Encoding and decoding method, code stream, encoder, decoder and storage medium
Patent Information
- Application Number
- CN202280102448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-07-15
AI Technical Summary
In the existing point cloud compression technology, the encoding method based on the context model brings great difficulty to the hardware implementation and reduces the hardware throughput. Especially when encoding the non-zero attribute quantization residual, all codewords after binarization Adopting this approach results in hardware inefficiency.
By determining the preset parameters corresponding to the attribute quantization residual value at the encoding and decoding ends, if certain conditions are met, the context-based model is used to encode/decode the first type of syntax elements, and the bypass model is used to encode/decode the second type of syntax elements. Encode/decode, limit the number of context model codewords used, and improve hardware throughput.
It improves the hardware throughput rate, reduces the difficulty of hardware implementation, and increases the processing speed.
Smart Images

Figure CN120323029A_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The present application relates to the field of point cloud encoding and decoding technology, and in particular to an encoding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art
[0002] In the Audio Video Standard-Point Cloud Compression (AVS-PCC) codec framework based on the Audio Video Coding Standard, the geometric and attribute information of a point cloud are encoded separately. For each point's attribute information, the attribute quantization residual of each point can be encoded / decoded sequentially in a pre-set order.
[0003] In related technologies, the Point Cloud Reference Model (PCRM) uses a context-based encoding / decoding method for all binarized codewords when encoding non-zero attribute quantization residuals, which brings great difficulties to hardware implementation and reduces hardware throughput.
[0004] Summary of the Invention
[0005] The present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can improve the hardware throughput.
[0006] The technical solution of this application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:
[0008] Determining preset parameters corresponding to attribute quantization residual values;
[0009] If the preset parameters meet the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information, and performing bypass model-based decoding processing on at least one second-category syntax element identification information, to determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information;
[0010] An attribute quantization residual value is determined according to a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0011] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0012] Determining an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value;
[0013] Determining, according to the attribute quantization residual value, a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information;
[0014] If the preset parameters meet the first preset condition, encoding processing is performed on the value of at least one first-category syntax element identification information based on the context model, and encoding processing is performed on the value of at least one second-category syntax element identification information based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0015] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0016] When the attribute information is a color component, the information to be encoded includes at least one of the following: a quantized residual value of a first color component, a quantized residual value of a second color component, a quantized residual value of a third color component, first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, tenth syntax element identification information, first numerical identification information, and second numerical identification information;
[0017] When the attribute information is reflectivity, the information to be encoded includes at least one of the following: a reflectivity quantized residual value, an eleventh grammatical element identification information, a twelfth grammatical element identification information, a thirteenth grammatical element identification information, a fourteenth grammatical element identification information, a fifteenth grammatical element identification information, a sixteenth grammatical element identification information, a seventeenth grammatical element identification information, an eighteenth grammatical element identification information, third numerical identification information, and fourth numerical identification information.
[0018] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and an encoding unit; wherein,
[0019] A first determining unit is configured to determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value; and determine a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information based on the attribute quantization residual value;
[0020] The encoding unit is configured to, if the preset parameters meet the first preset condition, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of at least one second-category syntax element identification information, and write the obtained encoded bits into the bitstream.
[0021] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,
[0022] a first memory for storing a computer program capable of running on the first processor;
[0023] The first processor is configured to execute the method according to the second aspect when running a computer program.
[0024] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second determining unit and a decoding unit; wherein,
[0025] A second determining unit is configured to determine a preset parameter corresponding to the attribute quantization residual value;
[0026] a decoding unit configured to, if the preset parameter meets the first preset condition, perform a context model-based decoding process on at least one first-category syntax element identification information, and perform a bypass model-based decoding process on at least one second-category syntax element identification information, and determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information;
[0027] The second determining unit is further configured to determine the attribute quantized residual value according to a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0028] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein,
[0029] a second memory for storing a computer program capable of running on the second processor;
[0030] The second processor is configured to execute the method according to the first aspect when running a computer program.
[0031] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in the first aspect or the method described in the second aspect.
[0032] The embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the encoding end, an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value are determined; based on the attribute quantization residual value, the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined; if the preset parameter meets a first preset condition, the value of the at least one first-category syntax element identification information is encoded based on a context model, and the value of the at least one second-category syntax element identification information is encoded based on a bypass model, and the resulting coded bits are written into the bitstream. At the decoding end, a preset parameter corresponding to the attribute quantization residual value is determined; if the preset parameter meets the first preset condition, the at least one first-category syntax element identification information is decoded based on a context model, and the at least one second-category syntax element identification information is decoded based on a bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined; and based on the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information, the attribute quantization residual value is determined. In this way, whether it is the encoding end or the decoding end, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used during encoding and decoding can be limited, so that some syntax element identification information is encoded and decoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; it can also improve the processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
[0034] FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
[0035] FIG2A is a schematic diagram of a point cloud image at different viewing angles provided by an embodiment of the present application;
[0036] FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application;
[0037] FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided by an embodiment of the present application;
[0038] FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;
[0039] FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;
[0040] FIG6 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;
[0041] FIG7 is a schematic diagram of a detailed flow chart of a decoding method provided in an embodiment of the present application;
[0042] FIG8 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0043] FIG9 is a schematic diagram of a detailed flow chart of an encoding method provided in an embodiment of the present application;
[0044] FIG10 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0045] FIG11 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0046] FIG12 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0047] FIG13 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0048] FIG14 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] 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.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0051] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be 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.
[0052] It should also be pointed out that the terms "first\second\third" involved 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 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 here can be implemented in an order other than that illustrated or described here.
[0053] Point cloud is a three-dimensional representation of the surface of an object. Point cloud (data) of the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.
[0054] A point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A shows a three-dimensional point cloud image and Figure 1B shows a partially enlarged view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
[0055] In a two-dimensional image, each pixel contains information and is distributed regularly, so there's no need to record its location. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so recording the location of each point in space is necessary to fully represent the point cloud. Similar to a two-dimensional image, each location in the acquisition process has corresponding attribute information, typically an RGB color value, which reflects the object's color. For a point cloud, in addition to color information, each point's attribute information often includes a reflectance value, which reflects the surface texture of the object. Therefore, a point in a point cloud can include both location information and attribute information. For example, the location information of a point can be its three-dimensional coordinates (x, y, z). The location information of a point can also be referred to as its geometric information. For example, the attribute information of a point can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r). For example, the color information can be information in any color space. For example, the color information can be RGB information, where R represents red (R), G represents green (G), and B represents blue (B). For another example, the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.
[0056] For example, a point cloud generated using laser measurement principles can include both its 3D coordinate information and its reflectivity. For another example, a point cloud generated using photogrammetry principles can include both its 3D coordinate information and its 3D color information. For another example, a point cloud generated using a combination of laser measurement and photogrammetry principles can include both its 3D coordinate information, its reflectivity value, and its 3D color information.
[0057] Figures 2A and 2B show a point cloud image and its corresponding data storage format. Figure 2A provides six viewing angles of the point cloud image, while Figure 2B consists of a file header and data. The header includes the data format, data representation type, the total number of points in the point cloud, and the content represented by the point cloud. For example, the point cloud is in ".ply" format, represented by ASCII code, with a total of 207,242 points. Each point has 3D coordinate information (x, y, z) and 3D color information (r, g, b).
[0058] Point clouds can be divided into the following categories according to the acquisition method:
[0059] Static point cloud: the object is stationary and the device that acquires the point cloud is also stationary;
[0060] Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;
[0061] Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.
[0062] For example, point clouds can be divided into two categories according to their usage:
[0063] 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 disaster relief robots;
[0064] Category 2: Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
[0065] 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, 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.
[0066] 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.
[0067] For example, taking a point cloud video with a frame rate of 30 frames per second (fps), each frame contains 700,000 points, and each point has coordinate information (xyz, float) and color information (RGB, uchar). 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. Where 1 byte is 10 bits, and the YUV sampling format is 4:2:0, and the frame rate is 24 fps, the data volume of a 1280 × 720 2D video is approximately 1280 × 720 × 12 bits × 24 fps × 10 seconds = 0.33 GB. The data volume of a 10-second two-view 3D video is approximately 0.33 × 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of 2D and 3D videos of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.
[0068] That is to say, since the point cloud is a collection of massive points, storing the point cloud not only consumes a lot of memory, but is also not conducive to transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.
[0069] Currently, the point cloud coding framework that can compress point clouds can be 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 can be used to compress the first type of static point clouds and the third type of dynamically acquired point clouds, and the V-PCC codec framework can be used to compress the second type of dynamic point clouds. 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.
[0070] The embodiment of the present application provides a network architecture of a point cloud encoding and decoding system including a decoding method and an encoding method. FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding system provided by the embodiment of the present application. As shown in FIG3 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with point cloud encoding and decoding functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application does not limit this.
[0071] Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device. In other words, the electronic device in the embodiment of the present application has point cloud encoding and decoding functions, generally including a point cloud encoder (i.e., encoder) and a point cloud decoder (i.e., decoder).
[0072] The following describes point cloud compression technology using the AVS-PCC encoding and decoding framework as an example.
[0073] As you can understand, point cloud compression generally uses a method that compresses point cloud geometry and attribute information separately. On the encoding side, the point cloud geometry is first encoded in the geometry encoder, and the reconstructed geometry is then input as additional information into the attribute encoder to assist in compressing the point cloud attributes. On the decoding side, the point cloud geometry is first decoded in the geometry decoder, and the decoded geometry is then input as additional information into the attribute decoder to assist in compressing the point cloud attributes. The entire codec consists of pre-processing / post-processing, geometry encoding / decoding, and attribute encoding / decoding.
[0074] The present embodiment provides a point cloud encoder. As shown in FIG4 , which is the framework of the point cloud compression reference platform PCRM provided by AVS, the point cloud encoder 11 includes a geometry encoder: a coordinate translation unit 111, a coordinate quantization unit 112, an octree construction unit 113, a geometry entropy encoder 114, and a geometry reconstruction unit 115. An attribute encoder: an attribute recoloring unit 116, a color space conversion unit 117, a first attribute prediction unit 118, a quantization unit 119, and an attribute entropy encoder 1110.
[0075] For PCRM, in the geometric coding part of the encoding end, the original geometric information is first preprocessed, and the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111. The geometric information is converted from floating point numbers to integers through the coordinate quantization unit 112 to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the octree structure is used in the octree construction unit 113 to recursively divide the point cloud space, each time dividing the current point into eight sub-blocks of the same size, and judging the occupancy codeword of each sub-block. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupancy codeword information of all blocks is recorded in the last layer of the recursive division and encoded; the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 to form a geometric code stream on the one hand, and is geometrically reconstructed in the geometric reconstruction unit 115 on the other hand. The reconstructed geometric information is input into the attribute encoder as additional information.
[0076] In the attribute encoding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reassigned to each point after geometric encoding through the attribute recoloring unit 116 to achieve attribute recoloring. In addition, if the processed attribute information is color information, the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space conversion unit 117; then, the preprocessed attribute information is attribute encoded through the first attribute prediction unit 118. 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 a single-point prediction based on the Morton order, that is, the Morton order is used to trace back one point from the current point to be encoded (current point), and the node 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 value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.
[0077] The present application also provides a point cloud decoder. FIG5 shows the framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122, a coordinate inverse quantization unit 123, and a coordinate inverse translation unit 124. An attribute decoder: an attribute entropy decoder 125, an inverse quantization unit 126, a second attribute prediction unit 127, and a color space inverse transformation unit 128.
[0078] On the decoding side, the same method of separate geometry and attribute decoding is used. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometric information of each node. Then, the octree structure is constructed by the octree reconstruction unit 122 in the same manner as the geometry encoding. Combined with the decoded geometry, the coordinate-transformed geometric information expressed by the octree structure is reconstructed. On the one hand, this information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometric information. On the other hand, it is input into the attribute decoder as additional information.
[0079] In the attribute decoding part, the Morton order is constructed in the same way as the encoding end. The attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then, it is dequantized by the dequantization unit 126 to obtain the attribute residual value; similarly, in the same way as the attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the second attribute prediction unit 127, and then the attribute prediction value is added to the attribute residual value to restore the attribute reconstruction value of the current point to be decoded (for example, the YUV attribute value); finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.
[0080] It can also be understood that for the AVS-PCC codec framework, the general test conditions are as follows:
[0081] (1) There are 4 test conditions:
[0082] Condition 1: The geometric position is limited and the attributes are lost;
[0083] Condition 2: Geometric position lossless, attribute lossy;
[0084] Condition 3: Geometric position lossless, attribute loss limited;
[0085] Condition 4: Geometric position and attributes are lossless.
[0086] (2) The general test sequence includes five categories: Cat1A, Cat1B, Cat1C, Cat2-frame and Cat3. Among them, Cat1A and Cat2-frame point clouds only contain reflectivity attribute information, Cat1B and Cat3 point clouds only contain color attribute information, and Cat1C point cloud contains both color and reflectivity attribute information.
[0087] (3) Technical routes: There are two types, which are distinguished by the algorithm used for attribute compression.
[0088] Technical Route 1: Prediction branch, attribute compression adopts prediction-based method;
[0089] Technical route 2: Transformation branch. Attribute compression adopts a transformation-based method, which includes two transformation algorithms: wavelet transform algorithm and k-ary discrete cosine transform (DCT) algorithm.
[0090] In the related art, the current AVS-PCC uses the same order (for example, the original acquisition order of the point cloud, Morton bidirectional, Hilbert order, etc.) for attribute quantization residuals to encode / decode the attribute quantization residuals of each point in turn.
[0091] However, the current PCRM uses context-based encoding / decoding for all binarized codewords when encoding non-zero attribute quantization residuals. This makes hardware implementation quite challenging. This is because hardware can typically process four to six bypass-model-encoded binary codewords (bins) in a single clock cycle, but only one context-model-encoded bin. From a hardware throughput perspective, if the context model is fully used to encode all bins, hardware throughput efficiency will be relatively low.
[0092] Based on this, an embodiment of the present application provides a coding and decoding method, whether it is the encoding end or the decoding end, first determine the preset parameters corresponding to the attribute quantization residual value, and then judge whether the preset parameters meet the first preset conditions; if the preset parameters meet the first preset conditions, then at least one first-category syntax element identification information is coded and decoded based on the context model, and at least one second-category syntax element identification information is coded and decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during coding and decoding can be limited, so that part of the syntax element identification information is coded and decoded using the bypass model, thereby improving the hardware throughput, reducing the difficulty of hardware implementation, and facilitating hardware implementation; and it can also improve the processing speed.
[0093] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0094] In one embodiment of the present application, referring to FIG6 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:
[0095] S601: Determine preset parameters corresponding to attribute quantization residual values.
[0096] It should be noted that the decoding method of the embodiment of the present application is applied to a decoder. In addition, the decoding method can specifically refer to an attribute quantization residual decoding method; more specifically, it refers to an attribute quantization residual decoding method that limits the number of codewords based on the context model to improve hardware throughput.
[0097] It should also be noted that in the embodiments of the present application, the attribute information of the point cloud may refer to a color component, a reflectivity, or even other attributes. Therefore, in some embodiments, the attribute quantization residual value may include one of the following: a color component quantization residual value and a reflectivity quantization residual value.
[0098] In the embodiment of the present application, for the color component quantization residual value, the color component quantization residual value may include: the quantization residual value of the first color component, the quantization residual value of the second color component, and the quantization residual value of the third color component. In other words, according to the decoding method of the embodiment of the present application, any one of the following items can be decoded: the quantization residual value of the first color component, the quantization residual value of the second color component, the quantization residual value of the third color component, and the reflectance quantization residual value.
[0099] The first color component, the second color component, and the third color component may be in RGB format, or in YUV format, or even in other formats. Furthermore, the order of the three color components, taking YUV as an example, may be in YUV order, UYV order, UVY order, or even VYU order, etc. In other words, the format and order of the color components are not specifically limited here.
[0100] It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, where the preset parameter is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value. For example, the value of the preset parameter can be set to 2 24 , but is not specifically limited.
[0101] In embodiments of the present application, the preset parameter can be a pre-set parameter value or determined via a bitstream. Therefore, in some embodiments, determining the preset parameter corresponding to the attribute quantization residual value can include decoding the bitstream and determining the preset parameter corresponding to the attribute quantization residual value. In other words, the encoder can write the value of the preset parameter into the bitstream, and the decoder can then obtain the value of the preset parameter by decoding the bitstream.
[0102] In this way, before the attribute quantization residual value decoding begins, it is necessary to first determine the value of the preset parameter, and then judge whether the preset parameter meets the first preset condition, thereby limiting the number of codewords based on the context model used during decoding and improving the hardware throughput.
[0103] S602: If the preset parameters meet the first preset conditions, at least one first-category syntax element identification information is decoded based on the context model, and at least one second-category syntax element identification information is decoded based on the bypass model to determine the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information.
[0104] It should be noted that, in the embodiment of the present application, the preset parameter meeting the first preset condition may include: determining that the value of the preset parameter is greater than or equal to a preset threshold value. The preset threshold value may be a judgment value pre-set based on the hardware configuration. For example, the preset threshold value may be set to 3, 8, 14, or even other values, which are not specifically limited here.
[0105] It should also be noted that, in an embodiment of the present application, if the preset parameters do not meet the first preset conditions, then in some embodiments, the method may further include: if the preset parameters meet the second preset conditions, performing bypass model-based decoding processing on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and determining the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information.
[0106] It should be noted that, in the embodiment of the present application, the preset parameter meets the second preset condition, which may include: determining that the preset parameter does not meet the first preset condition; or determining that the value of the preset parameter is less than a preset threshold value.
[0107] It should also be noted that in the embodiment of the present application, since the hardware can usually process 4 to 6 codewords decoded based on the bypass model in one clock cycle, but can only process 1 codeword decoded based on the context model; taking into account the hardware throughput, the decoding method proposed in the embodiment of the present application can avoid the situation where all codewords are decoded based on the context model.
[0108] Specifically, if the value of the preset parameter is greater than or equal to a preset threshold value, then a portion of the syntax elements (such as at least one first-category syntax element identification information) may be decoded based on the context model, and another portion of the syntax elements (such as at least one second-category syntax element identification information) may be decoded based on the bypass model; if the value of the preset parameter is less than the preset threshold value, then all syntax elements (such as at least one first-category syntax element identification information and at least one second-category syntax element identification information) may be decoded based on the bypass model.
[0109] In some embodiments, when the preset parameter meets the first preset condition, the method may further include: for at least one first-category syntax element identification information, after each first-category syntax element identification information is decoded based on the context model, performing a subtraction operation on the value of the preset parameter.
[0110] That is to say, in an embodiment of the present application, for at least one first-category syntax element identification information that may appear, a context model-based decoding method is used, and each time a first-category syntax element identification information is decoded, a --remBinsPass1 operation needs to be performed.
[0111] S603: Determine an attribute quantized residual value according to a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0112] It should be noted that in an embodiment of the present application, after decoding the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information, the attribute quantization residual value can be determined based on the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information.
[0113] It should also be noted that in the embodiments of the present application, in some cases, for example, when the attribute quantization residual value is less than a preset threshold, the attribute quantization residual value can be determined only by the value of at least one first-category syntax element identification information. In some embodiments, the method may further include:
[0114] If the preset parameters meet the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information to determine a value of the at least one first-category syntax element identification information; and determining an attribute quantization residual value based on the value of the at least one first-category syntax element identification information; or
[0115] If the preset parameters meet the second preset condition, the at least one first-category syntax element identification information is decoded based on the bypass model to determine the value of the at least one first-category syntax element identification information; and the attribute quantization residual value is determined based on the value of the at least one first-category syntax element identification information.
[0116] That is to say, in some cases, based on the value of at least one first-category syntax element identification information, it is possible to determine whether the attribute quantization residual value is equal to 0, or whether the attribute quantization residual value is equal to 1, or whether the attribute quantization residual value is equal to 2, or whether the quotient of the attribute quantization residual value minus a preset constant and then divided by 2 is equal to 0, equal to 1, and so on, thereby determining the attribute quantization residual value.
[0117] This embodiment provides a decoding method for determining a preset parameter corresponding to an attribute quantization residual value; if the preset parameter meets a first preset condition, decoding processing is performed on at least one first-category syntax element identification information based on a context model, and decoding processing is performed on at least one second-category syntax element identification information based on a bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined; and the attribute quantization residual value is determined based on the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information. In this way, after determining the preset parameter corresponding to the attribute quantization residual value, the number of codewords based on the context model used during decoding can be limited, so that some syntax element identification information is decoded using the bypass model, thereby improving hardware throughput, reducing the difficulty of hardware implementation, and also improving processing speed.
[0118] In another embodiment of the present application, based on the decoding method described in the above embodiment, see Figure 7, which shows a detailed flowchart of a decoding method provided by an embodiment of the present application. As shown in Figure 7, the method may include:
[0119] S701: Determine preset parameters corresponding to attribute quantization residual values.
[0120] S702: Determine whether the preset parameter is greater than or equal to a preset threshold.
[0121] S703: If the preset parameter is greater than or equal to the preset threshold value, decoding and processing is performed on at least one possible first-category syntax element identification information based on the context model, and decoding and processing is performed on at least one possible second-category syntax element identification information based on the bypass model, and the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined.
[0122] S704: If the preset parameter is less than the preset threshold value, decoding processing is performed on at least one first-category syntax element identification information and at least one second-category syntax element identification information that may appear based on the bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined.
[0123] S705: Determine an attribute quantization residual value according to a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0124] It should be noted that in the embodiment of the present application, the decoding end can use the same order (original point cloud acquisition order, Morton order, Hilbert order, etc.) to decode the quantized residual value of each node's attribute (color component, reflectivity, etc.) in turn.
[0125] In one possible implementation, when the attribute information is a color component, if the quantization residual values of the three color components are not all zero, it is necessary to sequentially determine the quantization residual value of the first color component, the quantization residual value of the second color component, and the quantization residual value of the third color component. In this case, when the attribute quantization residual value is a color component quantization residual value, the at least one first-category syntax element identification information may include at least one of the following: first syntax element identification information and second syntax element identification information.
[0126] Among them, the first syntax element identification information can be represented by color_first_comp_zero, which is used to indicate whether the quantized residual value of the first color component is equal to 0; the second syntax element identification information can be represented by color_second_comp_zero, which is used to indicate whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0.
[0127] In some embodiments, the method may further include:
[0128] Decoding the first syntax element identification information based on the target model to determine a value of the first syntax element identification information;
[0129] If the value of the first syntax element identification information is the first value, determining that the quantized residual value of the first color component is equal to 0, and decoding the second syntax element identification information based on the target model to determine the value of the second syntax element identification information;
[0130] If the value of the first syntax element identification information is the second value, the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component are decoded respectively;
[0131] If the value of the second syntax element identification information is the first value, determining that the quantized residual value of the second color component is equal to 0, and decoding the quantized residual value of the third color component;
[0132] If the value of the second syntax element identification information is the second value, decoding the quantized residual value of the second color component and the quantized residual value of the third color component respectively;
[0133] If the preset parameters meet the first preset condition, the context model is determined as the target model; if the preset parameters meet the second preset condition, the bypass model is determined as the target model.
[0134] That is to say, if the preset parameters meet the first preset conditions, then the first syntax element identification information and the second syntax element identification information that may appear are decoded based on the context model; if the preset parameters meet the second preset conditions, then the first syntax element identification information and the second syntax element identification information that may appear are decoded based on the bypass model.
[0135] It should also be noted that in the embodiments of the present application, for different syntax element identification information, such as the first syntax element identification information and the second syntax element identification information, the corresponding first value and second value can be the same or different, and this is not specifically limited here. In addition, in the embodiments of the present application, the first value and the second value can be in the form of parameters or in the form of numbers. Specifically, each syntax element identification information can be a parameter written in the profile, or it can be the value of a flag / identifier, and this is not specifically limited here.
[0136] For example, the first value may be set to 1 and the second value may be set to 0; or the first value may be set to 0 and the second value may be set to 1; or the first value may be set to true and the second value may be set to false; or the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value may be set to 1 and the second value may be set to 0, but this is not specifically limited.
[0137] In this way, the first syntax element identification information is first decoded. If the value of the first syntax element identification information is 1, it means that the quantized residual value of the first color component is equal to 0. Then the second syntax element identification information is decoded. If the value of the second syntax element identification information is 1, it means that the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0. Then the quantized residual value of the third color component needs to be decoded. Moreover, since the quantized residual value of the first color component and the quantized residual value of the second color component are both 0, the quantized residual value of the third color component must be non-zero at this time. Otherwise, if the value of the first syntax element identification information is 0, then the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component need to be decoded separately. If the value of the second syntax element identification information is 0, then the quantized residual value of the second color component and the quantized residual value of the third color component need to be decoded separately.
[0138] It is understandable that when the attribute quantization residual value is a color component quantization residual value, considering that there are quantization residual values of three color components, namely, the first color component, the second color component, and the third color component, it can be represented here by a first value to be decoded. Therefore, in some embodiments, the method may further include: setting a first value to be decoded; wherein the first value to be decoded includes one of the following: the absolute value of the quantization residual value of the first color component, the absolute value of the quantization residual value of the second color component, the absolute value of the quantization residual value of the third color component, the absolute value of the quantization residual value of the first color component minus one, the absolute value of the quantization residual value of the second color component minus one, and the absolute value of the quantization residual value of the third color component minus one.
[0139] It should be noted that when decoding the quantized residual value of each color component based on at least one first-category syntax element identification information and at least one second-category syntax element identification information, the absolute value of the quantized residual value and the positive and negative sign identification information are usually decoded separately; then, based on the positive and negative sign identification information and the absolute value of the quantized residual value, the quantized residual value of each color component can be determined.
[0140] It should also be noted that if the second syntax element identification information indicates that the quantized residual value of the first color component and the quantized residual value of the second color component are both 0, then the quantized residual value of the third color component must be non-zero; in order to save bit rate, the absolute value of the quantized residual value can be subtracted by one at this time, and then used as the first value to be decoded.
[0141] In the embodiments of the present application, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are not specifically limited. In some embodiments, in addition to the first syntax element identification information and the second syntax element identification information, the at least one first-category syntax element identification information may further include at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information; and the at least one second-category syntax element identification information includes at least first numerical identification information.
[0142] Among them, the third syntax element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 0, and the first numerical value identification information is used to indicate the second numerical value obtained after the second operation on the first value to be decoded.
[0143] In some embodiments, performing a first operation on the first value to be decoded may include: performing a subtraction operation on the first value to be decoded and a first preset value to obtain a first intermediate value; right-shifting the first intermediate value by one position to obtain a first numerical value; or setting the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
[0144] In some embodiments, performing a second operation on the first value to be decoded may include: performing a subtraction operation on the first value to be decoded and a second preset value to obtain a second intermediate value; right-shifting the second intermediate value by one position to obtain a second numerical value; or setting the second numerical value to be equal to the quotient of the second intermediate value divided by 2.
[0145] It should be noted that in the embodiments of the present application, for division operations, right shift operations can be used instead, “>>” represents the right shift operator; “divide by 2” is equivalent to shifting one bit right; for multiplication operations, left shift operations can be used instead, “<<” represents the left shift operator; “multiply by 2” is equivalent to shifting one bit left.
[0146] It should also be noted that, in the embodiment of the present application, the first preset value and the second preset value may be different. For example, the first preset value may be set to 2, and the second preset value may be set to 4. In addition, the third syntax element identification information may be represented by color_level_equal_zero, the fourth syntax element identification information may be represented by color_level_equal_one, the fifth syntax element identification information may be represented by color_level_parity, the sixth syntax element identification information may be represented by color_level_minus2_div2_eq0, and the first numerical identification information may be represented by color_level_minus4_div2.
[0147] It should also be noted that, in the embodiment of the present application, since there are quantized residual values of the first color component, the quantized residual values of the second color component, and the quantized residual values of the third color component, in addition to the first syntax element identification information and the second syntax element identification information being one, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, and the sixth syntax element identification information correspond to three respectively; that is, the embodiment of the present application may include: one first syntax element identification information, one second syntax element identification information, three third syntax element identification information, three fourth syntax element identification information, three fifth syntax element identification information, and three sixth syntax element identification information.
[0148] In some embodiments, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include: decoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information and the sixth syntax element identification information based on the context model to determine the value of at least one first-category syntax element identification information; and decoding the first numerical identification information that may appear based on the bypass model to determine the value of the first numerical identification information; and determining the first value to be decoded based on the value of at least one first-category syntax element identification information and the value of the first numerical identification information.
[0149] In a specific embodiment, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include:
[0150] Decoding the third syntax element identification information based on a context model to determine a value of the third syntax element identification information;
[0151] If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0;
[0152] If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the context model to determine the value of the fourth syntax element identification information;
[0153] If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1;
[0154] If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the context model to determine the value of the sixth syntax element identification information;
[0155] If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information;
[0156] If the value of the sixth syntax element identification information is the second value, decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information;
[0157] The first to-be-decoded value is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical identification information.
[0158] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0159] first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information.
[0160] In other embodiments, when the preset parameters meet the second preset condition, decoding the first value to be decoded may include: decoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, and the first numerical value identification information based on a bypass model to determine the first value to be decoded. In other words, if the preset parameters meet the second preset condition, decoding is performed using the bypass model on all binarized codewords corresponding to the first value to be decoded.
[0161] In a specific embodiment, when the preset parameter meets the second preset condition, decoding the first value to be decoded may include:
[0162] Decoding the third syntax element identification information based on the bypass model to determine a value of the third syntax element identification information;
[0163] If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0;
[0164] If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the bypass model to determine the value of the fourth syntax element identification information;
[0165] If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1;
[0166] If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the bypass model to determine the value of the sixth syntax element identification information;
[0167] If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information;
[0168] If the value of the sixth syntax element identification information is the second value, decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information;
[0169] A first value to be decoded is determined according to the second preset value, the value of the fifth syntax element identification information, and the value of the first numerical value identification information.
[0170] It should be noted that in the embodiment of the present application, for different syntax element identification information, such as the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, and the sixth syntax element identification information, the first value and the second value corresponding to each of them may be the same or different, and are not specifically limited here. In addition, in the embodiment of the present application, the first value and the second value may be in parameter form or in digital form. Specifically, each syntax element identification information may be a parameter written in the profile or the value of a flag / identifier, and are not specifically limited here.
[0171] For example, the first value may be set to 1 and the second value may be set to 0; or the first value may be set to 0 and the second value may be set to 1; or the first value may be set to true and the second value may be set to false; or the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0172] In this way, taking the first preset value of 2 as an example, the third grammatical element identification information is first decoded. If the value of the third grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 0; otherwise, if the value of the third grammatical element identification information is 0, it means that the first value to be decoded is not equal to 0, then it is necessary to continue decoding the fourth grammatical element identification information. If the value of the fourth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 1; otherwise, if the value of the fourth grammatical element identification information is 0, it means that the first value to be decoded is not equal to 1, then it is necessary to continue decoding the fifth grammatical element identification information and the sixth grammatical element identification information. If the value of the sixth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 2+color_level_parity; otherwise, if the value of the sixth grammatical element identification information is 0, then it is necessary to continue decoding the first numerical identification information to determine the first value to be decoded.
[0173] In some embodiments, for the first numerical identification information, decoding the first numerical identification information based on a bypass model to determine the value of the first numerical identification information may include: decoding the first numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the first numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the first numerical identification information.
[0174] For example, taking the second-order exponential Golomb decoding as an example, the codeword corresponding to the first numerical identification information is decoded based on the bypass model to obtain a set of binary symbols 011. Then, after the debinarization process, the value of the first numerical identification information is 3.
[0175] It should also be noted that, in the embodiment of the present application, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded. In some embodiments, for the value of the fifth syntax element identification information, the method may further include: if the value of the fifth syntax element identification information is a first value, determining that the first value to be decoded is an odd number; if the value of the fifth syntax element identification information is a second value, determining that the first value to be decoded is an even number;
[0176] Alternatively, if the value of the fifth syntax element identification information is the first value, it is determined that the remainder after the first value to be decoded is divided by 2 is 1; if the value of the fifth syntax element identification information is the second value, it is determined that the remainder after the first value to be decoded is divided by 2 is 0.
[0177] In short, in this embodiment of the present application, taking the example of the first value being set to 1 and the second value being set to 0, for the first value to be decoded, if the first value to be decoded is an odd number, then 1 needs to be added during the calculation; if the first value to be decoded is an even number, then 0 needs to be added during the calculation. In other words, the first value to be decoded is determined based on the second preset value, the value of the fifth syntax element identification information, and the value of the first value identification information.
[0178] Further, in some embodiments, determining the first value to be decoded based on the second preset value, the value of the fifth syntax element identification information, and the value of the first numerical identification information may include: performing an eighth operation on the value of the first numerical identification information to obtain an eighth numerical value; and determining the first value to be decoded based on the second preset value, the eighth numerical value, and the value of the fifth syntax element identification information.
[0179] It should also be noted that, in the embodiment of the present application, performing the eighth operation on the value of the first numerical identification information to obtain the eighth numerical value may include: multiplying the value of the first numerical identification information by 2 to obtain the eighth numerical value; or performing a left shift operation on the value of the first numerical identification information by one position to obtain the eighth numerical value.
[0180] Further, in some embodiments, determining the first value to be decoded based on the second preset value, the eighth numerical value, and the values of the fifth syntax element identification information may include: performing an addition operation on the second preset value, the eighth numerical value, and the values of the fifth syntax element identification information to obtain the first value to be decoded.
[0181] Exemplarily, assuming that the second preset value is set to 4, the fifth syntax element identification information is represented by color_level_parity, and the first numerical identification information is represented by color_level_minus4_div2; then, the first value to be decoded is (4+color_level_parity+(color_level_minus4_div2<<1)).
[0182] It can be understood that when the attribute information is a color component, the specific implementation steps for the quantized residual values of the three color components are as follows:
[0183] a) decoding color_first_comp_zero; if the decoded value of the color_first_comp_zero flag is equal to 1, the quantized residual value of the first color component is 0, and the process proceeds to step b); otherwise, the quantized residual value of the first color component is decoded, and the process proceeds to step c);
[0184] b) decoding color_second_comp_zero. If the decoded value of the color_second_comp_zero flag is equal to 1, the quantized residual value of the second color component is 0, and then the quantized residual value of the third color component is decoded, and the decoding ends; otherwise, proceeding to step c);
[0185] c) Decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively, and the decoding ends.
[0186] The decoding steps of the quantized residual value of each color component are as follows:
[0187] First, set the first value to be decoded, which can be the absolute value of the color quantization residual value or the absolute value of the color quantization residual value minus one. It should be noted that, as in step b) above, the quantization residual value of the third color component, since the previous flag bit has already indicated that the quantization residual value of the first color component and the quantization residual value of the second color component are both 0, the quantization residual value of the third color component must be non-zero at this time, so the subtraction operation can be performed first. In this way, the decoding process for the first value to be decoded is specifically implemented as follows:
[0188] a) decoding color_level_equal_zero. If the decoded value of the color_level_equal_zero flag is equal to 1, the first value to be decoded is 0 and the decoding is complete. Otherwise, proceed to step b);
[0189] b) decoding color_level_equal_one. If the decoded value of the color_level_equal_one flag is equal to 1, the first value to be decoded is 1 and decoding is complete. Otherwise, proceed to step c);
[0190] c) decoding color_level_parity and color_level_minus2_div2_eq0. If the decoded value of the color_level_minus2_div2_eq0 flag is equal to 1, the first value to be decoded is (2+color_level_parity), and decoding is complete. Otherwise, proceed to step d);
[0191] d) Decode color_level_minus4_div2, then the first value to be decoded is (4+color_level_parity+(color_level_minus4_div2<<1)), and decoding is completed.
[0192] In the related art, when decoding non-zero attribute quantization residual values, PCRM currently uses a context model-based decoding method for all binary codewords, which will bring great difficulties to hardware implementation. Based on this, in the embodiment of the present application, the decoding process can be as follows:
[0193] a) Allocate the budget remBinsPass1 based on the context model decoding codeword for the color quantization residual value (the initial value can be set to 2 24 );
[0194] b) Before decoding the color quantization residual value, determine whether remBinsPass1 is greater than or equal to T (such as set to 14);
[0195] c) When remBinsPass1 ≥ T, a context model-based decoding method is used for one color_first_comp_zero, one color_second_comp_zero, three color_level_equal_zero, three color_level_equal_one, three color_level_parity, and three color_level_minus2_div2_eq0 that may appear, and a remBinsPass1-- operation is performed each time a flag bit / flag is decoded; and all binarized codewords of color_level_minus4_div2 are decoded using a bypass model-based decoding method;
[0196] d) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is used for all binarized codewords of the color quantization residual values.
[0197] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 1 and Table 2.
[0198] Table 1
[0199]
[0200]
[0201] Table 2
[0202]
[0203] In another possible implementation, when the attribute information is still a color component, in addition to the first syntax element identification information and the second syntax element identification information, at least one first-category syntax element identification information may also include at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information and tenth syntax element identification information; and at least one second-category syntax element identification information includes at least: second numerical identification information.
[0204] Among them, the third syntax element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 0, the seventh syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 1, the eighth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 2, the ninth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 3, the tenth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 4, and the second numerical value identification information is used to indicate the third numerical value obtained after the third operation on the first value to be decoded.
[0205] In some embodiments, performing a first operation on the first value to be decoded may include: performing a subtraction operation on the first value to be decoded and a first preset value to obtain a first intermediate value; right-shifting the first intermediate value by one position to obtain a first numerical value; or setting the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
[0206] In some embodiments, performing a third operation on the first value to be decoded may include: performing a subtraction operation on the first value to be decoded and a third preset value to obtain a third intermediate value; right-shifting the third intermediate value by one position to obtain a third numerical value; or setting the third numerical value to be equal to the quotient of the third intermediate value divided by 2.
[0207] In an embodiment of the present application, the first preset value and the third preset value may be different. For example, the first preset value may be set to 2, and the third preset value may be set to 12. In addition, the third syntax element identification information may be represented by color_level_equal_zero, the fourth syntax element identification information may be represented by color_level_equal_one, the fifth syntax element identification information may be represented by color_level_parity, the sixth syntax element identification information may be represented by color_level_minus2_div2_eq0, the seventh syntax element identification information may be represented by color_level_minus2_div2_eq1, the eighth syntax element identification information may be represented by color_level_minus2_div2_eq2, the ninth syntax element identification information may be represented by color_level_minus2_div2_eq3, the tenth syntax element identification information may be represented by color_level_minus2_div2_eq4, and the second value identification information may be represented by color_level_minus12_div2.
[0208] It should also be noted that, in the embodiment of the present application, since there are quantized residual values of the first color component, the quantized residual values of the second color component and the quantized residual values of the third color component, in addition to the first syntax element identification information and the second syntax element identification information being one, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information and the tenth syntax element identification information correspond to three respectively; that is, the embodiment of the present application may include: one first syntax element identification information, one second syntax element identification information, three third syntax element identification information, three fourth syntax element identification information, three fifth syntax element identification information, three sixth syntax element identification information, three seventh syntax element identification information, three eighth syntax element identification information, three ninth syntax element identification information and three tenth syntax element identification information.
[0209] In some embodiments, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include: decoding the first grammatical element identification information, the second grammatical element identification information, the third grammatical element identification information, the fourth grammatical element identification information, the fifth grammatical element identification information, the sixth grammatical element identification information, the seventh grammatical element identification information, the eighth grammatical element identification information, the ninth grammatical element identification information and the tenth grammatical element identification information based on the context model to determine the value of at least one first-category grammatical element identification information; and decoding the second numerical identification information that may appear based on the bypass model to determine the value of the second numerical identification information; and determining the first value to be decoded based on the value of at least one first-category grammatical element identification information and the value of the second numerical identification information.
[0210] In a specific embodiment, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include:
[0211] Decoding the third syntax element identification information based on the context model to determine a value of the third syntax element identification information;
[0212] If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0;
[0213] If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the context model to determine the value of the fourth syntax element identification information;
[0214] If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1;
[0215] If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the context model to determine the value of the sixth syntax element identification information;
[0216] If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information;
[0217] If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the context model to determine the value of the seventh syntax element identification information;
[0218] If the value of the seventh syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first constant, the first preset value, and the fifth syntax element identification information;
[0219] If the value of the seventh syntax element identification information is the second value, decoding the eighth syntax element identification information based on the context model to determine the value of the eighth syntax element identification information;
[0220] If the value of the eighth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the second constant, the first preset value, and the fifth syntax element identification information;
[0221] If the value of the eighth syntax element identification information is the second value, decoding the ninth syntax element identification information based on the context model to determine the value of the ninth syntax element identification information;
[0222] If the value of the ninth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the third constant, the first preset value, and the fifth syntax element identification information;
[0223] If the value of the ninth syntax element identification information is the second value, decoding the tenth syntax element identification information based on the context model to determine the value of the tenth syntax element identification information;
[0224] If the value of the tenth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the fourth constant, the first preset value, and the fifth syntax element identification information;
[0225] If the value of the tenth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information;
[0226] A first to-be-decoded value is determined according to the third preset value, the value of the fifth syntax element identification information, and the value of the second numerical value identification information.
[0227] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0228] First grammatical element identification information, second grammatical element identification information, third grammatical element identification information, fourth grammatical element identification information, fifth grammatical element identification information, sixth grammatical element identification information, seventh grammatical element identification information, eighth grammatical element identification information, ninth grammatical element identification information, and tenth grammatical element identification information.
[0229] In other embodiments, when the preset parameters meet the second preset condition, decoding the first value to be decoded may include: decoding the possible first grammatical element identification information, second grammatical element identification information, third grammatical element identification information, fourth grammatical element identification information, fifth grammatical element identification information, sixth grammatical element identification information, seventh grammatical element identification information, eighth grammatical element identification information, ninth grammatical element identification information, tenth grammatical element identification information and second numerical identification information based on a bypass model to determine the first value to be decoded.
[0230] In a specific embodiment, when the preset parameter meets the second preset condition, decoding the first value to be decoded may include:
[0231] Decoding the third syntax element identification information based on the bypass model to determine a value of the third syntax element identification information;
[0232] If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0;
[0233] If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the bypass model to determine the value of the fourth syntax element identification information;
[0234] If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1;
[0235] If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the bypass model to determine the value of the sixth syntax element identification information;
[0236] If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information;
[0237] If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the bypass model to determine the value of the seventh syntax element identification information;
[0238] If the value of the seventh syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first constant, the first preset value, and the fifth syntax element identification information;
[0239] If the value of the seventh syntax element identification information is the second value, decoding the eighth syntax element identification information based on the bypass model to determine the value of the eighth syntax element identification information;
[0240] If the value of the eighth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the second constant, the first preset value, and the fifth syntax element identification information;
[0241] If the value of the eighth syntax element identification information is the second value, decoding the ninth syntax element identification information based on the bypass model to determine the value of the ninth syntax element identification information;
[0242] If the value of the ninth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the third constant, the first preset value, and the fifth syntax element identification information;
[0243] If the value of the ninth syntax element identification information is the second value, decoding the tenth syntax element identification information based on the bypass model to determine the value of the tenth syntax element identification information;
[0244] If the value of the tenth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the fourth constant, the first preset value, and the fifth syntax element identification information;
[0245] If the value of the tenth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information;
[0246] A first to-be-decoded value is determined according to the third preset value, the value of the fifth syntax element identification information, and the value of the second numerical value identification information.
[0247] In the embodiment of the present application, the first constant, the second constant, the third constant, and the fourth constant are all multiples of 2. For example, the first constant is set to 2, the second constant is set to 4, the third constant is set to 6, and the fourth constant is set to 8.
[0248] It should be noted that in the embodiment of the present application, for different syntax element identification information, such as the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information, and the tenth syntax element identification information, the first value and the second value corresponding to each other may be the same or different, and are not specifically limited here. In addition, in the embodiment of the present application, the first value and the second value may be in parameter form or in digital form. Specifically, each syntax element identification information may be a parameter written in the profile or the value of a flag / identifier, and are not specifically limited here.
[0249] For example, for each syntax element identification information, the first value may be set to 1 and the second value may be set to 0; or, the first value may be set to 0 and the second value may be set to 1; or, the first value may be set to true and the second value may be set to false; or, the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0250] In this way, taking the first preset value of 2 as an example, the third grammatical element identification information is first decoded. If the value of the third grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 0; otherwise, if the value of the third grammatical element identification information is 0, it means that the first value to be decoded is not equal to 0, then it is necessary to continue decoding the fourth grammatical element identification information. If the value of the fourth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 1; otherwise, if the value of the fourth grammatical element identification information is 0, it means that the first value to be decoded is not equal to 1, then it is necessary to continue decoding the fifth grammatical element identification information and the sixth grammatical element identification information. If the value of the sixth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 2+color_level_parity; otherwise, if the value of the sixth grammatical element identification information is 0, then it is necessary to continue decoding the seventh grammatical element identification information. If the value of the seventh grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 4+co lor_level_parity; otherwise, if the value of the seventh grammatical element identification information is 0, then it is necessary to continue decoding the eighth grammatical element identification information, if the value of the eighth grammatical element identification information is 2, then it can be determined that the first value to be decoded is equal to 6+color_level_parity; otherwise, if the value of the eighth grammatical element identification information is 0, then it is necessary to continue decoding the ninth grammatical element identification information, if the value of the ninth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 8+color_level_parity; otherwise, if the value of the ninth grammatical element identification information is 0, then it is necessary to continue decoding the tenth grammatical element identification information, if the value of the tenth grammatical element identification information is 1, then it can be determined that the first value to be decoded is equal to 10+color_level_parity; otherwise, if the value of the tenth grammatical element identification information is 0, then it is necessary to continue decoding the second numerical identification information to determine the first value to be decoded.
[0251] In some embodiments, for the second numerical identification information, decoding the second numerical identification information based on a bypass model to determine the value of the second numerical identification information may include: decoding the second numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the second numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the second numerical identification information.
[0252] Further, in some embodiments, determining the first value to be decoded based on the third preset value, the value of the fifth syntax element identification information, and the value of the second numerical identification information may include: performing a ninth operation on the value of the second numerical identification information to obtain a ninth numerical value; and determining the first value to be decoded based on the third preset value, the ninth numerical value, and the value of the fifth syntax element identification information.
[0253] It should also be noted that, in the embodiment of the present application, performing a ninth operation on the value of the second numerical identification information to obtain a ninth numerical value may include: multiplying the value of the second numerical identification information by 2 to obtain the ninth numerical value; or performing a left shift operation on the value of the second numerical identification information by one position to obtain the ninth numerical value.
[0254] Further, in some embodiments, determining the first value to be decoded based on the values of the third preset value, the ninth value, and the fifth syntax element identification information may include: performing an addition operation on the third preset value, the ninth value, and the values of the fifth syntax element identification information to obtain the first value to be decoded.
[0255] Exemplarily, assuming that the third preset value is set to 12, the fifth syntax element identification information is represented by color_level_parity, and the second numerical identification information is represented by color_level_minus12_div2; then, the first value to be decoded is (12+color_level_parity+(color_level_minus12_div2<<1)).
[0256] It can be understood that when the attribute information is a color component, the specific implementation steps for the quantized residual values of the three color components are as follows:
[0257] a) decoding color_first_comp_zero; if the decoded value of the color_first_comp_zero flag is equal to 1, the quantized residual value of the first color component is 0, and the process proceeds to step b); otherwise, the quantized residual value of the first color component is decoded, and the process proceeds to step c);
[0258] b) decoding color_second_comp_zero. If the decoded value of the color_second_comp_zero flag is equal to 1, the quantized residual value of the second color component is 0, and then the quantized residual value of the third color component is decoded, and the decoding ends; otherwise, proceeding to step c);
[0259] c) Decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively, and the decoding ends.
[0260] In addition, the decoding steps of the first value to be decoded (ie, the quantized residual value of each color component) are as follows:
[0261] a) decoding color_level_equal_zero. If the decoded value of the color_level_equal_zero flag is equal to 1, the first value to be decoded is 0 and the decoding is complete. Otherwise, proceed to step b);
[0262] b) decoding color_level_equal_one. If the decoded value of the color_level_equal_one flag is equal to 1, the first value to be decoded is 1 and decoding is complete. Otherwise, proceed to step c);
[0263] c) decoding color_level_parity and color_level_minus2_div2_eq0. If the decoded value of the color_level_minus2_div2_eq0 flag is equal to 1, the first value to be decoded is (2+color_level_parity), and decoding is complete. Otherwise, proceed to step d);
[0264] d) decoding color_level_minus2_div2_eq1. If the decoded value of the color_level_minus2_div2_eq1 flag is equal to 1, the first value to be decoded is (4+color_level_parity), and decoding is complete. Otherwise, proceed to step e);
[0265] e) decoding color_level_minus2_div2_eq2. If the decoded value of the color_level_minus2_div2_eq2 flag is equal to 1, the first value to be decoded is (6+color_level_parity), and decoding is complete. Otherwise, proceed to step f);
[0266] f) decoding color_level_minus2_div2_eq3. If the decoded value of the color_level_minus2_div2_eq3 flag is equal to 1, the first value to be decoded is (8+color_level_parity), and decoding is complete. Otherwise, proceed to step g);
[0267] g) decoding color_level_minus2_div2_eq4. If the decoded value of the color_level_minus2_div2_eq4 flag is equal to 1, the first value to be decoded is (10+color_level_parity), and decoding is complete. Otherwise, proceed to step h);
[0268] h) Decode color_level_minus12_div2, then the first value to be decoded is (12+color_level_parity+(color_level_minus12_div2<<1)), and decoding is completed.
[0269] In a specific embodiment, in order to improve hardware throughput, the decoding process may be as follows:
[0270] a) Allocate a budget remBinsPass1 based on the context model decoding codeword for the color quantization residual (the initial value can be set to 2 24 );
[0271] b) Before the color quantization residual decoding begins, determine whether remBinsPass1 is greater than or equal to T (for example, set to 26);
[0272] c) When remBinsPass1 ≥ T, a context-based decoding method is used for one color_first_comp_zero, one color_second_comp_zero, three color_level_equal_zero, three color_level_equal_one, three color_level_parity, three color_level_minus2_div2_eq0, three color_level_minus2_div2_eq1, three color_level_minus2_div2_eq2, three color_level_minus2_div2_eq3, and three color_level_minus2_div2_eq4 that may appear, and each time a flag bit / flag is decoded, a remBinsPass1-- operation is performed, and all binarized codewords of color_level_minus12_div2 are decoded using a bypass model-based decoding method;
[0273] d) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is used for all binarized codewords of the color quantization residual.
[0274] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 3 and Table 4.
[0275] Table 3
[0276]
[0277]
[0278] Table 4
[0279]
[0280] In another possible implementation, when the attribute information is reflectivity, the attribute quantization residual value is the reflectivity quantization residual value. For ease of description, this may be represented by a second value to be decoded. Therefore, in some embodiments, the method may further include setting the second value to be decoded; the second value to be decoded may include the absolute value of the reflectivity quantization residual value.
[0281] For the reflectivity quantization residual value, when decoding the reflectivity quantization residual value based on at least one first-category syntax element identification information and at least one second-category syntax element identification information, the absolute value of the quantization residual value and the positive and negative sign identification information are usually decoded separately; then, based on the positive and negative sign identification information and the absolute value of the quantization residual value, the reflectivity quantization residual value can be determined.
[0282] In the embodiment of the present application, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are also not specifically limited. In some embodiments, the at least one first-category syntax element identification information may include at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, and thirteenth syntax element identification information; and the at least one second-category syntax element identification information may include at least third numerical identification information.
[0283] Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be decoded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 1, and the third numerical value identification information is used to indicate the sixth numerical value obtained after the second value to be decoded is performed the sixth operation.
[0284] In some embodiments, performing the fourth operation on the second value to be decoded may include performing a subtraction operation on the second value to be decoded and a fourth preset value to obtain a fourth value, that is, setting the fourth value to be equal to the difference between the second value to be decoded and the fourth preset value.
[0285] In some embodiments, performing the fifth operation on the second value to be decoded may include: performing a subtraction operation on the second value to be decoded and a fifth preset value to obtain a fourth intermediate value; shifting the fourth intermediate value right by one position to obtain a fifth numerical value; or setting the fifth numerical value to be equal to the quotient of the fourth intermediate value divided by 2.
[0286] In some embodiments, performing the sixth operation on the second value to be decoded may include: performing a subtraction operation on the second value to be decoded and a sixth preset value to obtain a fifth intermediate value; shifting the fifth intermediate value right by one position to obtain a sixth value; or setting the sixth value to be equal to the quotient of the fifth intermediate value divided by 2.
[0287] In the embodiment of the present application, the fourth preset value, the fifth preset value, and the sixth preset value may not be completely the same. For example, the fourth preset value may be set to 1, the fifth preset value may be set to 1, and the sixth preset value may be set to 5. In addition, the eleventh syntax element identification information may be represented by abs_level_minus1_parity, the twelfth syntax element identification information may be represented by abs_level_minus1_div2_eq0, the thirteenth syntax element identification information may be represented by abs_level_minus1_div2_eq1, and the third value identification information may be represented by abs_level_minus5_div2.
[0288] In some embodiments, when the preset parameters meet the first preset condition, decoding the second value to be decoded may include: decoding the eleventh grammatical element identification information, the twelfth grammatical element identification information, and the thirteenth grammatical element identification information that may appear based on the context model to determine the value of at least one first-category grammatical element identification information; and decoding the third numerical identification information that may appear based on the bypass model to determine the value of the first numerical identification information; and determining the second value to be decoded based on the value of at least one first-category grammatical element identification information and the value of the first numerical identification information.
[0289] In a specific embodiment, when the preset parameter meets the first preset condition, decoding the second value to be decoded may include:
[0290] Decoding the eleventh syntax element identification information based on the context model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on the context model to determine a value of the twelfth syntax element identification information;
[0291] If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information;
[0292] If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the context model to determine the value of the thirteenth syntax element identification information;
[0293] If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information;
[0294] If the value of the thirteenth syntax element identification information is the second value, decoding the third numerical identification information based on the bypass model to determine the value of the third numerical identification information;
[0295] The second to-be-decoded value is determined according to the sixth preset value, the value of the eleventh syntax element identification information, and the value of the third numerical value identification information.
[0296] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0297] The eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
[0298] In other embodiments, when the preset parameters meet the second preset condition, decoding the second value to be decoded may include: decoding the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, and the third numerical value identification information that may appear based on the bypass model to determine the second value to be decoded. In other words, if the preset parameters meet the second preset condition, then all binarized codewords corresponding to the second value to be decoded are decoded using the bypass model.
[0299] In a specific embodiment, when the preset parameter meets the second preset condition, decoding the second value to be decoded may include:
[0300] Decoding the eleventh syntax element identification information based on the bypass model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on the bypass model to determine a value of the twelfth syntax element identification information;
[0301] If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information;
[0302] If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the bypass model to determine the value of the thirteenth syntax element identification information;
[0303] If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information;
[0304] If the value of the thirteenth syntax element identification information is the second value, decoding the third numerical identification information based on the bypass model to determine the value of the third numerical identification information;
[0305] The second value to be decoded is determined according to the sixth preset value, the value of the eleventh syntax element identification information, and the value of the third numerical value identification information.
[0306] In the embodiment of the present application, the fifth constant may be a multiple of 2. Exemplarily, the fifth constant is set to 2.
[0307] It should be noted that in the embodiment of the present application, for different syntax element identification information, such as the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information, the first value and the second value corresponding to each may be the same or different, and are not specifically limited here. In addition, in the embodiment of the present application, the first value and the second value may be in parameter form or in digital form. Specifically, each syntax element identification information may be a parameter written in the profile, or may be the value of a flag / identifier, and are not specifically limited here.
[0308] For example, the first value may be set to 1 and the second value may be set to 0; or the first value may be set to 0 and the second value may be set to 1; or the first value may be set to true and the second value may be set to false; or the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0309] In this way, the eleventh syntax element identification information and the twelfth syntax element identification information are first decoded. If the value of the twelfth syntax element identification information is 1, it can be determined that the second value to be decoded is equal to 1+abs_level_minus1_parity; otherwise, if the value of the twelfth syntax element identification information is 0, it is necessary to continue decoding the thirteenth syntax element identification information. If the value of the thirteenth syntax element identification information is 1, it can be determined that the second value to be decoded is equal to 3+abs_level_minus1_parity; otherwise, if the value of the thirteenth syntax element identification information is 0, it is necessary to continue decoding the third numerical identification information to determine the second value to be decoded.
[0310] In some embodiments, for the third numerical identification information, decoding the third numerical identification information based on the bypass model to determine the value of the third numerical identification information may include: decoding the third numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the third numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the third numerical identification information.
[0311] It should also be noted that, in the embodiment of the present application, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth value obtained after the second to-be-decoded value is subjected to the fourth operation. In some embodiments, for the value of the eleventh syntax element identification information, the method may further include: if the value of the eleventh syntax element identification information is a first value, determining that the fourth value is an odd number; if the value of the eleventh syntax element identification information is a second value, determining that the fourth value is an even number;
[0312] Alternatively, if the value of the eleventh syntax element identification information is the first value, it is determined that the remainder after the fourth value is divided by 2 is 1; if the value of the eleventh syntax element identification information is the second value, it is determined that the remainder after the fourth value is divided by 2 is 0.
[0313] In short, in this embodiment of the present application, taking the example of the first value being set to 1 and the second value being set to 0, for the second value to be decoded, if the fourth value is an odd number, then 1 needs to be added when calculating the second value to be decoded; if the fourth value is an even number, then 0 needs to be added when calculating the second value to be decoded. In other words, the second value to be decoded is determined based on the sixth preset value, the value of the eleventh syntax element identification information, and the value of the third value identification information.
[0314] Further, in some embodiments, determining the second value to be decoded based on the sixth preset value, the value of the eleventh syntax element identification information, and the value of the third numerical identification information may include: performing a tenth operation on the value of the third numerical identification information to obtain a tenth numerical value; and determining the second value to be decoded based on the sixth preset value, the tenth numerical value, and the value of the eleventh syntax element identification information.
[0315] It should also be noted that, in the embodiment of the present application, performing the tenth operation on the value of the third numerical identification information to obtain the tenth numerical value may include: multiplying the value of the third numerical identification information by 2 to obtain the tenth numerical value; or shifting the value of the third numerical identification information left by one position to obtain the tenth numerical value.
[0316] Further, in some embodiments, determining the second value to be decoded based on the values of the sixth preset value, the tenth numerical value, and the eleventh syntax element identification information may include: performing an addition operation on the sixth preset value, the tenth numerical value, and the values of the eleventh syntax element identification information to obtain the second value to be decoded.
[0317] Exemplarily, assuming that the sixth preset value is set to 5, the eleventh syntax element identification information is represented by abs_level_minus1_parity, and the third numerical identification information is represented by abs_level_minus5_div2; then, the second value to be decoded is (5+abs_level_minus1_parity+(abs_level_minus5_div2<<1)).
[0318] It can be understood that when the attribute information is reflectivity, the specific implementation steps for the second value to be decoded (ie, the reflectivity quantized residual value) are as follows:
[0319] a) Decode abs_level_minus1_parity and abs_level_minus1_div2_eq0. If the decoded value of the abs_level_minus1_div2_eq0 flag is equal to 1, the second value to be decoded is (1+abs_level_minus1_parity), and decoding is completed. Otherwise, proceed to step b);
[0320] b) decoding abs_level_minus1_div2_eq1. If the decoded value of the abs_level_minus1_div2_eq1 flag is equal to 1, the second value to be decoded is (3+abs_level_minus1_parity). The decoding is complete. Otherwise, the process goes to step c);
[0321] c) Decode abs_level_minus5_div2, then the second value to be decoded is (5+abs_level_minus1_parity+(abs_level_minus5_div2<<1)), and decoding is completed.
[0322] In the related art, when encoding and decoding non-zero attribute quantization residual values, PCRM currently uses a context model-based decoding method for all binarized codewords. Taking the reflectivity attribute as an example, if the reflectivity quantization residual value to be decoded is 12, the binarization process is as follows:
[0323] The abs_level_minus1_parity flag is 1;
[0324] The abs_level_minus1_div2_eq0 flag is 0;
[0325] The abs_level_minus1_div2_eq1 flag is 0;
[0326] abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Golomb coding as an example, the result of binarization of 3 is 0 1 1;
[0327] Therefore, for a reflectivity quantization residual value with a value of 12, the binarized codeword result is 1 0 0 0 1 1. At the decoding end, a decoding method based on a context model is used for all codewords after the binarization of the reflectivity quantization residual value, which will bring great difficulty to the hardware implementation. Based on this, in the embodiment of the present application, the decoding process can be as follows:
[0328] a) Allocate the budget remBinsPass1 based on the context model decoding codeword for the reflectivity quantization residual value (the initial value can be set to 2 24 );
[0329] b) Before decoding of the reflectivity quantization residual value begins, determine whether remBinsPass1 is greater than or equal to T (for example, set to 3);
[0330] c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, and abs_level_minus1_div2_eq1 are decoded using a context model, and each time a flag bit / flag is decoded, a remBinsPass1-- operation is performed, and all binarized codewords of abs_level_minu5_div2 are decoded using a bypass model-based decoding method;
[0331] d) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is used for all binarized codewords of the reflectivity quantization residual values.
[0332] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 5.
[0333] Table 5
[0334]
[0335]
[0336] In another possible implementation, when the attribute information is still reflectivity, at this time, at least one first-category syntax element identification information may include at least one of the following: the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
[0337] Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be decoded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 1, the fourteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 2, the fifteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 3, the sixteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 4, the seventeenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 5, the eighteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 6, and the fourth numerical value identification information is used to indicate the seventh numerical value obtained after the second value to be decoded is performed the seventh operation.
[0338] In some embodiments, performing the fourth operation on the second value to be decoded may include: performing a subtraction operation on the second value to be decoded and a fourth preset value to obtain a fourth value.
[0339] In some embodiments, performing the fifth operation on the second value to be decoded may include: performing a subtraction operation on the second value to be decoded and a fifth preset value to obtain a fourth intermediate value; shifting the fourth intermediate value right by one position to obtain a fifth numerical value; or setting the fifth numerical value to be equal to the quotient of the fourth intermediate value divided by 2.
[0340] In some embodiments, performing the seventh operation on the second value to be decoded may include: performing a subtraction operation on the second value to be decoded and the seventh preset value to obtain a sixth intermediate value; shifting the sixth intermediate value right by one position to obtain a seventh value; or setting the seventh value to be equal to the quotient of the sixth intermediate value divided by 2.
[0341] In an embodiment of the present application, the fourth preset value, the fifth preset value and the seventh preset value may not be exactly the same. For example, the fourth preset value may be set to 1, the fifth preset value may be set to 1, and the seventh preset value may be set to 15. In addition, the eleventh syntax element identification information can be expressed by abs_level_minus1_parity, the twelfth syntax element identification information can be expressed by abs_level_minus1_div2_eq0, the thirteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq1, the fourteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq2, the fifteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq3, the sixteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq4, the seventeenth syntax element identification information can be expressed by abs_level_minus1_div2_eq5, the eighteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq6, and the fourth numerical identification information can be expressed by abs_level_minus15_div2.
[0342] In some embodiments, when the preset parameters meet the first preset condition, decoding the second value to be decoded may include: decoding the eleventh grammatical element identification information, the twelfth grammatical element identification information, the thirteenth grammatical element identification information, the fourteenth grammatical element identification information, the fifteenth grammatical element identification information, the sixteenth grammatical element identification information, the seventeenth grammatical element identification information and the eighteenth grammatical element identification information that may appear based on the context model to determine the value of at least one first-category grammatical element identification information; and decoding the fourth numerical identification information that may appear based on the bypass model to determine the value of the fourth numerical identification information; and determining the second value to be decoded based on the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
[0343] In a specific embodiment, when the preset parameter meets the first preset condition, decoding the second value to be decoded may include:
[0344] Decoding the eleventh syntax element identification information based on the context model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on the context model to determine a value of the twelfth syntax element identification information;
[0345] If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information;
[0346] If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the context model to determine the value of the thirteenth syntax element identification information;
[0347] If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information;
[0348] If the value of the thirteenth syntax element identification information is the second value, decoding the fourteenth syntax element identification information based on the context model to determine the value of the fourteenth syntax element identification information;
[0349] If the value of the fourteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the sixth constant, the fifth preset value, and the eleventh syntax element identification information;
[0350] If the value of the fourteenth syntax element identification information is the second value, decoding the fifteenth syntax element identification information based on the context model to determine the value of the fifteenth syntax element identification information;
[0351] If the value of the fifteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the seventh constant, the fifth preset value, and the eleventh syntax element identification information;
[0352] If the value of the fifteenth syntax element identification information is the second value, decoding the sixteenth syntax element identification information based on the context model to determine the value of the sixteenth syntax element identification information;
[0353] If the value of the sixteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the eighth constant, the fifth preset value, and the eleventh syntax element identification information;
[0354] If the value of the sixteenth syntax element identification information is the second value, decoding the seventeenth syntax element identification information based on the context model to determine the value of the seventeenth syntax element identification information;
[0355] If the value of the seventeenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the ninth constant, the fifth preset value, and the eleventh syntax element identification information;
[0356] If the value of the seventeenth syntax element identification information is the second value, decoding the eighteenth syntax element identification information based on the context model to determine the value of the eighteenth syntax element identification information;
[0357] If the value of the eighteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the tenth constant, the fifth preset value, and the eleventh syntax element identification information;
[0358] If the value of the eighteenth syntax element identification information is the second value, decoding the fourth numerical identification information based on the bypass model to determine the value of the fourth numerical identification information;
[0359] The second value to be decoded is determined according to the seventh preset value, the value of the eleventh syntax element identification information, and the value of the fourth numerical value identification information.
[0360] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0361] The eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information.
[0362] In other embodiments, when the preset parameters meet the second preset condition, decoding the second value to be decoded may include: decoding the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information, the eighteenth syntax element identification information, and the fourth numerical value identification information based on the bypass model to determine the second value to be decoded. In other words, if the preset parameters meet the second preset condition, then all binarized codewords corresponding to the second value to be decoded are decoded using the bypass model.
[0363] In a specific embodiment, when the preset parameter meets the second preset condition, decoding the second value to be decoded may include:
[0364] Decoding the eleventh syntax element identification information based on the bypass model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on the bypass model to determine a value of the twelfth syntax element identification information;
[0365] If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information;
[0366] If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the bypass model to determine the value of the thirteenth syntax element identification information;
[0367] If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information;
[0368] If the value of the thirteenth syntax element identification information is the second value, decoding the fourteenth syntax element identification information based on the bypass model to determine the value of the fourteenth syntax element identification information;
[0369] If the value of the fourteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the sixth constant, the fifth preset value, and the eleventh syntax element identification information;
[0370] If the value of the fourteenth syntax element identification information is the second value, decoding the fifteenth syntax element identification information based on the bypass model to determine the value of the fifteenth syntax element identification information;
[0371] If the value of the fifteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the seventh constant, the fifth preset value, and the eleventh syntax element identification information;
[0372] If the value of the fifteenth syntax element identification information is the second value, decoding the sixteenth syntax element identification information based on the bypass model to determine the value of the sixteenth syntax element identification information;
[0373] If the value of the sixteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the eighth constant, the fifth preset value, and the eleventh syntax element identification information;
[0374] If the value of the sixteenth syntax element identification information is the second value, decoding the seventeenth syntax element identification information based on the bypass model to determine the value of the seventeenth syntax element identification information;
[0375] If the value of the seventeenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the ninth constant, the fifth preset value, and the eleventh syntax element identification information;
[0376] If the value of the seventeenth syntax element identification information is the second value, decoding the eighteenth syntax element identification information based on the bypass model to determine the value of the eighteenth syntax element identification information;
[0377] If the value of the eighteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the tenth constant, the fifth preset value, and the eleventh syntax element identification information;
[0378] If the value of the eighteenth syntax element identification information is the second value, decoding the fourth numerical identification information based on the bypass model to determine the value of the fourth numerical identification information;
[0379] The second value to be decoded is determined according to the seventh preset value, the value of the eleventh syntax element identification information, and the value of the fourth numerical value identification information.
[0380] In the embodiment of the present application, the fifth constant, the sixth constant, the seventh constant, the eighth constant, the ninth constant, and the tenth constant are all multiples of 2. For example, the fifth constant is set to 2, the sixth constant is set to 4, the seventh constant is set to 6, the eighth constant is set to 8, the ninth constant is set to 10, and the tenth constant is set to 12.
[0381] It should be noted that in the embodiments of the present application, for different grammatical element identification information, such as the eleventh grammatical element identification information, the twelfth grammatical element identification information, the thirteenth grammatical element identification information, the fourteenth grammatical element identification information, the fifteenth grammatical element identification information, the sixteenth grammatical element identification information, the seventeenth grammatical element identification information, the eighteenth grammatical element identification information, etc., the corresponding first value and second value may be the same, or may be different, and there is no specific limitation here.
[0382] In addition, in the embodiment of the present application, the first value and the second value can be in parameter form or in digital form. Specifically, each syntax element identification information can be a parameter written in the profile, or it can be the value of a flag / identifier, which is not specifically limited here. For example, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true. Among them, in the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0383] In this way, the eleventh grammatical element identification information and the twelfth grammatical element identification information are first decoded. If the value of the twelfth grammatical element identification information is 1, it can be determined that the second value to be decoded is equal to 1+abs_level_minus1_parity; otherwise, if the value of the twelfth grammatical element identification information is 0, it is necessary to continue decoding the thirteenth grammatical element identification information. If the value of the thirteenth grammatical element identification information is 1, it can be determined that the second value to be decoded is equal to 3+abs_level_minus1_parity; otherwise, if the value of the thirteenth grammatical element identification information is 0, it is necessary to continue decoding the fourteenth grammatical element identification information. If the value of the fourteenth grammatical element identification information is 1, it can be determined that the second value to be decoded is equal to 5+abs_level_minus1_parity; otherwise, if the value of the fourteenth grammatical element identification information is 0, it is necessary to continue decoding the fifteenth grammatical element identification information. If the value of the fifteenth grammatical element identification information is 1, it can be determined that the second value to be decoded is equal to 7+abs_level_minus1_parity. evel_minus1_parity; otherwise, if the value of the fifteenth grammatical element identification information is 0, then it is necessary to continue decoding the sixteenth grammatical element identification information, and if the value of the sixteenth grammatical element identification information is 1, then it can be determined that the second value to be decoded is equal to 9+abs_level_minus1_parity; otherwise, if the value of the sixteenth grammatical element identification information is 0, then it is necessary to continue decoding the seventeenth grammatical element identification information, and if the value of the seventeenth grammatical element identification information is 1, then it can be determined that the second value to be decoded is equal to 11+abs_level_minus1_parity; otherwise, if the value of the seventeenth grammatical element identification information is 0, then it is necessary to continue decoding the eighteenth grammatical element identification information, and if the value of the eighteenth grammatical element identification information is 1, then it can be determined that the second value to be decoded is equal to 13+abs_level_minus1_parity; otherwise, if the value of the eighteenth grammatical element identification information is 0, then it is necessary to continue decoding the fourth numerical identification information to determine the second value to be decoded.
[0384] In some embodiments, for the fourth numerical identification information, decoding the fourth numerical identification information based on the bypass model to determine the value of the fourth numerical identification information may include: decoding the fourth numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the fourth numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the fourth numerical identification information.
[0385] In some embodiments, determining the second value to be decoded based on the seventh preset value, the value of the eleventh syntax element identification information and the value of the fourth numerical identification information may include: performing an eleventh operation on the value of the fourth numerical identification information to obtain the eleventh numerical value; determining the second value to be decoded based on the seventh preset value, the eleventh numerical value and the value of the eleventh syntax element identification information.
[0386] It should also be noted that, in the embodiment of the present application, performing the eleventh operation on the value of the fourth numerical identification information to obtain the eleventh numerical value may include: multiplying the value of the fourth numerical identification information by 2 to obtain the eleventh numerical value; or, shifting the value of the fourth numerical identification information left by one position to obtain the eleventh numerical value.
[0387] Further, in some embodiments, determining the second value to be decoded based on the values of the seventh preset value, the eleventh numerical value, and the eleventh syntax element identification information may include: performing an addition operation on the seventh preset value, the eleventh numerical value, and the values of the eleventh syntax element identification information to obtain the second value to be decoded.
[0388] Exemplarily, assuming that the seventh preset value is set to 15, the eleventh syntax element identification information is represented by abs_level_minus1_parity, and the fourth numerical identification information is represented by abs_level_minus15_div2; then, the second value to be decoded is (15+abs_level_minus1_parity+(abs_level_minus15_div2<<1)).
[0389] It can be understood that when the attribute information is reflectivity, the specific implementation steps for the second value to be decoded (ie, the reflectivity quantized residual value) are as follows:
[0390] a) Decode abs_level_minus1_parity and abs_level_minus1_div2_eq0. If the decoded value of the abs_level_minus1_div2_eq0 flag is equal to 1, the second value to be decoded is (1+abs_level_minus1_parity), and decoding is completed. Otherwise, proceed to step b);
[0391] b) decoding abs_level_minus1_div2_eq1. If the decoded value of the abs_level_minus1_div2_eq1 flag is equal to 1, the second value to be decoded is (3+abs_level_minus1_parity). The decoding is complete. Otherwise, the process goes to step c);
[0392] c) Decode abs_level_minus1_div2_eq2. If the decoded value of the abs_level_minus1_div2_eq2 flag is equal to 1, the second value to be decoded is (5+abs_level_minus1_parity). The decoding is complete. Otherwise, proceed to step d).
[0393] d) Decode abs_level_minus1_div2_eq3. If the decoded value of the abs_level_minus1_div2_eq3 flag is equal to 1, the second value to be decoded is (7+abs_level_minus1_parity), and decoding is complete. Otherwise, proceed to step e);
[0394] e) decoding abs_level_minus1_div2_eq4. If the decoded value of the abs_level_minus1_div2_eq4 flag is equal to 1, the second value to be decoded is (9+abs_level_minus1_parity), and decoding is complete. Otherwise, proceed to step f);
[0395] f) Decode abs_level_minus1_div2_eq5. If the decoded value of the abs_level_minus1_div2_eq5 flag is 1, the second value to be decoded is (11+abs_level_minus1_parity). The decoding is complete. Otherwise, the process goes to step g).
[0396] g) Decode abs_level_minus1_div2_eq6. If the decoded value of the abs_level_minus1_div2_eq6 flag is equal to 1, the second value to be decoded is (13+abs_level_minus1_parity), and decoding is complete. Otherwise, proceed to step h);
[0397] h) Decode abs_level_minus15_div2, then the second value to be decoded is (15+abs_level_minus1_parity+(abs_level_minus15_div2<<1)), and decoding is completed.
[0398] In a specific embodiment, in order to improve hardware throughput, the decoding process may be as follows:
[0399] a) Allocate the budget remBinsPass1 based on the context model decoding codeword for the reflectivity quantization residual value (the initial value can be set to 2 24 );
[0400] b) Before decoding of the reflectivity quantization residual value begins, determine whether remBinsPass1 is greater than or equal to T (e.g., set to 8);
[0401] c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, abs_level_minus1_div2_eq1, abs_level_minus1_div2_eq2, abs_level_minus1_div2_eq3, abs_level_minus1_div2_eq4, abs_level_minus1_div2_eq5, abs_level_minus1_div2_eq6 are decoded using a context model, and each time a flag bit / flag is decoded, a remBinsPass1-- operation is performed, and all binarized codewords of abs_level_minus15_div2 are decoded using a bypass model-based decoding method;
[0402] d) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is used for all binarized codewords of the reflectivity quantization residual values.
[0403] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 6.
[0404] Table 6
[0405]
[0406]
[0407]
[0408] Simply put, in an embodiment of the present application, setting the budget remBinsPass1 to limit the number of codewords based on the context model used when decoding the attribute quantization residual value can improve the throughput and provide a more hardware-friendly implementation method.
[0409] For example, Tables 7 and 8 show the test results for the prediction branch. Table 7 shows the test results for the test condition C3 (lossless geometry, limit-lossy attributes), and Table 8 shows the test results for the test condition C4 (lossless geometry, lossless attributes).
[0410] Table 7
[0411]
[0412] Table 8
[0413]
[0414] For example, Tables 9, 10, 11, and 12 are test results for multi-layer transformation branches. Table 9 shows the test results for the test condition C1-limit-lossy geometry, lossy attributes, Table 10 shows the test results for the test condition C2-lossless geometry, lossy attributes, Table 11 shows the test results for the test condition C3-lossless geometry, limit-lossy attributes, and Table 12 shows the test results for the test condition C4-lossless geometry, lossless attributes.
[0415] Table 9
[0416]
[0417]
[0418] Table 10
[0419]
[0420] Table 11
[0421]
[0422] Table 12
[0423]
[0424] For example, Tables 13 and 14 show the test results for the resource-constrained prediction transform branch. Table 13 shows the test results for the test condition C1-limit-lossy geometry, lossy attributes, and Table 14 shows the test results for the test condition C2-lossless geometry, lossy attributes.
[0425] Table 13
[0426]
[0427] Table 14
[0428]
[0429] For example, Tables 15 and 16 show the test results for the predictive transform branch with unlimited resources. Table 15 shows the test results for the test condition C1-limit-lossy geometry, lossy attributes, and Table 16 shows the test results for the test condition C2-lossless geometry, lossy attributes.
[0430] Table 15
[0431]
[0432]
[0433] Table 16
[0434]
[0435] This embodiment provides a decoding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiment. It can be seen that according to the technical solution of the aforementioned embodiment, the preset parameters corresponding to the attribute quantization residual values are first determined, and then it is determined whether the preset parameters meet the first preset conditions; if the preset parameters meet the first preset conditions, then at least one first-category syntax element identification information is decoded based on the context model, and at least one second-category syntax element identification information is decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during decoding can be limited, so that part of the syntax element identification information is decoded using the bypass model, thereby improving the hardware throughput, reducing the difficulty of hardware implementation, and facilitating hardware implementation; and it can also improve the processing speed.
[0436] In another embodiment of the present application, referring to FIG8 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG8 , the method may include:
[0437] S801: Determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value.
[0438] It should be noted that the encoding method of the embodiment of the present application is applied to an encoder. In addition, the encoding method can specifically refer to an attribute quantization residual encoding method; more specifically, it refers to an attribute quantization residual encoding method that limits the number of codewords based on the context model to improve hardware throughput.
[0439] It should also be noted that in the embodiments of the present application, the attribute information of the point cloud may refer to a color component, a reflectivity, or even other attributes. Therefore, in some embodiments, the attribute quantization residual value may include one of the following: a color component quantization residual value and a reflectivity quantization residual value.
[0440] In the embodiment of the present application, for the color component quantization residual value, the color component quantization residual value may include: the quantization residual value of the first color component, the quantization residual value of the second color component, and the quantization residual value of the third color component. That is, according to the encoding method of the embodiment of the present application, any one of the following items can be encoded: the quantization residual value of the first color component, the quantization residual value of the second color component, the quantization residual value of the third color component, and the reflectance quantization residual value.
[0441] The first color component, the second color component, and the third color component may be in RGB format, or in YUV format, or even in other formats. Furthermore, the order of the three color components, taking YUV as an example, may be in YUV order, UYV order, UVY order, or even VYU order, etc. In other words, the format and order of the color components are not specifically limited here.
[0442] It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, where the preset parameter is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value. For example, the value of the preset parameter can be set to 2 24 , but is not specifically limited.
[0443] The preset parameters can be pre-set parameter values or written into the bitstream. Therefore, in some embodiments, the method may further include encoding the preset parameters corresponding to the attribute quantization residual values and writing the resulting encoded bits into the bitstream. This allows the decoder to subsequently obtain the preset parameter values by decoding the bitstream.
[0444] In this way, before the attribute quantization residual value encoding begins, it is necessary to first determine the value of the preset parameter, and then judge whether the preset parameter meets the first preset condition, so as to limit the number of codewords based on the context model used during encoding and improve the hardware throughput.
[0445] S802: Determine, according to the attribute quantization residual value, a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0446] In an embodiment of the present application, the attribute quantization residual value may be represented by syntax element identification information. For example, the syntax element identification information may be used to indicate whether the attribute quantization residual value is equal to 0, or whether the attribute quantization residual value is equal to 1, or whether the quotient of the attribute quantization residual value minus a preset constant and then divided by 2 is equal to 0, 1, 2, etc.
[0447] In this way, according to the attribute quantization residual value, the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information can be determined.
[0448] S803: If the preset parameters meet the first preset condition, the value of at least one first-category syntax element identification information is coded based on the context model, and the value of at least one second-category syntax element identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
[0449] It should be noted that, in the embodiment of the present application, the preset parameter meeting the first preset condition may include: determining that the value of the preset parameter is greater than or equal to a preset threshold value. The preset threshold value may be a judgment value pre-set based on the hardware configuration. For example, the preset threshold value may be set to 3, 8, 14, or even other values, which are not specifically limited here.
[0450] It should also be noted that, in an embodiment of the present application, if the preset parameters do not meet the first preset conditions, then in some embodiments, the method may further include: if the preset parameters meet the second preset conditions, performing bypass model-based encoding processing on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and writing the obtained encoded bits into the bitstream.
[0451] It should be noted that, in the embodiment of the present application, the preset parameter meets the second preset condition, which may include: determining that the preset parameter does not meet the first preset condition; or determining that the value of the preset parameter is less than a preset threshold value.
[0452] It should also be noted that in the embodiment of the present application, since the hardware can usually process 4 to 6 codewords encoded based on the bypass model in one clock cycle, but can only process 1 codeword encoded based on the context model; taking into account the hardware throughput, the encoding method proposed in the embodiment of the present application can avoid the situation where all codewords are encoded based on the context model.
[0453] Specifically, if the value of the preset parameter is greater than or equal to a preset threshold value, then a portion of the syntax elements (such as at least one first-category syntax element identification information) may be coded based on the context model, and another portion of the syntax elements (such as at least one second-category syntax element identification information) may be coded based on the bypass model; if the value of the preset parameter is less than the preset threshold value, then all syntax elements (such as at least one first-category syntax element identification information and at least one second-category syntax element identification information) may be coded based on the bypass model.
[0454] In some embodiments, when the preset parameter meets the first preset condition, the method may further include: for at least one first-category syntax element identification information, after each encoding of a first-category syntax element identification information is completed based on the context model, performing a subtraction operation on the value of the preset parameter.
[0455] That is to say, in an embodiment of the present application, for at least one first-category syntax element identification information that may appear, a context model-based encoding method is used, and each time a first-category syntax element identification information is encoded, a --remBinsPass1 operation needs to be performed.
[0456] It should also be noted that in the embodiments of the present application, in some cases, for example, when the attribute quantization residual value is less than a preset threshold, the attribute quantization residual value can be determined only by the value of at least one first-category syntax element identification information. In some embodiments, the method may further include:
[0457] Determining a value of at least one first-category syntax element identification information according to the attribute quantization residual value;
[0458] If the preset parameters meet the first preset condition, performing context model-based encoding processing on the value of at least one first-category syntax element identification information, and writing the obtained coded bits into the bitstream; or,
[0459] If the preset parameter meets the second preset condition, a bypass model-based encoding process is performed on the value of at least one first-category syntax element identification information, and the obtained encoding bits are written into the bitstream.
[0460] That is, in some cases, based on the value of at least one first-category syntax element identification information, it is possible to determine whether the attribute quantization residual value is equal to 0, or whether the attribute quantization residual value is equal to 1, or whether the quotient of the attribute quantization residual value minus a preset constant and then divided by 2 is equal to 0, 1, 2, etc., thereby determining the attribute quantization residual value. In this case, encoding processing can be performed only on the value indicating the first-category syntax element identification information.
[0461] This embodiment provides an encoding method that determines an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value; determines the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information based on the attribute quantization residual value; if the preset parameter meets a first preset condition, performs context-based encoding processing on the value of the at least one first-category syntax element identification information, and performs bypass-model-based encoding processing on the value of the at least one second-category syntax element identification information, and writes the resulting encoded bits into a bitstream. In this way, after determining the preset parameter corresponding to the attribute quantization residual value, the number of codewords based on the context model used during encoding can be limited, so that some syntax element identification information is encoded using the bypass model, thereby improving hardware throughput and reducing the difficulty of hardware implementation; it can also increase processing speed.
[0462] In another embodiment of the present application, based on the encoding method described in the above embodiment, see Figure 9, which shows a detailed flow chart of an encoding method provided by an embodiment of the present application. As shown in Figure 9, the method may include:
[0463] S901: Determine preset parameters corresponding to attribute quantization residual values.
[0464] S902: Determine whether the preset parameter is greater than or equal to a preset threshold.
[0465] S903: If the preset parameter is greater than or equal to the preset threshold value, encoding is performed on at least one possible first-category syntax element identification information based on the context model, and encoding is performed on at least one possible second-category syntax element identification information based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0466] S904: If the preset parameter is less than the preset threshold, encoding the at least one first-category syntax element identification information and the at least one second-category syntax element identification information that may appear is performed based on the bypass model, and the obtained encoding bits are written into the bitstream.
[0467] It should be noted that in the embodiment of the present application, the encoding end can use the same order (original point cloud acquisition order, Morton order, Hilbert order, etc.) to encode the quantized residual values of the attributes (color component, reflectivity, etc.) of each node in turn.
[0468] In one possible implementation, when the attribute information is a color component, if the quantization residual values of the three color components are not all zero, it is necessary to sequentially determine the quantization residual value of the first color component, the quantization residual value of the second color component, and the quantization residual value of the third color component. In this case, when the attribute quantization residual value is a color component quantization residual value, the at least one first-category syntax element identification information may include at least one of the following: first syntax element identification information and second syntax element identification information.
[0469] Among them, the first syntax element identification information can be represented by color_first_comp_zero, which is used to indicate whether the quantized residual value of the first color component is equal to 0; the second syntax element identification information can be represented by color_second_comp_zero, which is used to indicate whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0.
[0470] In some embodiments, the method may further include:
[0471] determining a value of the first syntax element identification information based on whether the quantized residual value of the first color component is equal to 0; and encoding the value of the first syntax element identification information based on the target model, and writing the obtained coded bits into the bitstream;
[0472] If the value of the first syntax element identification information is the first value, determining the value of the second syntax element identification information based on whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0; and encoding the value of the second syntax element identification information based on the target model, and writing the obtained coded bits into the bitstream;
[0473] If the value of the first syntax element identification information is the second value, encoding the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component are respectively performed, and the obtained coded bits are written into the bitstream;
[0474] If the value of the second syntax element identification information is the first value, encoding the quantized residual value of the third color component, and writing the obtained encoding bits into the bitstream;
[0475] If the value of the second syntax element identification information is the second value, encoding the quantized residual value of the second color component and the quantized residual value of the third color component respectively, and writing the obtained coded bits into the bitstream;
[0476] If the preset parameters meet the first preset condition, the context model is determined as the target model; if the preset parameters meet the second preset condition, the bypass model is determined as the target model.
[0477] That is to say, if the preset parameters meet the first preset conditions, then the first syntax element identification information and the second syntax element identification information that may appear are encoded based on the context model; if the preset parameters meet the second preset conditions, then the first syntax element identification information and the second syntax element identification information that may appear are encoded based on the bypass model.
[0478] It should also be noted that, in the embodiment of the present application, for different syntax element identification information, such as the first syntax element identification information and the second syntax element identification information, the corresponding first value and second value may be the same or different, which is not specifically limited here. In addition, in the embodiment of the present application, the first value and the second value may be in parameter form or in digital form. Specifically, each syntax element identification information may be a parameter written in the profile, or may be the value of a flag / identifier, which is not specifically limited here. For example, the first value may be set to 1 and the second value may be set to 0; or the first value may be set to 0 and the second value may be set to 1; or the first value may be set to true and the second value may be set to false; or the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value may be set to 1 and the second value may be set to 0, but this is not specifically limited.
[0479] In a specific embodiment, when the quantized residual values of the three color components are not all zero, the specific implementation steps are as follows:
[0480] a) using "color_first_comp_zero" to mark whether the quantized residual value of the first color component is equal to 0, encoding the "color_first_comp_zero" flag bit, and if the quantized residual value of the first color component is 0, proceeding to step b), otherwise proceeding to step e);
[0481] b) using "color_second_comp_zero" to mark whether the quantized residual value of the first color component and the quantized residual value of the second color component are both 0, encoding the "color_second_comp_zero" flag bit, and if the quantized residual value of the second color component is 0, proceeding to step c), otherwise proceeding to step d);
[0482] c) encoding the quantized residual value of the third color component, and the encoding ends;
[0483] d) encoding the quantized residual value of the second color component and the quantized residual value of the third color component respectively, and the encoding ends;
[0484] e) Encode the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component respectively, and the encoding ends.
[0485] It can be understood that when the attribute quantization residual value is a color component quantization residual value, considering that there are quantization residual values of three color components, namely, the first color component, the second color component, and the third color component, it can be represented by a first value to be encoded. Therefore, in some embodiments, the method may further include: setting a first value to be encoded; wherein the first value to be encoded includes one of the following: the absolute value of the quantization residual value of the first color component, the absolute value of the quantization residual value of the second color component, the absolute value of the quantization residual value of the third color component, the absolute value of the quantization residual value of the first color component minus one, the absolute value of the quantization residual value of the second color component minus one, and the absolute value of the quantization residual value of the third color component minus one.
[0486] It should be noted that, in an embodiment of the present application, when encoding the quantized residual value of each color component according to at least one first-category syntax element identification information and at least one second-category syntax element identification information, the absolute value of the quantized residual value and the positive and negative sign identification information are usually encoded separately. In addition, if the second syntax element identification information indicates that the quantized residual value of the first color component and the quantized residual value of the second color component are both 0, then the quantized residual value of the third color component must be non-zero. Taking the quantized residual value of the third color component in the above step c) as an example, since the previous flag bit has indicated that the quantized residual value of the first color component and the quantized residual value of the second color component are both 0, the quantized residual value of the third color component must be non-zero. At this time, in order to save code stream, a subtraction operation can be performed first, and then it can be used as the first value to be encoded.
[0487] It should also be noted that in the embodiments of the present application, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are not specifically limited. In some embodiments, in addition to the first syntax element identification information and the second syntax element identification information, the at least one first-category syntax element identification information may further include at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information; and the at least one second-category syntax element identification information includes at least first numerical identification information.
[0488] Among them, the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 0, and the first numerical value identification information is used to indicate the second numerical value obtained after the second operation on the first value to be encoded.
[0489] In some embodiments, performing a first operation on the first value to be encoded may include: performing a subtraction operation on the first value to be encoded and a first preset value to obtain a first intermediate value; right-shifting the first intermediate value by one position to obtain a first numerical value; or setting the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
[0490] In some embodiments, performing a second operation on the first value to be encoded may include: performing a subtraction operation on the first value to be encoded and a second preset value to obtain a second intermediate value; shifting the second intermediate value right by one position to obtain a second numerical value; or setting the second numerical value to be equal to the quotient of the second intermediate value divided by 2.
[0491] It should be noted that in the embodiments of the present application, for division operations, right shift operations can be used instead, “>>” represents the right shift operator; “divide by 2” is equivalent to shifting one bit right; for multiplication operations, left shift operations can be used instead, “<<” represents the left shift operator; “multiply by 2” is equivalent to shifting one bit left.
[0492] It should also be noted that, in the embodiment of the present application, the first preset value and the second preset value may be different. For example, the first preset value may be set to 2, and the second preset value may be set to 4. In addition, the third syntax element identification information may be represented by color_level_equal_zero, the fourth syntax element identification information may be represented by color_level_equal_one, the fifth syntax element identification information may be represented by color_level_parity, the sixth syntax element identification information may be represented by color_level_minus2_div2_eq0, and the first numerical identification information may be represented by color_level_minus4_div2.
[0493] It should also be noted that, in the embodiment of the present application, since there are quantized residual values of the first color component, the quantized residual values of the second color component, and the quantized residual values of the third color component, in addition to the first syntax element identification information and the second syntax element identification information being one, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, and the sixth syntax element identification information correspond to three respectively; that is, the embodiment of the present application may include: one first syntax element identification information, one second syntax element identification information, three third syntax element identification information, three fourth syntax element identification information, three fifth syntax element identification information, and three sixth syntax element identification information.
[0494] In some embodiments, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, and the sixth syntax element identification information that may appear based on the context model, and encoding the first numerical identification information that may appear based on the bypass model, and writing the obtained encoded bits into the bitstream.
[0495] In a specific embodiment, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include:
[0496] determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0497] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0498] If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity characteristic of the first value to be coded; determining the value of the sixth syntax element identification information based on whether the first value obtained after performing the first operation on the first value to be coded is equal to 0; and encoding the values of the fifth syntax element identification information and the sixth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0499] If the value of the sixth syntax element identification information is the second value, the value of the first numerical identification information is determined based on the second numerical value obtained after the second operation is performed on the first value to be encoded; and the value of the first numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0500] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0501] first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information.
[0502] In other embodiments, when the preset parameters meet the first preset condition, encoding the first value to be encoded may include: encoding the possible first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, and the first numerical value identification information based on a bypass model, and writing the resulting encoded bits into the bitstream. In other words, if the preset parameters meet the second preset condition, encoding is performed using the bypass model on all binarized codewords corresponding to the first value to be encoded.
[0503] In a specific embodiment, when the preset parameter meets the second preset condition, encoding the first value to be encoded may include:
[0504] determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0505] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0506] If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity characteristic of the first value to be coded; determining the value of the sixth syntax element identification information based on whether the first value obtained after performing the first operation on the first value to be coded is equal to 0; and encoding the values of the fifth syntax element identification information and the sixth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0507] If the value of the sixth syntax element identification information is the second value, the value of the first numerical identification information is determined based on the second numerical value obtained after the second operation is performed on the first value to be encoded; and the value of the first numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0508] In some embodiments, determining the value of the third grammatical element identification information based on whether the first value to be encoded is equal to 0 may include: if the first value to be encoded is equal to 0, determining the value of the third grammatical element identification information to be the first value; if the first value to be encoded is not equal to 0, determining the value of the third grammatical element identification information to be the second value.
[0509] In some embodiments, determining the value of the fourth grammatical element identification information based on whether the first value to be encoded is equal to 1 may include: if the first value to be encoded is equal to 1, determining the value of the fourth grammatical element identification information to be the first value; if the first value to be encoded is not equal to 1, determining the value of the fourth grammatical element identification information to be the second value.
[0510] In some embodiments, determining the value of the fifth grammatical element identification information based on the parity characteristic of the first value to be encoded may include: if the first value to be encoded is an odd number, determining the value of the fifth grammatical element identification information to be a first value; if the first value to be encoded is an even number, determining the value of the fifth grammatical element identification information to be a second value.
[0511] In some embodiments, determining the value of the sixth grammatical element identification information based on whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 0 may include: if the first numerical value is equal to 0, determining the value of the sixth grammatical element identification information to be the first value; if the first numerical value is not equal to 0, determining the value of the sixth grammatical element identification information to be the second value.
[0512] In some embodiments, determining the value of the first numerical identification information according to the second numerical value obtained after performing the second operation on the first value to be encoded may include: setting the value of the first numerical identification information to be equal to the second numerical value.
[0513] In some embodiments, encoding the value of the first numerical identification information based on the bypass model may include: binarizing the value of the first numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0514] For example, assuming that the value of the first numerical identification information is 3, 3 is first binarized. Taking the second-order exponential Golomb code as an example, after binarization of 3, a group of binary symbols 011 is obtained; then, this group of binary symbols is encoded in sequence based on the bypass model, and the obtained coded bits are written into the code stream.
[0515] It can be understood that the encoding process is performed on the first value to be encoded (ie, the absolute value of the color quantization residual or the absolute value of the color quantization residual minus one), and the specific implementation steps are as follows:
[0516] The encoding steps of the quantized residual of each color component are as follows:
[0517] For the first value to be encoded (the absolute value of the color quantization residual or the absolute value of the color quantization residual minus one):
[0518] a) using "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encoding the "color_level_equal_zero" flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise proceed to step b);
[0519] b) using "color_level_equal_one" to mark whether the first value to be encoded is equal to 1, encoding the "color_level_equal_one" flag bit, if the first value to be encoded is 1, encoding is completed, otherwise proceed to step c);
[0520] c) using "color_level_parity" to mark the parity of the first value to be encoded, that is, the remainder when the first value to be encoded is divided by 2, and "color_level_minus2_div2_eq0" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 0. Encode "color_level_parity" and "color_level_minus2_div2_eq0". If the quotient of the first value to be encoded minus one and then divided by two is equal to 0, encoding is completed. Otherwise, proceed to step d);
[0521] d) "color_level_minus4_div2" is the quotient of the first value to be encoded minus 4 and divided by 2. Encode the "color_level_minus4_div2" value, and the encoding is complete.
[0522] In a specific embodiment, in order to improve hardware throughput, the encoding process may be as follows:
[0523] a) Allocate a budget of remBinsPass1 based on the context model encoding codeword for the color quantization residual (the initial value can be set to 2 24 );
[0524] b) Before the color quantization residual coding begins, determine whether remBinsPass1 is greater than or equal to T (for example, set to 14);
[0525] c) When remBinsPass1 ≥ T, a context-based encoding method is used for one color_first_comp_zero, one color_second_comp_zero, three color_level_equal_zero, three color_level_equal_one, three color_level_parity, and three color_level_minus2_div2_eq0 that may appear, and a remBinsPass1-- operation is performed after each flag bit / flag is encoded, and all binarized codewords of color_level_minus4_div2 are encoded using a bypass model-based encoding method;
[0526] d) When remBinsPass1 ≥ T is not satisfied, all binarized codewords of the color quantization residual are coded using a bypass model-based encoding method.
[0527] For the entire encoding process of the embodiment of the present application, the syntax table description of the corresponding decoding process in the implementation is shown in Table 1 and Table 2 above.
[0528] In another possible implementation, when the attribute information is still a color component, in addition to the first syntax element identification information and the second syntax element identification information, at least one first-category syntax element identification information may also include at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information and tenth syntax element identification information; and at least one second-category syntax element identification information includes at least: second numerical identification information.
[0529] Among them, the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 0, the seventh syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 1, the eighth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 2, the ninth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 3, the tenth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 4, and the second numerical value identification information is used to indicate the third numerical value obtained after the third operation on the first value to be encoded.
[0530] In some embodiments, performing a first operation on the first value to be encoded may include: performing a subtraction operation on the first value to be encoded and a first preset value to obtain a first intermediate value; right-shifting the first intermediate value by one position to obtain a first numerical value; or setting the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
[0531] In some embodiments, performing a second operation on the first value to be encoded may include: performing a subtraction operation on the first value to be encoded and a second preset value to obtain a second intermediate value; shifting the second intermediate value right by one position to obtain a second numerical value; or setting the second numerical value to be equal to the quotient of the second intermediate value divided by 2.
[0532] In some embodiments, performing a third operation on the first value to be encoded may include: performing a subtraction operation on the first value to be encoded and a third preset value to obtain a third intermediate value; shifting the third intermediate value right by one position to obtain a third numerical value; or setting the third numerical value to be equal to the quotient of the third intermediate value divided by 2.
[0533] In an embodiment of the present application, the first preset value and the third preset value may be different. For example, the first preset value may be set to 2, and the third preset value may be set to 12. In addition, the third syntax element identification information may be represented by color_level_equal_zero, the fourth syntax element identification information may be represented by color_level_equal_one, the fifth syntax element identification information may be represented by color_level_parity, the sixth syntax element identification information may be represented by color_level_minus2_div2_eq0, the seventh syntax element identification information may be represented by color_level_minus2_div2_eq1, the eighth syntax element identification information may be represented by color_level_minus2_div2_eq2, the ninth syntax element identification information may be represented by color_level_minus2_div2_eq3, the tenth syntax element identification information may be represented by color_level_minus2_div2_eq4, and the second value identification information may be represented by color_level_minus12_div2.
[0534] In some embodiments, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information, and the tenth syntax element identification information based on the context model, and encoding the second numerical value identification information based on the bypass model, and writing the obtained encoded bits into the bitstream.
[0535] In a specific embodiment, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include:
[0536] determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0537] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0538] If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity characteristic of the first value to be coded; determining the value of the sixth syntax element identification information based on whether the first value obtained after performing the first operation on the first value to be coded is equal to 0; and encoding the values of the fifth syntax element identification information and the sixth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0539] If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 1; and encoding the value of the seventh syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0540] If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 2; and encoding the value of the eighth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0541] If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 3; and encoding the value of the ninth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0542] If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 4; and encoding the value of the tenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0543] If the value of the tenth syntax element identification information is the second value, determining the value of the second numerical identification information based on a third numerical value obtained after performing a third operation on the first value to be encoded; and encoding the value of the second numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0544] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0545] First grammatical element identification information, second grammatical element identification information, third grammatical element identification information, fourth grammatical element identification information, fifth grammatical element identification information, sixth grammatical element identification information, seventh grammatical element identification information, eighth grammatical element identification information, ninth grammatical element identification information, and tenth grammatical element identification information.
[0546] In other embodiments, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information, the tenth syntax element identification information, and the second numerical value identification information based on the bypass model, and writing the obtained encoded bits into the bitstream.
[0547] In a specific embodiment, when the preset parameter meets the second preset condition, encoding the first value to be encoded may include:
[0548] determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0549] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0550] If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity characteristic of the first value to be coded; determining the value of the sixth syntax element identification information based on whether the first value obtained after performing the first operation on the first value to be coded is equal to 0; and encoding the values of the fifth syntax element identification information and the sixth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0551] If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 1; and encoding the value of the seventh syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0552] If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 2; and encoding the value of the eighth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0553] If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 3; and encoding the value of the ninth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0554] If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 4; and encoding the value of the tenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0555] If the value of the tenth syntax element identification information is the second value, determining the value of the second numerical identification information based on a third numerical value obtained after performing a third operation on the first value to be encoded; and encoding the value of the second numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0556] In some embodiments, determining the value of the seventh grammatical element identification information based on whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 1 can include: if the first numerical value is equal to 1, determining the value of the seventh grammatical element identification information to be the first value; if the first numerical value is not equal to 1, determining the value of the seventh grammatical element identification information to be the second value.
[0557] In some embodiments, determining the value of the eighth grammatical element identification information based on whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 2 may include: if the first numerical value is equal to 2, determining the value of the eighth grammatical element identification information to be the first value; if the first numerical value is not equal to 2, determining the value of the eighth grammatical element identification information to be the second value.
[0558] In some embodiments, determining the value of the ninth grammatical element identification information based on whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 3 may include: if the first numerical value is equal to 3, determining the value of the ninth grammatical element identification information to be the first value; if the first numerical value is not equal to 3, determining the value of the ninth grammatical element identification information to be the second value.
[0559] In some embodiments, determining the value of the tenth grammatical element identification information based on whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 4 may include: if the first numerical value is equal to 4, determining the value of the tenth grammatical element identification information to be the first value; if the first numerical value is not equal to 4, determining the value of the tenth grammatical element identification information to be the second value.
[0560] In some embodiments, determining the value of the second numerical identification information according to the third numerical value obtained after performing the third operation on the first value to be encoded may include: setting the value of the second numerical identification information equal to the third numerical value.
[0561] In some embodiments, encoding the value of the second numerical identification information based on the bypass model may include: binarizing the value of the second numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0562] It can be understood that the encoding process is performed on the first value to be encoded (ie, the absolute value of the color quantization residual or the absolute value of the color quantization residual minus one), and the specific implementation steps are as follows:
[0563] The encoding steps of the quantized residual of each color component are as follows:
[0564] For the first value to be encoded (the absolute value of the color quantization residual or the absolute value of the color quantization residual minus one):
[0565] a) using "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encoding the "color_level_equal_zero" flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise proceed to step b);
[0566] b) using "color_level_equal_one" to mark whether the first value to be encoded is equal to 1, encoding the "color_level_equal_one" flag bit, if the first value to be encoded is 1, encoding is completed, otherwise proceed to step c);
[0567] c) using "color_level_parity" to mark the parity of the first value to be encoded, that is, the remainder when the first value to be encoded is divided by 2, and "color_level_minus2_div2_eq0" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 0. Encode "color_level_parity" and "color_level_minus2_div2_eq0". If the quotient of the first value to be encoded minus one and then divided by two is equal to 0, encoding is completed. Otherwise, proceed to step d);
[0568] d) Using "color_level_minus2_div2_eq1" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 1, encode the "color_level_minus2_div2_eq1" flag bit. If the quotient of the first value to be encoded minus 2 and then divided by two is equal to 1, encoding is completed; otherwise, proceed to step e);
[0569] e) Use "color_level_minus2_div2_eq2" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 2, and encode the "color_level_minus2_div2_eq2" flag bit. If the quotient of the first value to be encoded minus 2 and then divided by two is equal to 2, encoding is completed; otherwise, proceed to step f);
[0570] f) Using "color_level_minus2_div2_eq3" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 3, encode the "color_level_minus2_div2_eq3" flag bit. If the quotient of the first value to be encoded minus 2 and then divided by two is equal to 3, encoding is completed; otherwise, proceed to step g);
[0571] g) Use "color_level_minus2_div2_eq4" to mark whether the quotient of the first value to be encoded minus 2 and then divided by two is equal to 4, encode the "color_level_minus2_div2_eq4" flag bit, if the quotient of the first value to be encoded minus 2 and then divided by two is equal to 4, the encoding is completed, otherwise proceed to step h);
[0572] h) "color_level_minus4_div2" is the quotient of the first value to be encoded minus 4 and divided by 2. Encode the "color_level_minus4_div2" value and the encoding is complete.
[0573] In a specific embodiment, in order to improve hardware throughput, the encoding process may be as follows:
[0574] a) Allocate a budget of remBinsPass1 based on the context model encoding codeword for the color quantization residual (the initial value can be set to 2 24 );
[0575] b) Before the color quantization residual coding begins, determine whether remBinsPass1 is greater than or equal to T (for example, set to 26);
[0576] c) When remBinsPass1 ≥ T, the possible one color_first_comp_zero, one color_second_comp_zero, three color_level_equal_zero, three color_level_equal_one, three color_level_parity, three color_level_minus2_div2_eq0, three color_level_minus2_div2_eq1, three color_level_minus2_div2_eq2, three color_level_minus2_div2_eq3, and three color_level_minus2_div2_eq4 are coded based on the context model, and each time a flag bit / flag is encoded, a remBinsPass1-- operation is performed, and all the binarized codewords of color_level_minus12_div2 are coded based on the bypass model;
[0577] d) When remBinsPass1 ≥ T is not satisfied, all binarized codewords of the color quantization residual are coded using a bypass model-based encoding method.
[0578] For the entire encoding process of the embodiment of the present application, the syntax table description corresponding to the decoding process in the implementation is shown in Table 3 and Table 4 above.
[0579] In another possible implementation, when the attribute information is reflectivity, the attribute quantization residual value is the reflectivity quantization residual value. For ease of description, this may be represented by a second value to be encoded. Therefore, in some embodiments, the method may further include setting the second value to be encoded; the second value to be encoded includes the absolute value of the reflectivity quantization residual value.
[0580] In the embodiment of the present application, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are also not specifically limited. In some embodiments, the at least one first-category syntax element identification information may include at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, and thirteenth syntax element identification information; and the at least one second-category syntax element identification information may include at least third numerical identification information.
[0581] Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be encoded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is performed the fifth operation is equal to 1, and the third numerical value identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is performed the sixth operation.
[0582] In some embodiments, performing the fourth operation on the second value to be encoded may include: performing a subtraction operation on the second value to be decoded and a fourth preset value to obtain a fourth value.
[0583] In some embodiments, performing the fifth operation on the second value to be encoded may include: performing a subtraction operation on the second value to be encoded and a fifth preset value to obtain a fourth intermediate value; shifting the fourth intermediate value right by one position to obtain a fifth numerical value; or setting the fifth numerical value to be equal to the quotient of the fourth intermediate value divided by 2.
[0584] In some embodiments, performing the sixth operation on the second value to be encoded may include: performing a subtraction operation on the second value to be encoded and a sixth preset value to obtain a fifth intermediate value; shifting the fifth intermediate value right by one position to obtain a sixth numerical value; or setting the sixth numerical value to be equal to the quotient of the fifth intermediate value divided by 2.
[0585] In the embodiment of the present application, the fourth preset value, the fifth preset value, and the sixth preset value may not be completely the same. For example, the fourth preset value may be set to 1, the fifth preset value may be set to 1, and the sixth preset value may be set to 5. In addition, the eleventh syntax element identification information may be represented by abs_level_minus1_parity, the twelfth syntax element identification information may be represented by abs_level_minus1_div2_eq0, the thirteenth syntax element identification information may be represented by abs_level_minus1_div2_eq1, and the third value identification information may be represented by abs_level_minus5_div2.
[0586] In some embodiments, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include: encoding the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information that may appear based on the context model, and encoding the third numerical identification information that may appear based on the bypass model, and writing the obtained encoded bits into the bitstream.
[0587] In a specific embodiment, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include:
[0588] determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on the context model, and writing the resulting coded bits into the bitstream;
[0589] If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0590] If the value of the thirteenth syntax element identification information is the second value, then determine the value of the third numerical identification information based on the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and encode the value of the third numerical identification information based on the bypass model, and write the obtained coded bits into the bitstream.
[0591] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0592] The eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
[0593] In other embodiments, when the preset parameters meet the second preset condition, encoding the second value to be encoded may include: encoding the possible eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, and the third value identification information based on the bypass model, and writing the obtained coded bits into the bitstream. In other words, if the preset parameters meet the second preset condition, then all binarized codewords corresponding to the second value to be encoded are encoded using the bypass model.
[0594] In a specific embodiment, when the preset parameter meets the second preset condition, encoding the second value to be encoded may include:
[0595] determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a bypass model, and writing the resulting coded bits into a bitstream;
[0596] If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0597] If the value of the thirteenth syntax element identification information is the second value, then determine the value of the third numerical identification information based on the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and encode the value of the third numerical identification information based on the bypass model, and write the obtained coded bits into the bitstream.
[0598] In some embodiments, determining the value of the eleventh grammatical element identification information based on the parity characteristic of the fourth numerical value obtained after performing the fourth operation on the second value to be encoded may include: if the fourth numerical value is an odd number, determining the value of the eleventh grammatical element identification information to be the first value; if the fourth numerical value is an even number, determining the value of the eleventh grammatical element identification information to be the second value.
[0599] In some embodiments, determining the value of the twelfth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 0 may include: if the fifth numerical value is equal to 0, determining the value of the twelfth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 0, determining the value of the twelfth grammatical element identification information to be the second value.
[0600] In some embodiments, determining the value of the thirteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 1 may include: if the fifth numerical value is equal to 1, determining the value of the thirteenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 1, determining the value of the thirteenth grammatical element identification information to be the second value.
[0601] In some embodiments, determining the value of the third numerical identification information according to the sixth numerical value obtained after performing the sixth operation on the second value to be encoded may include: setting the value of the third numerical identification information to be equal to the sixth numerical value.
[0602] In some embodiments, encoding the value of the third numerical identification information based on the bypass model may include: binarizing the value of the third numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0603] It can be understood that when the reflectivity quantization residual value is not zero, the specific implementation steps for the second value to be encoded (ie, the absolute value of the reflectivity quantization residual value) are as follows:
[0604] a) Use "abs_level_minus1_parity" to mark the parity of the second value to be encoded minus 1, that is, the remainder after the second value to be encoded is subtracted from 1 and then divided by 2. Use "abs_level_minus1_div2_eq0" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 0. If the quotient of the second value to be encoded minus one and then divided by two is equal to 0, encoding is completed; otherwise, proceed to step b);
[0605] b) using "abs_level_minus1_div2_eq1" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 1. If the quotient of the second value to be encoded minus one and then divided by two is equal to 1, encoding is completed; otherwise, proceed to step c);
[0606] c) "abs_level_minus5_div2" is the quotient of the second value to be encoded minus 5 and divided by 2. Encode the "abs_level_minus5_div2" value and the encoding is complete.
[0607] In the related art, when encoding non-zero attribute quantization residual values, the current PCRM uses a context model-based encoding method for all binarized codewords. Taking the reflectivity attribute as an example, if the reflectivity quantization residual value to be encoded is 12, the binarization process is:
[0608] The abs_level_minus1_parity flag is 1;
[0609] The abs_level_minus1_div2_eq0 flag is 0;
[0610] The abs_level_minus1_div2_eq1 flag is 0;
[0611] abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Golomb coding as an example, the result of binarization of 3 is 0 1 1;
[0612] Therefore, for a reflectivity quantization residual value of 12, the binarized codeword result is 1 0 0 0 1 1. In order to improve the hardware throughput, in a specific embodiment, the encoding process can be as follows:
[0613] a) Assign a budget of remBinsPass1 based on the context model encoding codeword to the reflectivity quantization residual (the initial value can be set to 2 24 );
[0614] b) Before the reflectivity quantization residual coding begins, determine whether remBinsPass1 is greater than or equal to T (for example, set to 3);
[0615] c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, and abs_level_minus1_div2_eq1 are coded using a context model, and after each flag bit / flag is coded, a remBinsPass1-- operation is performed, while all binarized codewords of abs_level_minus5_div2 are coded using a bypass model;
[0616] d) When remBinsPass1 ≥ T is not satisfied, all binarized codewords of the reflectivity quantization residual are coded using a bypass model-based encoding method.
[0617] For the entire encoding process of the embodiment of the present application, the syntax table description of the corresponding decoding process in the implementation is shown in the aforementioned Table 5.
[0618] In another possible implementation, when the attribute information is still reflectivity, at this time, at least one first-category syntax element identification information may include at least one of the following: the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
[0619] Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be coded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 1, the fourteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 2, the fifteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 3, the sixteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 4, the seventeenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 5, the eighteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be coded is performed the fifth operation is equal to 6, and the fourth numerical value identification information is used to indicate the seventh numerical value obtained after the second value to be coded is performed the seventh operation.
[0620] In some embodiments, performing the fourth operation on the second value to be encoded may include: performing a subtraction operation on the second value to be encoded and a fourth preset value to obtain a fourth value.
[0621] In some embodiments, performing the fifth operation on the second value to be encoded may include: performing a subtraction operation on the second value to be encoded and a fifth preset value to obtain a fourth intermediate value; shifting the fourth intermediate value right by one position to obtain a fifth numerical value; or setting the fifth numerical value to be equal to the quotient of the fourth intermediate value divided by 2.
[0622] In some embodiments, performing the seventh operation on the second value to be encoded may include: performing a subtraction operation on the second value to be encoded and the seventh preset value to obtain a sixth intermediate value; shifting the sixth intermediate value right by one position to obtain a seventh value; or setting the seventh value to be equal to the quotient of the sixth intermediate value divided by 2.
[0623] In an embodiment of the present application, the fourth preset value, the fifth preset value and the seventh preset value may not be exactly the same. For example, the fourth preset value may be set to 1, the fifth preset value may be set to 1, and the seventh preset value may be set to 15. In addition, the eleventh syntax element identification information can be expressed by abs_level_minus1_parity, the twelfth syntax element identification information can be expressed by abs_level_minus1_div2_eq0, the thirteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq1, the fourteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq2, the fifteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq3, the sixteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq4, the seventeenth syntax element identification information can be expressed by abs_level_minus1_div2_eq5, the eighteenth syntax element identification information can be expressed by abs_level_minus1_div2_eq6, and the fourth numerical identification information can be expressed by abs_level_minus15_div2.
[0624] In some embodiments, when the preset parameters meet the first preset condition, decoding the second value to be decoded may include: decoding the eleventh grammatical element identification information, the twelfth grammatical element identification information, the thirteenth grammatical element identification information, the fourteenth grammatical element identification information, the fifteenth grammatical element identification information, the sixteenth grammatical element identification information, the seventeenth grammatical element identification information and the eighteenth grammatical element identification information that may appear based on the context model to determine the value of at least one first-category grammatical element identification information; and decoding the fourth numerical identification information that may appear based on the bypass model to determine the value of the fourth numerical identification information; and determining the second value to be decoded based on the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
[0625] In a specific embodiment, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include:
[0626] determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on the context model, and writing the resulting coded bits into the bitstream;
[0627] If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0628] If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 2; and encoding the value of the fourteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0629] If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 3; and encoding the value of the fifteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0630] If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 4; and encoding the value of the sixteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0631] If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 5; and encoding the value of the seventeenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0632] If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 6; and encoding the value of the eighteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0633] If the value of the eighteenth syntax element identification information is the second value, determining the value of the fourth numerical identification information according to the seventh numerical value obtained after performing the seventh operation on the second value to be encoded; and encoding the value of the fourth numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0634] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0635] The eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information.
[0636] In other embodiments, when the preset parameters meet the second preset condition, decoding the second value to be decoded may include: encoding the possible eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information, the eighteenth syntax element identification information, and the fourth value identification information based on the bypass model, and writing the obtained coded bits into the bitstream. In other words, if the preset parameters meet the second preset condition, then all binarized codewords corresponding to the second value to be encoded are encoded using the bypass model.
[0637] In a specific embodiment, when the preset parameter meets the second preset condition, encoding the second value to be encoded may include:
[0638] determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a bypass model, and writing the resulting coded bits into a bitstream;
[0639] If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0640] If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 2; and encoding the value of the fourteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0641] If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 3; and encoding the value of the fifteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0642] If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 4; and encoding the value of the sixteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0643] If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information based on whether the fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 5; and encoding the value of the seventeenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0644] If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information based on whether the fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 6; and encoding the value of the eighteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0645] If the value of the eighteenth syntax element identification information is the second value, determining the value of the fourth numerical identification information according to the seventh numerical value obtained after performing the seventh operation on the second value to be encoded; and encoding the value of the fourth numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0646] In some embodiments, determining the value of the fourteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 2 may include: if the fifth numerical value is equal to 2, determining the value of the fourteenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 2, determining the value of the fourteenth grammatical element identification information to be the second value.
[0647] In some embodiments, determining the value of the fifteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 3 may include: if the fifth numerical value is equal to 3, determining the value of the fifteenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 3, determining the value of the fifteenth grammatical element identification information to be the second value.
[0648] In some embodiments, determining the value of the sixteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 4 may include: if the fifth numerical value is equal to 4, determining the value of the sixteenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 4, determining the value of the sixteenth grammatical element identification information to be the second value.
[0649] In some embodiments, determining the value of the seventeenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 5 may include: if the fifth numerical value is equal to 5, determining the value of the seventeenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 5, determining the value of the seventeenth grammatical element identification information to be the second value.
[0650] In some embodiments, determining the value of the eighteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 6 may include: if the fifth numerical value is equal to 6, determining the value of the eighteenth grammatical element identification information to be the first value; if the fifth numerical value is not equal to 6, determining the value of the eighteenth grammatical element identification information to be the second value.
[0651] In some embodiments, determining the value of the fourth numerical identification information according to the seventh numerical value obtained after performing the seventh operation on the second value to be encoded may include: setting the value of the fourth numerical identification information to be equal to the seventh numerical value.
[0652] In some embodiments, encoding the value of the fourth numerical identification information based on the bypass model may include: binarizing the value of the fourth numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0653] It can be understood that when the reflectivity quantization residual value is not zero, the specific implementation steps for the second value to be encoded (ie, the absolute value of the reflectivity quantization residual value) are as follows:
[0654] a) Use "abs_level_minus1_parity" to mark the parity of the second value to be encoded minus 1, that is, the remainder after the second value to be encoded is subtracted from 1 and then divided by 2. Use "abs_level_minus1_div2_eq0" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 0. If the quotient of the second value to be encoded minus one and then divided by two is equal to 0, encoding is completed; otherwise, proceed to step b);
[0655] b) using "abs_level_minus1_div2_eq1" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 1. If the quotient of the second value to be encoded minus one and then divided by two is equal to 1, encoding is completed; otherwise, proceed to step c);
[0656] c) using "abs_level_minus1_div2_eq2" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 2. If the quotient of the second value to be encoded minus one and then divided by two is equal to 2, encoding is complete; otherwise, proceed to step d);
[0657] d) Use "abs_level_minus1_div2_eq3" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 3. If the quotient of the second value to be encoded minus one and then divided by two is equal to 3, the encoding is completed; otherwise, go to step e);
[0658] e) Use "abs_level_minus1_div2_eq4" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 4. If the quotient of the second value to be encoded minus one and then divided by two is equal to 4, encoding is completed; otherwise, go to step f);
[0659] f) using "abs_level_minus1_div2_eq5" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 5. If the quotient of the second value to be encoded minus one and then divided by two is equal to 5, encoding is completed; otherwise, proceed to step g);
[0660] g) Use "abs_level_minus1_div2_eq6" to mark whether the quotient of the second value to be encoded minus one and then divided by two is equal to 6. If the quotient of the second value to be encoded minus one and then divided by two is equal to 6, the encoding is completed; otherwise, go to step h);
[0661] h) "abs_level_minus15_div2" is the quotient of the second value to be encoded minus 15 and divided by 2. Encode the "abs_level_minus15_div2" value and the encoding is complete.
[0662] In a specific embodiment, in order to improve hardware throughput, the encoding process may be as follows:
[0663] a) Assign a budget of remBinsPass1 based on the context model encoding codeword to the reflectivity quantization residual (the initial value can be set to 2 24 );
[0664] b) Before the reflectivity quantization residual coding begins, determine whether remBinsPass1 is greater than or equal to T (such as set to 8);
[0665] c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, abs_level_minus1_div2_eq1, abs_level_minus1_div2_eq2, abs_level_minus1_div2_eq3, abs_level_minus1_div2_eq4, abs_level_minus1_div2_eq5, abs_level_minus1_div2_eq6 are coded based on the context model, and each time a flag bit / flag is encoded, the remBinsPass1-- operation is performed, and all the binarized codewords of abs_level_minus15_div2 are coded based on the bypass model;
[0666] d) When remBinsPass1 ≥ T is not satisfied, all binarized codewords of the reflectivity quantization residual are coded using a bypass model-based encoding method.
[0667] For the entire encoding process of the embodiment of the present application, the syntax table description of the corresponding decoding process in the implementation is shown in the aforementioned Table 6.
[0668] In short, in the embodiments of the present application, as shown in the test results in Tables 7 to 16 above, by setting the budget remBinsPass1 to limit the number of codewords based on the context model used in zero-run encoding, the throughput can be improved and a more hardware-friendly implementation method can be provided.
[0669] Furthermore, an embodiment of the present application also provides a code stream, which is generated by bit encoding based on the information to be encoded.
[0670] Wherein, when the attribute information is a color component, the information to be encoded includes at least one of the following: a quantized residual value of a first color component, a quantized residual value of a second color component, a quantized residual value of a third color component, first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, tenth syntax element identification information, first numerical identification information, and second numerical identification information;
[0671] When the attribute information is reflectivity, the information to be encoded includes at least one of the following: a reflectivity quantized residual value, an eleventh grammatical element identification information, a twelfth grammatical element identification information, a thirteenth grammatical element identification information, a fourteenth grammatical element identification information, a fifteenth grammatical element identification information, a sixteenth grammatical element identification information, a seventeenth grammatical element identification information, an eighteenth grammatical element identification information, third numerical identification information, and fourth numerical identification information.
[0672] Here, the attribute quantization residual value can be a color component quantization residual value or a reflectance quantization residual value. After encoding these to-be-encoded information, the encoder writes them into the bitstream. Thus, the decoder can directly obtain these to-be-encoded information by decoding the bitstream, and thus determine the attribute quantization residual value.
[0673] This embodiment provides a coding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiment. It can be seen that according to the technical solution of the aforementioned embodiment, the preset parameters corresponding to the attribute quantization residual values are first determined, and then it is determined whether the preset parameters meet the first preset conditions; if the preset parameters meet the first preset conditions, then at least one first-category syntax element identification information is decoded based on the context model, and at least one second-category syntax element identification information is decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during decoding can be limited, so that part of the syntax element identification information is decoded using the bypass model, thereby improving the hardware throughput, reducing the difficulty of hardware implementation, and facilitating hardware implementation; and it can also improve the processing speed.
[0674] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 10, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in Figure 10, the encoder 100 may include: a first determining unit 1001 and an encoding unit 1002; wherein,
[0675] The first determining unit 1001 is configured to determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value; and determine a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information according to the attribute quantization residual value;
[0676] The encoding unit 1002 is configured to, if the preset parameters meet the first preset condition, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of at least one second-category syntax element identification information, and write the obtained coded bits into the bitstream.
[0677] In some embodiments, referring to FIG. 10 , the encoder 100 further includes a first judgment unit 1003 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
[0678] In some embodiments, the encoding unit 1002 is further configured to, if the preset parameters meet the second preset condition, perform bypass model-based encoding processing on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and write the obtained encoded bits into the bitstream.
[0679] In some embodiments, the first judgment unit 1003 is further configured to determine whether the value of the preset parameter is less than a preset threshold value.
[0680] In some embodiments, the encoding unit 1002 is further configured to perform encoding processing on the preset parameters corresponding to the attribute quantization residual value, and write the obtained encoding bits into the bitstream.
[0681] In some embodiments, the encoding unit 1002 is further configured to, when the attribute quantization residual value is less than a preset threshold, determine a value of at least one first-category syntax element identification information based on the attribute quantization residual value; if the preset parameters meet a first preset condition, perform context-based encoding processing on the value of the at least one first-category syntax element identification information, and write the resulting coded bits into the bitstream; or, if the preset parameters meet a second preset condition, perform bypass-model-based encoding processing on the value of the at least one first-category syntax element identification information, and write the resulting coded bits into the bitstream.
[0682] In some embodiments, the attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value; the color component quantization residual value includes: a quantization residual value of a first color component, a quantization residual value of a second color component, and a quantization residual value of a third color component.
[0683] In some embodiments, when the attribute quantization residual value is a color component quantization residual value, at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information and second syntax element identification information; wherein the first syntax element identification information is used to indicate whether the quantization residual value of the first color component is equal to 0, and the second syntax element identification information is used to indicate whether the quantization residual value of the first color component and the quantization residual value of the second color component are both equal to 0.
[0684] In some embodiments, the encoding unit 1002 is further configured to determine the value of the first syntax element identification information according to whether the quantized residual value of the first color component is equal to 0; and encode the value of the first syntax element identification information based on the target model, and write the obtained coded bits into the bitstream; if the value of the first syntax element identification information is the first value, then determine the value of the second syntax element identification information according to whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0; and encode the value of the second syntax element identification information based on the target model, and write the obtained coded bits into the bitstream; if the value of the first syntax element identification information is the second value, then encode the value of the first syntax element identification information respectively. The quantized residual value of the color component, the quantized residual value of the second color component and the quantized residual value of the third color component are encoded, and the obtained encoded bits are written into the bitstream; if the value of the second syntax element identification information is the first value, the quantized residual value of the third color component is encoded, and the obtained encoded bits are written into the bitstream; if the value of the second syntax element identification information is the second value, the quantized residual value of the second color component and the quantized residual value of the third color component are encoded respectively, and the obtained encoded bits are written into the bitstream; wherein, if the preset parameters meet the first preset conditions, the context model is determined as the target model; if the preset parameters meet the second preset conditions, the bypass model is determined as the target model.
[0685] In some embodiments, the first determination unit 1001 is further configured to set a first value to be encoded when the attribute quantization residual value is a color component quantization residual value; wherein the first value to be encoded includes one of the following: the absolute value of the quantization residual value of the first color component, the absolute value of the quantization residual value of the second color component, the absolute value of the quantization residual value of the third color component, the absolute value of the quantization residual value of the first color component minus one, the absolute value of the quantization residual value of the second color component minus one, and the absolute value of the quantization residual value of the third color component minus one.
[0686] In some embodiments, at least one first-category syntax element identification information also includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information and sixth syntax element identification information; at least one second-category syntax element identification information at least includes: first numerical identification information; wherein, the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 0, and the first numerical identification information is used to indicate the second numerical value obtained after the second operation on the first value to be encoded.
[0687] In some embodiments, at least one first-category syntax element identification information further includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, and tenth syntax element identification information; at least one second-category syntax element identification information at least includes: second numerical identification information; wherein the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, and the The sixth grammatical element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be encoded is equal to 0, the seventh grammatical element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be encoded is equal to 1, the eighth grammatical element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be encoded is equal to 2, the ninth grammatical element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be encoded is equal to 3, the tenth grammatical element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be encoded is equal to 4, and the second numerical value identification information is used to indicate the third numerical value obtained after the third operation is performed on the first value to be encoded.
[0688] In some embodiments, referring to FIG10 , the encoder 100 further includes a first calculation unit 1004 configured to perform a subtraction operation on the first value to be encoded and the first preset value to obtain a first intermediate value; right-shift the first intermediate value by one position to obtain a first numerical value; or set the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
[0689] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation based on the first value to be encoded and the second preset value to obtain a second intermediate value; right-shift the second intermediate value by one position to obtain a second numerical value; or set the second numerical value to be equal to the quotient of the second intermediate value divided by 2.
[0690] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation on the first value to be encoded and the third preset value to obtain a third intermediate value; right-shift the third intermediate value by one position to obtain a third numerical value; or set the third numerical value to be equal to the quotient of the third intermediate value divided by 2.
[0691] In some embodiments, the first determining unit 1001 is further configured to set a second value to be encoded when the attribute quantization residual value is a reflectivity quantization residual value; wherein the second value to be encoded includes: an absolute value of the reflectivity quantization residual value.
[0692] In some embodiments, at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, and thirteenth syntax element identification information; at least one second-category syntax element identification information includes at least: third numerical identification information; wherein, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be encoded is subjected to the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is subjected to the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is subjected to the fifth operation is equal to 1, and the third numerical identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is subjected to the sixth operation.
[0693] In some embodiments, at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, thirteenth syntax element identification information, fourteenth syntax element identification information, fifteenth syntax element identification information, sixteenth syntax element identification information, seventeenth syntax element identification information, and eighteenth syntax element identification information; at least one second-category syntax element identification information includes at least: fourth numerical value identification information; wherein the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second to-be-encoded value is subjected to the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second to-be-encoded value is subjected to the fifth operation is equal to 0, and the thirteenth syntax element identification information is used to indicate whether the second to-be-encoded value is subjected to the fifth operation Whether the fifth numerical value obtained after the fifth operation of the coded value is equal to 1, the fourteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation of the second value to be coded is equal to 2, the fifteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation of the second value to be coded is equal to 3, the sixteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation of the second value to be coded is equal to 4, the seventeenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation of the second value to be coded is equal to 5, the eighteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation of the second value to be coded is equal to 6, and the fourth numerical value identification information is used to indicate the seventh numerical value obtained after the seventh operation of the second value to be coded.
[0694] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation on the second value to be decoded and a fourth preset value to obtain a fourth value.
[0695] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation based on the second value to be encoded and the fifth preset value to obtain a fourth intermediate value; shift the fourth intermediate value right by one position to obtain a fifth value; or set the fifth value to be equal to the quotient of the fourth intermediate value divided by 2.
[0696] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation based on the second value to be encoded and the sixth preset value to obtain a fifth intermediate value; right-shift the fifth intermediate value by one position to obtain a sixth value; or set the sixth value to be equal to the quotient of the fifth intermediate value divided by 2.
[0697] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation on the second value to be encoded and the seventh preset value to obtain a sixth intermediate value; right-shift the sixth intermediate value by one position to obtain a seventh value; or set the seventh value to be equal to the quotient of the sixth intermediate value divided by 2.
[0698] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the first preset condition, determine the value of the third syntax element identification information according to whether the first value to be encoded is equal to 0; and perform encoding processing on the value of the third syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine the value of the fourth syntax element identification information according to whether the first value to be encoded is equal to 1; and perform encoding processing on the value of the fourth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the fourth syntax element identification information is the second value, perform encoding processing on the value of the fourth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; The method includes: determining a value of fifth syntax element identification information based on an even-odd property of a first value to be coded; determining a value of sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; encoding the values of the fifth syntax element identification information and the values of the sixth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; if the value of the sixth syntax element identification information is a second value, determining a value of first value identification information based on a second value obtained by performing a second operation on the first value to be coded; and encoding the value of the first value identification information based on a bypass model, and writing the obtained coded bits into the bitstream.
[0699] In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following syntax element identification information is completed based on the context model: the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information and the sixth syntax element identification information.
[0700] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the second preset condition, determine the value of the third syntax element identification information according to whether the first value to be encoded is equal to 0; and perform encoding processing on the value of the third syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine the value of the fourth syntax element identification information according to whether the first value to be encoded is equal to 1; and perform encoding processing on the value of the fourth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the fourth syntax element identification information is the second value, perform encoding processing on the value of the fourth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; The method includes: determining a value of fifth syntax element identification information based on an even-odd property of a first value to be coded; determining a value of sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; encoding the values of the fifth syntax element identification information and the values of the sixth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; if the value of the sixth syntax element identification information is a second value, determining a value of first value identification information based on a second value obtained by performing a second operation on the first value to be coded; and encoding the value of the first value identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0701] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the first preset condition, determine the value of the third syntax element identification information according to whether the first value to be encoded is equal to 0; and encode the value of the third syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine the value of the fourth syntax element identification information according to whether the first value to be encoded is equal to 1; and encode the value of the fourth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the fourth syntax element identification information is the second value value, then determine the value of the fifth syntax element identification information according to the parity characteristic of the first value to be coded; determine the value of the sixth syntax element identification information according to whether the first value obtained after the first operation on the first value to be coded is equal to 0; and encode the values of the fifth syntax element identification information and the values of the sixth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the sixth syntax element identification information is the second value, then determine the value of the seventh syntax element identification information according to whether the first value obtained after the first operation on the first value to be coded is equal to 1; and determine the value of the seventh syntax element identification information based on the context model. Perform encoding processing and write the obtained coded bits into the bitstream; if the value of the seventh grammatical element identification information is the second value, determine the value of the eighth grammatical element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 2; and perform encoding processing on the value of the eighth grammatical element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the eighth grammatical element identification information is the second value, determine the value of the ninth grammatical element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 3; and perform encoding processing on the value of the ninth grammatical element identification information based on the context model. The method further comprises performing encoding processing on the value of the tenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 4; encoding the value of the tenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the tenth syntax element identification information is the second value, determining the value of the second value identification information based on the third value obtained by performing the third operation on the first value to be encoded; and encoding the value of the second value identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0702] In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following grammatical element identification information is completed based on the context model: the first grammatical element identification information, the second grammatical element identification information, the third grammatical element identification information, the fourth grammatical element identification information, the fifth grammatical element identification information, the sixth grammatical element identification information, the seventh grammatical element identification information, the eighth grammatical element identification information, the ninth grammatical element identification information, and the tenth grammatical element identification information.
[0703] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the second preset condition, determine the value of the third syntax element identification information according to whether the first value to be encoded is equal to 0; and encode the value of the third syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine the value of the fourth syntax element identification information according to whether the first value to be encoded is equal to 1; and encode the value of the fourth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the fourth syntax element identification information is the second value value, then determine the value of the fifth syntax element identification information according to the parity characteristic of the first value to be coded; determine the value of the sixth syntax element identification information according to whether the first value obtained after the first operation on the first value to be coded is equal to 0; and encode the values of the fifth syntax element identification information and the values of the sixth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the sixth syntax element identification information is the second value, then determine the value of the seventh syntax element identification information according to whether the first value obtained after the first operation on the first value to be coded is equal to 1; and encode the value of the seventh syntax element identification information based on the bypass model. Perform encoding processing and write the obtained coded bits into the bitstream; if the value of the seventh syntax element identification information is the second value, determine the value of the eighth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 2; and perform encoding processing on the value of the eighth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the eighth syntax element identification information is the second value, determine the value of the ninth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 3; and perform encoding processing on the value of the ninth syntax element identification information based on the bypass model. , and writing the obtained coded bits into the bitstream; if the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether the first value obtained by performing the first operation on the first value to be encoded is equal to 4; and encoding the value of the tenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; if the value of the tenth syntax element identification information is the second value, determining the value of the second value identification information based on the third value obtained by performing the third operation on the first value to be encoded; and encoding the value of the second value identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
[0704] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the first preset condition, determine a value of the eleventh syntax element identification information based on the parity property of a fourth value obtained after performing the fourth operation on the second value to be encoded; determine a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be encoded is equal to 0; and, based on a context model, encode the values of the eleventh syntax element identification information and the twelfth syntax element identification information, and write the resulting coded bits into the bitstream; if the value of the twelfth syntax element identification information is the second value, determine a value of the thirteenth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be encoded is equal to 1; and, based on the context model, encode the value of the thirteenth syntax element identification information, and write the resulting coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine a value of the third value identification information based on a sixth value obtained after performing the sixth operation on the second value to be encoded; and, based on a bypass model, encode the value of the third value identification information, and write the resulting coded bits into the bitstream.
[0705] In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following syntax element identification information is completed based on the context model: the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
[0706] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the second preset condition, determine a value of the eleventh syntax element identification information based on the parity property of a fourth value obtained after performing the fourth operation on the second value to be encoded; determine a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be encoded is equal to 0; and encode the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a bypass model, and write the resulting coded bits into the bitstream; if the value of the twelfth syntax element identification information is the second value, determine a value of the thirteenth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be encoded is equal to 1; and encode the value of the thirteenth syntax element identification information based on the bypass model, and write the resulting coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine a value of the third value identification information based on a sixth value obtained after performing the sixth operation on the second value to be encoded; and encode the value of the third value identification information based on the bypass model, and write the resulting coded bits into the bitstream.
[0707] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the first preset condition, determine the value of the eleventh syntax element identification information according to the parity characteristic of the fourth value obtained after the second value to be encoded is performed the fourth operation; determine the value of the twelfth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is equal to 0; and encode the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the twelfth syntax element identification information is the second value, determine whether the fifth value obtained after the second value to be encoded is equal to 1 according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 1. the value of the thirteenth grammatical element identification information; and encoding the value of the thirteenth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the thirteenth grammatical element identification information is the second value, then determining the value of the fourteenth grammatical element identification information based on whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 2; and encoding the value of the fourteenth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the fourteenth grammatical element identification information is the second value, then determining the value of the fifteenth grammatical element identification information based on whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 3; and encoding the value of the fifteenth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the fifteenth grammatical element identification information is the second value, determining the value of the sixteenth grammatical element identification information based on whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 4; and encoding the value of the sixteenth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the sixteenth grammatical element identification information is the second value, determining the value of the seventeenth grammatical element identification information based on whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 5; and The method further comprises: encoding the value of the identification information, and writing the obtained coded bits into the bitstream; if the value of the seventeenth grammatical element identification information is the second value, determining the value of the eighteenth grammatical element identification information based on whether a fifth value obtained by performing the fifth operation on the second value to be coded is equal to 6; encoding the value of the eighteenth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the eighteenth grammatical element identification information is the second value, determining the value of the fourth value identification information based on a seventh value obtained...
Claims
1. A decoding method, applied to a decoder, comprising: Determining preset parameters corresponding to attribute quantization residual values; If the preset parameter meets the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information, and performing bypass model-based decoding processing on at least one second-category syntax element identification information, and determining a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information; The attribute quantization residual value is determined according to a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information.
2. The method according to claim 1, wherein The preset parameter meets the first preset condition, including: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
3. The method according to claim 1, wherein The method further comprises: If the preset parameters meet the second preset conditions, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are both decoded based on the bypass model to determine the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information.
4. The method according to claim 3, wherein: The preset parameter meets the second preset condition, including: determining that the value of the preset parameter is less than a preset threshold value.
5. The method according to claim 1, wherein The determining of the preset parameters corresponding to the attribute quantization residual value includes: The code stream is decoded to determine a preset parameter corresponding to the attribute quantization residual value.
6. The method according to claim 1, wherein When the attribute quantization residual value is less than a preset threshold, the method further includes: If the preset parameter meets the first preset condition, performing context model-based decoding processing on the at least one first-category syntax element identification information to determine a value of the at least one first-category syntax element identification information; and determining the attribute quantization residual value based on the value of the at least one first-category syntax element identification information; or, If the preset parameters meet the second preset condition, the at least one first-category syntax element identification information is decoded based on a bypass model to determine a value of the at least one first-category syntax element identification information; and the attribute quantization residual value is determined based on the value of the at least one first-category syntax element identification information.
7. The method according to claim 1, wherein The attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value; The color component quantization residual values include: a quantization residual value of a first color component, a quantization residual value of a second color component, and a quantization residual value of a third color component.
8. The method according to claim 7, wherein: When the attribute quantization residual value is the color component quantization residual value, the at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information and second syntax element identification information; The first syntax element identification information is used to indicate whether the quantized residual value of the first color component is equal to 0, and the second syntax element identification information is used to indicate whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0.
9. The method according to claim 8, wherein The method further comprises: Decoding the first syntax element identification information based on a target model to determine a value of the first syntax element identification information; If the value of the first syntax element identification information is a first value, determining that the quantized residual value of the first color component is equal to 0, and decoding the second syntax element identification information based on a target model to determine the value of the second syntax element identification information; If the value of the first syntax element identification information is the second value, respectively decoding the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component; If the value of the second syntax element identification information is the first value, determining that the quantized residual value of the second color component is equal to 0, and decoding the quantized residual value of the third color component; If the value of the second syntax element identification information is the second value, decoding the quantized residual value of the second color component and the quantized residual value of the third color component respectively; If the preset parameters meet a first preset condition, the context model is determined as the target model; if the preset parameters meet a second preset condition, the bypass model is determined as the target model.
10. The method according to claim 8, wherein When the attribute quantization residual value is the color component quantization residual value, the method further includes: Set the first value to be decoded; Among them, the first value to be decoded includes one of the following: the absolute value of the quantized residual value of the first color component, the absolute value of the quantized residual value of the second color component, the absolute value of the quantized residual value of the third color component, the absolute value of the quantized residual value of the first color component minus one, the absolute value of the quantized residual value of the second color component minus one, and the absolute value of the quantized residual value of the third color component minus one.
11. The method according to claim 10, wherein: The at least one first-category syntax element identification information further includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information; The at least one second-category syntax element identification information includes at least: first numerical identification information; Among them, the third syntax element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be decoded is equal to 0, and the first numerical value identification information is used to indicate the second numerical value obtained after the second operation on the first value to be decoded.
12. The method according to claim 10, wherein: The at least one first-category syntax element identification information further includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, and tenth syntax element identification information; The at least one second type of syntax element identification information at least includes: second numerical identification information; Among them, the third syntax element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be decoded is equal to 0, the seventh syntax element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be decoded is equal to 1, the eighth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be decoded is equal to 2, the ninth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be decoded is equal to 3, the tenth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation is performed on the first value to be decoded is equal to 4, and the second numerical value identification information is used to indicate a third numerical value obtained after the third operation is performed on the first value to be decoded.
13. The method according to claim 11 or 12, wherein: Performing a first operation on the first value to be decoded includes: Performing a subtraction operation on the first value to be decoded and a first preset value to obtain a first intermediate value; Shifting the first intermediate value right by one position to obtain the first value; or The first numerical value is set equal to a quotient of the first intermediate value divided by 2.
14. The method according to claim 11, wherein Performing a second operation on the first value to be decoded includes: Performing a subtraction operation on the first value to be decoded and a second preset value to obtain a second intermediate value; Shift the second intermediate value right by one position to obtain the second value; or The second numerical value is set equal to a quotient of the second intermediate value divided by 2.
15. The method according to claim 12, wherein: Performing a third operation on the first to-be-decoded value includes: Performing a subtraction operation on the first value to be decoded and a third preset value to obtain a third intermediate value; Shifting the third intermediate value right by one position to obtain the third value; or The third numerical value is set equal to a quotient of the third intermediate value divided by 2.
16. The method according to claim 7, wherein When the attribute quantization residual value is the reflectivity quantization residual value, the method further includes: Set the second value to be decoded; The second value to be decoded includes: the absolute value of the reflectivity quantization residual value.
17. The method according to claim 16, wherein The at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, and thirteenth syntax element identification information; The at least one second-category syntax element identification information includes at least: third numerical identification information; Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be decoded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be decoded is performed the fifth operation is equal to 1, and the third numerical value identification information is used to indicate the sixth numerical value obtained after the second value to be decoded is performed the sixth operation.
18. The method according to claim 16, wherein The at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, thirteenth syntax element identification information, fourteenth syntax element identification information, fifteenth syntax element identification information, sixteenth syntax element identification information, seventeenth syntax element identification information, and eighteenth syntax element identification information; The at least one second-category syntax element identification information includes at least: fourth numerical identification information; The eleventh syntax element identification information is used to indicate the parity characteristic of a fourth value obtained after the fourth operation is performed on the second value to be decoded, the twelfth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 1, the fourteenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 2, the fifteenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 3, the sixteenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 4, the seventeenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 5, the eighteenth syntax element identification information is used to indicate whether the fifth value obtained after the fifth operation is performed on the second value to be decoded is equal to 6, and the fourth value identification information is used to indicate the seventh value obtained after the seventh operation is performed on the second value to be decoded.
19. The method according to claim 17 or 18, wherein Performing a fourth operation on the second to-be-decoded value includes: The fourth value is obtained by performing a subtraction operation on the second value to be decoded and a fourth preset value.
20. The method according to claim 17 or 18, wherein Performing a fifth operation on the second to-be-decoded value includes: performing a subtraction operation on the second to-be-decoded value and a fifth preset value to obtain a fourth intermediate value; Shifting the fourth intermediate value right by one position to obtain the fifth value; or The fifth value is set equal to a quotient of the fourth intermediate value divided by 2.
21. The method according to claim 17, wherein Performing a sixth operation on the second to-be-decoded value includes: performing a subtraction operation on the second to-be-decoded value and a sixth preset value to obtain a fifth intermediate value; Shifting the fifth intermediate value right by one position to obtain the sixth value; or The sixth value is set equal to a quotient of the fifth intermediate value divided by 2.
22. The method according to claim 18, wherein Performing a seventh operation on the second to-be-decoded value includes: performing a subtraction operation on the second to-be-decoded value and a seventh preset value to obtain a sixth intermediate value; Shifting the sixth intermediate value right by one position to obtain the seventh value; or The seventh value is set equal to a quotient of the sixth intermediate value divided by 2.
23. The method according to claim 11, wherein When the preset parameter meets the first preset condition, decoding the first value to be decoded includes: Decoding the third syntax element identification information based on a context model to determine a value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0; If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the context model to determine the value of the fourth syntax element identification information; If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1; If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the context model to determine the value of the sixth syntax element identification information; If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information; If the value of the sixth syntax element identification information is the second value, decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information; The first to-be-decoded value is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical identification information.
24. The method according to claim 23, wherein The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information and the sixth syntax element identification information.
25. The method according to claim 11, wherein When the preset parameter meets the second preset condition, decoding the first value to be decoded includes: Decoding the third syntax element identification information based on a bypass model to determine a value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0; If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the bypass model to determine the value of the fourth syntax element identification information; If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1; If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the bypass model to determine the value of the sixth syntax element identification information; If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information; If the value of the sixth syntax element identification information is the second value, decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information; The first to-be-decoded value is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical identification information.
26. The method according to claim 12, wherein When the preset parameter meets the first preset condition, decoding the first value to be decoded includes: Decoding the third syntax element identification information based on a context model to determine a value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0; If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the context model to determine the value of the fourth syntax element identification information; If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1; If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the context model to determine the value of the sixth syntax element identification information; If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information; If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the context model to determine the value of the seventh syntax element identification information; If the value of the seventh syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a first constant, a first preset value, and the fifth syntax element identification information; If the value of the seventh syntax element identification information is the second value, decoding the eighth syntax element identification information based on the context model to determine the value of the eighth syntax element identification information; If the value of the eighth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the second constant, the first preset value, and the fifth syntax element identification information; If the value of the eighth syntax element identification information is the second value, decoding the ninth syntax element identification information based on the context model to determine the value of the ninth syntax element identification information; If the value of the ninth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a third constant, a first preset value, and the fifth syntax element identification information; If the value of the ninth syntax element identification information is the second value, decoding the tenth syntax element identification information based on the context model to determine the value of the tenth syntax element identification information; If the value of the tenth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a fourth constant, a first preset value, and the fifth syntax element identification information; If the value of the tenth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information; The first to-be-decoded value is determined according to a third preset value, a value of the fifth syntax element identification information, and a value of the second numerical identification information.
27. The method according to claim 26, wherein The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information, and the tenth syntax element identification information.
28. The method according to claim 12, wherein When the preset parameter meets the second preset condition, decoding the first value to be decoded includes: Decoding the third syntax element identification information based on a bypass model to determine a value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 0; If the value of the third syntax element identification information is the second value, decoding the fourth syntax element identification information based on the bypass model to determine the value of the fourth syntax element identification information; If the value of the fourth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to 1; If the value of the fourth syntax element identification information is the second value, decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information; and decoding the sixth syntax element identification information based on the bypass model to determine the value of the sixth syntax element identification information; If the value of the sixth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the first preset value and the fifth syntax element identification information; If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the bypass model to determine the value of the seventh syntax element identification information; If the value of the seventh syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a first constant, a first preset value, and the fifth syntax element identification information; If the value of the seventh syntax element identification information is the second value, decoding the eighth syntax element identification information based on the bypass model to determine the value of the eighth syntax element identification information; If the value of the eighth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of the second constant, the first preset value, and the fifth syntax element identification information; If the value of the eighth syntax element identification information is the second value, decoding the ninth syntax element identification information based on the bypass model to determine the value of the ninth syntax element identification information; If the value of the ninth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a third constant, a first preset value, and the fifth syntax element identification information; If the value of the ninth syntax element identification information is the second value, decoding the tenth syntax element identification information based on the bypass model to determine the value of the tenth syntax element identification information; If the value of the tenth syntax element identification information is the first value, determining that the first to-be-decoded value is equal to the sum of a fourth constant, a first preset value, and the fifth syntax element identification information; If the value of the tenth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information; The first to-be-decoded value is determined according to a third preset value, a value of the fifth syntax element identification information, and a value of the second numerical identification information.
29. The method according to claim 26 or 28, wherein The first constant, the second constant, the third constant, and the fourth constant are all multiples of 2.
30. The method of claim 17, wherein: When the preset parameter meets the first preset condition, decoding the second value to be decoded includes: Decoding the eleventh syntax element identification information based on a context model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on a context model to determine a value of the twelfth syntax element identification information; If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information; If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the context model to determine the value of the thirteenth syntax element identification information; If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the thirteenth syntax element identification information is the second value, decoding the third numerical identification information based on the bypass model to determine the value of the third numerical identification information; The second value to be decoded is determined according to a sixth preset value, a value of the eleventh syntax element identification information, and a value of the third numerical identification information.
31. The method according to claim 30, wherein The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: The eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
32. The method of claim 17, wherein: When the preset parameter meets the second preset condition, decoding the second value to be decoded includes: Decoding the eleventh syntax element identification information based on a bypass model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on a bypass model to determine a value of the twelfth syntax element identification information; If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information; If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the bypass model to determine the value of the thirteenth syntax element identification information; If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the thirteenth syntax element identification information is the second value, decoding the third numerical identification information based on the bypass model to determine the value of the third numerical identification information; The second value to be decoded is determined according to a sixth preset value, a value of the eleventh syntax element identification information, and a value of the third numerical identification information.
33. The method of claim 18, wherein: When the preset parameter meets the first preset condition, decoding the second value to be decoded includes: Decoding the eleventh syntax element identification information based on a context model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on a context model to determine a value of the twelfth syntax element identification information; If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information; If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the context model to determine the value of the thirteenth syntax element identification information; If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the thirteenth syntax element identification information is the second value, decoding the fourteenth syntax element identification information based on the context model to determine the value of the fourteenth syntax element identification information; If the value of the fourteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the sixth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the fourteenth syntax element identification information is the second value, decoding the fifteenth syntax element identification information based on the context model to determine the value of the fifteenth syntax element identification information; If the value of the fifteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the seventh constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the fifteenth syntax element identification information is the second value, decoding the sixteenth syntax element identification information based on the context model to determine the value of the sixteenth syntax element identification information; If the value of the sixteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the eighth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the sixteenth syntax element identification information is the second value, decoding the seventeenth syntax element identification information based on the context model to determine the value of the seventeenth syntax element identification information; If the value of the seventeenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the ninth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the seventeenth syntax element identification information is the second value, decoding the eighteenth syntax element identification information based on the context model to determine the value of the eighteenth syntax element identification information; If the value of the eighteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the tenth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the eighteenth syntax element identification information is the second value, decoding the fourth numerical identification information based on the bypass model to determine the value of the fourth numerical identification information; The second value to be decoded is determined according to a seventh preset value, a value of the eleventh syntax element identification information, and a value of the fourth numerical identification information.
34. The method according to claim 33, wherein The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information.
35. The method of claim 18, wherein When the preset parameter meets the second preset condition, decoding the second value to be decoded includes: Decoding the eleventh syntax element identification information based on a bypass model to determine a value of the eleventh syntax element identification information; and decoding the twelfth syntax element identification information based on a bypass model to determine a value of the twelfth syntax element identification information; If the value of the twelfth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh syntax element identification information; If the value of the twelfth syntax element identification information is the second value, decoding the thirteenth syntax element identification information based on the bypass model to determine the value of the thirteenth syntax element identification information; If the value of the thirteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the fifth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the thirteenth syntax element identification information is the second value, decoding the fourteenth syntax element identification information based on the bypass model to determine the value of the fourteenth syntax element identification information; If the value of the fourteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the sixth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the fourteenth syntax element identification information is the second value, decoding the fifteenth syntax element identification information based on the bypass model to determine the value of the fifteenth syntax element identification information; If the value of the fifteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the seventh constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the fifteenth syntax element identification information is the second value, decoding the sixteenth syntax element identification information based on the bypass model to determine the value of the sixteenth syntax element identification information; If the value of the sixteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the eighth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the sixteenth syntax element identification information is the second value, decoding the seventeenth syntax element identification information based on the bypass model to determine the value of the seventeenth syntax element identification information; If the value of the seventeenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the ninth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the seventeenth syntax element identification information is the second value, decoding the eighteenth syntax element identification information based on the bypass model to determine the value of the eighteenth syntax element identification information; If the value of the eighteenth syntax element identification information is the first value, determining that the second to-be-decoded value is equal to the sum of the tenth constant, the fifth preset value, and the eleventh syntax element identification information; If the value of the eighteenth syntax element identification information is the second value, decoding the fourth numerical identification information based on the bypass model to determine the value of the fourth numerical identification information; The second value to be decoded is determined according to a seventh preset value, a value of the eleventh syntax element identification information, and a value of the fourth numerical identification information.
36. The method according to claim 33 or 35, wherein The fifth constant, the sixth constant, the seventh constant, the eighth constant, the ninth constant, and the tenth constant are all multiples of 2.
37. A coding method, applied to an encoder, comprising: Determining an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value; determining, according to the attribute quantized residual value, a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information; If the preset parameters meet the first preset condition, encoding processing is performed on the value of the at least one first-category syntax element identification information based on the context model, and encoding processing is performed on the value of the at least one second-category syntax element identification information based on the bypass model, and the obtained coded bits are written into the bitstream.
38. The method of claim 37, wherein: The preset parameter meets the first preset condition, including: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
39. The method of claim 37, wherein: The method further comprises: If the preset parameters meet the second preset condition, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are both coded based on the bypass model, and the obtained coded bits are written into the bitstream.
40. The method of claim 39, wherein The preset parameter meets the second preset condition, including: determining that the value of the preset parameter is less than a preset threshold value.
41. The method of claim 37, wherein: The method further comprises: The preset parameters corresponding to the attribute quantization residual value are coded, and the obtained coded bits are written into a bit stream.
42. The method of claim 37, wherein: When the attribute quantization residual value is less than a preset threshold, the method further includes: Determining a value of at least one first-category syntax element identification information according to the attribute quantization residual value; If the preset parameter meets the first preset condition, performing context model-based encoding processing on the value of the at least one first-category syntax element identification information, and writing the obtained coded bits into the bitstream; or, If the preset parameter meets the second preset condition, the value of the at least one first-category syntax element identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
43. The method of claim 37, wherein: The attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value; The color component quantization residual values include: a quantization residual value of a first color component, a quantization residual value of a second color component, and a quantization residual value of a third color component.
44. The method according to claim 43, wherein When the attribute quantization residual value is the color component quantization residual value, the at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information and second syntax element identification information; The first syntax element identification information is used to indicate whether the quantized residual value of the first color component is equal to 0, and the second syntax element identification information is used to indicate whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0.
45. The method of claim 44, wherein: The method further comprises: determining a value of the first syntax element identification information based on whether the quantized residual value of the first color component is equal to 0; and encoding the value of the first syntax element identification information based on a target model, and writing the obtained coded bits into a bitstream; If the value of the first syntax element identification information is a first value, determining the value of the second syntax element identification information based on whether the quantized residual value of the first color component and the quantized residual value of the second color component are both equal to 0; and encoding the value of the second syntax element identification information based on a target model, and writing the obtained coded bits into a bitstream; If the value of the first syntax element identification information is the second value, encoding the quantized residual value of the first color component, the quantized residual value of the second color component, and the quantized residual value of the third color component respectively, and writing the obtained coded bits into the bitstream; If the value of the second syntax element identification information is the first value, encoding the quantized residual value of the third color component, and writing the obtained encoding bits into the bitstream; If the value of the second syntax element identification information is the second value, encoding the quantized residual value of the second color component and the quantized residual value of the third color component respectively, and writing the obtained coded bits into the bitstream; If the preset parameters meet a first preset condition, the context model is determined as the target model; if the preset parameters meet a second preset condition, the bypass model is determined as the target model.
46. The method of claim 44, wherein When the attribute quantization residual value is the color component quantization residual value, the method further includes: Set the first value to be encoded; Among them, the first value to be encoded includes one of the following: the absolute value of the quantized residual value of the first color component, the absolute value of the quantized residual value of the second color component, the absolute value of the quantized residual value of the third color component, the absolute value of the quantized residual value of the first color component minus one, the absolute value of the quantized residual value of the second color component minus one, and the absolute value of the quantized residual value of the third color component minus one.
47. The method of claim 46, wherein The at least one first-category syntax element identification information further includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, and sixth syntax element identification information; The at least one second-category syntax element identification information includes at least: first numerical identification information; Among them, the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation on the first value to be encoded is equal to 0, and the first numerical value identification information is used to indicate the second numerical value obtained after the second operation on the first value to be encoded.
48. The method of claim 46, wherein The at least one first-category syntax element identification information further includes at least one of the following: third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, and tenth syntax element identification information; The at least one second type of syntax element identification information at least includes: second numerical identification information; Among them, the third syntax element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth syntax element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation of the first value to be encoded is equal to 0, the seventh syntax element identification information is used to indicate whether the first numerical value obtained after the first operation of the first value to be encoded is equal to 1, the eighth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation of the first value to be encoded is equal to 2, the ninth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation of the first value to be encoded is equal to 3, the tenth syntax element identification information is used to indicate whether the first numerical value obtained after the first operation of the first value to be encoded is equal to 4, and the second numerical identification information is used to indicate the third numerical value obtained after the third operation of the first value to be encoded.
49. The method according to claim 47 or 48, wherein Performing a first operation on the first value to be encoded includes: Performing a subtraction operation on the first value to be encoded and a first preset value to obtain a first intermediate value; Shifting the first intermediate value right by one position to obtain the first value; or The first numerical value is set equal to a quotient of the first intermediate value divided by 2.
50. The method of claim 47, wherein Performing a second operation on the first value to be encoded includes: Performing a subtraction operation on the first value to be encoded and a second preset value to obtain a second intermediate value; Shift the second intermediate value right by one position to obtain the second value; or The second numerical value is set equal to a quotient of the second intermediate value divided by 2.
51. The method of claim 48, wherein Performing a third operation on the first to-be-encoded value includes: Performing a subtraction operation on the first value to be encoded and a third preset value to obtain a third intermediate value; Shifting the third intermediate value right by one position to obtain the third value; or The third numerical value is set equal to a quotient of the third intermediate value divided by 2.
52. The method of claim 43, wherein: When the attribute quantization residual value is the reflectivity quantization residual value, the method further includes: Set the second value to be encoded; The second value to be encoded includes: the absolute value of the reflectivity quantization residual value.
53. The method of claim 52, wherein: The at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, and thirteenth syntax element identification information; The at least one second-category syntax element identification information includes at least: third numerical identification information; Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth numerical value obtained after the second value to be encoded is performed the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is performed the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the second value to be encoded is performed the fifth operation is equal to 1, and the third numerical value identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is performed the sixth operation.
54. The method of claim 52, wherein: The at least one first-category syntax element identification information includes at least one of the following: eleventh syntax element identification information, twelfth syntax element identification information, thirteenth syntax element identification information, fourteenth syntax element identification information, fifteenth syntax element identification information, sixteenth syntax element identification information, seventeenth syntax element identification information, and eighteenth syntax element identification information; The at least one second-category syntax element identification information includes at least: fourth numerical identification information; Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth value obtained after the second to-be-coded value is subjected to the fourth operation, the twelfth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 1, the fourteenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 2, the fifteenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 3, the sixteenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 4, the seventeenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 5, the eighteenth syntax element identification information is used to indicate whether the fifth value obtained after the second to-be-coded value is subjected to the fifth operation is equal to 6, and the fourth value identification information is used to indicate the seventh value obtained after the second to-be-coded value is subjected to the seventh operation.
55. The method according to claim 53 or 54, wherein Performing a fourth operation on the second to-be-encoded value includes: The fourth value is obtained by performing a subtraction operation on the second value to be decoded and a fourth preset value.
56. The method according to claim 53 or 54, wherein Performing a fifth operation on the second to-be-encoded value includes: performing a subtraction operation on the second value to be encoded and a fifth preset value to obtain a fourth intermediate value; Shifting the fourth intermediate value right by one position to obtain the fifth value; or The fifth value is set equal to a quotient of the fourth intermediate value divided by 2.
57. The method of claim 53, wherein: Performing a sixth operation on the second to-be-encoded value includes: performing a subtraction operation on the second value to be encoded and a sixth preset value to obtain a fifth intermediate value; Shifting the fifth intermediate value right by one position to obtain the sixth value; or The sixth value is set equal to a quotient of the fifth intermediate value divided by 2.
58. The method of claim 54, wherein Performing a seventh operation on the second to-be-encoded value includes: performing a subtraction operation on the second value to be encoded and a seventh preset value to obtain a sixth intermediate value; Shifting the sixth intermediate value right by one position to obtain the seventh value; or The seventh value is set equal to a quotient of the sixth intermediate value divided by 2.
59. The method of claim 47, wherein When the preset parameter meets the first preset condition, encoding the first value to be encoded includes: determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity property of the first value to be coded; determining the value of the sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; and encoding the value of the fifth syntax element identification information and the value of the sixth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the first numerical identification information according to the second numerical value obtained after performing the second operation on the first value to be encoded; and encoding the value of the first numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
60. The method of claim 59, wherein The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information and the sixth syntax element identification information.
61. The method of claim 47, wherein When the preset parameter meets the second preset condition, encoding the first value to be encoded includes: determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity property of the first value to be coded; determining the value of the sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; and encoding the value of the fifth syntax element identification information and the value of the sixth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the first numerical identification information according to the second numerical value obtained after performing the second operation on the first value to be encoded; and encoding the value of the first numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
62. The method of claim 48, wherein When the preset parameter meets the first preset condition, encoding the first value to be encoded includes: determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity property of the first value to be coded; determining the value of the sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; and encoding the value of the fifth syntax element identification information and the value of the sixth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information according to whether a first value obtained by performing the first operation on the first value to be encoded is equal to 1; and encoding the value of the seventh syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information according to whether a first value obtained by performing the first operation on the first value to be encoded is equal to 2; and encoding the value of the eighth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 3; and encoding the value of the ninth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 4; and encoding the value of the tenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the tenth syntax element identification information is the second value, determining the value of the second numerical identification information according to a third numerical value obtained after performing a third operation on the first value to be encoded; and encoding the value of the second numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
63. The method of claim 62, wherein: The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, the ninth syntax element identification information, and the tenth syntax element identification information.
64. The method of claim 48, wherein When the preset parameter meets the second preset condition, encoding the first value to be encoded includes: determining a value of the third syntax element identification information according to whether the first to-be-encoded value is equal to 0; and encoding the value of the third syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information according to whether the first to-be-encoded value is equal to 1; and encoding the value of the fourth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information based on the parity property of the first value to be coded; determining the value of the sixth syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be coded is equal to 0; and encoding the value of the fifth syntax element identification information and the value of the sixth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information based on whether a first value obtained by performing a first operation on the first value to be encoded is equal to 1; and encoding the value of the seventh syntax element identification information based on a bypass model, and writing the obtained coded bits into the bitstream; If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 2; and encoding the value of the eighth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 3; and encoding the value of the ninth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information based on whether a first value obtained by performing the first operation on the first value to be encoded is equal to 4; and encoding the value of the tenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the tenth syntax element identification information is the second value, determining the value of the second numerical identification information according to a third numerical value obtained after performing a third operation on the first value to be encoded; and encoding the value of the second numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
65. The method of claim 53, wherein When the preset parameter meets the first preset condition, encoding the second value to be encoded includes: determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information according to whether a fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the thirteenth syntax element identification information is the second value, determining the value of the third numerical identification information according to a sixth numerical value obtained after performing the sixth operation on the second value to be encoded; and encoding the value of the third numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
66. The method of claim 65, wherein The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: The eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
67. The method of claim 53, wherein When the preset parameter meets the second preset condition, encoding the second value to be encoded includes: determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the thirteenth syntax element identification information is the second value, determining the value of the third numerical identification information according to a sixth numerical value obtained after performing the sixth operation on the second value to be encoded; and encoding the value of the third numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
68. The method of claim 54, wherein When the preset parameter meets the first preset condition, encoding the second value to be encoded includes: determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream; If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information according to whether a fifth value obtained after performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 2; and encoding the value of the fourteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 3; and encoding the value of the fifteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 4; and encoding the value of the sixteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 5; and encoding the value of the seventeenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 6; and encoding the value of the eighteenth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream; If the value of the eighteenth syntax element identification information is the second value, determining the value of the fourth numerical identification information according to a seventh value obtained after performing the seventh operation on the second value to be encoded; and encoding the value of the fourth numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
69. The method of claim 68, wherein The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information, the fourteenth syntax element identification information, the fifteenth syntax element identification information, the sixteenth syntax element identification information, the seventeenth syntax element identification information and the eighteenth syntax element identification information.
70. The method of claim 54, wherein When the preset parameter meets the second preset condition, encoding the second value to be encoded includes: determining a value of the eleventh syntax element identification information based on a parity property of a fourth value obtained after performing the fourth operation on the second value to be coded; determining a value of the twelfth syntax element identification information based on whether a fifth value obtained after performing the fifth operation on the second value to be coded is equal to 0; and encoding the values of the eleventh syntax element identification information and the twelfth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the twelfth syntax element identification information is the second value, determining the value of the thirteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 1; and encoding the value of the thirteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 2; and encoding the value of the fourteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 3; and encoding the value of the fifteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 4; and encoding the value of the sixteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 5; and encoding the value of the seventeenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information based on whether a fifth value obtained by performing the fifth operation on the second to-be-encoded value is equal to 6; and encoding the value of the eighteenth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; If the value of the eighteenth syntax element identification information is the second value, determining the value of the fourth numerical identification information according to a seventh value obtained after performing the seventh operation on the second value to be encoded; and encoding the value of the fourth numerical identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
71. A code stream, wherein The code stream is generated by bit coding based on the information to be coded; wherein: When the attribute information is a color component, the information to be encoded includes at least one of the following: a quantized residual value of a first color component, a quantized residual value of a second color component, a quantized residual value of a third color component, first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, fifth syntax element identification information, sixth syntax element identification information, seventh syntax element identification information, eighth syntax element identification information, ninth syntax element identification information, tenth syntax element identification information, first numerical identification information, and second numerical identification information; When the attribute information is reflectivity, the information to be encoded includes at least one of the following: a reflectivity quantized residual value, an eleventh grammatical element identification information, a twelfth grammatical element identification information, a thirteenth grammatical element identification information, a fourteenth grammatical element identification information, a fifteenth grammatical element identification information, a sixteenth grammatical element identification information, a seventeenth grammatical element identification information, an eighteenth grammatical element identification information, third numerical identification information, and fourth numerical identification information.
72. An encoder, comprising a first determining unit and an encoding unit; wherein: The first determining unit is configured to determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value; and determine a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information based on the attribute quantization residual value; The encoding unit is configured to, if the preset parameter meets the first preset condition, perform context model-based encoding processing on the value of the at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of the at least one second-category syntax element identification information, and write the obtained coded bits into the bitstream.
73. An encoder 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 37 to 70 when running the computer program.
74. A decoder comprising a second determining unit and a decoding unit; wherein: The second determining unit is configured to determine a preset parameter corresponding to the attribute quantization residual value; The decoding unit is configured to, if the preset parameter meets the first preset condition, perform decoding processing on at least one first-category syntax element identification information based on a context model, and perform decoding processing on at least one second-category syntax element identification information based on a bypass model, and determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information; The second determining unit is further configured to determine the attribute quantized residual value according to a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information.
75. A decoder 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 1 to 36 when running the computer program.
76. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which, when executed, implements the method according to any one of claims 1 to 36, or implements the method according to any one of claims 37 to 70.