WO2024119419A1 - Encoding method, decoding method, bit stream, encoder, decoder, and storage medium - Google Patents

Encoding method, decoding method, bit stream, encoder, decoder, and storage medium Download PDF

Info

Publication number
WO2024119419A1
WO2024119419A1 PCT/CN2022/137376 CN2022137376W WO2024119419A1 WO 2024119419 A1 WO2024119419 A1 WO 2024119419A1 CN 2022137376 W CN2022137376 W CN 2022137376W WO 2024119419 A1 WO2024119419 A1 WO 2024119419A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
identification information
syntax element
element identification
equal
Prior art date
Application number
PCT/CN2022/137376
Other languages
French (fr)
Chinese (zh)
Inventor
魏红莲
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/137376 priority Critical patent/WO2024119419A1/en
Publication of WO2024119419A1 publication Critical patent/WO2024119419A1/en

Links

Images

Definitions

  • 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.
  • the geometric information and attribute information of the point cloud are encoded separately.
  • the attribute quantization residual of each point can be encoded/decoded in turn according to a preset order.
  • the Point Cloud Reference Model adopts a context model-based encoding/decoding method for all binarized codewords when encoding non-zero attribute quantization residuals, which brings great difficulty to hardware implementation and reduces the hardware throughput.
  • the present application provides a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium, which can improve the hardware throughput.
  • an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
  • the preset parameter meets the first preset condition, performing a context model-based decoding process on at least one first-category syntax element identification information, and performing a bypass model-based decoding process on at least one second-category syntax element identification information, to 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;
  • the attribute quantization residual value is determined according to 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.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
  • 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.
  • an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:
  • the 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;
  • the information to be encoded includes at least one of the following: a reflectivity quantization 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, a third numerical identification information, and a fourth numerical identification information.
  • an embodiment of the present application provides an encoder, the encoder comprising a first determining unit and an encoding unit; wherein,
  • 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 according to 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 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.
  • an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,
  • a first memory for storing a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the second aspect when running a computer program.
  • an embodiment of the present application provides a decoder, the decoder comprising a second determining unit and a decoding unit; wherein,
  • a second determining unit is configured to determine a preset parameter corresponding to the attribute quantization residual value
  • 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 at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information;
  • the second determination unit is further configured to determine the attribute quantization residual value according to 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.
  • an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:
  • a second memory for storing a computer program that can be run on a second processor
  • the second processor is used to execute the method described in the first aspect when running the computer program.
  • an embodiment of the present application provides a computer-readable storage medium, which stores a computer program.
  • the computer program When executed, it implements the method described in the first aspect, or implements the method described in the second aspect.
  • the embodiment of the present application provides a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium.
  • a property quantization residual value and a preset parameter corresponding to the property quantization residual value are determined; according to the property 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 the first preset condition, the value of at least one first-category syntax element identification information is encoded based on a context model, and the value of at least one second-category syntax element identification information is encoded based on a bypass model, and the obtained encoded bits are written into the bitstream.
  • the preset parameter corresponding to the property 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 at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined; according to 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 property quantization residual value is determined.
  • the number of codewords based on the context model used in 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.
  • FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application.
  • FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application.
  • FIG2A is a schematic diagram of a point cloud image at different viewing angles provided in an embodiment of the present application.
  • FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided in an embodiment of the present application
  • FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application.
  • FIG7 is a detailed flowchart of a decoding method provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of a detailed flow chart of an encoding method provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • 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 in 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.
  • Point Cloud is a three-dimensional representation of the surface of an object.
  • Point cloud (data) on the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.
  • a point cloud is a set of discrete points that are irregularly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene.
  • FIG1A shows a three-dimensional point cloud image
  • FIG1B shows a partial magnified view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information additionally; however, the distribution of points in point clouds in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space in order to fully express a point cloud.
  • each position in the acquisition process has corresponding attribute information, usually RGB color values, and the color value reflects the color of the object; for point clouds, in addition to color information, the attribute information corresponding to each point is also commonly the reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include the location information of the point and the attribute information of the point.
  • the location information of the point can be the three-dimensional coordinate information (x, y, z) of the point.
  • the location information of the point can also be called the geometric information of the point.
  • the attribute information of the point can include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r), etc.
  • the color information can be information on any color space.
  • the color information can be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B).
  • the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.
  • the points in the point cloud may include the three-dimensional coordinate information of the points and the reflectivity value of the points.
  • the points in the point cloud may include the three-dimensional coordinate information of the points and the three-dimensional color information of the points.
  • a point cloud obtained by combining the principles of laser measurement and photogrammetry may include the three-dimensional coordinate information of the points, the reflectivity value of the points and the three-dimensional color information of the points.
  • Figure 2A and 2B a point cloud image and its corresponding data storage format are shown.
  • Figure 2A provides six viewing angles of the point cloud image
  • Figure 2B consists of a file header information part and a data part.
  • the header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud.
  • the point cloud is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
  • Point clouds can be divided into the following categories according to the way they are obtained:
  • Static point cloud the object is stationary, and the device that obtains the point cloud is also stationary;
  • Dynamic point cloud The object is moving, but the device that obtains the point cloud is stationary;
  • Dynamic point cloud acquisition The device used to acquire the point cloud is in motion.
  • point clouds can be divided into two categories according to their usage:
  • Category 1 Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, emergency rescue robots, etc.
  • Category 2 Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so 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.
  • Point clouds can be collected mainly through the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc.
  • Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second.
  • 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second.
  • the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar).
  • the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but also be inconvenient for 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.
  • 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).
  • G-PCC codec framework can be used to compress the first type of static point cloud and the third type of dynamically acquired point cloud, and the V-PCC codec framework can be used to compress the second type of dynamic point cloud.
  • the G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.
  • FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding provided by the embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01.
  • the electronic device can be various types of devices with point cloud encoding and decoding functions.
  • 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., which is not limited by the embodiment of the present application.
  • the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device. That is to say, the electronic device in the embodiment of the present application has the point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
  • the electronic device in the embodiment of the present application has the point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
  • the following uses the AVS-PCC encoding and decoding framework as an example to illustrate the point cloud compression technology.
  • point cloud compression generally adopts the method of compressing point cloud geometry information and attribute information separately.
  • the point cloud geometry information is first encoded in the geometry encoder, and then the reconstructed geometry information is input into the attribute encoder as additional information to assist in the compression of point cloud attributes;
  • the point cloud geometry information is first decoded in the geometry decoder, and then the decoded geometry information is input into the attribute decoder as additional information to assist in the compression of point cloud attributes.
  • the entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.
  • the embodiment of the present application provides a point cloud encoder, as shown in FIG4 , which is a 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.
  • 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, and 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 point cloud space is recursively divided using an octree structure in the octree construction unit 113, and the current point is divided into eight sub-blocks of the same size each time, and the occupation codeword of each sub-block is judged.
  • the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty.
  • the occupation 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, and the reconstructed geometric information is input into the attribute encoder as additional information.
  • the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reallocated to each point after geometric encoding through the attribute recoloring unit 116 to achieve attribute recoloring.
  • 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 the point cloud to be reordered, and 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, trace back one point from the current point to be encoded (current point) according to the Morton order, and the node found is the prediction reference point of the current point to be encoded, and then the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.
  • the embodiment of the present application also provides a point cloud decoder, as shown in FIG5 , which is a 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.
  • the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometry information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same way as the geometry encoding.
  • the geometry information expressed by the octree structure after coordinate transformation is reconstructed in combination with the decoded geometry.
  • the information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometry information.
  • it is input into the attribute decoder as additional information.
  • 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, the inverse quantization unit 126 performs inverse quantization 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 (for example, YUV attribute value) of the current point to be decoded; finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.
  • Condition 1 The geometric position is limitedly lossy and the attributes are lossy;
  • Condition 3 The geometric position is lossless, and the attributes are limitedly lossy
  • Condition 4 The geometric position and attributes are lossless.
  • 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.
  • Attribute compression adopts a transformation-based method, which includes two transformation algorithms, one is the wavelet transform algorithm, and the other is the k-ary discrete cosine transform (DCT) algorithm.
  • DCT discrete cosine transform
  • 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.
  • the current PCRM uses context model-based encoding/decoding for all binarized codewords when encoding non-zero attribute quantization residuals, which will bring great difficulty to hardware implementation. Because usually the hardware can process 4 to 6 bypass model-encoded binary codewords (bins) in one clock cycle, but can only process 1 context model-encoded bin. From the perspective of hardware throughput, if the context model is fully used to encode all bins, the hardware throughput efficiency will be relatively low.
  • an embodiment of the present application provides a coding and decoding method, whether it is an encoding end or a 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 condition; if the preset parameters meet the first preset condition, 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 in 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.
  • FIG6 a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:
  • S601 Determine a preset parameter corresponding to an attribute quantization residual value.
  • the decoding method of the embodiment of the present application is applied to a decoder.
  • the decoding method may 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 a context model to improve hardware throughput.
  • 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.
  • 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 to say, 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 reflectivity quantization residual value.
  • 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.
  • 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. That is, the format and order of the color components are not specifically limited here.
  • the preset parameter is represented by remBinsPass1, and the preset parameter here is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value.
  • the value of the preset parameter can be set to 2 24 , but it is not specifically limited.
  • the preset parameter may be a pre-set parameter value or may be determined by a bitstream. Therefore, in some embodiments, determining the preset parameter corresponding to the attribute quantization residual value may include: decoding the bitstream and determining the preset parameter corresponding to the attribute quantization residual value. In other words, the encoder may write the value of the preset parameter into the bitstream, and then the decoder may obtain the value of the preset parameter by decoding the bitstream.
  • 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.
  • the preset parameter meets the first preset condition, which may include: determining that the value of the preset parameter is greater than or equal to the preset threshold value.
  • the preset threshold value may be a judgment value preset according to the hardware configuration. Exemplarily, the preset threshold value may be set to 3, or 8, or 14, or even other values, which are not specifically limited here.
  • the method may also include: if the preset parameters meet the second preset conditions, at least one first-category syntax element identification information and at least one second-category syntax element identification information are both decoded based on a 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.
  • 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.
  • 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; considering 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.
  • a portion of the syntax elements (such as at least one first-category syntax element identification information) can 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) can 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) can be decoded based on the bypass model.
  • 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.
  • 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.
  • S603 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.
  • 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.
  • the attribute quantization residual value can be determined only by the value of at least one first-category syntax element identification information.
  • the method may further include:
  • At least one first-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 based on the value of at least one first-category syntax element identification information, an attribute quantization residual value is determined.
  • 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 divided by 2 is equal to 0, equal to 1, and so on, thereby determining the attribute quantization residual value.
  • This embodiment provides a decoding method, which determines the preset parameters corresponding to the attribute quantization residual value; if the preset parameters meet the first preset condition, 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; the attribute quantization residual value is determined according to 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 number of codewords based on the context model used in decoding can be limited, so that part of the syntax element identification information is decoded using the bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and it can also improve the processing speed.
  • Figure 7 shows a detailed flow chart of a decoding method provided by an embodiment of the present application.
  • the method may include:
  • S701 Determine a preset parameter corresponding to an attribute quantization residual value.
  • S702 Determine whether the preset parameter is greater than or equal to a preset threshold value.
  • At least one first-category syntax element identification information that may appear is decoded based on the context model, and at least one second-category syntax element identification information that may appear 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.
  • decoding 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 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.
  • 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.
  • 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.
  • 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.
  • the first syntax element identification information can be represented by color_first_comp_zero, color_first_comp_zero 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, color_second_comp_zero 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.
  • the method may further include:
  • 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;
  • the value of the first syntax element identification information is the second value, respectively decode 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;
  • 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;
  • the value of the second syntax element identification information is the second value, respectively decoding the quantized residual value of the second color component and the quantized residual value of the third color component;
  • 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.
  • the preset parameters meet the first preset condition, 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 condition, then the first syntax element identification information and the second syntax element identification information that may appear are decoded based on the bypass model.
  • each syntax element identification information may be a parameter written in the profile, or may be a value of a flag bit/identifier, which is not specifically limited here.
  • 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.
  • the first value may be set to 1 and the second value may be set to 0, but this is not specifically limited.
  • first decode the first syntax element identification information 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 decode the second syntax element identification information. 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 it is necessary to decode the quantized residual value of the third color component. 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.
  • the value of the first syntax element identification information is 0, then it is necessary to decode 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. If the value of the second syntax element identification information is 0, then it is necessary to decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively.
  • the attribute quantization residual value is a color component quantization residual value
  • the attribute quantization residual value is a color component quantization residual value
  • the first value to be decoded can be used to represent it.
  • 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.
  • the absolute value of the quantized residual value and the sign identification information are usually decoded separately; then, based on the sign identification information and the absolute value of the quantized residual value, the quantized residual value of each color component can be determined.
  • the quantization residual value of the third color component must be non-zero; in order to save bit rate, at this time, the absolute value of the quantization residual value can be subtracted by one, and then used as the first value to be decoded.
  • At least one first-category syntax element identification information and at least one second-category syntax element identification information are not specifically limited.
  • the 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, and sixth syntax element identification information; and the at least one second-category syntax element identification information at least includes: first numerical identification information.
  • the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0
  • the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1
  • the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded
  • the sixth grammatical 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 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.
  • performing a first operation on a 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.
  • 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.
  • the first preset value and the second preset value may be different.
  • the first preset value may be set to 2
  • the second preset value may be set to 4.
  • 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 first numerical identification information may be represented by color_level_minus4_div2.
  • 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.
  • 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 and the sixth 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 first numerical identification information that may appear based on the bypass model to determine the value of the first numerical identification information; determining the first value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the first numerical identification information.
  • decoding the first value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • 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 value to be decoded is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical value identification information.
  • the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
  • 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.
  • 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 identification information that may appear based on the bypass model to determine the first value to be decoded. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the first value to be decoded are decoded using the bypass model.
  • decoding the first value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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.
  • each 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 other may be the same, or may be different, which is not specifically limited here.
  • the first value and the second value may be in parameter form or in digital form.
  • each syntax element identification information may be a parameter written in the profile, or may be a value of a flag bit/identifier, which is not specifically limited here.
  • 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.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • 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.
  • 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.
  • 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; debinarizing at least one binary symbol to obtain the value of the first numerical identification information.
  • 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.
  • the fifth syntax element identification information is used to indicate the parity characteristic of the first value to be decoded.
  • 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;
  • 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.
  • the 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 identification information.
  • 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; 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.
  • 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 shifting the value of the first numerical identification information left by one position to obtain the eighth numerical value.
  • determining the first value to be decoded based on the values of the second preset value, the eighth numerical value, and the fifth syntax element identification information may include: adding 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.
  • the fifth syntax element identification information is represented by color_level_parity
  • 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)).
  • step b 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);
  • the decoding steps of the quantized residual value of each color component are as follows:
  • the first value to be decoded is set, 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 for the quantization residual value of the third color component in the above step b), since the previous flag bit has 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 a minus-one operation can be performed first. In this way, the first value to be decoded is decoded, and the specific implementation steps are as follows:
  • step c) 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 the decoding is completed, otherwise proceed to step c);
  • step d 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 the decoding is completed, otherwise proceed to step d);
  • the decoding process can be as follows:
  • remBinsPass1 ⁇ T a decoding method based on the context model 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 decoded; and all binary codewords of color_level_minus4_div2 are decoded based on the bypass model;
  • 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.
  • the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0
  • the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1
  • the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded
  • the sixth grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical element identification information is used to indicate whether
  • performing a first operation on a 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.
  • 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; 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.
  • the first preset value and the third preset value may be different.
  • the first preset value may be set to 2
  • the third preset value may be set to 12.
  • 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
  • the second value identification information may be represented by color_level_minus12_div2.
  • 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.
  • 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; determining the first value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the second numerical identification information.
  • decoding the first value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • the value of the fourth grammatical element identification information is the second value, decoding the fifth grammatical element identification information based on the context model to determine the value of the fifth grammatical element identification information; and decoding the sixth grammatical element identification information based on the context model to determine the value of the sixth grammatical element identification information;
  • 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;
  • the value of the sixth grammar element identification information is the second value, decoding the seventh grammar element identification information based on the context model to determine the value of the seventh grammar element identification information;
  • 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;
  • 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;
  • 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;
  • the value of the eighth grammatical element identification information is the second value, decoding the ninth grammatical element identification information based on the context model to determine the value of the ninth grammatical element identification information;
  • 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;
  • 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;
  • 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;
  • 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;
  • a first value to be decoded 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.
  • the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
  • 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, the tenth grammatical element identification information and the second numerical identification information that may appear based on a bypass model to determine the first value to be decoded.
  • decoding the first value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • a first value to be decoded 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.
  • the first constant, the second constant, the third constant and the fourth constant are all multiples of 2.
  • the first constant is set to 2
  • the second constant is set to 4
  • the third constant is set to 6
  • the fourth constant is set to 8.
  • the first value and the second value corresponding to each other may be the same, or may be different, which is not specifically limited here.
  • the first value and the second value may be in parameter form or in digital form.
  • each grammatical element identification information may be a parameter written in the profile, or may be the value of a flag bit/identifier, which is not specifically limited here.
  • 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.
  • the first value is set to 1, and the second value is set to 0, but this is not specifically limited.
  • the third grammatical element identification information is first decoded. If the value of the third grammatical element identification information is 1, 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.
  • 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.
  • 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+color_level_parity. lor_level_parity; otherwise, if the value of the seventh grammatical element identification information is 0, 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, 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, it is necessary to continue decoding the tenth grammatical element identification information, if the value of the tenth grammatical element identification
  • 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; debinarizing at least one binary symbol to obtain the value of the second numerical identification information.
  • 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; 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.
  • 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 shifting the value of the second numerical identification information left by one position to obtain the ninth numerical value.
  • determining the first value to be decoded based on the values of the third preset value, the ninth numerical value, and the fifth syntax element identification information may include: adding the third preset value, the ninth numerical value, and the values of the fifth syntax element identification information to obtain the first value to be decoded.
  • the fifth syntax element identification information is represented by color_level_parity
  • 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)).
  • step b 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);
  • the decoding steps of the first value to be decoded are as follows:
  • step c) 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 the decoding is completed, otherwise proceed to step c);
  • step d 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 the decoding is completed, otherwise proceed to step d);
  • step g 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 the decoding is completed, otherwise proceed to step g);
  • the decoding process may be as follows:
  • the attribute quantization residual value at this time is the reflectivity quantization residual value.
  • the method may further include: setting a second value to be decoded; wherein the second value to be decoded may include: an absolute value of the reflectivity quantization residual value.
  • the reflectivity quantization residual value when the reflectivity quantization residual value is decoded 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 quantization residual value and the sign identification information are usually decoded separately; then, based on the sign identification information and the absolute value of the quantization residual value, the reflectivity quantization residual value can be determined.
  • At least one first-category syntax element identification information and at least one second-category syntax element identification information are also not specifically limited.
  • 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, thirteenth syntax element identification information; and at least one second-category syntax element identification information includes at least: third numerical identification information.
  • the eleventh grammatical 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 grammatical 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 grammatical 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 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.
  • 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 equal to the difference between the second value to be decoded and the fourth preset value.
  • performing a 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.
  • 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 the 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.
  • the fourth preset value, the fifth preset value and the sixth preset value may not be completely the same.
  • the fourth preset value may be set to 1
  • the fifth preset value may be set to 1
  • the sixth preset value may be set to 5.
  • 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
  • the third value identification information may be represented by abs_level_minus5_div2.
  • 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; 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.
  • decoding the second value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • a 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 value identification information.
  • the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation 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.
  • 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 identification information that may appear based on the bypass model to determine the second value to be decoded. That is, if the preset parameter meets the second preset condition, then all binarized codewords corresponding to the second value to be decoded are decoded using the bypass model.
  • decoding the second value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • a 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 value identification information.
  • the fifth constant may be a multiple of 2.
  • the fifth constant is set to 2.
  • each syntax element identification information may be the same, or may be different, which is not specifically limited here.
  • the first value and the second value may be in parameter form or in digital form.
  • each syntax element identification information may be a parameter written in the profile, or may be a value of a flag bit/identifier, which is not specifically limited here.
  • 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.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • 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.
  • 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 third numerical identification information to determine the second value to be decoded.
  • decoding the third numerical identification information based on a 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; debinarizing at least one binary symbol to obtain the value of the third numerical identification information.
  • the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth value obtained after the second value to be decoded is subjected to the fourth operation.
  • 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;
  • 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.
  • 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 value identification information.
  • 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; 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.
  • 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.
  • 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: adding 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.
  • the eleventh syntax element identification information is represented by abs_level_minus1_parity
  • 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)).
  • the specific implementation steps for the second value to be decoded ie, the reflectivity quantized residual value
  • the abs_level_minus1_parity flag is 1;
  • abs_level_minus1_div2_eq0 flag is 0;
  • abs_level_minus1_div2_eq1 flag is 0;
  • abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Columbus code as an example, the result of binarizing 3 is 0 1 1;
  • the decoding process can be as follows:
  • 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, 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; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
  • the eleventh grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical element identification information
  • 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.
  • performing a 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.
  • 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.
  • the fourth preset value, the fifth preset value and the seventh preset value may not be completely the same.
  • the fourth preset value may be set to 1
  • the fifth preset value may be set to 1
  • the seventh preset value may be set to 15.
  • 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
  • the fourteenth syntax element identification information may be represented by abs_level_minus1_div2_eq2
  • the fifteenth syntax element identification information may be represented by abs_level_minus1_div2_eq3
  • the sixteenth syntax element identification information may be represented by abs_level_minus1_div2_eq4
  • the seventeenth syntax element identification information may be represented by abs_level_minus1_div2_eq5
  • the eighteenth syntax element identification information may be represented by abs_level_minus1_div2_eq6
  • the fourth value identification information may be represented by abs_level_minus15_div2.
  • 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 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; determining the second value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
  • decoding the second value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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 the seventh preset value, the value of the eleventh syntax element identification information and the value of the fourth numerical value identification information.
  • the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
  • 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, the eighteenth grammatical element identification information and the fourth numerical identification information that may appear based on the bypass model to determine the second value to be decoded. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be decoded are decoded using the bypass model.
  • decoding the second value to be decoded may include:
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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;
  • 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 the seventh preset value, the value of the eleventh syntax element identification information and the value of the fourth numerical value identification information.
  • the fifth constant, the sixth constant, the seventh constant, the eighth constant, the ninth constant and the tenth constant are all multiples of 2.
  • 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
  • the tenth constant is set to 12.
  • the corresponding first value and second value may be the same, or may be different, and there is no specific limitation here.
  • the first value and the second value may be in parameter form or in digital form.
  • each syntax element identification information may be a parameter written in a profile or may be a value of a flag/identifier, which is not specifically limited here.
  • 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.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • 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.
  • 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.
  • inus1_parity otherwise, if the value of the fourteenth grammatical element identification information is 0, then it is necessary to continue decoding the fifteenth grammatical element identification information, if the value of the fifteenth grammatical element identification information is 1, then it can be determined that the second value to be decoded is equal to 7+abs_level_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, 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, if the value of the seventeenth grammatical element identification information is 1, then It is determined that the second value to be decoded is equal to 11+abs_level_minus1_
  • decoding the fourth numerical identification information based on a 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; debinarizing at least one binary symbol to obtain the value of the fourth numerical identification information.
  • 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 can 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.
  • 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 place to obtain the eleventh numerical value.
  • 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: adding 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.
  • the eleventh syntax element identification information is represented by abs_level_minus1_parity
  • 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)).
  • the specific implementation steps for the second value to be decoded ie, the reflectivity quantized residual value
  • the decoding process may be as follows:
  • 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 in a context model-based manner, 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 in a bypass model-based manner;
  • setting the budget remBinsPass1 to limit the number of context model-based codewords used when decoding attribute quantization residual values can improve throughput and provide a more hardware-friendly implementation method.
  • Table 7 and Table 8 are the test results of the prediction branch.
  • Table 7 is the test result corresponding to the test condition --- lossless geometry, limit-lossy attributes (C3-lossless geometry,limit-lossy attributes), and Table 8 is the test result corresponding to the test condition --- lossless geometry, lossless attributes (C4-lossless geometry,lossless attributes).
  • Tables 9, 10, 11 and 12 are test results of multi-layer transform branches.
  • Table 9 is the test result corresponding to the test condition ---- limited lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes)
  • Table 10 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes)
  • Table 11 is the test result corresponding to the test condition ---- lossless geometry, limited lossy attributes (C3-lossless geometry, limit-lossy attributes)
  • Table 12 is the test result corresponding to the test condition ---- lossless geometry, lossless attributes (C4-lossless geometry, lossless attributes).
  • Table 13 and Table 14 are the test results of the resource-constrained prediction transformation branch.
  • Table 13 is the test result corresponding to the test condition ---- limited-lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes), and
  • Table 14 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes).
  • Table 15 and Table 16 are the test results of the prediction transformation branch with unlimited resources.
  • Table 15 is the test result corresponding to the test condition ---- limited lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes), and Table 16 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes).
  • the present embodiment provides a decoding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the aforementioned embodiment. It can be seen that according to the technical scheme 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 in 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.
  • FIG8 a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG8 , the method may include:
  • S801 Determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value.
  • the encoding method of the embodiment of the present application is applied to an encoder.
  • the encoding method may 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 a context model to improve hardware throughput.
  • 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.
  • 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 reflectivity quantization residual value.
  • 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.
  • 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. That is, the format and order of the color components are not specifically limited here.
  • the preset parameter is represented by remBinsPass1, and the preset parameter here is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value.
  • the value of the preset parameter can be set to 2 24 , but it is not specifically limited.
  • the preset parameter it can be a pre-set parameter value, or the value of the preset parameter can be written into the bitstream. Therefore, in some embodiments, the method can also include: encoding the preset parameter corresponding to the attribute quantization residual value, and writing the obtained encoding bits into the bitstream. In this way, the value of the preset parameter can be obtained by decoding the bitstream at the decoding end.
  • 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.
  • the attribute quantization residual value may be represented by syntax element identification information.
  • syntax element identification information it 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, equal to 1, equal to 2, and so 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 can be determined.
  • the preset parameter meets the first preset condition, which may include: determining that the value of the preset parameter is greater than or equal to the preset threshold value.
  • the preset threshold value may be a judgment value preset according to the hardware configuration. Exemplarily, the preset threshold value may be set to 3, or 8, or 14, or even other values, which are not specifically limited here.
  • the method may further include: if the preset parameters meet the second preset conditions, encoding processing based on the bypass model is performed on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and the obtained encoding bits are written into the bitstream.
  • 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.
  • 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; considering 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.
  • a part of the syntax elements (such as at least one first-category syntax element identification information) can be coded based on the context model, and another part of the syntax elements (such as at least one second-category syntax element identification information) can be coded based on the bypass model; if the value of the preset parameter is less than the preset threshold value, then all the syntax elements (such as at least one first-category syntax element identification information and at least one second-category syntax element identification information) can be coded based on the bypass model.
  • 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.
  • a context model-based encoding method is used, and when each first-category syntax element identification information is encoded, a --remBinsPass1 operation needs to be performed.
  • the attribute quantization residual value can be determined only by the value of at least one first-category syntax element identification information.
  • the method may further include:
  • a context 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; or,
  • 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.
  • the encoding process can be performed only on the value indicating one first-category syntax element identification information.
  • This embodiment provides a coding method, which 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 according to the attribute quantization residual value; if the preset parameter meets the first preset condition, performs a context model-based coding process on the value of at least one first-category syntax element identification information, and performs a bypass model-based coding process on the value of at least one second-category syntax element identification information, and writes the obtained coded bits into a bitstream.
  • the number of codewords based on the context model used in coding can be limited, so that part of the syntax element identification information is coded using the bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
  • Figure 9 shows a detailed flow chart of an encoding method provided by an embodiment of the present application.
  • the method may include:
  • S901 Determine a preset parameter corresponding to an attribute quantization residual value.
  • S902 Determine whether the preset parameter is greater than or equal to a preset threshold value.
  • S903 If the preset parameter is greater than or equal to the preset threshold value, encoding is performed on at least one first-category syntax element identification information that may appear based on the context model, and encoding is performed on at least one second-category syntax element identification information that may appear based on the bypass model, and the obtained encoding bits are written into the bitstream.
  • 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.
  • 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.
  • the first syntax element identification information can be represented by color_first_comp_zero, color_first_comp_zero 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, color_second_comp_zero 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.
  • the method may further include:
  • the value of the first syntax element identification information is the first value, determining 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 encoding the value of the second syntax element identification information based on the target model, and writing the obtained coded bits into the bitstream;
  • 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 encoded, and the obtained encoding bits are written into the bitstream;
  • 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;
  • 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;
  • 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.
  • the preset parameters meet the first preset condition, 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 condition, then the first syntax element identification information and the second syntax element identification information that may appear are encoded based on the bypass model.
  • each syntax element identification information may be the same, or may be different, which is not specifically limited here.
  • the first value and the second value may be in parameter form or in digital form.
  • each syntax element identification information may be a parameter written in the profile, or may be the value of a flag bit/identifier, which is not specifically limited here.
  • 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.
  • the first value may be set to 1, and the second value may be set to 0, but this is not specifically limited.
  • the attribute quantization residual value is a color component quantization residual value
  • the attribute quantization residual value is a color component quantization residual value
  • the first value to be encoded can be used here to represent it.
  • 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.
  • the absolute value of the quantized residual value and the positive and negative sign identification information are usually encoded separately.
  • 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.
  • the quantized residual value of the third color component 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 the code stream, a subtraction operation can be performed first, and then it can be used as the first value to be encoded.
  • At least one first-category syntax element identification information and at least one second-category syntax element identification information are not specifically limited.
  • the 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, and sixth syntax element identification information; and the at least one second-category syntax element identification information includes at least: first numerical identification information.
  • the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0
  • the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1
  • the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded
  • the sixth grammatical 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 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.
  • 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.
  • 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.
  • the first preset value and the second preset value may be different.
  • the first preset value may be set to 2
  • the second preset value may be set to 4.
  • 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 first value identification information may be represented by color_level_minus4_div2.
  • 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.
  • encoding the first value to be encoded may include: encoding 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 and the sixth grammatical 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 coded bits into the bitstream.
  • encoding the first value to be encoded may include:
  • 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 value to be encoded 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;
  • the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the context model, and writing the obtained coded bits into the bitstream;
  • the value of the sixth syntax element identification information is the second value
  • the value of the first numerical identification information is determined according to 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 bit stream.
  • the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
  • 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.
  • 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 and the first numerical identification information that may appear based on the bypass model, and writing the obtained encoding bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the first value to be encoded are encoded using the bypass model.
  • encoding the first value to be encoded may include:
  • 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 value to be encoded 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;
  • the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the bypass model, and writing the obtained coded bits into the bitstream;
  • the value of the sixth syntax element identification information is the second value
  • the value of the first numerical identification information is determined according to 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 bit stream.
  • 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 is 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 is the second value.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 turn based on the bypass model, and writing the obtained encoded bits into the code stream.
  • 3 is first binarized.
  • a group of binary symbols 011 are obtained; then this group of binary symbols is encoded in turn based on the bypass model, and the obtained coded bits are written into the code stream.
  • 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
  • the specific implementation steps are as follows:
  • the encoding steps of the quantized residual of each color component are as follows:
  • step b) Use "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encode the "color_level_equal_zero” flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise go to step b);
  • step c) 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, if the first value to be encoded is 1, the encoding is completed, otherwise proceed to step c);
  • 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 completed.
  • the encoding process may be as follows:
  • 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.
  • the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0
  • the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1
  • the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded
  • the sixth grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical element identification information is used to indicate whether the first numerical value obtained after the
  • 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.
  • 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.
  • 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.
  • the first preset value and the third preset value may be different.
  • the first preset value may be set to 2
  • the third preset value may be set to 12.
  • 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
  • the second value identification information may be represented by color_level_minus12_div2.
  • encoding the first value to be encoded may include: encoding 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 that may appear based on the context model, and encoding the second numerical identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream.
  • encoding the first value to be encoded may include:
  • 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 value to be encoded 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;
  • the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the context model, and writing the obtained coded bits into the bitstream;
  • 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 the first value obtained after the first operation is performed 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;
  • the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information according to whether the first value obtained after 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;
  • the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether the first value obtained after 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;
  • the value of the second numerical identification information is determined according to the third numerical value obtained after the third operation is performed on the first value to be encoded; and the value of the second numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
  • the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
  • encoding the first value to be encoded may include: encoding 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, the tenth grammatical element identification information and the second numerical identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream.
  • encoding the first value to be encoded may include:
  • 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 value to be encoded 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;
  • the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the bypass model, and writing the obtained coded bits into the bitstream;
  • 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 the first value obtained after the first operation is performed 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;
  • determining the value of the ninth syntax element identification information according to whether the first value obtained after the first operation is performed 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;
  • the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether the first value obtained after 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;
  • the value of the second numerical identification information is determined according to the third numerical value obtained after the third operation is performed on the first value to be encoded; and the value of the second numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
  • determining the value of the seventh grammatical element identification information based on whether a first numerical value obtained after a first operation is performed on the first value to be encoded is equal to 1 may 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.
  • 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.
  • 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 is the first value; if the first numerical value is not equal to 3, determining the value of the ninth grammatical element identification information is the second value.
  • 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 is the first value; if the first numerical value is not equal to 4, determining the value of the tenth grammatical element identification information is the second value.
  • 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.
  • 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 turn based on the bypass model, and writing the obtained encoded bits into the bit stream.
  • 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
  • the specific implementation steps are as follows:
  • the encoding steps of the quantized residual of each color component are as follows:
  • step b) Use "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encode the "color_level_equal_zero” flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise go to step b);
  • step c) 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, if the first value to be encoded is 1, the encoding is completed, otherwise proceed to step c);
  • step g) 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, encoding 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, the encoding is completed, otherwise proceed to step g);
  • 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 completed.
  • the encoding process may be as follows:
  • the attribute quantization residual value at this time is the reflectivity quantization residual value.
  • the method may further include: setting a second value to be encoded; wherein the second value to be encoded includes: an absolute value of the reflectivity quantization residual value.
  • At least one first-category syntax element identification information and at least one second-category syntax element identification information are also not specifically limited.
  • 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, thirteenth syntax element identification information; and at least one second-category syntax element identification information at least includes: third numerical identification information.
  • the eleventh grammatical 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 grammatical 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 grammatical 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
  • the third numerical value identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is subjected to the sixth operation.
  • 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.
  • performing a 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.
  • performing a 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.
  • the fourth preset value, the fifth preset value and the sixth preset value may not be completely the same.
  • the fourth preset value may be set to 1
  • the fifth preset value may be set to 1
  • the sixth preset value may be set to 5.
  • 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
  • the third value identification information may be represented by abs_level_minus5_div2.
  • encoding the second value to be encoded may include: encoding 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, and encoding the third numerical identification information that may appear based on the bypass model, and writing the obtained encoded bits into the bitstream.
  • encoding the second value to be encoded may include:
  • determining the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded 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;
  • the value of the third numerical identification information is determined according to the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
  • the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation 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.
  • encoding the second value to be encoded may include: encoding the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information and the third value identification information that may appear based on the bypass model, and writing the obtained encoding bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be encoded are encoded using the bypass model.
  • encoding the second value to be encoded may include:
  • the value of the third numerical identification information is determined according to the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
  • 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 a first value; if the fourth numerical value is an even number, determining the value of the eleventh grammatical element identification information to be a second value.
  • determining the value of the twelfth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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 is the first value; if the fifth numerical value is not equal to 0, determining the value of the twelfth grammatical element identification information is the second value.
  • determining the value of the thirteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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 is the first value; if the fifth numerical value is not equal to 1, determining the value of the thirteenth grammatical element identification information is the second value.
  • determining the value of the third numerical identification information according to the sixth numerical value obtained after the sixth operation is performed 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.
  • 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 turn based on the bypass model, and writing the obtained encoded bits into the bit stream.
  • the specific implementation steps for the second value to be encoded ie, the absolute value of the reflectivity quantization residual value
  • abbreviations: "abs_level_minus1_parity” is used 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, and "abs_level_minus1_div2_eq0" is used 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, the encoding is completed, otherwise it goes to step b);
  • step c) 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, the encoding is completed, otherwise, proceed to step c);
  • abbreviations: "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.
  • the abs_level_minus1_parity flag is 1;
  • abs_level_minus1_div2_eq0 flag is 0;
  • abs_level_minus1_div2_eq1 flag is 0;
  • abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Columbus code as an example, the result of binarizing 3 is 0 1 1;
  • the binary codeword result is 1 0 0 0 1 1.
  • the encoding process can be as follows:
  • 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, 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; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
  • the eleventh grammatical 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 grammatical 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 grammatical 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
  • the fourteenth grammatical 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 2
  • the fifteenth grammatical 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 3
  • the sixteenth grammatical 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 4
  • the seventeenth grammatical element identification information is used to indicate whether the
  • 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.
  • performing a 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.
  • 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.
  • the fourth preset value, the fifth preset value and the seventh preset value may not be completely the same.
  • the fourth preset value may be set to 1
  • the fifth preset value may be set to 1
  • the seventh preset value may be set to 15.
  • 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
  • the fourteenth syntax element identification information may be represented by abs_level_minus1_div2_eq2
  • the fifteenth syntax element identification information may be represented by abs_level_minus1_div2_eq3
  • the sixteenth syntax element identification information may be represented by abs_level_minus1_div2_eq4
  • the seventeenth syntax element identification information may be represented by abs_level_minus1_div2_eq5
  • the eighteenth syntax element identification information may be represented by abs_level_minus1_div2_eq6
  • the fourth value identification information may be represented by abs_level_minus15_div2.
  • 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 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; determining the second value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
  • encoding the second value to be encoded may include:
  • determining the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded 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;
  • the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fourth numerical identification information is determined according to the seventh numerical value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
  • the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
  • decoding the second value to be decoded may include: encoding 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 and the fourth numerical value identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be encoded are encoded using the bypass model.
  • encoding the second value to be encoded may include:
  • the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
  • the value of the fourth numerical identification information is determined according to the seventh numerical value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
  • determining the value of the fourteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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.
  • determining the value of the fifteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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 is the first value; if the fifth numerical value is not equal to 3, determining 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 numerical value obtained after the fifth operation 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.
  • determining the value of the seventeenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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.
  • determining the value of the eighteenth grammatical element identification information based on whether the fifth numerical value obtained after the fifth operation 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.
  • 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 equal to the seventh numerical value.
  • 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 turn based on the bypass model, and writing the obtained coded bits into the bit stream.
  • the specific implementation steps for the second value to be encoded ie, the absolute value of the reflectivity quantization residual value
  • abbreviations: "abs_level_minus1_parity” is used 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, and "abs_level_minus1_div2_eq0" is used 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, the encoding is completed, otherwise it goes to step b);
  • step c) 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, the encoding is completed, otherwise, proceed to step c);
  • step d) 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, the encoding is completed, otherwise, proceed to step d);
  • step g) 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, the encoding is completed, otherwise proceed to step g);
  • abbreviations: "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 completed.
  • the encoding process may be as follows:
  • 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 after each 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;
  • an embodiment of the present application also provides a code stream, which is generated by bit encoding according to the information to be encoded.
  • 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;
  • the information to be encoded includes at least one of the following: a reflectivity quantization 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, a third numerical identification information, and a fourth numerical identification information.
  • the attribute quantization residual value can be a color component quantization residual value or a reflectance quantization residual value.
  • the encoder writes the information to be encoded into the bitstream after encoding it; thus, the decoder can directly obtain the information to be encoded by decoding the bitstream, and then determine the attribute quantization residual value.
  • the present 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 scheme of the aforementioned embodiment, the preset parameters corresponding to the attribute quantization residual value are first determined, and then it is determined whether the preset parameters meet the first preset condition; if the preset parameters meet the first preset condition, 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 in 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.
  • the encoder 100 may include: a first determining unit 1001 and an encoding unit 1002; wherein,
  • 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;
  • 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 encoded bits into the bitstream.
  • the encoder 100 further includes a first judging unit 1003 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
  • the encoding unit 1002 is further configured to 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 if the preset parameters meet the second preset condition, and write the obtained encoded bits into the bitstream.
  • the first judgment unit 1003 is further configured to determine whether the value of the preset parameter is less than a preset threshold value.
  • the encoding unit 1002 is further configured to perform encoding processing on preset parameters corresponding to the attribute quantization residual value, and write the obtained encoding bits into the bit stream.
  • the encoding unit 1002 is further configured to determine, when the attribute quantization residual value is less than a preset threshold, the 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, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and write the obtained coded bits into the bitstream; or, if the preset parameter meets the second preset condition, perform bypass model-based encoding processing on the value of at least one first-category syntax element identification information, and write the obtained coded bits into the bitstream.
  • 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.
  • 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.
  • 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, 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, encode the value of the first syntax element identification information respectively.
  • 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 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.
  • 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.
  • 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.
  • At least one first-category grammatical element identification information also includes at least one of the following: 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; at least one second-category grammatical element identification information includes at least: second numerical identification information; wherein the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical 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 on the first value to be encoded is equal to 0, the seventh grammatical element identification information is used to
  • 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.
  • 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.
  • the first calculation unit 1004 is further configured to perform a subtraction operation 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.
  • 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; shift the third intermediate value right by one bit 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.
  • 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.
  • At least one first-category syntax element identification information includes at least one of the following: an eleventh syntax element identification information, a twelfth syntax element identification information, and a thirteenth syntax element identification information; at least one second-category syntax element identification information includes at least: third numerical value identification information; wherein, the eleventh syntax element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be encoded, the twelfth syntax element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second value to be encoded is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 1, and the third numerical value identification information is used to indicate a sixth numerical value obtained after a sixth operation is performed on the second value to be encoded.
  • At least one first-category grammatical element identification information includes at least one of the following: 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, and an eighteenth grammatical element identification information; and at least one second-category grammatical element identification information includes at least: fourth numerical value identification information; wherein the eleventh grammatical element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second to-be-encoded value, the twelfth grammatical element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second to-be-encoded value is equal to 0, and the thirteenth grammatical element
  • the first calculation unit 1004 is further configured to perform a subtraction operation on the second value to be decoded and the fourth preset value to obtain a fourth value.
  • the first calculation unit 1004 is further configured to perform a subtraction operation 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.
  • the first calculation unit 1004 is further configured to perform a subtraction operation on the second value to be encoded and the sixth preset value to obtain a fifth intermediate value; shift the fifth intermediate value right 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.
  • 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; shift the sixth intermediate value right 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.
  • 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 comprises the steps of: determining a value of fifth grammatical element identification information according to an even-odd characteristic of a value to be encoded;
  • the encoding unit 1002 is also configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following grammatical element identification information based on the context model is completed: 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 and the sixth grammatical element identification information.
  • 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 comprises the steps of: determining a value of fifth grammatical element identification information according to an even-odd characteristic of a value to be encoded;
  • 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 to-be-encoded value 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, then according to the first whether the value to be encoded is equal to 1, determining the value of the fourth grammatical element identification information; and encoding the value of the fourth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the fourth grammatical element identification information is the second value, determining the value of the fifth grammatical element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth grammatical element identification information according to whether the first value obtained after the first operation on the first value to be encoded is equal to
  • the encoding unit 1002 is further configured to perform a subtraction operation on the value of a preset parameter after each encoding of the following grammatical element identification information based on the context model is completed: 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.
  • 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 value, then determine the value of the fifth grammatical element identification information according to the parity characteristic of the first value to be coded; determine the value of the sixth grammatical 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 value of
  • 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 performed the fifth operation 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine
  • 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 based on the context model is completed: the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
  • the encoding unit 1002 is further configured to, when the preset parameter meets the second 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 performed the fifth operation 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 bypass 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine
  • the encoding unit 1002 is further configured to, when the preset parameter meets the first preset condition, determine the value of the eleventh grammatical element identification information according to the parity characteristic of the fourth value obtained after the second value to be encoded is performed after the fourth operation; determine the value of the twelfth grammatical 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 grammatical element identification information and the value of the twelfth grammatical element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the twelfth grammatical element identification information is the second value, determine whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 1.
  • 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 based on the context model is completed: 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.
  • the encoding unit 1002 is further configured to, when the preset parameter meets the second 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 performed the fifth operation 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 bypass 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular.
  • the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 100.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by the first processor, the encoding method described in any one of the aforementioned embodiments is implemented.
  • the encoder 100 may include: a first communication interface 1101, a first memory 1102 and a first processor 1103; each component is coupled together through a first bus system 1104. It can be understood that the first bus system 1104 is used to achieve connection and communication between these components.
  • the first bus system 1104 also includes a power bus, a control bus and a status signal bus.
  • various buses are labeled as the first bus system 1104 in Figure 11. Among them,
  • the first communication interface 1101 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • a first memory 1102 used to store a computer program that can be run on the first processor 1103;
  • the first processor 1103 is configured to, when running the computer program, execute:
  • 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.
  • the first memory 1102 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the first processor 1103 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 1103.
  • the above-mentioned first processor 1103 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102 and completes the steps of the above method in combination with its hardware.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the first processor 1103 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • This embodiment provides an encoder in which, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used in encoding can be limited, so that part of the syntax element identification information is encoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
  • the decoder 120 may include: a second determination unit 1201 and a decoding unit 1202; wherein,
  • the second determining unit 1201 is configured to determine a preset parameter corresponding to the attribute quantization residual value
  • the decoding unit 1202 is 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;
  • the second determining unit 1201 is further configured to determine the attribute quantization residual value according to 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 decoder 120 further includes a second determination unit 1203 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
  • the decoding unit 1202 is further configured to perform 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 if the preset parameters meet the second preset condition, and 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.
  • the second determination unit 1203 is further configured to determine whether the value of the preset parameter is less than a preset threshold value.
  • the decoding unit 1202 is further configured to decode the bitstream and determine a preset parameter corresponding to the attribute quantization residual value.
  • the decoding unit 1202 is further configured to, when the attribute quantization residual value is less than a preset threshold, if the preset parameters meet the first preset condition, perform context model-based decoding processing on at least one first-category syntax element identification information to determine the value of at least one first-category syntax element identification information; and determine the attribute quantization residual value according to the value of at least one first-category syntax element identification information; or, if the preset parameters meet the second preset condition, perform bypass model-based decoding processing on at least one first-category syntax element identification information to determine the value of at least one first-category syntax element identification information; and determine the attribute quantization residual value according to the value of at least one first-category syntax element identification information.
  • 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.
  • 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.
  • the decoding unit 1202 is further configured to decode the first syntax element identification information based on the target model to determine the value of the first syntax element identification information; if the value of the first syntax element identification information is the first value, determine that the quantized residual value of the first color component is equal to 0, and decode the second syntax element identification information based on the 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, decode 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; if the value of the second syntax element identification information is the first value, determine that the quantized residual value of the second color component is equal to 0, and decode the quantized residual value of the third color component; if the value of the second syntax element identification information is the second value, decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively; wherein, if the preset parameter meets the first preset condition
  • the second determination unit 1201 is further configured to set a first value to be decoded when the attribute quantization residual value is a color component quantization residual value; 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.
  • 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 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 identification information is used to indicate the second numerical value obtained after the second operation on the first value to be decoded.
  • At least one first-category grammatical element identification information also includes at least one of the following: 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; at least one second-category grammatical element identification information includes at least: second numerical identification information; wherein the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded, 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 decoded is equal to 0, the seventh grammatical
  • the decoder 120 further includes a second calculation unit 1204 configured to perform a subtraction operation on the first value to be decoded and the first preset value to obtain a first intermediate value; to right-shift the first intermediate value by one bit to obtain a first numerical value; or to set the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
  • a second calculation unit 1204 configured to perform a subtraction operation on the first value to be decoded and the first preset value to obtain a first intermediate value; to right-shift the first intermediate value by one bit to obtain a first numerical value; or to set the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
  • the second calculation unit 1204 is further configured to perform a subtraction operation on the first value to be decoded and the second preset value to obtain a second intermediate value; right-shift the second intermediate value by one bit 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.
  • the second calculation unit 1204 is further configured to perform a subtraction operation on the first value to be decoded and the third preset value to obtain a third intermediate value; right-shift the third intermediate value by one bit 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.
  • the second determining unit 1201 is further configured to set a second value to be decoded when the attribute quantization residual value is a reflectivity quantization residual value; wherein the second value to be decoded includes: an absolute value of the reflectivity quantization residual value.
  • At least one first-category syntax element identification information includes at least one of the following: an eleventh syntax element identification information, a twelfth syntax element identification information, and a thirteenth syntax element identification information; at least one second-category syntax element identification information includes at least: third numerical value identification information; wherein the eleventh syntax element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be decoded, the twelfth syntax element identification information is used to indicate whether a fifth numerical value obtained after a 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 numerical value obtained after the fifth operation is performed on the second value to be decoded is equal to 1, and the third numerical value identification information is used to indicate a sixth numerical value obtained after a sixth operation is performed on the second value to be decoded.
  • At least one first-category grammatical element identification information includes at least one of the following: 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, and an eighteenth grammatical element identification information; and at least one second-category grammatical element identification information includes at least: fourth numerical value identification information; wherein the eleventh grammatical element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be decoded, the twelfth grammatical element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second value to be decoded is equal to 0, and the thirteenth grammatical element identification information is used
  • the second calculation unit 1204 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.
  • the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the fifth preset value to obtain a fourth intermediate value; right shift the fourth intermediate value by one bit to obtain a fifth value; or set the fifth value to be equal to the quotient of the fourth intermediate value divided by 2.
  • the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the sixth preset value to obtain a fifth intermediate value; shift the fifth intermediate value right by one bit to obtain a sixth value; or set the sixth value to be equal to the quotient of the fifth intermediate value divided by 2.
  • the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the seventh preset value to obtain a sixth intermediate value; shift the sixth intermediate value right 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.
  • the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the third grammatical element identification information based on the context model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first value to be decoded is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the context model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first value to be decoded is equal to 1; if the value of the fourth grammatical element identification information is the second value, determine that the first value to be decoded is equal to 0 based on the context model.
  • the model decodes the fifth grammatical element identification information to determine the value of the fifth grammatical element identification information; and decodes the sixth grammatical element identification information based on the context model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical element identification information is the second value, the first numerical identification information is decoded based on the bypass model to determine the value of the first numerical identification information; the first value to be decoded is determined according to the second preset value, the value of the fifth grammatical element identification information and the value of the first numerical identification information.
  • the decoding unit 1202 is also configured to perform 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: 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 decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the third grammatical element identification information based on the bypass model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the bypass model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 1; if the value of the fourth grammatical element identification information is the second value, determine that the first to-be-decoded value is equal to 0 based on the bypass model.
  • the method comprises the following steps: decoding the fifth grammatical element identification information based on the bypass model to determine the value of the fifth grammatical element identification information; and decoding the sixth grammatical element identification information based on the bypass model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, determining that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical 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; and determining the first value to be decoded according to the second preset value, the value of the fifth grammatical element identification information and the value of the first numerical identification information.
  • the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the third grammatical element identification information based on the context model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first value to be decoded is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the context model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first value to be decoded is equal to 1; if the value of the fourth grammatical element identification information is the second value, then based on the above
  • the following model decodes the fifth grammatical element identification information to determine the value of the fifth grammatical element identification information; and decodes the sixth grammatical element identification information based on the context model to
  • the method comprises the following steps: if the value of the ninth grammatical element identification information is the second value, decoding the tenth grammatical element identification information based on the context model to determine the value of the tenth grammatical element identification information; if the value of the tenth grammatical element identification information is the first value, determining that the first value to be decoded is equal to the sum of the fourth constant, the first preset value and the fifth grammatical element identification information; if the value of the tenth grammatical 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; and determining the first value to be decoded according to the third preset value, the value of the fifth grammatical element identification information and the value of the second numerical identification information.
  • the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information based on the context model is completed: 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 decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the third grammatical element identification information based on the bypass model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the bypass model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 1; if the value of the fourth grammatical element identification information is the second value, then based on the bypass model
  • the fifth grammatical element identification information is decoded to determine the value of the fifth grammatical element identification information; and the sixth grammatical element identification information is decoded based on the bypass
  • the first constant, the second constant, the third constant, and the fourth constant are all multiples of 2.
  • the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the eleventh grammatical element identification information based on the context model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the context model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second value to be decoded is equal to the sum of the fifth preset value and the eleventh grammatical element identification information; if the value of the twelfth grammatical element identification information is the second value, decode the thirteenth grammatical element identification information based on the context model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the first value, determine that the second value to be decoded is equal to the sum of the fifth constant
  • the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information based on the context model is completed: the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
  • the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the eleventh syntax element identification information based on the bypass model to determine the value of the eleventh syntax element identification information; and decode the twelfth syntax element identification information based on the bypass model to determine the value of the twelfth syntax element identification information; if the value of the twelfth syntax element identification information is the first value, determine that the second value to be decoded 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, decode 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, determine that the second value to be decoded 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
  • the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the eleventh grammatical element identification information based on the context model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the context model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleven ...
  • the thirteenth grammatical element identification information is decoded based on the context model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the fifth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the thirteenth grammatical element identification information is the second value, the fourteenth grammatical element identification information is decoded based on the context model to determine the value of the fourteenth grammatical element identification information; if the value of the fourteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the sixth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the fourteenth grammatical element identification information is the second value, the fifteenth grammatical element
  • the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after decoding the following syntax element identification information based on the context model each time:
  • the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the eleventh grammatical element identification information based on the bypass model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the bypass model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh grammatical element identification information; if the value of the twelfth grammatical element identification information is the second value, decode the thirteenth grammatical element identification information based on the bypass model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the second value, If the value of the 13th grammatical element identification information is the second
  • the eightheenth grammatical element identification information is decoded based on the bypass model to determine the value of the eighteenth grammatical element identification information; if the value of the eighteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the tenth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the eighteenth grammatical element identification information is the second value, the fourth numerical identification information is decoded 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 the seventh preset value, the value of the eleventh grammatical element identification information and the value of the fourth numerical identification information.
  • the fifth constant, the sixth constant, the seventh constant, the eighth constant, the ninth constant, and the tenth constant are all multiples of 2.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium, which is applied to the decoder 120.
  • the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the decoding method described in any one of the above embodiments is implemented.
  • the decoder 120 may include: a second communication interface 1301, a second memory 1302 and a second processor 1303; each component is coupled together through a second bus system 1304. It can be understood that the second bus system 1304 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 1304 in Figure 13. Among them,
  • the second communication interface 1301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 1302 is used to store a computer program that can be run on the second processor 1303;
  • the second processor 1303 is configured to, when running the computer program, execute:
  • the preset parameter meets the first preset condition, performing a context model-based decoding process on at least one first-category syntax element identification information, and performing a bypass model-based decoding process on at least one second-category syntax element identification information, to 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;
  • 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.
  • the second processor 1303 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • the present embodiment provides a decoder in which, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used in decoding can be limited, so that part of the syntax element identification information is decoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
  • Figure 14 shows a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • the coding and decoding system 140 may include an encoder 1401 and a decoder 1402.
  • the encoder 1401 may be the encoder described in any one of the aforementioned embodiments
  • the decoder 1402 may be the decoder described in any one of the aforementioned embodiments.

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An encoding method, a decoding method, an encoder, a decoder, and a storage medium. The decoding method comprises: determining a preset parameter corresponding to an attribute quantization residual value; if the preset parameter meets a first preset condition, performing, on at least one piece of first-type syntax element identification information, decoding processing based on a context model, and performing, on at least one piece of second-type syntax element identification information, decoding processing based on a bypass model, so as to determine a value of the at least one piece of first-type syntax element identification information and a value of the at least one piece of second-type syntax element identification information; and determining the attribute quantization residual value according to the value of the at least one piece of first-type syntax element identification information and the value of the at least one piece of second-type syntax element identification information. In this way, a hardware throughput rate can be increased.

Description

编解码方法、码流、编码器、解码器以及存储介质Coding and decoding method, code stream, encoder, decoder and storage medium 技术领域Technical Field
本申请涉及点云编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。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 technique
在基于音视频编码标准提供的点云压缩(Audio Video Standard-Point Cloud Compression,AVS-PCC)编解码框架中,点云的几何信息和属性信息是分开进行编码的。其中,对于每一个点的属性信息,可以按照预设顺序依次对每一个点的属性量化残差进行编码/解码。In the point cloud compression (AVS-PCC) codec framework based on the audio and video coding standard, the geometric information and attribute information of the point cloud are encoded separately. Among them, for the attribute information of each point, the attribute quantization residual of each point can be encoded/decoded in turn according to a preset order.
相关技术中,点云压缩参考平台(Point Cloud Reference Model,PCRM)在编码非零属性量化残差时,对于二值化后的所有码字都采用基于上下文模型的编码/解码方式,给硬件实现带来了较大难度,降低了硬件吞吐率。In the related technologies, the Point Cloud Reference Model (PCRM) adopts a context model-based encoding/decoding method for all binarized codewords when encoding non-zero attribute quantization residuals, which brings great difficulty to hardware implementation and reduces the hardware throughput.
发明内容Summary of the invention
本申请提供一种编解码方法、码流、编码器、解码器以及存储介质,可以提高硬件吞吐率。The present application provides a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium, which can improve the hardware throughput.
本申请的技术方案可以如下实现:The technical solution of this application can be implemented as follows:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
确定属性量化残差值对应的预置参数;Determine preset parameters corresponding to attribute quantization residual values;
若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;If the preset parameter meets the first preset condition, performing a context model-based decoding process on at least one first-category syntax element identification information, and performing a bypass model-based decoding process on at least one second-category syntax element identification information, to 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;
根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。The attribute quantization residual value is determined according to 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.
第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:In a second aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
确定属性量化残差值以及属性量化残差值对应的预置参数;Determine the attribute quantization residual value and the preset parameters corresponding to the attribute quantization residual value;
根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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;
若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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.
第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:
当属性信息为颜色分量时,待编码信息包括下述至少一项:第一颜色分量的量化残差值、第二颜色分量的量化残差值、第三颜色分量的量化残差值、第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息、第一数值标识信息和第二数值标识信息;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 quantization 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, a third numerical identification information, and a fourth numerical identification information.
第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元和编码单元;其中,In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit and an encoding unit; wherein,
第一确定单元,配置为确定属性量化残差值以及属性量化残差值对应的预置参数;以及根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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 according to 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 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.
第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;A first memory, for storing a computer program that can be run on the first processor;
第一处理器,用于在运行计算机程序时,执行如第二方面所述的方法。The first processor is used to execute the method described in the second aspect when running a computer program.
第六方面,本申请实施例提供了一种解码器,该解码器包括第二确定单元和解码单元;其中,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,
第二确定单元,配置为确定属性量化残差值对应的预置参数;A second determining unit is configured to determine a preset parameter corresponding to the attribute quantization residual value;
解码单元,配置为若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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 at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information;
第二确定单元,还配置为根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。The second determination unit is further configured to determine the attribute quantization residual value according to 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.
第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:
第二存储器,用于存储能够在第二处理器上运行的计算机程序;A second memory for storing a computer program that can be run on a second processor;
第二处理器,用于在运行计算机程序时,执行如第一方面所述的方法。The second processor is used to execute the method described in the first aspect when running the computer program.
第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面所述的方法、或者实现如第二方面所述的方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method described in the first aspect, or implements the method described in the second aspect.
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端,确定属性量化残差值以及属性量化残差值对应的预置参数;根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。在解码端,确定属性量化残差值对应的预置参数;若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。这样,无论是编码端还是解码端,在确定出属性量化残差值对应的预置参数之后,可以限定在编解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行编解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度;而且还能够提升处理速度。The embodiment of the present application provides a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium. At the encoding end, a property quantization residual value and a preset parameter corresponding to the property quantization residual value are determined; according to the property 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 the first preset condition, the value of at least one first-category syntax element identification information is encoded based on a context model, and the value of at least one second-category syntax element identification information is encoded based on a bypass model, and the obtained encoded bits are written into the bitstream. At the decoding end, the preset parameter corresponding to the property 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 at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined; according to 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 property 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 in 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
图1A为本申请实施例提供的一种三维点云图像示意图;FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
图1B为本申请实施例提供的一种三维点云图像的局部放大示意图;FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
图2A为本申请实施例提供的一种不同观看角度下的点云图像示意图;FIG2A is a schematic diagram of a point cloud image at different viewing angles provided in an embodiment of the present application;
图2B为本申请实施例提供的一种图2A对应的数据存储格式示意图;FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application;
图3为本申请实施例提供的一种点云编解码的网络架构示意图;FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided in an embodiment of the present application;
图4为本申请实施例提供的一种点云编码器的组成结构示意图;FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;
图5为本申请实施例提供的一种点云解码器的组成结构示意图;FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;
图6为本申请实施例提供的一种解码方法的流程示意图;FIG6 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;
图7为本申请实施例提供的一种解码方法的详细流程示意图;FIG7 is a detailed flowchart of a decoding method provided in an embodiment of the present application;
图8为本申请实施例提供的一种编码方法的流程示意图;FIG8 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
图9为本申请实施例提供的一种编码方法的详细流程示意图;FIG9 is a schematic diagram of a detailed flow chart of an encoding method provided in an embodiment of the present application;
图10为本申请实施例提供的一种编码器的组成结构示意图;FIG10 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
图11为本申请实施例提供的一种编码器的具体硬件结构示意图;FIG11 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
图12为本申请实施例提供的一种解码器的组成结构示意图;FIG12 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
图13为本申请实施例提供的一种解码器的具体硬件结构示意图;FIG13 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
图14为本申请实施例提供的一种编解码系统的组成结构示意图。FIG. 14 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
具体实施方式Detailed ways
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。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 in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解 的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe 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.
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。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 in 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.
点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。Point Cloud is a three-dimensional representation of the surface of an object. Point cloud (data) on the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.
点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。A point cloud is a set of discrete points that are irregularly distributed in space and express the spatial structure and surface properties of a three-dimensional object or scene. FIG1A shows a three-dimensional point cloud image and FIG1B shows a partial magnified view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云中的点可以包括点的位置信息和点的属性信息。例如,点的位置信息可以是点的三维坐标信息(x,y,z)。点的位置信息也可称为点的几何信息。例如,点的属性信息可以包括颜色信息(三维颜色信息)和/或反射率(一维反射率信息r)等等。例如,颜色信息可以是任意一种色彩空间上的信息。例如,颜色信息可以是RGB信息。其中,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information additionally; however, the distribution of points in point clouds in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space in order to fully express a point cloud. Similar to two-dimensional images, each position in the acquisition process has corresponding attribute information, usually RGB color values, and the color value reflects the color of the object; for point clouds, in addition to color information, the attribute information corresponding to each point is also commonly the reflectance value, which reflects the surface material of the object. Therefore, the points in the point cloud can include the location information of the point and the attribute information of the point. For example, the location information of the point can be the three-dimensional coordinate information (x, y, z) of the point. The location information of the point can also be called the geometric information of the point. For example, the attribute information of the point can include color information (three-dimensional color information) and/or reflectance (one-dimensional reflectance information r), etc. For example, the color information can be information on any color space. For example, the color information can be RGB information. Among them, R represents red (Red, R), G represents green (Green, G), and B represents blue (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.
根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。For a point cloud obtained according to the principle of laser measurement, the points in the point cloud may include the three-dimensional coordinate information of the points and the reflectivity value of the points. For another example, for a point cloud obtained according to the principle of photogrammetry, the points in the point cloud may include the three-dimensional coordinate information of the points and the three-dimensional color information of the points. For another example, a point cloud obtained by combining the principles of laser measurement and photogrammetry may include the three-dimensional coordinate information of the points, the reflectivity value of the points and the three-dimensional color information of the points.
如图2A和图2B所示为一幅点云图像及其对应的数据存储格式。其中,图2A提供了点云图像的六个观看角度,图2B由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息(r,g,b)。As shown in Figures 2A and 2B, a point cloud image and its corresponding data storage format are shown. Figure 2A provides six viewing angles of the point cloud image, and Figure 2B consists of a file header information part and a data part. The header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud. For example, the point cloud is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
点云可以按获取的途径分为:Point clouds can be divided into the following categories according to the way they are obtained:
静态点云:即物体是静止的,获取点云的设备也是静止的;Static point cloud: the object is stationary, and the device that obtains the point cloud is also stationary;
动态点云:物体是运动的,但获取点云的设备是静止的;Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;
动态获取点云:获取点云的设备是运动的。Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.
例如,按点云的用途分为两大类:For example, point clouds can be divided into two categories according to their usage:
类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;Category 1: Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, emergency rescue robots, etc.
类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。Category 2: Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so 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.
点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。Point clouds can be collected mainly through the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc. Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second. These technologies reduce the cost and time cycle of point cloud data acquisition and improve the accuracy of data. The change in the way point cloud data is acquired makes it possible to acquire a large amount of point cloud data. With the growth of application demand, the processing of massive 3D point cloud data encounters bottlenecks in storage space and transmission bandwidth.
示例性地,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为10bit,而YUV采样格式为4:2:0,帧率为24fps的1280× 720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。For example, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar). The data volume of a 10s point cloud video is approximately 0.7 million × (4Byte × 3 + 1Byte × 3) × 30fps × 10s = 3.15GB, where 1Byte is 10bit, and the YUV sampling format is 4:2:0. The 1280 × 720 two-dimensional video with a frame rate of 24fps has a data volume of approximately 1280 × 720 × 12bit × 24fps × 10s ≈ 0.33GB for 10s of two-view three-dimensional video, and a data volume of approximately 0.33 × 2 = 0.66GB for 10s of two-view three-dimensional video. It can be seen that the data volume of a point cloud video far exceeds that of a two-dimensional video and a three-dimensional video 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.
也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。That is to say, since the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but also be inconvenient for 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.
目前,可对点云进行压缩的点云编码框架可以是运动图像专家组(Moving Picture Experts Group,MPEG)提供的基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video-based Point Cloud Compression,V-PCC)编解码框架,也可以是音视频编码标准(Audio Video Standard,AVS)提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,V-PCC编解码框架可用于针对第二类动态点云进行压缩。G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。At present, 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 cloud and the third type of dynamically acquired point cloud, and the V-PCC codec framework can be used to compress the second type of dynamic point cloud. The G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.
本申请实施例提供了一种包含解码方法和编码方法的点云编解码系统的网络架构,图3为本申请实施例提供的一种点云编解码的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有点云编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限定。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 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 the implementation process, 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., which is not limited by the embodiment of the present application.
其中,本申请实施例中的解码器或编码器就可以为上述电子设备。也就是说,本申请实施例中的电子设备具有点云编解码功能,一般包括点云编码器(即编码器)和点云解码器(即解码器)。The decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device. That is to say, the electronic device in the embodiment of the present application has the point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
下面以AVS-PCC编解码框架为例进行点云压缩技术的说明。The following uses the AVS-PCC encoding and decoding framework as an example to illustrate the point cloud compression technology.
可以理解,点云压缩一般采用点云几何信息和属性信息分别压缩的方式,在编码端,首先在几何编码器中编码点云几何信息,然后将重建几何信息作为附加信息输入到属性编码器中,辅助点云属性的压缩;在解码端,首先在几何解码器中解码点云几何信息,然后将解码后的几何信息作为附加信息输入到属性解码器中,辅助点云属性的压缩。整个编解码器由预处理/后处理、几何编码/解码、属性编码/解码几部分组成。It can be understood that point cloud compression generally adopts the method of compressing point cloud geometry information and attribute information separately. At the encoding end, the point cloud geometry information is first encoded in the geometry encoder, and then the reconstructed geometry information is input into the attribute encoder as additional information to assist in the compression of point cloud attributes; at the decoding end, the point cloud geometry information is first decoded in the geometry decoder, and then the decoded geometry information is input into the attribute decoder as additional information to assist in the compression of point cloud attributes. The entire codec consists of pre-processing/post-processing, geometry encoding/decoding, and attribute encoding/decoding.
本申请实施例提供一种点云编码器,如图4所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云编码器11包括几何编码器:坐标平移单元111、坐标量化单元112、八叉树构建单元113、几何熵编码器114、几何重建单元115。属性编码器:属性重上色单元116、颜色空间变换单元117、第一属性预测单元118、量化单元119和属性熵编码器1110。The embodiment of the present application provides a point cloud encoder, as shown in FIG4 , which is a 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.
对于PCRM,在编码端的几何编码部分,首先对原始几何信息进行预处理,通过坐标平移单元111将几何原点归一化到点云空间中的最小值位置,通过坐标量化单元112将几何信息从浮点数转化为整形,便于后续的规则化处理;然后对规则化的几何信息进行几何编码,在八叉树构建单元113中采用八叉树结构对点云空间进行递归划分,每次将当前点划分成八个相同大小的子块,并判断每个子块的占有码字情况,当子块内不包含点时记为空,否则记为非空,在递归划分的最后一层记录所有块的占有码字信息,并进行编码;通过八叉树结构表达的几何信息一方面输入到几何熵编码器114中形成几何码流,另一方面在几何重建单元115进行几何重建处理,重建后的几何信息作为附加信息输入到属性编码器中。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, and 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 point cloud space is recursively divided using an octree structure in the octree construction unit 113, and the current point is divided into eight sub-blocks of the same size each time, and the occupation codeword of each sub-block is judged. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupation 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, and the reconstructed geometric information is input into the attribute encoder as additional information.
在属性编码部分,首先对原始的属性信息进行预处理,由于几何信息在几何编码之后有所异动,因此,通过属性重上色单元116为几何编码后的每一个点重新分配属性值,实现属性重上色。此外,如果处理的属性信息为颜色信息,还需要将原始的颜色信息通过颜色空间变换单元117进行颜色空间变换,将其转变成更符合人眼视觉特性的YUV色彩空间;然后通过第一属性预测单元118对预处理后属性信息进行属性编码,属性编码首先需要将点云进行重排序,重排序的方式是莫顿码,因此属性编码的遍历顺序为莫顿顺序。PCRM中的属性预测方法为基于莫顿顺序的单点预测,即按照莫顿顺序从当前待编码点(当前点)向前回溯一个点,找到的节点为当前待编码点的预测参考点,然后将预测参考点的属性重建值作为属性预测值,属性残差值为当前待编码点的属性原始值与属性预测值之间的差值;最后通过量化单元119对属性残差值进行量化,将量化后的残差信息输入到属性熵编码器1110中形成属性码流。In the attribute encoding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reallocated 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 the point cloud to be reordered, and 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, trace back one point from the current point to be encoded (current point) according to the Morton order, and the node found is the prediction reference point of the current point to be encoded, and then the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.
本申请实施例还提供一种点云解码器,如图5所示为AVS所提供的点云压缩参考平台PCRM的框架,该点云解码器12包括几何解编码器:几何熵解码器121、八叉树重建单元122、坐标反量化单元123、坐标反平移单元124。属性解码器:属性熵解码器125、反量化单元126、第二属性预测单元127和颜色空间反变换单元128。The embodiment of the present application also provides a point cloud decoder, as shown in FIG5 , which is a 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.
在解码端,同样采用几何和属性分别解码的方式。在几何解码部分,首先通过几何熵解码器121对几何码流进行熵解码,得到每个节点的几何信息,然后按照和几何编码相同的方式通过八叉树重建单 元122构建八叉树结构,结合解码几何重建出坐标变换后的、通过八叉树结构表达的几何信息,一方面将该信息通过坐标反量化单元123进行坐标反量化和通过坐标反平移单元124进行反平移,得到解码几何信息。另一方面作为附加信息输入到属性解码器中。At the decoding end, the same method of decoding geometry and attributes separately is adopted. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometry information of each node, and then the octree structure is constructed by the octree reconstruction unit 122 in the same way as the geometry encoding. The geometry information expressed by the octree structure after coordinate transformation is reconstructed in combination with the decoded geometry. On the one hand, the information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometry information. On the other hand, it is input into the attribute decoder as additional information.
在属性解码部分,按照与编码端相同的方式构建莫顿顺序,先通过属性熵解码器125对属性码流进行熵解码,得到量化后的残差信息;然后通过反量化单元126进行反量化,得到属性残差值;类似的,按照与属性编码相同的方式,通过第二属性预测单元127获得当前待解码点的属性预测值,然后将属性预测值与属性残差值相加,可以恢复出当前待解码点的属性重建值(例如,YUV属性值);最后,经过颜色空间反变换单元128的颜色空间反变换得到解码属性信息。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, the inverse quantization unit 126 performs inverse quantization 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 (for example, YUV attribute value) of the current point to be decoded; finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.
还可以理解,对于AVS-PCC编解码框架而言,通用测试条件如下:It can also be understood that for the AVS-PCC codec framework, the general test conditions are as follows:
(1)测试条件共4种:(1) There are 4 test conditions:
条件1:几何位置有限度有损、属性有损;Condition 1: The geometric position is limitedly lossy and the attributes are lossy;
条件2:几何位置无损、属性有损;Condition 2: The geometric position is lossless, but the attributes are lossy;
条件3:几何位置无损、属性有限度有损;Condition 3: The geometric position is lossless, and the attributes are limitedly lossy;
条件4:几何位置无损、属性无损。Condition 4: The geometric position and attributes are lossless.
(2)通用测试序列包括Cat1A,Cat1B,Cat1C,Cat2-frame和Cat3共五类。其中,Cat1A、Cat2-frame点云只包含反射率属性信息,Cat1B、Cat3点云只包含颜色属性信息,Cat1C点云同时包含颜色和反射率属性信息。(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.
(3)技术路线:共2种,以属性压缩所采用的算法进行区分。(3) Technical routes: There are 2 types, which are differentiated by the algorithm used for attribute compression.
技术路线1:预测分支,属性压缩采用基于预测的方法;Technical route 1: predictive branching, attribute compression adopts a prediction-based method;
技术路线2:变换分支,属性压缩采用基于变换的方法,共包含两种变换算法,一种是小波变换算法,一种是k元离散余弦变换(Discrete Cosine Transform,DCT)算法。Technical route 2: Transformation branch. Attribute compression adopts a transformation-based method, which includes two transformation algorithms, one is the wavelet transform algorithm, and the other is the k-ary discrete cosine transform (DCT) algorithm.
在相关技术中,当前AVS-PCC对于属性量化残差而言,编解码端采用相同的顺序(例如,点云原始采集顺序、莫顿双向、希尔伯特顺序等)依次对每一个点的属性量化残差进行编码/解码。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.
然而,当前PCRM在编码非零属性量化残差时,对于二值化后的所有码字都采用基于上下文模型的编码/解码方式,这将给硬件实现带来较大难度。因为通常硬件在一个时钟周期内可以处理4~6个旁路模型编码的二进制码字(bin),但仅可以处理1个上下文模型编码的bin。从硬件吞吐率(throughput)的角度来讲,如果完全采用上下文模型来编码所有bin,硬件吞吐率效率会比较低。However, the current PCRM uses context model-based encoding/decoding for all binarized codewords when encoding non-zero attribute quantization residuals, which will bring great difficulty to hardware implementation. Because usually the hardware can process 4 to 6 bypass model-encoded binary codewords (bins) in one clock cycle, but can only process 1 context model-encoded bin. From the perspective of hardware throughput, if the context model is fully used to encode all bins, the hardware throughput efficiency will be relatively low.
基于此,本申请实施例提供了一种编解码方法,无论是编码端还是解码端,首先确定属性量化残差值对应的预置参数,然后判断预置参数是否满足第一预设条件;如果预置参数符合第一预设条件,那么对至少一个第一类语法元素标识信息进行基于上下文模型的编解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的编解码处理;如此,根据所确定的预置参数,可以限定在编解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行编解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度,有利于硬件实现;而且还能够提升处理速度。Based on this, an embodiment of the present application provides a coding and decoding method, whether it is an encoding end or a 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 condition; if the preset parameters meet the first preset condition, 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 in 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.
下面将结合附图对本申请各实施例进行详细说明。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
在本申请的一实施例中,参见图6,其示出了本申请实施例提供的一种解码方法的流程示意图。如图6所示,该方法可以包括:In one embodiment of the present application, referring to FIG6 , a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:
S601:确定属性量化残差值对应的预置参数。S601: Determine a preset parameter corresponding to an attribute quantization residual value.
需要说明的是,本申请实施例的解码方法应用于解码器。另外,该解码方法具体可以是指一种属性量化残差解码方法;更具体地,是指一种限制基于上下文模型的码字数量的属性量化残差解码方法,以提高硬件吞吐率。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 may 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 a context model to improve hardware throughput.
还需要说明的是,在本申请实施例中,对于点云的属性信息,这里可以是指颜色分量,也可以是指反射率,甚至还可以是其他属性。因此,在一些实施例中,属性量化残差值可以包括下述其中之一:颜色分量量化残差值和反射率量化残差值。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.
在本申请实施例中,对于颜色分量量化残差值而言,颜色分量量化残差值可以包括:第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值。也就是说,根据本申请实施例的解码方法,可以解码出以下任意一项:第一颜色分量的量化残差值、第二颜色分量的量化残差值、第三颜色分量的量化残差值和反射率量化残差值。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 to say, 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 reflectivity quantization residual value.
其中,对于第一颜色分量、第二颜色分量和第三颜色分量,可以是RGB格式,或者也可以是YUV格式,甚至还可以是其他格式。另外,对于这三个颜色分量的顺序,以YUV为例,可以是YUV顺序,也可以是UYV顺序,还可以是UVY顺序,甚至还可以是VYU顺序等等,即对于颜色分量的格式以及顺序,这里均不作具体限定。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. In addition, 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. That is, the format and order of the color components are not specifically limited here.
还需要说明的是,在本申请实施例中,预置参数用remBinsPass1表示,这里的预置参数用于表示为属性量化残差值分配基于上下文模型的码字的预算数量。示例性地,预置参数的取值可以设置为2 24,但是并不作具体限定。 It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, and the preset parameter here is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value. Exemplarily, the value of the preset parameter can be set to 2 24 , but it is not specifically limited.
在本申请实施例中,对于预置参数而言,其可以是预先设定的参数值,也可以是通过码流确定的。因此,在一些实施例中,确定属性量化残差值对应的预置参数,可以包括:解码码流,确定属性量化残差值对应的预置参数。也就是说,编码端可以将预置参数的取值写入码流,然后解码端通过解码码流就可获得预置参数的取值。In the embodiment of the present application, the preset parameter may be a pre-set parameter value or may be determined by a bitstream. Therefore, in some embodiments, determining the preset parameter corresponding to the attribute quantization residual value may include: decoding the bitstream and determining the preset parameter corresponding to the attribute quantization residual value. In other words, the encoder may write the value of the preset parameter into the bitstream, and then the decoder may obtain the value of the preset parameter by decoding the bitstream.
这样,在属性量化残差值解码开始前,需要先确定预置参数的取值,然后判断预置参数是否符合第一预设条件,进而能够限定在解码时使用的基于上下文模型的码字数量,提高硬件吞吐率。In this way, before decoding of the attribute quantization residual value begins, it is necessary to first determine the value of the preset parameter, and then determine 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 hardware throughput.
S602:若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。S602: If the preset parameters meet the first preset condition, 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.
需要说明的是,在本申请实施例中,预置参数符合第一预设条件,可以包括:确定预置参数的取值大于或等于预设门限值。其中,预设门限值可以是根据硬件配置情况预先设置的一个判定值。示例性地,预设门限值可以设置为3,也可以设置为8,还可以设置为14,甚至还可以设置为其他数值,这里也不作具体限定。It should be noted that, in the embodiment of the present application, the preset parameter meets the first preset condition, which may include: determining that the value of the preset parameter is greater than or equal to the preset threshold value. The preset threshold value may be a judgment value preset according to the hardware configuration. Exemplarily, the preset threshold value may be set to 3, or 8, or 14, or even other values, which are not specifically limited here.
还需要说明的是,在本申请实施例中,如果预置参数不符合第一预设条件,那么在一些实施例中,该方法还可以包括:若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息均进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。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 also include: if the preset parameters meet the second preset conditions, at least one first-category syntax element identification information and at least one second-category syntax element identification information are both decoded based on a 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.
需要说明的是,在本申请实施例中,预置参数符合第二预设条件,可以包括:确定预置参数不符合第一预设条件;或者,确定预置参数的取值小于预设门限值。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.
还需要说明的是,在本申请实施例中,由于通常硬件在一个时钟周期内可以处理4~6个基于旁路模型进行解码的码字,但仅可以处理1个基于上下文模型进行解码的码字;考虑到硬件吞吐率,本申请实施例提出的解码方法,能够避免使用基于上下文模型进行解码所有码字的情况。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; considering 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.
具体地,如果预置参数的取值大于或等于预设门限值,那么可以对一部分语法元素(如至少一个第一类语法元素标识信息)进行基于上下文模型的解码处理,以及对另一部分语法元素(如至少一个第二类语法元素标识信息)进行基于旁路模型的解码处理;如果预置参数的取值小于预设门限值,那么可以对所有语法元素(如至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息)均进行基于旁路模型的解码处理。Specifically, if the value of the preset parameter is greater than or equal to the preset threshold value, then a portion of the syntax elements (such as at least one first-category syntax element identification information) can 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) can 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) can be decoded based on the bypass model.
在一些实施例中,在预置参数符合第一预设条件时,该方法还可以包括:对于至少一个第一类语法元素标识信息,在基于上下文模型每解码完成一个第一类语法元素标识信息后,对预置参数的取值执行一次减1操作。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.
也就是说,在本申请实施例中,对于可能出现的至少一个第一类语法元素标识信息,使用基于上下文模型的解码方式,且在每解码完成一个第一类语法元素标识信息时,还需要执行--remBinsPass1操作。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.
S603:根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。S603: 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.
需要说明的是,在本申请实施例中,如果解码出至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值之后,根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,就可以确定出属性量化残差值。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.
还需要说明的是,在本申请实施例中,在某些情况下,例如属性量化残差值小于预设阈值,这时候仅通过至少一个第一类语法元素标识信息的取值就可以确定出属性量化残差值。在一些实施例中,该方法还可以包括: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:
若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,确定至少一个第一类语法元素标识信息的取值;以及根据至少一个第一类语法元素标识信息的取值,确定属性量化残差值;或者,If the preset parameters meet the first preset condition, then performing context model-based decoding processing on at least one first-category syntax element identification information to determine a value of at least one first-category syntax element identification information; and determining an attribute quantization residual value according to the value of at least one first-category syntax element identification information; or,
若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值;以及根据至少一个第一类语法元素标识信息的取值,确定属性量化残差值。If the preset parameters meet the second preset condition, at least one first-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 based on the value of at least one first-category syntax element identification information, an attribute quantization residual value is determined.
也就是说,在某些情况下,根据至少一个第一类语法元素标识信息的取值,就可以确定属性量化残差值是否等于0、或者属性量化残差值是否等于1、或者属性量化残差值是否等于2、或者属性量化残差值减预设常数再除以2的商是否等于0、是否等于1等等,进而确定出属性量化残差值。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 divided by 2 is equal to 0, equal to 1, and so on, thereby determining the attribute quantization residual value.
本实施例提供了一种解码方法,确定属性量化残差值对应的预置参数;若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。这样,在确定出属性量化残差值对应的预置参数之后,可以限定在解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度;而且还能够提升处理速度。This embodiment provides a decoding method, which determines the preset parameters corresponding to the attribute quantization residual value; if the preset parameters meet the first preset condition, 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; the attribute quantization residual value is determined according to 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. In this way, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used in decoding can be limited, so that part of the syntax element identification information is decoded using the bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and it can also improve the processing speed.
在本申请的另一实施例中,基于前述实施例所述的解码方法,参见图7,其示出了本申请实施例提供的一种解码方法的详细流程示意图。如图7所示,该方法可以包括:In another embodiment of the present application, based on the decoding method described in the above embodiment, see Figure 7, which shows a detailed flow chart of a decoding method provided by an embodiment of the present application. As shown in Figure 7, the method may include:
S701:确定属性量化残差值对应的预置参数。S701: Determine a preset parameter corresponding to an attribute quantization residual value.
S702:判断预置参数是否大于或等于预设门限值。S702: Determine whether the preset parameter is greater than or equal to a preset threshold value.
S703:若预置参数大于或等于预设门限值,则基于上下文模型对可能出现的至少一个第一类语法元素标识信息进行解码处理,以及基于旁路模型对可能出现的至少一个第二类语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。S703: If the preset parameter is greater than or equal to the preset threshold value, at least one first-category syntax element identification information that may appear is decoded based on the context model, and at least one second-category syntax element identification information that may appear 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.
S704:若预置参数小于预设门限值,则基于旁路模型对可能出现的至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。S704: If the preset parameter is less than a preset threshold value, decoding 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 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.
S705:根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。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.
需要说明的是,在本申请实施例中,解码端可以采用相同的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)依次对每一个节点的属性(颜色分量、反射率等)量化残差值进行解码处理。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.
在一种可能的实现方式中,在属性信息为颜色分量时,如果三个颜色分量的量化残差值不全为0,这时候需要针对第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值依次进行确定。这时候,在属性量化残差值为颜色分量量化残差值时,至少一个第一类语法元素标识信息可以包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息。In a possible implementation, when the attribute information is a color component, if the quantized residual values of the three color components are not all 0, then it is necessary to determine 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 in sequence. At this time, when the attribute quantized residual value is a color component quantized 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.
其中,第一语法元素标识信息可以用color_first_comp_zero表示,color_first_comp_zero用于指示第一颜色分量的量化残差值是否等于0;第二语法元素标识信息可以用color_second_comp_zero表示,color_second_comp_zero用于指示第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0。Among them, the first syntax element identification information can be represented by color_first_comp_zero, color_first_comp_zero 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, color_second_comp_zero 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.
在一些实施例中,该方法还可以包括:In some embodiments, the method may further include:
基于目标模型对第一语法元素标识信息进行解码处理,确定第一语法元素标识信息的取值;Decoding the first syntax element identification information based on the target model to determine a value of the first syntax element identification information;
若第一语法元素标识信息的取值为第一值,则确定第一颜色分量的量化残差值等于0,以及基于目标模型对第二语法元素标识信息进行解码处理,确定第二语法元素标识信息的取值;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;
若第一语法元素标识信息的取值为第二值,则分别解码第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值;If the value of the first syntax element identification information is the second value, respectively decode 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;
若第二语法元素标识信息的取值为第一值,则确定第二颜色分量的量化残差值等于0,以及解码第三颜色分量的量化残差值;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, respectively decoding the quantized residual value of the second color component and the quantized residual value of the third color component;
其中,若预置参数符合第一预设条件,则将上下文模型确定为目标模型;若预置参数符合第二预设条件,则将旁路模型确定为目标模型。Among them, 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.
也就是说,如果预置参数符合第一预设条件,那么基于上下文模型对可能出现的第一语法元素标识信息和第二语法元素标识信息进行解码处理;如果预置参数符合第二预设条件,那么基于旁路模型对可能出现的第一语法元素标识信息和第二语法元素标识信息进行解码处理。That is to say, if the preset parameters meet the first preset condition, 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 condition, then the first syntax element identification information and the second syntax element identification information that may appear are decoded based on the bypass model.
还需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第一语法元素标识信息和第二语法元素标识信息,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里也不作具体限定。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 first value and the second value corresponding to each other may be the same, or may be 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 a value of a flag bit/identifier, which is not specifically limited here.
示例性地,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第 二值可以设置为true。其中,在本申请实施例中,第一值可以设置为1,第二值可以设置为0,但是对此并不作具体限定。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.
这样,首先解码第一语法元素标识信息,若第一语法元素标识信息的取值为1,说明第一颜色分量的量化残差值等于0,则解码第二语法元素标识信息,若第二语法元素标识信息的取值为1,说明第一颜色分量的量化残差值和第二颜色分量的量化残差值均等于0,则需要解码第三颜色分量的量化残差值;而且由于第一颜色分量的量化残差值和第二颜色分量的量化残差值均为0,这时候第三颜色分量的量化残差值一定为非零。否则,如果第一语法元素标识信息的取值为0,那么需要分别解码第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值;如果第二语法元素标识信息的取值为0,那么需要分别解码第二颜色分量的量化残差值和第三颜色分量的量化残差值。In this way, first decode the first syntax element identification information. 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 decode the second syntax element identification information. 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 it is necessary to decode the quantized residual value of the third color component. 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 it is necessary to decode 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. If the value of the second syntax element identification information is 0, then it is necessary to decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively.
可以理解地,在属性量化残差值为颜色分量量化残差值时,考虑到存在第一颜色分量、第二颜色分量和第三颜色分量等三个颜色分量的量化残差值,故这里可以用第一待解码值表示。因此,在一些实施例中,该方法还可以包括:设置第一待解码值;其中,第一待解码值包括下述其中之一:第一颜色分量的量化残差值的绝对值、第二颜色分量的量化残差值的绝对值、第三颜色分量的量化残差值的绝对值、第一颜色分量的量化残差值的绝对值减一、第二颜色分量的量化残差值的绝对值减一、第三颜色分量的量化残差值的绝对值减一。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, the first value to be decoded can be used to represent it. 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.
需要说明的是,在根据至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息来解码每一个颜色分量的量化残差值时,通常是量化残差值的绝对值和正负号标识信息分开解码的;然后根据正负号标识信息和量化残差值的绝对值,能够确定出每一个颜色分量的量化残差值。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 sign identification information are usually decoded separately; then, based on the sign identification information and the absolute value of the quantized residual value, the quantized residual value of each color component can be determined.
还需要说明的是,如果第二语法元素标识信息指示第一颜色分量的量化残差值和第二颜色分量的量化残差值均为0,这时候第三颜色分量的量化残差值一定为非零;为了节省码率,这时候可以针对量化残差值的绝对值先进行减一操作,然后将其作为第一待解码值。It should also be noted that if the second syntax element identification information indicates that the quantization residual value of the first color component and the quantization residual value of the second color component are both 0, then the quantization residual value of the third color component must be non-zero; in order to save bit rate, at this time, the absolute value of the quantization residual value can be subtracted by one, and then used as the first value to be decoded.
在本申请实施例中,至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息并不作具体限定。在一些实施例中,除了第一语法元素标识信息和第二语法元素标识信息之外,至少一个第一类语法元素标识信息还可以包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第一数值标识信息。In the embodiment of the present application, at least one first-category syntax element identification information and 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 also 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 at least includes: first numerical identification information.
其中,第三语法元素标识信息用于指示第一待解码值是否等于0,第四语法元素标识信息用于指示第一待解码值是否等于1,第五语法元素标识信息用于指示第一待解码值的奇偶特性,第六语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于0,第一数值标识信息用于指示第一待解码值进行第二运算后得到的第二数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth grammatical 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.
在一些实施例中,对第一待解码值进行第一运算,可以包括:根据第一待解码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。In some embodiments, performing a first operation on a 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.
在一些实施例中,对第一待解码值进行第二运算,可以包括:根据第一待解码值与第二预设值进行减法运算,得到第二中间值;对第二中间值进行右移一位处理,得到第二数值;或者,将第二数值设置为等于第二中间值除以2的商。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.
需要说明的是,在本申请实施例中,对于除法运算,可以用右移运算替代,“>>”表示右移运算符;“除以2”相当于右移一位;对于乘法运算,可以用左移运算替代,“<<”表示左移运算符;“乘以2”相当于左移一位。It should be noted that in the embodiments of the present application, for division operations, right shift operations can be used instead, and “>>” represents the right shift operator; “divide by 2” is equivalent to shifting right by one bit; for multiplication operations, left shift operations can be used instead, and “<<” represents the left shift operator; “multiply by 2” is equivalent to shifting left by one bit.
还需要说明的是,在本申请实施例中,第一预设值与第二预设值可以不同,示例性地,第一预设值可以设置为2,第二预设值可以设置为4。另外,第三语法元素标识信息可以用color_level_equal_zero表示,第四语法元素标识信息可以用color_level_equal_one表示,第五语法元素标识信息可以用color_level_parity表示,第六语法元素标识信息可以用color_level_minus2_div2_eq0表示,第一数值标识信息可以用color_level_minus4_div2表示。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.
还需要说明的是,在本申请实施例中,由于存在第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值,因此,除了第一语法元素标识信息和第二语法元素标识信息均为一个之外,第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息分别对应三个;即,本申请实施例可以包括:一个第一语法元素标识信息、一个第二语法元素标识信息、三个第三语法元素标识信息、三个第四语法元素标识信息、三个第五语法元素标识信息和三个第六语法元素标识信息。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.
在一些实施例中,在预置参数符合第一预设条件时,对第一待解码值进行解码处理,可以包括:基于上下文模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、 第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值;以及基于旁路模型对可能出现的第一数值标识信息进行解码处理,确定第一数值标识信息的取值;根据至少一个第一类语法元素标识信息的取值和第一数值标识信息的取值,确定第一待解码值。In some embodiments, when the preset parameters meet 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 and the sixth 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 first numerical identification information that may appear based on the bypass model to determine the value of the first numerical identification information; determining the first value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the first numerical identification information.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第一待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include:
基于上下文模型对所述第三语法元素标识信息进行解码处理,确定所述第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the context model to determine a value of the third syntax element identification information;
若所述第三语法元素标识信息的取值为第一值,则确定所述第一待解码值等于0;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;
若所述第四语法元素标识信息的取值为第一值,则确定所述第一待解码值等于1;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 value to be decoded is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical value identification information.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息。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.
在另一些实施例中,在预置参数符合第二预设条件时,对第一待解码值进行解码处理,可以包括:基于旁路模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息和第一数值标识信息进行解码处理,确定第一待解码值。也就是说,如果预置参数符合第二预设条件,那么对于第一待解码值对应的所有二值化码字均采用旁路模型进行解码处理。In other embodiments, when the preset parameter meets 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 identification information that may appear based on the bypass model to determine the first value to be decoded. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the first value to be decoded are decoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第一待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, decoding the first value to be decoded may include:
基于旁路模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the bypass model to determine a value of the third syntax element identification information;
若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;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;
若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;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;
根据第二预设值、第五语法元素标识信息的取值和第一数值标识信息的取值,确定第一待解码值。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.
需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息等,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里也不作具体限定。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 other may be the same, or may be 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 a value of a flag bit/identifier, which is not specifically limited here.
示例性地,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以 设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是对此并不作具体限定。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.
这样,以第一预设值为2为例,首先解码第三语法元素标识信息,如果第三语法元素标识信息的取值为1,那么可以确定第一待解码值等于0;否则,如果第三语法元素标识信息的取值为0,意味着第一待解码值不等于0,那么需要继续解码第四语法元素标识信息,如果第四语法元素标识信息的取值为1,那么可以确定第一待解码值等于1;否则,如果第四语法元素标识信息的取值为0,意味着第一待解码值不等于1,那么需要继续解码第五语法元素标识信息和第六语法元素标识信息,如果第六语法元素标识信息的取值为1,那么可以确定第一待解码值等于2+color_level_parity;否则,如果第六语法元素标识信息的取值为0,那么需要继续解码第一数值标识信息,以确定出第一待解码值。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.
在一些实施例中,对于第一数值标识信息,基于旁路模型对第一数值标识信息进行解码处理,确定第一数值标识信息的取值,可以包括:基于旁路模型对第一数值标识信息进行解码处理,确定第一数值标识信息对应的至少一个二值符号;对至少一个二值符号进行反二值化处理,得到第一数值标识信息的取值。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; debinarizing at least one binary symbol to obtain the value of the first numerical identification information.
示例性地,以二阶指数哥伦布解码为例,基于旁路模型对第一数值标识信息对应的码字进行解码处理,可以得到一组二值符号011,那么经过反二值化处理之后,第一数值标识信息的取值为3。Exemplarily, 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.
还需要说明的是,在本申请实施例中,第五语法元素标识信息用于指示第一待解码值的奇偶特性。在一些实施例中,对于第五语法元素标识信息的取值,该方法还可以包括:若第五语法元素标识信息的取值为第一值,则确定第一待解码值为奇数;若第五语法元素标识信息的取值为第二值,则确定第一待解码值为偶数;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;
或者,若第五语法元素标识信息的取值为第一值,则确定第一待解码值与2进行除法运算后的余数为1;若第五语法元素标识信息的取值为第二值,则确定第一待解码值与2进行除法运算后的余数为0。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.
简单来说,在本申请实施例中,以第一值设置为1,第二值设置为0为例,对于第一待解码值,如果第一待解码值为奇数,那么在计算时需要加1;如果第一待解码值为偶数,那么在进行计算时需要加0。即,第一待解码值是根据第二预设值、第五语法元素标识信息的取值和第一数值标识信息的取值来确定的。In short, in the embodiment of the present application, taking the first value as 1 and the second value as 0 as an example, 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 calculation; if the first value to be decoded is an even number, then 0 needs to be added during calculation. That is, the 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 identification information.
进一步地,在一些实施例中,根据第二预设值、第五语法元素标识信息的取值和第一数值标识信息的取值,确定第一待解码值,可以包括:对第一数值标识信息的取值进行第八运算,得到第八数值;根据第二预设值、第八数值和第五语法元素标识信息的取值,确定第一待解码值。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; 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.
还需要说明的是,在本申请实施例中,对第一数值标识信息的取值进行第八运算,得到第八数值,可以包括:对第一数值标识信息的取值与2进行乘法运算,得到第八数值;或者,对第一数值标识信息的取值进行左移一位运算,得到第八数值。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 shifting the value of the first numerical identification information left by one position to obtain the eighth numerical value.
进一步地,在一些实施例中,根据第二预设值、第八数值和第五语法元素标识信息的取值,确定第一待解码值,可以包括:对第二预设值、第八数值和第五语法元素标识信息的取值进行加法运算,得到第一待解码值。Further, in some embodiments, determining the first value to be decoded based on the values of the second preset value, the eighth numerical value, and the fifth syntax element identification information may include: adding 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.
示例性地,假定第二预设值设置为4,第五语法元素标识信息用color_level_parity表示,第一数值标识信息用color_level_minus4_div2表示;那么,第一待解码值为(4+color_level_parity+(color_level_minus4_div2<<1))。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)).
可以理解地,属性信息为颜色分量时,对于三个颜色分量的量化残差值的具体实施步骤如下: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:
a)解码color_first_comp_zero,如果color_first_comp_zero标志位的解码值等于1,则第一颜色分量的量化残差值为0,进入步骤b),否则解码第一颜色分量的量化残差值,进入步骤c);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);
b)解码color_second_comp_zero,如果color_second_comp_zero标志位的解码值等于1,则第二颜色分量的量化残差值为0,然后解码第三颜色分量的量化残差值,解码结束;否则进入步骤c);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, proceed to step c);
c)分别解码第二颜色分量的量化残差值和第三颜色分量的量化残差值,解码结束。c) The quantized residual value of the second color component and the quantized residual value of the third color component are decoded respectively, and the decoding is completed.
其中,每一个颜色分量的量化残差值的解码步骤如下:The decoding steps of the quantized residual value of each color component are as follows:
首先设置第一待解码值,可以为颜色量化残差值的绝对值或颜色量化残差值的绝对值减一。需要注意的是,如上述步骤b)中的第三颜色分量的量化残差值,由于前面的标志位已经表明第一颜色分量的量化残差值和第二颜色分量的量化残差值均为0,此时第三颜色分量的量化残差值一定为非零,因此可以先进行减一操作。这样,对于第一待解码值进行解码处理,具体实施步骤如下:First, the first value to be decoded is set, 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 for the quantization residual value of the third color component in the above step b), since the previous flag bit has 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 a minus-one operation can be performed first. In this way, the first value to be decoded is decoded, and the specific implementation steps are as follows:
a)解码color_level_equal_zero,如果color_level_equal_zero标志位的解码值等于1,则第一待解码值为0,解码完成,否则进入步骤b);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 completed, otherwise proceed to step b);
b)解码color_level_equal_one,如果color_level_equal_one标志位的解码值等于1,则第一待解码 值为1,解码完成,否则进入步骤c);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 the decoding is completed, otherwise proceed to step c);
c)解码color_level_parity和color_level_minus2_div2_eq0,如果color_level_minus2_div2_eq0标志位的解码值等于1,则第一待解码值为(2+color_level_parity),解码完成,否则进入步骤d);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 the decoding is completed, otherwise proceed to step d);
d)解码color_level_minus4_div2,则第一待解码值为(4+color_level_parity+(color_level_minus4_div2<<1)),解码完成。d) Decode color_level_minus4_div2, then the first value to be decoded is (4+color_level_parity+(color_level_minus4_div2<<1)), and the decoding is completed.
在相关技术中,目前PCRM在解码非零属性量化残差值时,对于所有二值化后的码字,均采用基于上下文模型的解码方式,这将给硬件实现带来较大难度。基于此,在本申请实施例中,该解码过程可以如下:In the related art, when PCRM decodes non-zero attribute quantization residual values, for all binary codewords, a decoding method based on a context model is adopted, which will bring great difficulty to hardware implementation. Based on this, in the embodiment of the present application, the decoding process can be as follows:
a)为颜色量化残差值分配基于上下文模型解码码字的预算remBinsPass1(初始值可设置为2 24); a) Allocate a budget remBinsPass1 based on the context model decoding codeword for the color quantization residual value (the initial value can be set to 2 24 );
b)在颜色量化残差值解码开始前,判断remBinsPass1是否大于等于T(如设置为14);b) Before the color quantization residual value decoding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 14);
c)当remBinsPass1≥T时,对可能出现的一个color_first_comp_zero、一个color_second_comp_zero、三个color_level_equal_zero、三个color_level_equal_one、三个color_level_parity、三个color_level_minus2_div2_eq0采用基于上下文模型的解码方式,且每解完一个标志位/标志符,做remBinsPass1--操作;而color_level_minus4_div2的所有二值化后的码字采用基于旁路模型的解码方式;c) When remBinsPass1 ≥ T, a decoding method based on the context model 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 decoded; and all binary codewords of color_level_minus4_div2 are decoded based on the bypass model;
d)当不满足remBinsPass1≥T时,对颜色量化残差值的所有二值化后的码字均采用基于旁路模型的解码方式。d) When remBinsPass1≥T is not satisfied, a bypass model-based decoding method is used for all binarized code words of the color quantization residual values.
在实现中,本申请实施例的整个解码过程的语法表描述如表1和表2所示。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.
表1Table 1
Figure PCTCN2022137376-appb-000001
Figure PCTCN2022137376-appb-000001
Figure PCTCN2022137376-appb-000002
Figure PCTCN2022137376-appb-000002
表2Table 2
Figure PCTCN2022137376-appb-000003
Figure PCTCN2022137376-appb-000003
在另一种可能的实现方式中,在属性信息仍为颜色分量时,除了第一语法元素标识信息和第二语法元素标识信息之外,至少一个第一类语法元素标识信息还可以包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第二数值标识信息。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.
其中,第三语法元素标识信息用于指示第一待解码值是否等于0,第四语法元素标识信息用于指示第一待解码值是否等于1,第五语法元素标识信息用于指示第一待解码值的奇偶特性,第六语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于0,第七语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于1,第八语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于2,第九语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于3,第十语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于4,第二数值标识信息用于指示第一待解码值进行第三运算后得到的第三数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded, the sixth grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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.
在一些实施例中,对第一待解码值进行第一运算,可以包括:根据第一待解码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。In some embodiments, performing a first operation on a 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.
在一些实施例中,对第一待解码值进行第三运算,可以包括:根据第一待解码值与第三预设值进行减法运算,得到第三中间值;对第三中间值进行右移一位处理,得到第三数值;或者,将第三数值设置 为等于第三中间值除以2的商。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; 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.
在本申请实施例中,第一预设值与第三预设值可以不同,示例性地,第一预设值可以设置为2,第三预设值可以设置为12。另外,第三语法元素标识信息可以用color_level_equal_zero表示,第四语法元素标识信息可以用color_level_equal_one表示,第五语法元素标识信息可以用color_level_parity表示,第六语法元素标识信息可以用color_level_minus2_div2_eq0表示,第七语法元素标识信息可以用color_level_minus2_div2_eq1表示,第八语法元素标识信息可以用color_level_minus2_div2_eq2表示,第九语法元素标识信息可以用color_level_minus2_div2_eq3表示,第十语法元素标识信息可以用color_level_minus2_div2_eq4表示,第二数值标识信息可以用color_level_minus12_div2表示。In the 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.
还需要说明的是,在本申请实施例中,由于存在第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值,因此,除了第一语法元素标识信息和第二语法元素标识信息均为一个之外,第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息分别对应三个;即,本申请实施例可以包括:一个第一语法元素标识信息、一个第二语法元素标识信息、三个第三语法元素标识信息、三个第四语法元素标识信息、三个第五语法元素标识信息、三个第六语法元素标识信息、三个第七语法元素标识信息、三个第八语法元素标识信息、三个第九语法元素标识信息和三个第十语法元素标识信息。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.
在一些实施例中,在预置参数符合第一预设条件时,对第一待解码值进行解码处理,可以包括:基于上下文模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值;以及基于旁路模型对可能出现的第二数值标识信息进行解码处理,确定第二数值标识信息的取值;根据至少一个第一类语法元素标识信息的取值和第二数值标识信息的取值,确定第一待解码值。In some embodiments, when the preset parameters meet 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; determining the first value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the second numerical identification information.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第一待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, decoding the first value to be decoded may include:
基于上下文模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the context model to determine a value of the third syntax element identification information;
若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;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;
若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;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 grammatical element identification information is the second value, decoding the fifth grammatical element identification information based on the context model to determine the value of the fifth grammatical element identification information; and decoding the sixth grammatical element identification information based on the context model to determine the value of the sixth grammatical 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 grammar element identification information is the second value, decoding the seventh grammar element identification information based on the context model to determine the value of the seventh grammar 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 the first constant, the 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 grammatical element identification information is the second value, decoding the ninth grammatical element identification information based on the context model to determine the value of the ninth grammatical 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 the third constant, the 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 the fourth constant, the 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;
根据第三预设值、第五语法元素标识信息的取值和第二数值标识信息的取值,确定第一待解码值。A first value to be decoded 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.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息。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.
在另一些实施例中,在预置参数符合第二预设条件时,对第一待解码值进行解码处理,可以包括:基于旁路模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息和第二数值标识信息进行解码处理,确定第一待解码值。In other embodiments, when the preset parameters meet the second 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, the tenth grammatical element identification information and the second numerical identification information that may appear based on a bypass model to determine the first value to be decoded.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第一待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, decoding the first value to be decoded may include:
基于旁路模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the bypass model to determine a value of the third syntax element identification information;
若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;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;
若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;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 the first constant, the 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 the third constant, the 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 the fourth constant, the 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;
根据第三预设值、第五语法元素标识信息的取值和第二数值标识信息的取值,确定第一待解码值。A first value to be decoded 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.
在本申请实施例中,第一常数、第二常数、第三常数和第四常数均为2的倍数。示例性地,第一常数设置为2,第二常数设置为4,第三常数设置为6,第四常数设置为8。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. Exemplarily, 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.
需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息等,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里对此不作具体限定。It should be noted that, in the embodiment of the present application, for different grammatical element identification information, such as 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, the first value and the second value corresponding to each other may be the same, or may be 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 grammatical element identification information may be a parameter written in the profile, or may be the value of a flag bit/identifier, which is not specifically limited here.
示例性地,针对每一个语法元素标识信息,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是对此并不作具体限定。Exemplarily, 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.
这样,以第一预设值为2为例,首先解码第三语法元素标识信息,如果第三语法元素标识信息的取值为1,那么可以确定第一待解码值等于0;否则,如果第三语法元素标识信息的取值为0,意味着第一待解码值不等于0,那么需要继续解码第四语法元素标识信息,如果第四语法元素标识信息的取值为1,那么可以确定第一待解码值等于1;否则,如果第四语法元素标识信息的取值为0,意味着第一待解码值不等于1,那么需要继续解码第五语法元素标识信息和第六语法元素标识信息,如果第六语法元素标识信息的取值为1,那么可以确定第一待解码值等于2+color_level_parity;否则,如果第六语法元素标识信息的取值为0,那么需要继续解码第七语法元素标识信息,如果第七语法元素标识信息的取值为1,那么可以确定第一待解码值等于4+color_level_parity;否则,如果第七语法元素标识信息的取值为0,那么需要继续解码第八语法元素标识信息,如果第八语法元素标识信息的取值为2,那么可以确定第一待解码值等于6+color_level_parity;否则,如果第八语法元素标识信息的取值为0,那么需要继续解码第九语法元素标识信息,如果第九语法元素标识信息的取值为1,那么可以确定第一待解码值等于8+color_level_parity;否则,如果第九语法元素标识信息的取值为0,那么需要继续解码第十语法元素标识信息,如果第十语法元素标识信息的取值为1,那么可以确定第一待解码值等于10+color_level_parity;否则,如果第十语法元素标识信息的取值为0,那么需要继续解码第二数值标识信息,以确定出第一待解码值。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, 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+color_level_parity. lor_level_parity; otherwise, if the value of the seventh grammatical element identification information is 0, 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, 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, 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, it is necessary to continue decoding the second numerical identification information to determine the first value to be decoded.
在一些实施例中,对于第二数值标识信息,基于旁路模型对第二数值标识信息进行解码处理,确定第二数值标识信息的取值,可以包括:基于旁路模型对第二数值标识信息进行解码处理,确定第二数值标识信息对应的至少一个二值符号;对至少一个二值符号进行反二值化处理,得到第二数值标识信息的取值。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; debinarizing at least one binary symbol to obtain the value of the second numerical identification information.
进一步地,在一些实施例中,根据第三预设值、第五语法元素标识信息的取值和第二数值标识信息的取值,确定第一待解码值,可以包括:对第二数值标识信息的取值进行第九运算,得到第九数值;根据第三预设值、第九数值和第五语法元素标识信息的取值,确定第一待解码值。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; 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.
还需要说明的是,在本申请实施例中,对第二数值标识信息的取值进行第九运算,得到第九数值,可以包括:对第二数值标识信息的取值与2进行乘法运算,得到第九数值;或者,对第二数值标识信息的取值进行左移一位运算,得到第九数值。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 shifting the value of the second numerical identification information left by one position to obtain the ninth numerical value.
进一步地,在一些实施例中,根据第三预设值、第九数值和第五语法元素标识信息的取值,确定第一待解码值,可以包括:对第三预设值、第九数值和第五语法元素标识信息的取值进行加法运算,得到第一待解码值。Further, in some embodiments, determining the first value to be decoded based on the values of the third preset value, the ninth numerical value, and the fifth syntax element identification information may include: adding the third preset value, the ninth numerical value, and the values of the fifth syntax element identification information to obtain the first value to be decoded.
示例性地,假定第三预设值设置为12,第五语法元素标识信息用color_level_parity表示,第二数值标识信息用color_level_minus12_div2表示;那么,第一待解码值为(12+color_level_parity+(color_level_minus12_div2<<1))。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)).
可以理解地,属性信息为颜色分量时,对于三个颜色分量的量化残差值的具体实施步骤如下: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:
a)解码color_first_comp_zero,如果color_first_comp_zero标志位的解码值等于1,则第一颜色分量的量化残差值为0,进入步骤b),否则解码第一颜色分量的量化残差值,进入步骤c);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);
b)解码color_second_comp_zero,如果color_second_comp_zero标志位的解码值等于1,则第二颜色分量的量化残差值为0,然后解码第三颜色分量的量化残差值,解码结束;否则进入步骤c);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, proceed to step c);
c)分别解码第二颜色分量的量化残差值和第三颜色分量的量化残差值,解码结束。c) The quantized residual value of the second color component and the quantized residual value of the third color component are decoded respectively, and the decoding is completed.
另外,第一待解码值(即每一个颜色分量的量化残差值)的解码步骤如下:In addition, the decoding steps of the first value to be decoded (ie, the quantized residual value of each color component) are as follows:
a)解码color_level_equal_zero,如果color_level_equal_zero标志位的解码值等于1,则第一待解码值为0,解码完成,否则进入步骤b);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 completed, otherwise proceed to step b);
b)解码color_level_equal_one,如果color_level_equal_one标志位的解码值等于1,则第一待解码值为1,解码完成,否则进入步骤c);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 the decoding is completed, otherwise proceed to step c);
c)解码color_level_parity和color_level_minus2_div2_eq0,如果color_level_minus2_div2_eq0标志位的解码值等于1,则第一待解码值为(2+color_level_parity),解码完成,否则进入步骤d);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 the decoding is completed, otherwise proceed to step d);
d)解码color_level_minus2_div2_eq1,如果color_level_minus2_div2_eq1标志位的解码值等于1,则第一待解码值为(4+color_level_parity),解码完成,否则进入步骤e);d) Decode 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 the decoding is completed. Otherwise, proceed to step e);
e)解码color_level_minus2_div2_eq2,如果color_level_minus2_div2_eq2标志位的解码值等于1,则第一待解码值为(6+color_level_parity),解码完成,否则进入步骤f);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 the decoding is completed, otherwise proceed to step f);
f)解码color_level_minus2_div2_eq3,如果color_level_minus2_div2_eq3标志位的解码值等于1,则第一待解码值为(8+color_level_parity),解码完成,否则进入步骤g);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 the decoding is completed, otherwise proceed to step g);
g)解码color_level_minus2_div2_eq4,如果color_level_minus2_div2_eq4标志位的解码值等于1,则第一待解码值为(10+color_level_parity),解码完成,否则进入步骤h);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 the decoding is completed, otherwise proceed to step h);
h)解码color_level_minus12_div2,则第一待解码值为(12+color_level_parity+(color_level_minus12_div2<<1)),解码完成。h) Decode color_level_minus12_div2, then the first value to be decoded is (12+color_level_parity+(color_level_minus12_div2<<1)), and the decoding is completed.
在一种具体的实施例中,为了提升硬件吞吐率,该解码过程可以如下:In a specific embodiment, in order to improve the hardware throughput, the decoding process may be as follows:
a)为颜色量化残差分配基于上下文模型解码码字的预算remBinsPass1(初始值可设置为2 24); 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 );
b)在颜色量化残差解码开始前,判断remBinsPass1是否大于等于T(如设置为26);b) Before the color quantization residual decoding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 26);
c)当remBinsPass1≥T时,对可能出现的一个color_first_comp_zero、一个color_second_comp_zero、三个color_level_equal_zero、三个color_level_equal_one、三个color_level_parity、三个color_level_minus2_div2_eq0、三个color_level_minus2_div2_eq1、三个color_level_minus2_div2_eq2、三个color_level_minus2_div2_eq3、三个color_level_minus2_div2_eq4采用基于上下文模型的解码方式,且每解完一个标志位/标志符,做remBinsPass1--操作,而color_level_minus12_div2的所有二值化后的码字采用基于旁路模型的解码方式;c) When remBinsPass1≥T, a decoding method based on the context model is adopted 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 the binarized codewords of color_level_minus12_div2 are decoded based on the bypass model;
d)当不满足remBinsPass1≥T时,对颜色量化残差的所有二值化后的码字均采用基于旁路模型的解码方式。d) When remBinsPass1≥T is not satisfied, a bypass model-based decoding method is used for all binarized codewords of the color quantization residual.
在实现中,本申请实施例的整个解码过程的语法表描述如表3和表4所示。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.
表3table 3
Figure PCTCN2022137376-appb-000004
Figure PCTCN2022137376-appb-000004
Figure PCTCN2022137376-appb-000005
Figure PCTCN2022137376-appb-000005
表4Table 4
Figure PCTCN2022137376-appb-000006
Figure PCTCN2022137376-appb-000006
在又一种可能的实现方式中,在属性信息为反射率时,这时候的属性量化残差值即为反射率量化残 差值。为了便于描述,这里可以用第二待解码值表示。因此,在一些实施例中,该方法还可以包括:设置第二待解码值;其中,第二待解码值可以包括:反射率量化残差值的绝对值。In another possible implementation, when the attribute information is reflectivity, the attribute quantization residual value at this time is the reflectivity quantization residual value. For ease of description, it can be represented by a second value to be decoded. Therefore, in some embodiments, the method may further include: setting a second value to be decoded; wherein the second value to be decoded may include: an absolute value of the reflectivity quantization residual value.
对于反射率量化残差值而言,在根据至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息来解码反射率量化残差值时,通常也是量化残差值的绝对值和正负号标识信息分开解码的;然后根据正负号标识信息和量化残差值的绝对值,能够确定出反射率量化残差值。For the reflectivity quantization residual value, when the reflectivity quantization residual value is decoded 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 quantization residual value and the sign identification information are usually decoded separately; then, based on the sign identification information and the absolute value of the quantization residual value, the reflectivity quantization residual value can be determined.
在本申请实施例中,至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息也不作具体限定。在一些实施例中,至少一个第一类语法元素标识信息可以包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;以及至少一个第二类语法元素标识信息至少包括:第三数值标识信息。In the embodiment of the present application, at least one first-category syntax element identification information and at least one second-category syntax element identification information are also not specifically limited. In some embodiments, 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, thirteenth syntax element identification information; and at least one second-category syntax element identification information includes at least: third numerical identification information.
其中,第十一语法元素标识信息用于指示第二待解码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于1,第三数值标识信息用于指示第二待解码值进行第六运算后得到的第六数值。Among them, the eleventh grammatical 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 grammatical 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 grammatical 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.
在一些实施例中,对第二待解码值进行第四运算,可以包括:根据第二待解码值与第四预设值进行减法运算,得到第四数值。即,将第四数值设置为等于第二待解码值与第四预设值的差值。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 equal to the difference between the second value to be decoded and the fourth preset value.
在一些实施例中,对第二待解码值进行第五运算,可以包括:根据第二待解码值与第五预设值进行减法运算,得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。In some embodiments, performing a 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.
在一些实施例中,对第二待解码值进行第六运算,可以包括:根据第二待解码值与第六预设值进行减法运算,得到第五中间值;对第五中间值进行右移一位处理,得到第六数值;或者,将第六数值设置为等于第五中间值除以2的商。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 the 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.
在本申请实施例中,第四预设值、第五预设值与第六预设值可以不完全相同,示例性地,第四预设值可以设置为1,第五预设值可以设置为1,第六预设值可以设置为5。另外,第十一语法元素标识信息可以用abs_level_minus1_parity表示,第十二语法元素标识信息可以用abs_level_minus1_div2_eq0表示,第十三语法元素标识信息可以用abs_level_minus1_div2_eq1表示,第三数值标识信息可以用abs_level_minus5_div2表示。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.
在一些实施例中,在预置参数符合第一预设条件时,对第二待解码值进行解码处理,可以包括:基于上下文模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息和第十三语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值;以及基于旁路模型对可能出现的第三数值标识信息进行解码处理,确定第一数值标识信息的取值;根据至少一个第一类语法元素标识信息的取值和第一数值标识信息的取值,确定第二待解码值。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; 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.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第二待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, decoding the second value to be decoded may include:
基于上下文模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于上下文模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;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;
若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;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;
根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值,确定第二待解码值。A 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 value identification information.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation 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.
在另一些实施例中,在预置参数符合第二预设条件时,对第二待解码值进行解码处理,可以包括:基于旁路模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息和第三数值标识信息进行解码处理,确定第二待解码值。也就是说,如果预置参数符合第二预设条件,那么对于第二待解码值对应的所有二值化码字均采用旁路模型进行解码处理。In other embodiments, when the preset parameter meets 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 identification information that may appear based on the bypass model to determine the second value to be decoded. That is, if the preset parameter meets the second preset condition, then all binarized codewords corresponding to the second value to be decoded are decoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第二待解码值进行解码处理,可以包 括:In a specific embodiment, when the preset parameter meets the second preset condition, decoding the second value to be decoded may include:
基于旁路模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于旁路模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;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;
若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;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;
根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值,确定第二待解码值。A 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 value identification information.
在本申请实施例中,第五常数可以为2的倍数。示例性地,第五常数设置为2。In the embodiment of the present application, the fifth constant may be a multiple of 2. Exemplarily, the fifth constant is set to 2.
需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第十一语法元素标识信息、第十二语法元素标识信息和第十三语法元素标识信息等,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里也不作具体限定。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 other may be the same, or may be 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 a value of a flag bit/identifier, which is not specifically limited here.
示例性地,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是对此并不作具体限定。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.
这样,首先解码第十一语法元素标识信息和第十二语法元素标识信息,如果第十二语法元素标识信息的取值为1,那么可以确定第二待解码值等于1+abs_level_minus1_parity;否则,如果第十二语法元素标识信息的取值为0,那么需要继续解码第十三语法元素标识信息,如果第十三语法元素标识信息的取值为1,那么可以确定第二待解码值等于3+abs_level_minus1_parity;否则,如果第十三语法元素标识信息的取值为0,那么需要继续解码第三数值标识信息,以确定出第二待解码值。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 third numerical identification information to determine the second value to be decoded.
在一些实施例中,对于第三数值标识信息,基于旁路模型对第三数值标识信息进行解码处理,确定第三数值标识信息的取值,可以包括:基于旁路模型对第三数值标识信息进行解码处理,确定第三数值标识信息对应的至少一个二值符号;对至少一个二值符号进行反二值化处理,得到第三数值标识信息的取值。In some embodiments, for the third numerical identification information, decoding the third numerical identification information based on a 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; debinarizing at least one binary symbol to obtain the value of the third numerical identification information.
还需要说明的是,在本申请实施例中,第十一语法元素标识信息用于指示第二待解码值进行第四运算后得到的第四数值的奇偶特性。在一些实施例中,对于第十一语法元素标识信息的取值,该方法还可以包括:若第十一语法元素标识信息的取值为第一值,则确定第四数值为奇数;若第十一语法元素标识信息的取值为第二值,则确定第四数值为偶数;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 value to be decoded 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;
或者,若第十一语法元素标识信息的取值为第一值,则确定第四数值与2进行除法运算后的余数为1;若第十一语法元素标识信息的取值为第二值,则确定第四数值与2进行除法运算后的余数为0。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.
简单来说,在本申请实施例中,以第一值设置为1,第二值设置为0为例,对于第二待解码值,如果第四数值为奇数,那么在计算第二待解码值时需要加1;如果第四数值为偶数,那么在进行计算第二待解码值时需要加0。即,第二待解码值是根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值来确定的。In short, in the embodiment of the present application, taking the first value as 1 and the second value as 0 as an example, 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. That is, 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 value identification information.
进一步地,在一些实施例中,根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值,确定第二待解码值,可以包括:对第三数值标识信息的取值进行第十运算,得到第十数值;根据第六预设值、第十数值和第十一语法元素标识信息的取值,确定第二待解码值。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; 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.
还需要说明的是,在本申请实施例中,对第三数值标识信息的取值进行第十运算,得到第十数值,可以包括:对第三数值标识信息的取值与2进行乘法运算,得到第十数值;或者,对第三数值标识信息的取值进行左移一位运算,得到第十数值。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.
进一步地,在一些实施例中,根据第六预设值、第十数值和第十一语法元素标识信息的取值,确定第二待解码值,可以包括:对第六预设值、第十数值和第十一语法元素标识信息的取值进行加法运算,得到第二待解码值。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: adding 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.
示例性地,假定第六预设值设置为5,第十一语法元素标识信息用abs_level_minus1_parity表示,第三数值标识信息用abs_level_minus5_div2表示;那么,第二待解码值为(5+abs_level_minus1_parity +(abs_level_minus5_div2<<1))。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)).
可以理解地,属性信息为反射率时,对于第二待解码值(即反射率量化残差值)的具体实施步骤如下: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:
a)解码abs_level_minus1_parity和abs_level_minus1_div2_eq0,如果abs_level_minus1_div2_eq0标志位的解码值等于1,则第二待解码值为(1+abs_level_minus1_parity),解码完成,否则进入步骤b);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 the decoding is completed. Otherwise, proceed to step b);
b)解码abs_level_minus1_div2_eq1,如果abs_level_minus1_div2_eq1标志位的解码值等于1,则第二待解码值为(3+abs_level_minus1_parity),解码完成,否则进入步骤c);b) Decode 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), and the decoding is completed. Otherwise, proceed to step c);
c)解码abs_level_minus5_div2,则第二待解码值为(5+abs_level_minus1_parity+(abs_level_minus5_div2<<1)),解码完成。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 the decoding is completed.
在相关技术中,目前PCRM在编解码非零属性量化残差值时,对于所有二值化后的码字,均采用基于上下文模型的解码方式,以反射率属性为例,若要解码的反射率量化残差值为12,则将其进行二值化的过程为:In the related art, when PCRM encodes and decodes non-zero attribute quantization residual values, for all binarized codewords, a decoding method based on a context model is adopted. Taking the reflectivity attribute as an example, if the reflectivity quantization residual value to be decoded is 12, the process of binarizing it is as follows:
abs_level_minus1_parity标志符为1;The abs_level_minus1_parity flag is 1;
abs_level_minus1_div2_eq0标志位为0;The abs_level_minus1_div2_eq0 flag is 0;
abs_level_minus1_div2_eq1标志位为0;abs_level_minus1_div2_eq1 flag is 0;
abs_level_minus5_div2为3,继续对3进行二值化,以二阶指数哥伦布编码为例,对3进行二值化之后的结果为0 1 1;abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Columbus code as an example, the result of binarizing 3 is 0 1 1;
因此,对于一个数值为12的反射率量化残差值,其二值化后的码字结果为1 0 0 0 1 1。在解码端,对于反射率量化残差值二值化后的所有码字都采用基于上下文模型的解码方式,这将给硬件实现带来较大难度,基于此,在本申请实施例中,该解码过程可以如下:Therefore, for a reflectivity quantization residual value of 12, the binarized codeword result is 1 0 0 0 1 1. At the decoding end, all codewords after the binarization of the reflectivity quantization residual value are decoded based on the context model, 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:
a)为反射率量化残差值分配基于上下文模型解码码字的预算remBinsPass1(初始值可设置为2 24); a) Allocate a budget remBinsPass1 based on the context model decoding codeword for the reflectivity quantization residual value (the initial value can be set to 2 24 );
b)在反射率量化残差值解码开始前,判断remBinsPass1是否大于等于T(如设置为3);b) Before decoding of the reflectivity quantization residual value begins, determine whether remBinsPass1 is greater than or equal to T (such as set to 3);
c)当remBinsPass1≥T时,对可能出现的abs_level_minus1_parity、abs_level_minus1_div2_eq0、abs_level_minus1_div2_eq1采用基于上下文模型的解码方式,且每解完一个标志位/标志符,做remBinsPass1--操作,而abs_level_minu5_div2的所有二值化后的码字采用基于旁路模型的解码方式;c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, abs_level_minus1_div2_eq1 are decoded based on the context model, and after each flag bit/flag is decoded, the remBinsPass1-- operation is performed, and all binarized codewords of abs_level_minu5_div2 are decoded based on the bypass model;
d)当不满足remBinsPass1≥T时,对反射率量化残差值的所有二值化后的码字均采用基于旁路模型的解码方式。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.
在实现中,本申请实施例的整个解码过程的语法表描述如表5所示。In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 5.
表5table 5
Figure PCTCN2022137376-appb-000007
Figure PCTCN2022137376-appb-000007
Figure PCTCN2022137376-appb-000008
Figure PCTCN2022137376-appb-000008
在再一种可能的实现方式中,在属性信息仍为反射率时,这时候,至少一个第一类语法元素标识信息可以包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第四数值标识信息。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: 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; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
其中,第十一语法元素标识信息用于指示第二待解码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于1,第十四语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于2,第十五语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于3,第十六语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于4,第十七语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于5,第十八语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于6,第四数值标识信息用于指示第二待解码值进行第七运算后得到的第七数值。Among them, the eleventh grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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.
在一些实施例中,对第二待解码值进行第四运算,可以包括:根据第二待解码值与第四预设值进行减法运算,得到第四数值。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.
在一些实施例中,对第二待解码值进行第五运算,可以包括:根据第二待解码值与第五预设值进行减法运算,得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。In some embodiments, performing a 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.
在一些实施例中,对第二待解码值进行第七运算,可以包括:根据第二待解码值与第七预设值进行减法运算,得到第六中间值;对第六中间值进行右移一位处理,得到第七数值;或者,将第七数值设置为等于第六中间值除以2的商。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.
在本申请实施例中,第四预设值、第五预设值与第七预设值可以不完全相同,示例性地,第四预设值可以设置为1,第五预设值可以设置为1,第七预设值可以设置为15。另外,第十一语法元素标识信息可以用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表示,第四数值标识信息可以用abs_level_minus15_div2表示。In the embodiment of the present application, the fourth preset value, the fifth preset value and the seventh 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 seventh preset value may be set to 15. 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, the fourteenth syntax element identification information may be represented by abs_level_minus1_div2_eq2, the fifteenth syntax element identification information may be represented by abs_level_minus1_div2_eq3, the sixteenth syntax element identification information may be represented by abs_level_minus1_div2_eq4, the seventeenth syntax element identification information may be represented by abs_level_minus1_div2_eq5, the eighteenth syntax element identification information may be represented by abs_level_minus1_div2_eq6, and the fourth value identification information may be represented by abs_level_minus15_div2.
在一些实施例中,在预置参数符合第一预设条件时,对第二待解码值进行解码处理,可以包括:基于上下文模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元 素标识信息和第十八语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值;以及基于旁路模型对可能出现的第四数值标识信息进行解码处理,确定第四数值标识信息的取值;根据至少一个第一类语法元素标识信息的取值和第四数值标识信息的取值,确定第二待解码值。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 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; determining the second value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第二待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, decoding the second value to be decoded may include:
基于上下文模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于上下文模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;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;
若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;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 the seventh preset value, the value of the eleventh syntax element identification information and the value of the fourth numerical value identification information.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after each decoding of the following syntax element identification information based on the context model is completed, performing a subtraction operation on the value of the preset parameter:
第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息。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.
在另一些实施例中,在预置参数符合第二预设条件时,对第二待解码值进行解码处理,可以包括:基于旁路模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息、第十八语法元素标识信息和第四数值标识信息进行解码处理,确定第二待解码值。也就是说,如果预置参数符合第二预设条件,那么对于第二待解码值对应的所有二值化码字均采用旁路模型进行解码处理。In other embodiments, when the preset parameter meets the second 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, the eighteenth grammatical element identification information and the fourth numerical identification information that may appear based on the bypass model to determine the second value to be decoded. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be decoded are decoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第二待解码值进行解码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, decoding the second value to be decoded may include:
基于旁路模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于旁路模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;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;
若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元 素标识信息之和;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 the seventh preset value, the value of the eleventh syntax element identification information and the value of the fourth numerical value identification information.
在本申请实施例中,第五常数、第六常数、第七常数、第八常数、第九常数和第十常数均为2的倍数。示例性地,第五常数设置为2,第六常数设置为4,第七常数设置为6,第八常数设置为8,第九常数设置为10,第十常数设置为12。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. Exemplarily, 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.
需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息、第十八语法元素标识信息等,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。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.
另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里也不作具体限定。示例性地,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是对此并不作具体限定。In addition, in an 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 a profile or may be a value of a flag/identifier, which is not specifically limited here. Exemplarily, 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. Among them, in an 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.
这样,首先解码第十一语法元素标识信息和第十二语法元素标识信息,如果第十二语法元素标识信息的取值为1,那么可以确定第二待解码值等于1+abs_level_minus1_parity;否则,如果第十二语法元素标识信息的取值为0,那么需要继续解码第十三语法元素标识信息,如果第十三语法元素标识信息的取值为1,那么可以确定第二待解码值等于3+abs_level_minus1_parity;否则,如果第十三语法元素标识信息的取值为0,那么需要继续解码第十四语法元素标识信息,如果第十四语法元素标识信息的取值为1,那么可以确定第二待解码值等于5+abs_level_minus1_parity;否则,如果第十四语法元素标识信息的取值为0,那么需要继续解码第十五语法元素标识信息,如果第十五语法元素标识信息的取值为1,那么可以确定第二待解码值等于7+abs_level_minus1_parity;否则,如果第十五语法元素标识信息的取值为0,那么需要继续解码第十六语法元素标识信息,如果第十六语法元素标识信息的取值为1,那么可以确定第二待解码值等于9+abs_level_minus1_parity;否则,如果第十六语法元素标识信息的取值为0,那么需要继续解码第十七语法元素标识信息,如果第十七语法元素标识信息的取值为1,那么可以 确定第二待解码值等于11+abs_level_minus1_parity;否则,如果第十七语法元素标识信息的取值为0,那么需要继续解码第十八语法元素标识信息,如果第十八语法元素标识信息的取值为1,那么可以确定第二待解码值等于13+abs_level_minus1_parity;否则,如果第十八语法元素标识信息的取值为0,那么需要继续解码第四数值标识信息,以确定出第二待解码值。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. inus1_parity; otherwise, if the value of the fourteenth grammatical element identification information is 0, then it is necessary to continue decoding the fifteenth grammatical element identification information, if the value of the fifteenth grammatical element identification information is 1, then it can be determined that the second value to be decoded is equal to 7+abs_level_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, 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, if the value of the seventeenth grammatical element identification information is 1, then It is 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, 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, 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, it is necessary to continue decoding the fourth numerical identification information to determine the second value to be decoded.
在一些实施例中,对于第四数值标识信息,基于旁路模型对第四数值标识信息进行解码处理,确定第四数值标识信息的取值,可以包括:基于旁路模型对第四数值标识信息进行解码处理,确定第四数值标识信息对应的至少一个二值符号;对至少一个二值符号进行反二值化处理,得到第四数值标识信息的取值。In some embodiments, for the fourth numerical identification information, decoding the fourth numerical identification information based on a 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; debinarizing at least one binary symbol to obtain the value of the fourth numerical identification information.
在一些实施例中,根据第七预设值、第十一语法元素标识信息的取值和第四数值标识信息的取值,确定第二待解码值,可以包括:对第四数值标识信息的取值进行第十一运算,得到第十一数值;根据第七预设值、第十一数值和第十一语法元素标识信息的取值,确定第二待解码值。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 can 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.
还需要说明的是,在本申请实施例中,对第四数值标识信息的取值进行第十一运算,得到第十一数值,可以包括:对第四数值标识信息的取值与2进行乘法运算,得到第十一数值;或者,对第四数值标识信息的取值进行左移一位运算,得到第十一数值。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 place to obtain the eleventh numerical value.
进一步地,在一些实施例中,根据第七预设值、第十一数值和第十一语法元素标识信息的取值,确定第二待解码值,可以包括:对第七预设值、第十一数值和第十一语法元素标识信息的取值进行加法运算,得到第二待解码值。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: adding 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.
示例性地,假定第七预设值设置为15,第十一语法元素标识信息用abs_level_minus1_parity表示,第四数值标识信息用abs_level_minus15_div2表示;那么,第二待解码值为(15+abs_level_minus1_parity+(abs_level_minus15_div2<<1))。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)).
可以理解地,属性信息为反射率时,对于第二待解码值(即反射率量化残差值)的具体实施步骤如下: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:
a)解码abs_level_minus1_parity和abs_level_minus1_div2_eq0,如果abs_level_minus1_div2_eq0标志位的解码值等于1,则第二待解码值为(1+abs_level_minus1_parity),解码完成,否则进入步骤b);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 the decoding is completed. Otherwise, proceed to step b);
b)解码abs_level_minus1_div2_eq1,如果abs_level_minus1_div2_eq1标志位的解码值等于1,则第二待解码值为(3+abs_level_minus1_parity),解码完成,否则进入步骤c);b) Decode 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), and the decoding is completed. Otherwise, proceed to step c);
c)解码abs_level_minus1_div2_eq2,如果abs_level_minus1_div2_eq2标志位的解码值等于1,则第二待解码值为(5+abs_level_minus1_parity),解码完成,否则进入步骤d);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), and the decoding is completed. Otherwise, proceed to step d);
d)解码abs_level_minus1_div2_eq3,如果abs_level_minus1_div2_eq3标志位的解码值等于1,则第二待解码值为(7+abs_level_minus1_parity),解码完成,否则进入步骤e);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 the decoding is completed. Otherwise, proceed to step e);
e)解码abs_level_minus1_div2_eq4,如果abs_level_minus1_div2_eq4标志位的解码值等于1,则第二待解码值为(9+abs_level_minus1_parity),解码完成,否则进入步骤f);e) Decode 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 the decoding is completed. Otherwise, proceed to step f);
f)解码abs_level_minus1_div2_eq5,如果abs_level_minus1_div2_eq5标志位的解码值等于1,则第二待解码值为(11+abs_level_minus1_parity),解码完成,否则进入步骤g);f) Decode abs_level_minus1_div2_eq5. If the decoded value of the abs_level_minus1_div2_eq5 flag is equal to 1, the second value to be decoded is (11+abs_level_minus1_parity), and the decoding is completed. Otherwise, proceed to step g);
g)解码abs_level_minus1_div2_eq6,如果abs_level_minus1_div2_eq6标志位的解码值等于1,则第二待解码值为(13+abs_level_minus1_parity),解码完成,否则进入步骤h);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 the decoding is completed. Otherwise, proceed to step h);
h)解码abs_level_minus15_div2,则第二待解码值为(15+abs_level_minus1_parity+(abs_level_minus15_div2<<1)),解码完成。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 the decoding is completed.
在一种具体的实施例中,为了提升硬件吞吐率,该解码过程可以如下:In a specific embodiment, in order to improve the hardware throughput, the decoding process may be as follows:
a)为反射率量化残差值分配基于上下文模型解码码字的预算remBinsPass1(初始值可设置为2 24); a) Allocate a budget remBinsPass1 based on the context model decoding codeword for the reflectivity quantization residual value (the initial value can be set to 2 24 );
b)在反射率量化残差值解码开始前,判断remBinsPass1是否大于等于T(如设置为8);b) Before decoding of the reflectivity quantization residual value begins, determine whether remBinsPass1 is greater than or equal to T (such as set to 8);
c)当remBinsPass1≥T时,对可能出现的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采用基于上下文模型的解码方式,且每解完一个标志位/标志符,做remBinsPass1--操作,而abs_level_minus15_div2的所有二值化后的码字采用基于旁路模型的解码方式;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 in a context model-based manner, 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 in a bypass model-based manner;
d)当不满足remBinsPass1≥T时,对反射率量化残差值的所有二值化后的码字均采用基于旁路模型的解码方式。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.
在实现中,本申请实施例的整个解码过程的语法表描述如表6所示。In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 6.
表6Table 6
Figure PCTCN2022137376-appb-000009
Figure PCTCN2022137376-appb-000009
Figure PCTCN2022137376-appb-000010
Figure PCTCN2022137376-appb-000010
Figure PCTCN2022137376-appb-000011
Figure PCTCN2022137376-appb-000011
简单来说,在本申请实施例中,设定预算remBinsPass1对属性量化残差值解码时使用的基于上下文模型的码字个数进行限制,可以提高吞吐率,提供对硬件更友好的实现方式。In short, in an embodiment of the present application, setting the budget remBinsPass1 to limit the number of context model-based codewords used when decoding attribute quantization residual values can improve throughput and provide a more hardware-friendly implementation method.
示例性地,表7和表8为预测分支的测试结果。其中,表7为测试条件----几何位置无损、属性有限度有损(C3-lossless geometry,limit-lossy attributes)所对应的测试结果,表8为测试条件----几何位置无损、属性无损(C4-lossless geometry,lossless attributes)所对应的测试结果。For example, Table 7 and Table 8 are the test results of the prediction branch. Table 7 is the test result corresponding to the test condition --- lossless geometry, limit-lossy attributes (C3-lossless geometry,limit-lossy attributes), and Table 8 is the test result corresponding to the test condition --- lossless geometry, lossless attributes (C4-lossless geometry,lossless attributes).
表7Table 7
Figure PCTCN2022137376-appb-000012
Figure PCTCN2022137376-appb-000012
表8Table 8
Figure PCTCN2022137376-appb-000013
Figure PCTCN2022137376-appb-000013
示例性地,表9、表10、表11和表12为多层变换分支的测试结果。其中,表9为测试条件----几何位置有限度有损、属性有损(C1-limit-lossy geometry,lossy attributes)所对应的测试结果,表10为测试条件----几何位置无损、属性有损(C2-lossless geometry,lossy attributes)所对应的测试结果,表11为测试条件----几何位置无损、属性有限度有损(C3-lossless geometry,limit-lossy attributes)所对应的测试结果,表12为测试条件----几何位置无损、属性无损(C4-lossless geometry,lossless attributes)所对应的测试结果。Exemplarily, Tables 9, 10, 11 and 12 are test results of multi-layer transform branches. Table 9 is the test result corresponding to the test condition ---- limited lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes), Table 10 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes), Table 11 is the test result corresponding to the test condition ---- lossless geometry, limited lossy attributes (C3-lossless geometry, limit-lossy attributes), and Table 12 is the test result corresponding to the test condition ---- lossless geometry, lossless attributes (C4-lossless geometry, lossless attributes).
表9Table 9
Figure PCTCN2022137376-appb-000014
Figure PCTCN2022137376-appb-000014
Figure PCTCN2022137376-appb-000015
Figure PCTCN2022137376-appb-000015
表10Table 10
Figure PCTCN2022137376-appb-000016
Figure PCTCN2022137376-appb-000016
表11Table 11
Figure PCTCN2022137376-appb-000017
Figure PCTCN2022137376-appb-000017
表12Table 12
Figure PCTCN2022137376-appb-000018
Figure PCTCN2022137376-appb-000018
示例性地,表13和表14为在资源受限的预测变换分支的测试结果。其中,表13为测试条件----几何位置有限度有损、属性有损(C1-limit-lossy geometry,lossy attributes)所对应的测试结果,表14为测试条件----几何位置无损、属性有损(C2-lossless geometry,lossy attributes)所对应的测试结果。For example, Table 13 and Table 14 are the test results of the resource-constrained prediction transformation branch. Table 13 is the test result corresponding to the test condition ---- limited-lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes), and Table 14 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes).
表13Table 13
Figure PCTCN2022137376-appb-000019
Figure PCTCN2022137376-appb-000019
表14Table 14
Figure PCTCN2022137376-appb-000020
Figure PCTCN2022137376-appb-000020
示例性地,表15和表16为在资源不受限的预测变换分支的测试结果。其中,表15为测试条件----几何位置有限度有损、属性有损(C1-limit-lossy geometry,lossy attributes)所对应的测试结果,表16为测试条件----几何位置无损、属性有损(C2-lossless geometry,lossy attributes)所对应的测试结果。For example, Table 15 and Table 16 are the test results of the prediction transformation branch with unlimited resources. Table 15 is the test result corresponding to the test condition ---- limited lossy geometry, lossy attributes (C1-limit-lossy geometry, lossy attributes), and Table 16 is the test result corresponding to the test condition ---- lossless geometry, lossy attributes (C2-lossless geometry, lossy attributes).
表15Table 15
Figure PCTCN2022137376-appb-000021
Figure PCTCN2022137376-appb-000021
Figure PCTCN2022137376-appb-000022
Figure PCTCN2022137376-appb-000022
表16Table 16
Figure PCTCN2022137376-appb-000023
Figure PCTCN2022137376-appb-000023
本实施例提供了一种解码方法,通过上述实施例对前述实施例的具体实现进行了详细阐述,从中可以看出,根据前述实施例的技术方案,首先确定属性量化残差值对应的预置参数,然后判断预置参数是否满足第一预设条件;如果预置参数符合第一预设条件,那么对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理;如此,根据所确定的预置参数,可以限定在解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度,有利于硬件实现;而且还能够提升处理速度。The present embodiment provides a decoding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the aforementioned embodiment. It can be seen that according to the technical scheme 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 in 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.
在本申请的又一实施例中,参见图8,其示出了本申请实施例提供的一种编码方法的流程示意图。如图8所示,该方法可以包括:In another embodiment of the present application, referring to FIG8 , a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG8 , the method may include:
S801:确定属性量化残差值以及属性量化残差值对应的预置参数。S801: Determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value.
需要说明的是,本申请实施例的编码方法应用于编码器。另外,该编码方法具体可以是指一种属性量化残差编码方法;更具体地,是指一种限制基于上下文模型的码字数量的属性量化残差编码方法,以提高硬件吞吐率。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 may 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 a context model to improve hardware throughput.
还需要说明的是,在本申请实施例中,对于点云的属性信息,这里可以是指颜色分量,也可以是指反射率,甚至还可以是其他属性。因此,在一些实施例中,属性量化残差值可以包括下述其中之一:颜色分量量化残差值和反射率量化残差值。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.
在本申请实施例中,对于颜色分量量化残差值而言,颜色分量量化残差值可以包括:第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值。也就是说,根据本申请实施例的编码方法,可以对以下任意一项进行编码处理:第一颜色分量的量化残差值、第二颜色分量的量化残差值、第三颜色分量的量化残差值和反射率量化残差值。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 reflectivity quantization residual value.
其中,对于第一颜色分量、第二颜色分量和第三颜色分量,可以是RGB格式,或者也可以是YUV格式,甚至还可以是其他格式。另外,对于这三个颜色分量的顺序,以YUV为例,可以是YUV顺序,也可以是UYV顺序,还可以是UVY顺序,甚至还可以是VYU顺序等等,即对于颜色分量的格式以及顺序,这里均不作具体限定。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. In addition, 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. That is, the format and order of the color components are not specifically limited here.
还需要说明的是,在本申请实施例中,预置参数用remBinsPass1表示,这里的预置参数用于表示为属性量化残差值分配基于上下文模型的码字的预算数量。示例性地,预置参数的取值可以设置为2 24,但是并不作具体限定。 It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, and the preset parameter here is used to represent the budget number of codewords based on the context model allocated to the attribute quantization residual value. Exemplarily, the value of the preset parameter can be set to 2 24 , but it is not specifically limited.
对于预置参数而言,其可以是预先设定的参数值,也可以是将预置参数的取值写入码流中。因此,在一些实施例中,该方法还可以包括:对属性量化残差值对应的预置参数进行编码处理,将所得到的编码比特写入码流。这样,后续在解码端,通过解码码流就可以获得预置参数的取值。For the preset parameter, it can be a pre-set parameter value, or the value of the preset parameter can be written into the bitstream. Therefore, in some embodiments, the method can also include: encoding the preset parameter corresponding to the attribute quantization residual value, and writing the obtained encoding bits into the bitstream. In this way, the value of the preset parameter can be obtained by decoding the bitstream at the decoding end.
这样,在属性量化残差值编码开始前,需要先确定预置参数的取值,然后判断预置参数是否符合第一预设条件,进而能够限定在编码时使用的基于上下文模型的码字数量,提高硬件吞吐率。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 determine whether the preset parameter meets the first preset condition, thereby limiting the number of codewords based on the context model used in encoding and improving hardware throughput.
S802:根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。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.
在本申请实施例中,对于属性量化残差值,可以将其用语法元素标识信息来进行表示。示例性地,根据语法元素标识信息,可以用于指示属性量化残差值是否等于0、或者属性量化残差值是否等于1、或者属性量化残差值减预设常数再除以2的商是否等于0、是否等于1、是否等于2等等。In the embodiment of the present application, the attribute quantization residual value may be represented by syntax element identification information. Exemplarily, according to the syntax element identification information, it 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, equal to 1, equal to 2, and so on.
如此,根据属性量化残差值,可以确定出至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。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.
S803:若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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.
需要说明的是,在本申请实施例中,预置参数符合第一预设条件,可以包括:确定预置参数的取值大于或等于预设门限值。其中,预设门限值可以是根据硬件配置情况预先设置的一个判定值。示例性地,预设门限值可以设置为3,也可以设置为8,还可以设置为14,甚至还可以设置为其他数值,这里也不作具体限定。It should be noted that, in the embodiment of the present application, the preset parameter meets the first preset condition, which may include: determining that the value of the preset parameter is greater than or equal to the preset threshold value. The preset threshold value may be a judgment value preset according to the hardware configuration. Exemplarily, the preset threshold value may be set to 3, or 8, or 14, or even other values, which are not specifically limited here.
还需要说明的是,在本申请实施例中,如果预置参数不符合第一预设条件,那么在一些实施例中,该方法还可以包括:若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息均进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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, encoding processing based on the bypass model is performed on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and the obtained encoding bits are written into the bitstream.
需要说明的是,在本申请实施例中,预置参数符合第二预设条件,可以包括:确定预置参数不符合第一预设条件;或者,确定预置参数的取值小于预设门限值。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.
还需要说明的是,在本申请实施例中,由于通常硬件在一个时钟周期内可以处理4~6个基于旁路模型进行编码的码字,但仅可以处理1个基于上下文模型进行编码的码字;考虑到硬件吞吐率,本申请实施例提出的编码方法,能够避免使用基于上下文模型进行编码所有码字的情况。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; considering 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.
具体地,如果预置参数的取值大于或等于预设门限值,那么可以对一部分语法元素(如至少一个第一类语法元素标识信息)进行基于上下文模型的编码处理,以及对另一部分语法元素(如至少一个第二类语法元素标识信息)进行基于旁路模型的编码处理;如果预置参数的取值小于预设门限值,那么可以对所有语法元素(如至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息)均进行基于旁路模型的编码处理。Specifically, if the value of the preset parameter is greater than or equal to the preset threshold value, then a part of the syntax elements (such as at least one first-category syntax element identification information) can be coded based on the context model, and another part of the syntax elements (such as at least one second-category syntax element identification information) can be coded based on the bypass model; if the value of the preset parameter is less than the preset threshold value, then all the syntax elements (such as at least one first-category syntax element identification information and at least one second-category syntax element identification information) can be coded based on the bypass model.
在一些实施例中,在预置参数符合第一预设条件时,该方法还可以包括:对于至少一个第一类语法元素标识信息,在基于上下文模型每编码完成一个第一类语法元素标识信息后,对预置参数的取值执行一次减1操作。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.
也就是说,在本申请实施例中,对于可能出现的至少一个第一类语法元素标识信息,使用基于上下文模型的编码方式,且在每编码完成一个第一类语法元素标识信息时,还需要执行--remBinsPass1操作。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 when each first-category syntax element identification information is encoded, a --remBinsPass1 operation needs to be performed.
还需要说明的是,在本申请实施例中,在某些情况下,例如属性量化残差值小于预设阈值,这时候仅通过至少一个第一类语法元素标识信息的取值就可以确定出属性量化残差值。在一些实施例中,该方法还可以包括: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:
根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值;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, a context 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; or,
若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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.
也就是说,在某些情况下,根据至少一个第一类语法元素标识信息的取值,就可以确定属性量化残差值是否等于0、或者属性量化残差值是否等于1、或者属性量化残差值减预设常数再除以2的商是否等于0、是否等于1、是否等于2等等,进而确定出属性量化残差值。这时候,可以仅针对指示一个第一类语法元素标识信息的取值进行编码处理。That is to say, in some cases, according to 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., and then determine the attribute quantization residual value. At this time, the encoding process can be performed only on the value indicating one first-category syntax element identification information.
本实施例提供了一种编码方法,确定属性量化残差值以及属性量化残差值对应的预置参数;根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。这样,在确定出属性量化残差值对应的预置参数之后,可以限定在编码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行编码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度;而且还能够提升处理速度。This embodiment provides a coding method, which 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 according to the attribute quantization residual value; if the preset parameter meets the first preset condition, performs a context model-based coding process on the value of at least one first-category syntax element identification information, and performs a bypass model-based coding process on the value of at least one second-category syntax element identification information, and writes the obtained coded 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 in coding can be limited, so that part of the syntax element identification information is coded using the bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
在本申请的又一实施例中,基于前述实施例所述的编码方法,参见图9,其示出了本申请实施例提供的一种编码方法的详细流程示意图。如图9所示,该方法可以包括: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:
S901:确定属性量化残差值对应的预置参数。S901: Determine a preset parameter corresponding to an attribute quantization residual value.
S902:判断预置参数是否大于或等于预设门限值。S902: Determine whether the preset parameter is greater than or equal to a preset threshold value.
S903:若预置参数大于或等于预设门限值,则基于上下文模型对可能出现的至少一个第一类语法元素标识信息进行编码处理,以及基于旁路模型对可能出现的至少一个第二类语法元素标识信息进行编码处理,将所得到的编码比特写入码流。S903: If the preset parameter is greater than or equal to the preset threshold value, encoding is performed on at least one first-category syntax element identification information that may appear based on the context model, and encoding is performed on at least one second-category syntax element identification information that may appear based on the bypass model, and the obtained encoding bits are written into the bitstream.
S904:若预置参数小于预设门限值,则基于旁路模型对可能出现的至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息进行编码处理,将所得到的编码比特写入码流。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.
需要说明的是,在本申请实施例中,编码端可以采用相同的顺序(点云原始采集顺序、莫顿顺序、希尔伯特顺序等)依次对每一个节点的属性(颜色分量、反射率等)量化残差值进行编码处理。It should be noted that in an 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.
在一种可能的实现方式中,在属性信息为颜色分量时,如果三个颜色分量的量化残差值不全为0,这时候需要针对第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值依次进行确定。这时候,在属性量化残差值为颜色分量量化残差值时,至少一个第一类语法元素标识信息可以包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息。In a possible implementation, when the attribute information is a color component, if the quantized residual values of the three color components are not all 0, then it is necessary to determine 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 in sequence. At this time, when the attribute quantized residual value is a color component quantized 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.
其中,第一语法元素标识信息可以用color_first_comp_zero表示,color_first_comp_zero用于指示第一颜色分量的量化残差值是否等于0;第二语法元素标识信息可以用color_second_comp_zero表示,color_second_comp_zero用于指示第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0。Among them, the first syntax element identification information can be represented by color_first_comp_zero, color_first_comp_zero 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, color_second_comp_zero 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.
在一些实施例中,该方法还可以包括:In some embodiments, the method may further include:
根据第一颜色分量的量化残差值是否等于0,确定第一语法元素标识信息的取值;以及基于目标模型对第一语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
若第一语法元素标识信息的取值为第一值,则根据第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0,确定第二语法元素标识信息的取值;以及基于目标模型对第二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the first syntax element identification information is the first value, determining 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 encoding the value of the second syntax element identification information based on the target model, and writing the obtained coded bits into the 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 are respectively encoded, and the obtained encoding bits are written 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;
其中,若预置参数符合第一预设条件,则将上下文模型确定为目标模型;若预置参数符合第二预设条件,则将旁路模型确定为目标模型。Among them, 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.
也就是说,如果预置参数符合第一预设条件,那么基于上下文模型对可能出现的第一语法元素标识信息和第二语法元素标识信息进行编码处理;如果预置参数符合第二预设条件,那么基于旁路模型对可能出现的第一语法元素标识信息和第二语法元素标识信息进行编码处理。That is to say, if the preset parameters meet the first preset condition, 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 condition, then the first syntax element identification information and the second syntax element identification information that may appear are encoded based on the bypass model.
还需要说明的是,在本申请实施例中,针对不同的语法元素标识信息,例如第一语法元素标识信息和第二语法元素标识信息,各自对应的第一值和第二值可以相同,或者也可以不相同,这里不作具体限定。另外,在本申请实施例中,第一值和第二值可以是参数形式,也可以是数字形式。具体地,每一个语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志位/标识符的取值,这里也不作具体限定。示例性地,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值可以设置为1,第二值可以设置为0,但是对此并不作具体限定。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 first value and the second value corresponding to each other may be the same, or may be 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 bit/identifier, which is not specifically limited here. Exemplarily, 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. Among them, 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.
在一种具体的实施例中,当三个颜色分量的量化残差值不全为零时,其具体实施步骤如下: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:
a)采用"color_first_comp_zero"标志第一颜色分量的量化残差值是否等于0,编码"color_first_comp_zero"标志位,如果第一颜色分量的量化残差值为0则进入步骤b),否则进入步骤e);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, if the quantized residual value of the first color component is 0, proceeding to step b), otherwise proceeding to step e);
b)采用"color_second_comp_zero"标志第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均为0,编码"color_second_comp_zero"标志位,如果第二颜色分量的量化残差值为0则进入步骤c),否则进入步骤d);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, if the quantized residual value of the second color component is 0, proceeding to step c), otherwise proceeding to step d);
c)编码第三颜色分量的量化残差值,编码结束;c) encoding the quantized residual value of the third color component, and the encoding ends;
d)分别编码第二颜色分量的量化残差值和第三颜色分量的量化残差值,编码结束;d) respectively encoding the quantized residual value of the second color component and the quantized residual value of the third color component, and the encoding ends;
e)分别编码第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值,编码结束。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.
可以理解地,在属性量化残差值为颜色分量量化残差值时,考虑到存在第一颜色分量、第二颜色分量和第三颜色分量等三个颜色分量的量化残差值,故这里可以用第一待编码值表示。因此,在一些实施例中,该方法还可以包括:设置第一待编码值;其中,第一待编码值包括下述其中之一:第一颜色分量的量化残差值的绝对值、第二颜色分量的量化残差值的绝对值、第三颜色分量的量化残差值的绝对值、第一颜色分量的量化残差值的绝对值减一、第二颜色分量的量化残差值的绝对值减一、第三颜色分量的 量化残差值的绝对值减一。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, the first value to be encoded can be used here to represent it. 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.
需要说明的是,在本申请实施例中,在根据至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息来编码每一个颜色分量的量化残差值时,通常是分开编码量化残差值的绝对值和正负号标识信息的。另外,如果第二语法元素标识信息指示第一颜色分量的量化残差值和第二颜色分量的量化残差值均为0,这时候第三颜色分量的量化残差值一定为非零。以上述步骤c)中的第三颜色分量的量化残差值为例,由于前面的标志位已经表明第一颜色分量的量化残差值和第二颜色分量的量化残差值均为0,因此第三颜色分量的量化残差值一定为非零,这时候为了节省码流,可以先进行减一操作,然后再将其作为第一待编码值。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 the code stream, a subtraction operation can be performed first, and then it can be used as the first value to be encoded.
还需要说明的是,在本申请实施例中,至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息并不作具体限定。在一些实施例中,除了第一语法元素标识信息和第二语法元素标识信息之外,至少一个第一类语法元素标识信息还可以包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第一数值标识信息。It should also be noted that, in the embodiment of the present application, at least one first-category syntax element identification information and 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 also 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.
其中,第三语法元素标识信息用于指示第一待编码值是否等于0,第四语法元素标识信息用于指示第一待编码值是否等于1,第五语法元素标识信息用于指示第一待编码值的奇偶特性,第六语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于0,第一数值标识信息用于指示第一待编码值进行第二运算后得到的第二数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth grammatical 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.
在一些实施例中,对第一待编码值进行第一运算,可以包括:根据第一待编码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。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.
在一些实施例中,对第一待编码值进行第二运算,可以包括:根据第一待编码值与第二预设值进行减法运算,得到第二中间值;对第二中间值进行右移一位处理,得到第二数值;或者,将第二数值设置为等于第二中间值除以2的商。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.
需要说明的是,在本申请实施例中,对于除法运算,可以用右移运算替代,“>>”表示右移运算符;“除以2”相当于右移一位;对于乘法运算,可以用左移运算替代,“<<”表示左移运算符;“乘以2”相当于左移一位。It should be noted that in the embodiments of the present application, for division operations, right shift operations can be used instead, and “>>” represents the right shift operator; “divide by 2” is equivalent to shifting right by one bit; for multiplication operations, left shift operations can be used instead, and “<<” represents the left shift operator; “multiply by 2” is equivalent to shifting left by one bit.
还需要说明的是,在本申请实施例中,第一预设值与第二预设值可以不同,示例性地,第一预设值可以设置为2,第二预设值可以设置为4。另外,第三语法元素标识信息可以用color_level_equal_zero表示,第四语法元素标识信息可以用color_level_equal_one表示,第五语法元素标识信息可以用color_level_parity表示,第六语法元素标识信息可以用color_level_minus2_div2_eq0表示,第一数值标识信息可以用color_level_minus4_div2表示。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 value identification information may be represented by color_level_minus4_div2.
还需要说明的是,在本申请实施例中,由于存在第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值,因此,除了第一语法元素标识信息和第二语法元素标识信息均为一个之外,第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息分别对应三个;即,本申请实施例可以包括:一个第一语法元素标识信息、一个第二语法元素标识信息、三个第三语法元素标识信息、三个第四语法元素标识信息、三个第五语法元素标识信息和三个第六语法元素标识信息。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.
在一些实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包括:基于上下文模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息进行编码处理,以及基于旁路模型对可能出现的第一数值标识信息进行编码处理,将所得到的编码比特写入码流。In some embodiments, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include: encoding 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 and the sixth grammatical 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 coded bits into the bitstream.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include:
根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于上下文模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;Determine the value of the third syntax element identification information according to whether the first to-be-encoded value 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;
若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于上下文模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于上下文模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the context model, and writing the obtained coded bits into the bitstream;
若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第二运算后得到的第二数值,确定第一数值标识信息的取值;以及基于旁路模型对第一数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。If the value of the sixth syntax element identification information is the second value, the value of the first numerical identification information is determined according to 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 bit stream.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息。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.
在另一些实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包括:基于旁路模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息和第一数值标识信息进行编码处理,将所得到的编码比特写入码流。也就是说,如果预置参数符合第二预设条件,那么对于第一待编码值对应的所有二值化码字均采用旁路模型进行编码处理。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 and the first numerical identification information that may appear based on the bypass model, and writing the obtained encoding bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the first value to be encoded are encoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第一待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, encoding the first value to be encoded may include:
根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于旁路模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于旁路模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于旁路模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the bypass model, and writing the obtained coded bits into the bitstream;
若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第二运算后得到的第二数值,确定第一数值标识信息的取值;以及基于旁路模型对第一数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。If the value of the sixth syntax element identification information is the second value, the value of the first numerical identification information is determined according to 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 bit stream.
在一些实施例中,根据第一待编码值是否等于0,确定第三语法元素标识信息的取值,可以包括:若第一待编码值等于0,则确定第三语法元素标识信息的取值为第一值;若第一待编码值不等于0,则确定第三语法元素标识信息的取值为第二值。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 is 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 is the second value.
在一些实施例中,根据第一待编码值是否等于1,确定第四语法元素标识信息的取值,可以包括:若第一待编码值等于1,则确定第四语法元素标识信息的取值为第一值;若第一待编码值不等于1,则确定第四语法元素标识信息的取值为第二值。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.
在一些实施例中,根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值,可以包括:若第一待编码值为奇数,则确定第五语法元素标识信息的取值为第一值;若第一待编码值为偶数,则确定第五语法元素标识信息的取值为第二值。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.
在一些实施例中,根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值,可以包括:若第一数值等于0,则确定第六语法元素标识信息的取值为第一值;若第一数值不等于0,则确定第六语法元素标识信息的取值为第二值。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.
在一些实施例中,根据第一待编码值进行第二运算后得到的第二数值,确定第一数值标识信息的取值,可以包括:将第一数值标识信息的取值设置为等于第二数值。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.
在一些实施例中,基于旁路模型对第一数值标识信息的取值进行编码处理,可以包括:对第一数值标识信息的取值进行二值化处理,得到至少一个二值符号;基于旁路模型对至少一个二值符号依次进行编码处理,将所得到的编码比特写入码流。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 turn based on the bypass model, and writing the obtained encoded bits into the code stream.
示例性地,假定第一数值标识信息的取值为3,首先对3进行二值化处理,以二阶指数哥伦布编码为例,对3进行二值化后,得到一组二值符号011;然后基于旁路模型对这一组二值符号依次进行编码处理,将所得到的编码比特写入码流。Exemplarily, assuming that the value of the first numerical identification information is 3, 3 is first binarized. Taking the second-order exponential Golomb coding as an example, after 3 is binarized, a group of binary symbols 011 are obtained; then this group of binary symbols is encoded in turn based on the bypass model, and the obtained coded bits are written into the code stream.
可以理解地,对于第一待编码值(即颜色量化残差的绝对值或颜色量化残差的绝对值减一)进行编码处理,具体实施步骤如下:It can be understood that 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) is encoded, and the specific implementation steps are as follows:
其中,每个颜色分量的量化残差的编码步骤如下:Among them, the encoding steps of the quantized residual of each color component are as follows:
对于第一待编码值(为颜色量化残差的绝对值或颜色量化残差的绝对值减一):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):
a)采用"color_level_equal_zero"标志第一待编码值是否等于0,编码"color_level_equal_zero"标志位,如果第一待编码值为0则编码完成,否则进入步骤b);a) Use "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encode the "color_level_equal_zero" flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise go to step b);
b)采用"color_level_equal_one"标志第一待编码值是否等于1,编码"color_level_equal_one"标志位,如果第一待编码值为1则编码完成,否则进入步骤c);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, if the first value to be encoded is 1, the encoding is completed, otherwise proceed to step c);
c)采用"color_level_parity"标志第一待编码值的奇偶性,即为第一待编码值除2的余数,"color_level_minus2_div2_eq0"标志第一待编码值减2之后再除二的商是否等于0,编码"color_level_parity"和"color_level_minus2_div2_eq0",如果第一待编码值减一之后再除二的商等于0则编码完成,否则进入步骤d);c) Use "color_level_parity" to mark the parity of the first value to be encoded, that is, the remainder of the first value to be encoded divided by 2, "color_level_minus2_div2_eq0" marks 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, the encoding is completed, otherwise go to step d);
d)"color_level_minus4_div2"为第一待编码值减4再除2的商,编码"color_level_minus4_div2"值,则编码完成。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 completed.
在一种具体的实施例中,为了提高硬件吞吐率,该编码过程可以如下:In a specific embodiment, in order to improve the hardware throughput, the encoding process may be as follows:
a)为颜色量化残差分配基于上下文模型编码码字的预算remBinsPass1(初始值可设置为2 24); a) Allocate a budget remBinsPass1 of the context model encoding codeword for the color quantization residual (the initial value can be set to 2 24 );
b)在颜色量化残差编码开始前,判断remBinsPass1是否大于等于T(如设置为14);b) Before the color quantization residual coding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 14);
c)当remBinsPass1≥T时,对可能出现的一个color_first_comp_zero、一个color_second_comp_zero、三个color_level_equal_zero、三个color_level_equal_one、三个color_level_parity、三个color_level_minus2_div2_eq0采用基于上下文模型的编码方式,且每编完一个标志位/标志符,做remBinsPass1--操作,而color_level_minus4_div2的所有二值化后的码字采用基于旁路模型的编码方式;c) When remBinsPass1 ≥ T, a possible color_first_comp_zero, a 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 are encoded using a context model, and after each flag bit/flag is encoded, a remBinsPass1-- operation is performed, and all binary codewords of color_level_minus4_div2 are encoded using a bypass model-based encoding method;
d)当不满足remBinsPass1≥T时,对颜色量化残差的所有二值化后的码字均采用基于旁路模型的编码方式。d) When remBinsPass1≥T is not satisfied, all binarized codewords of the color quantization residual are coded using a bypass model-based encoding method.
对于本申请实施例的整个编码过程,在实现中对应解码过程的语法表描述如前述的表1和表2所示。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.
在另一种可能的实现方式中,在属性信息仍为颜色分量时,除了第一语法元素标识信息和第二语法元素标识信息之外,至少一个第一类语法元素标识信息还可以包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第二数值标识信息。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.
其中,第三语法元素标识信息用于指示第一待编码值是否等于0,第四语法元素标识信息用于指示第一待编码值是否等于1,第五语法元素标识信息用于指示第一待编码值的奇偶特性,第六语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于0,第七语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于1,第八语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于2,第九语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于3,第十语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于4,第二数值标识信息用于指示第一待编码值进行第三运算后得到的第三数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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.
在一些实施例中,对第一待编码值进行第一运算,可以包括:根据第一待编码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。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.
在一些实施例中,对第一待编码值进行第二运算,可以包括:根据第一待编码值与第二预设值进行减法运算,得到第二中间值;对第二中间值进行右移一位处理,得到第二数值;或者,将第二数值设置为等于第二中间值除以2的商。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.
在一些实施例中,对第一待编码值进行第三运算,可以包括:根据第一待编码值与第三预设值进行减法运算,得到第三中间值;对第三中间值进行右移一位处理,得到第三数值;或者,将第三数值设置为等于第三中间值除以2的商。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.
在本申请实施例中,第一预设值与第三预设值可以不同,示例性地,第一预设值可以设置为2,第三预设值可以设置为12。另外,第三语法元素标识信息可以用color_level_equal_zero表示,第四语法元素标识信息可以用color_level_equal_one表示,第五语法元素标识信息可以用color_level_parity表示,第六语法元素标识信息可以用color_level_minus2_div2_eq0表示,第七语法元素标识信息可以用color_level_minus2_div2_eq1表示,第八语法元素标识信息可以用color_level_minus2_div2_eq2表示,第九语法元素标识信息可以用color_level_minus2_div2_eq3表示,第十语法元素标识信息可以用color_level_minus2_div2_eq4表示,第二数值标识信息可以用color_level_minus12_div2表示。In the 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.
在一些实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包括:基于上下文模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息进行编码处理,以及基于旁路模型对可能出现的第二数值标识信息进行编码处理,将所得到的编码比特写入码流。In some embodiments, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include: encoding 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 that may appear based on the context model, and encoding the second numerical identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包 括:In a specific embodiment, when the preset parameter meets the first preset condition, encoding the first value to be encoded may include:
根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于上下文模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;Determine the value of the third syntax element identification information according to whether the first to-be-encoded value 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;
若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于上下文模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于上下文模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the context model, and writing the obtained coded bits into the bitstream;
若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于1,确定第七语法元素标识信息的取值;以及基于上下文模型对第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after the first operation is performed 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;
若第七语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于2,确定第八语法元素标识信息的取值;以及基于上下文模型对第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after 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;
若第八语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于3,确定第九语法元素标识信息的取值;以及基于上下文模型对第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information according to whether the first value obtained after 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;
若第九语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于4,确定第十语法元素标识信息的取值;以及基于上下文模型对第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether the first value obtained after 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, the value of the second numerical identification information is determined according to the third numerical value obtained after the third operation is performed on the first value to be encoded; and the value of the second numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息。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.
在另一些实施例中,在预置参数符合第一预设条件时,对第一待编码值进行编码处理,可以包括:基于旁路模型对可能出现的第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息和第二数值标识信息进行编码处理,将所得到的编码比特写入码流。In other embodiments, when the preset parameters meet the first preset condition, encoding the first value to be encoded may include: encoding 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, the tenth grammatical element identification information and the second numerical identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第一待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, encoding the first value to be encoded may include:
根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于旁路模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于旁路模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于旁路模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining 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 encoded 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 the bypass model, and writing the obtained coded bits into the bitstream;
若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于1,确定第七语法元素标识信息的取值;以及基于旁路模型对第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after the first operation is performed 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;
若第七语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于2,确定第八语法元素标识信息的取值;以及基于旁路模型对第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after 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;
若第八语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于3,确定第九语法元素标识信息的取值;以及基于旁路模型对第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information according to whether the first value obtained after the first operation is performed 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;
若第九语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于4,确定第十语法元素标识信息的取值;以及基于旁路模型对第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether the first value obtained after 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, the value of the second numerical identification information is determined according to the third numerical value obtained after the third operation is performed on the first value to be encoded; and the value of the second numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
在一些实施例中,根据第一待编码值进行第一运算后得到的第一数值是否等于1,确定第七语法元素标识信息的取值,可以包括:若第一数值等于1,则确定第七语法元素标识信息的取值为第一值;若第一数值不等于1,则确定第七语法元素标识信息的取值为第二值。In some embodiments, determining the value of the seventh grammatical element identification information based on whether a first numerical value obtained after a first operation is performed on the first value to be encoded is equal to 1 may 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.
在一些实施例中,根据第一待编码值进行第一运算后得到的第一数值是否等于2,确定第八语法元素标识信息的取值,可以包括:若第一数值等于2,则确定第八语法元素标识信息的取值为第一值;若第一数值不等于2,则确定第八语法元素标识信息的取值为第二值。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.
在一些实施例中,根据第一待编码值进行第一运算后得到的第一数值是否等于3,确定第九语法元素标识信息的取值,可以包括:若第一数值等于3,则确定第九语法元素标识信息的取值为第一值;若第一数值不等于3,则确定第九语法元素标识信息的取值为第二值。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 is the first value; if the first numerical value is not equal to 3, determining the value of the ninth grammatical element identification information is the second value.
在一些实施例中,根据第一待编码值进行第一运算后得到的第一数值是否等于4,确定第十语法元素标识信息的取值,可以包括:若第一数值等于4,则确定第十语法元素标识信息的取值为第一值;若第一数值不等于4,则确定第十语法元素标识信息的取值为第二值。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 is the first value; if the first numerical value is not equal to 4, determining the value of the tenth grammatical element identification information is the second value.
在一些实施例中,根据第一待编码值进行第三运算后得到的第三数值,确定第二数值标识信息的取值,可以包括:将第二数值标识信息的取值设置为等于第三数值。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.
在一些实施例中,基于旁路模型对第二数值标识信息的取值进行编码处理,可以包括:对第二数值标识信息的取值进行二值化处理,得到至少一个二值符号;基于旁路模型对至少一个二值符号依次进行编码处理,将所得到的编码比特写入码流。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 turn based on the bypass model, and writing the obtained encoded bits into the bit stream.
可以理解地,对于第一待编码值(即颜色量化残差的绝对值或颜色量化残差的绝对值减一)进行编码处理,具体实施步骤如下:It can be understood that 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) is encoded, and the specific implementation steps are as follows:
其中,每个颜色分量的量化残差的编码步骤如下:Among them, the encoding steps of the quantized residual of each color component are as follows:
对于第一待编码值(为颜色量化残差的绝对值或颜色量化残差的绝对值减一):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):
a)采用"color_level_equal_zero"标志第一待编码值是否等于0,编码"color_level_equal_zero"标志位,如果第一待编码值为0则编码完成,否则进入步骤b);a) Use "color_level_equal_zero" to mark whether the first value to be encoded is equal to 0, encode the "color_level_equal_zero" flag bit, if the first value to be encoded is 0, the encoding is completed, otherwise go to step b);
b)采用"color_level_equal_one"标志第一待编码值是否等于1,编码"color_level_equal_one"标志位,如果第一待编码值为1则编码完成,否则进入步骤c);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, if the first value to be encoded is 1, the encoding is completed, otherwise proceed to step c);
c)采用"color_level_parity"标志第一待编码值的奇偶性,即为第一待编码值除2的余数,"color_level_minus2_div2_eq0"标志第一待编码值减2之后再除二的商是否等于0,编码"color_level_parity"和"color_level_minus2_div2_eq0",如果第一待编码值减一之后再除二的商等于0则编码完成,否则进入步骤d);c) Use "color_level_parity" to mark the parity of the first value to be encoded, that is, the remainder of the first value to be encoded divided by 2, "color_level_minus2_div2_eq0" marks 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, the encoding is completed, otherwise go to step d);
d)采用"color_level_minus2_div2_eq1"标志第一待编码值减2之后再除二的商是否等于1,编码"color_level_minus2_div2_eq1"标志位,如果第一待编码值减2之后再除二的商等于1则编码完成,否则进入步骤e);d) Use "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, the encoding is completed, otherwise go to step e);
e)采用"color_level_minus2_div2_eq2"标志第一待编码值减2之后再除二的商是否等于2,编码"color_level_minus2_div2_eq2"标志位,如果第一待编码值减2之后再除二的商等于2则编码完成,否则进入步骤f);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, 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, the encoding is completed, otherwise go to step f);
f)采用"color_level_minus2_div2_eq3"标志第一待编码值减2之后再除二的商是否等于3,编码"color_level_minus2_div2_eq3"标志位,如果第一待编码值减2之后再除二的商等于3则编码完成,否则进入步骤g);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, encoding 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, the encoding is completed, otherwise proceed to step g);
g)采用"color_level_minus2_div2_eq4"标志第一待编码值减2之后再除二的商是否等于4,编码"color_level_minus2_div2_eq4"标志位,如果第一待编码值减2之后再除二的商等于4则编码完成,否则进入步骤h);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 go to step h);
h)"color_level_minus4_div2"为第一待编码值减4再除2的商,编码"color_level_minus4_div2"值,则编码完成。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 completed.
在一种具体的实施例中,为了提高硬件吞吐率,该编码过程可以如下:In a specific embodiment, in order to improve the hardware throughput, the encoding process may be as follows:
a)为颜色量化残差分配基于上下文模型编码码字的预算remBinsPass1(初始值可设置为2 24); a) Allocate a budget remBinsPass1 of the context model encoding codeword for the color quantization residual (the initial value can be set to 2 24 );
b)在颜色量化残差编码开始前,判断remBinsPass1是否大于等于T(如设置为26);b) Before the color quantization residual coding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 26);
c)当remBinsPass1≥T时,对可能出现的一个color_first_comp_zero、一个color_second_comp_zero、三个color_level_equal_zero、三个color_level_equal_one、三个color_level_parity、三个color_level_minus2_div2_eq0、三个color_level_minus2_div2_eq1、三个color_level_minus2_div2_eq2、三个color_level_minus2_div2_eq3、三个color_level_minus2_div2_eq4采用基于上下文模型的编码方式,且每编完一个标志位/标志符,做remBinsPass1--操作,而color_level_minus12_div2的所有二值化后的码字采用基于旁路模型的编码方式;c) When remBinsPass1 ≥ T, a possible color_first_comp_zero, a 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 encoded using a context model, and after each flag bit/flag is encoded, a remBinsPass1-- operation is performed, and all binary codewords of color_level_minus12_div2 are encoded using a bypass model-based encoding method;
d)当不满足remBinsPass1≥T时,对颜色量化残差的所有二值化后的码字均采用基于旁路模型的编码方式。d) When remBinsPass1≥T is not satisfied, all binarized codewords of the color quantization residual are coded using a bypass model-based encoding method.
对于本申请实施例的整个编码过程,在实现中对应解码过程的语法表描述如前述的表3和表4所示。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 the aforementioned Table 3 and Table 4.
在又一种可能的实现方式中,在属性信息为反射率时,这时候的属性量化残差值即为反射率量化残差值。为了便于描述,这里可以用第二待编码值表示。因此,在一些实施例中,该方法还可以包括:设置第二待编码值;其中,第二待编码值包括:反射率量化残差值的绝对值。In another possible implementation, when the attribute information is reflectivity, the attribute quantization residual value at this time is the reflectivity quantization residual value. For ease of description, it can be represented by a second value to be encoded. Therefore, in some embodiments, the method may further include: setting a second value to be encoded; wherein the second value to be encoded includes: an absolute value of the reflectivity quantization residual value.
在本申请实施例中,至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息也不作具体限定。在一些实施例中,至少一个第一类语法元素标识信息可以包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第三数值标识信息。In the embodiment of the present application, at least one first-category syntax element identification information and at least one second-category syntax element identification information are also not specifically limited. In some embodiments, 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, thirteenth syntax element identification information; and at least one second-category syntax element identification information at least includes: third numerical identification information.
其中,第十一语法元素标识信息用于指示第二待编码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于1,第三数值标识信息用于指示第二待编码值进行第六运算后得到的第六数值。Among them, the eleventh grammatical 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 grammatical 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 grammatical 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 value identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is subjected to the sixth operation.
在一些实施例中,对第二待编码值进行第四运算,可以包括:根据第二待解码值与第四预设值进行减法运算,得到第四数值。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.
在一些实施例中,对第二待编码值进行第五运算,可以包括:根据第二待编码值与第五预设值进行减法运算,得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。In some embodiments, performing a 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.
在一些实施例中,对第二待编码值进行第六运算,可以包括:根据第二待编码值与第六预设值进行减法运算,得到第五中间值;对第五中间值进行右移一位处理,得到第六数值;或者,将第六数值设置为等于第五中间值除以2的商。In some embodiments, performing a 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.
在本申请实施例中,第四预设值、第五预设值与第六预设值可以不完全相同,示例性地,第四预设值可以设置为1,第五预设值可以设置为1,第六预设值可以设置为5。另外,第十一语法元素标识信息可以用abs_level_minus1_parity表示,第十二语法元素标识信息可以用abs_level_minus1_div2_eq0表示,第十三语法元素标识信息可以用abs_level_minus1_div2_eq1表示,第三数值标识信息可以用abs_level_minus5_div2表示。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.
在一些实施例中,在预置参数符合第一预设条件时,对第二待编码值进行编码处理,可以包括:基于上下文模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息和第十三语法元素标识信息进行编码处理,以及基于旁路模型对可能出现的第三数值标识信息进行编码处理,将所得到的编码比特写入码流。In some embodiments, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include: encoding 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, and encoding the third numerical identification information that may appear based on the bypass model, and writing the obtained encoded bits into the bitstream.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第二待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include:
根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于上下文模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to the parity characteristic of the fourth value obtained after the fourth operation is performed on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 0; and encoding 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 writing the obtained coded bits into the bitstream;
若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于上下文模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the fifth value obtained after the fifth operation is performed on the second value to be encoded 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, the value of the third numerical identification information is determined according to the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation 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.
在另一些实施例中,在预置参数符合第二预设条件时,对第二待编码值进行编码处理,可以包括:基于旁路模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息和第三数值标识信息进行编码处理,将所得到的编码比特写入码流。也就是说,如果预置参数符合第二预设条件,那么对于第二待编码值对应的所有二值化码字均采用旁路模型进行编码处理。In other embodiments, when the preset parameter meets the second preset condition, encoding the second value to be encoded may include: encoding the eleventh syntax element identification information, the twelfth syntax element identification information, the thirteenth syntax element identification information and the third value identification information that may appear based on the bypass model, and writing the obtained encoding bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be encoded are encoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第二待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, encoding the second value to be encoded may include:
根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于旁路模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to the parity characteristic of the fourth value obtained after the fourth operation is performed on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于旁路模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the fifth value obtained after performing the fifth operation on the second value to be encoded 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, the value of the third numerical identification information is determined according to the sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bit stream.
在一些实施例中,根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值,可以包括:若第四数值为奇数,则确定第十一语法元素标识信息的取值为第一值;若第四数值为偶数,则确定第十一语法元素标识信息的取值为第二值。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 a first value; if the fourth numerical value is an even number, determining the value of the eleventh grammatical element identification information to be a second value.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值,可以包括:若第五数值等于0,则确定第十二语法元素标识信息的取值为第一值;若第五数值不等于0,则确定第十二语法元素标识信息的取值为第二值。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 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 is the first value; if the fifth numerical value is not equal to 0, determining the value of the twelfth grammatical element identification information is the second value.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值,可以包括:若第五数值等于1,则确定第十三语法元素标识信息的取值为第一值;若第五数值不等于1,则确定第十三语法元素标识信息的取值为第二值。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 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 is the first value; if the fifth numerical value is not equal to 1, determining the value of the thirteenth grammatical element identification information is the second value.
在一些实施例中,根据第二待编码值进行第六运算后得到的第六数值,确定第三数值标识信息的取值,可以包括:将第三数值标识信息的取值设置为等于第六数值。In some embodiments, determining the value of the third numerical identification information according to the sixth numerical value obtained after the sixth operation is performed 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.
在一些实施例中,基于旁路模型对第三数值标识信息的取值进行编码处理,可以包括:对第三数值标识信息的取值进行二值化处理,得到至少一个二值符号;基于旁路模型对至少一个二值符号依次进行编码处理,将所得到的编码比特写入码流。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 turn based on the bypass model, and writing the obtained encoded bits into the bit stream.
可以理解地,当反射率量化残差值不为零时,对于第二待编码值(即反射率量化残差值的绝对值)的具体实施步骤如下: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:
a)采用"abs_level_minus1_parity"标志第二待编码值减1的奇偶性,即为第二待编码值减1之后再除2的余数,采用"abs_level_minus1_div2_eq0"标志第二待编码值减一之后再除二的商是否等于0,如果第二待编码值减一之后再除二的商等于0则编码完成,否则进入步骤b);a) "abs_level_minus1_parity" is used 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, and "abs_level_minus1_div2_eq0" is used 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, the encoding is completed, otherwise it goes to step b);
b)采用"abs_level_minus1_div2_eq1"标志第二待编码值减一之后再除二的商是否等于1,如果标志第二待编码值减一之后再除二的商等于1则编码完成,否则进入步骤c);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, the encoding is completed, otherwise, proceed to step c);
c)"abs_level_minus5_div2"为第二待编码值减5再除2的商,编码"abs_level_minus5_div2"值,则编码完成。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.
在相关技术中,目前PCRM在编码非零属性量化残差值时,对于所有二值化后的码字,均采用基于上下文模型的编码方式,以反射率属性为例,若要编码的反射率量化残差值为12,则将其进行二值化的过程为:In the related art, when PCRM encodes non-zero attribute quantization residual values, for all binarized codewords, a coding method based on a context model is adopted. Taking the reflectivity attribute as an example, if the reflectivity quantization residual value to be encoded is 12, the process of binarizing it is as follows:
abs_level_minus1_parity标志符为1;The abs_level_minus1_parity flag is 1;
abs_level_minus1_div2_eq0标志位为0;abs_level_minus1_div2_eq0 flag is 0;
abs_level_minus1_div2_eq1标志位为0;abs_level_minus1_div2_eq1 flag is 0;
abs_level_minus5_div2为3,继续对3进行二值化,以二阶指数哥伦布编码为例,对3进行二值化之后的结果为0 1 1;abs_level_minus5_div2 is 3, and 3 is binarized. Taking the second-order exponential Columbus code as an example, the result of binarizing 3 is 0 1 1;
因此,对于一个数值为12的反射率量化残差值,其二值化后的码字结果为1 0 0 0 1 1。为了提高硬件吞吐率,在一种具体的实施例中,该编码过程可以如下:Therefore, for a reflectivity quantization residual value of 12, the binary 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:
a)为反射率量化残差分配基于上下文模型编码码字的预算remBinsPass1(初始值可设为2 24); a) Allocate a budget remBinsPass1 of the context model-based coding codeword for the reflectivity quantization residual (the initial value can be set to 2 24 );
b)在反射率量化残差编码开始前,判断remBinsPass1是否大于等于T(如设置为3);b) Before the reflectivity quantization residual coding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 3);
c)当remBinsPass1≥T时,对可能出现的abs_level_minus1_parity、abs_level_minus1_div2_eq0、abs_level_minus1_div2_eq1采用基于上下文模型的编码方式,且每编完一个标志位/标志符,做remBinsPass1--操作,而abs_level_minus5_div2的所有二值化后的码字采用基于旁路模型的编码方式;c) When remBinsPass1 ≥ T, the possible abs_level_minus1_parity, abs_level_minus1_div2_eq0, abs_level_minus1_div2_eq1 are coded based on the context model, and after each flag bit/flag is coded, the remBinsPass1-- operation is performed, and all the binarized codewords of abs_level_minus5_div2 are coded based on the bypass model;
d)当不满足remBinsPass1≥T时,对反射率量化残差的所有二值化后的码字均采用基于旁路模型的编码方式。d) When remBinsPass1≥T is not satisfied, all binarized codewords of the reflectivity quantization residual are coded using a bypass model-based encoding method.
对于本申请实施例的整个编码过程,在实现中对应解码过程的语法表描述如前述的表5所示。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.
在再一种可能的实现方式中,在属性信息仍为反射率时,这时候,至少一个第一类语法元素标识信息可以包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;以及,至少一个第二类语法元素标识信息至少包括:第四数值标识信息。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: 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; and at least one second-category syntax element identification information includes at least: fourth numerical identification information.
其中,第十一语法元素标识信息用于指示第二待编码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于1,第十四语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于2,第十五语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于3,第十六语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于4,第十七语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于5,第十八语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于6,第四数值标识信息用于指示第二待编码值进行第七运算后得到的第七数值。Among them, the eleventh grammatical 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 grammatical 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 grammatical 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, the fourteenth grammatical 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 2, the fifteenth grammatical 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 3, the sixteenth grammatical 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 4, the seventeenth grammatical 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 5, the eighteenth grammatical 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 6, and the fourth numerical value identification information is used to indicate the seventh numerical value obtained after the second value to be encoded is performed the seventh operation.
在一些实施例中,对第二待编码值进行第四运算,可以包括:根据第二待编码值与第四预设值进行减法运算,得到第四数值。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.
在一些实施例中,对第二待编码值进行第五运算,可以包括:根据第二待编码值与第五预设值进行减法运算,得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。In some embodiments, performing a 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.
在一些实施例中,对第二待编码值进行第七运算,可以包括:根据第二待编码值与第七预设值进行减法运算,得到第六中间值;对第六中间值进行右移一位处理,得到第七数值;或者,将第七数值设置为等于第六中间值除以2的商。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.
在本申请实施例中,第四预设值、第五预设值与第七预设值可以不完全相同,示例性地,第四预设值可以设置为1,第五预设值可以设置为1,第七预设值可以设置为15。另外,第十一语法元素标识信息可以用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表示,第四数值标识信息可以用abs_level_minus15_div2表示。In the embodiment of the present application, the fourth preset value, the fifth preset value and the seventh 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 seventh preset value may be set to 15. 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, the fourteenth syntax element identification information may be represented by abs_level_minus1_div2_eq2, the fifteenth syntax element identification information may be represented by abs_level_minus1_div2_eq3, the sixteenth syntax element identification information may be represented by abs_level_minus1_div2_eq4, the seventeenth syntax element identification information may be represented by abs_level_minus1_div2_eq5, the eighteenth syntax element identification information may be represented by abs_level_minus1_div2_eq6, and the fourth value identification information may be represented by abs_level_minus15_div2.
在一些实施例中,在预置参数符合第一预设条件时,对第二待解码值进行解码处理,可以包括:基于上下文模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息进行解码处理,确定至少一个第一类语法元素标识信息的取值;以及基于旁路模型对可能出现的第四数值标识信息进行解码处理,确定第四数值标识信息的取值;根据至少一个第一类语法元素标识信息的取值和第四数值标识信息的取值,确定第二待解码值。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 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; determining the second value to be decoded according to the value of at least one first-category grammatical element identification information and the value of the fourth numerical identification information.
在一种具体的实施例中,在预置参数符合第一预设条件时,对第二待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the first preset condition, encoding the second value to be encoded may include:
根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于上下文模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to the parity characteristic of the fourth value obtained after the fourth operation is performed on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 0; and encoding 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 writing the obtained coded bits into the bitstream;
若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于上下文模型对第十三语法元素标识信息的 取值进行编码处理,将所得到的编码比特写入码流;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 the fifth value obtained after the fifth operation is performed on the second value to be encoded 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;
若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于2,确定第十四语法元素标识信息的取值;以及基于上下文模型对第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十四语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于3,确定第十五语法元素标识信息的取值;以及基于上下文模型对第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十五语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于4,确定第十六语法元素标识信息的取值;以及基于上下文模型对第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十六语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于5,确定第十七语法元素标识信息的取值;以及基于上下文模型对第十七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十七语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于6,确定第十八语法元素标识信息的取值;以及基于上下文模型对第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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, the value of the fourth numerical identification information is determined according to the seventh numerical value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
进一步地,在一些实施例中,该方法还可以包括:在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:Furthermore, in some embodiments, the method may further include: after encoding the following syntax element identification information based on the context model each time, performing a subtraction operation on the value of the preset parameter:
第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息。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.
在另一些实施例中,在预置参数符合第二预设条件时,对第二待解码值进行解码处理,可以包括:基于旁路模型对可能出现的第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息、第十八语法元素标识信息和第四数值标识信息进行编码处理,将所得到的编码比特写入码流。也就是说,如果预置参数符合第二预设条件,那么对于第二待编码值对应的所有二值化码字均采用旁路模型进行编码处理。In other embodiments, when the preset parameter meets the second preset condition, decoding the second value to be decoded may include: encoding 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 and the fourth numerical value identification information that may appear based on the bypass model, and writing the obtained coded bits into the bitstream. That is, if the preset parameter meets the second preset condition, then all binary codewords corresponding to the second value to be encoded are encoded using the bypass model.
在一种具体的实施例中,在预置参数符合第二预设条件时,对第二待编码值进行编码处理,可以包括:In a specific embodiment, when the preset parameter meets the second preset condition, encoding the second value to be encoded may include:
根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于旁路模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to the parity characteristic of the fourth value obtained after the fourth operation is performed on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于旁路模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于2,确定第十四语法元素标识信息的取值;以及基于旁路模型对第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十四语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于3,确定第十五语法元素标识信息的取值;以及基于旁路模型对第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十五语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于4,确定第十六语法元素标识信息的取值;以及基于旁路模型对第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十六语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于5,确定第十七语法元素标识信息的取值;以及基于旁路模型对第十七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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;
若第十七语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值 是否等于6,确定第十八语法元素标识信息的取值;以及基于旁路模型对第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information according to whether the fifth value obtained after performing the fifth operation on the second value to be encoded 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, the value of the fourth numerical identification information is determined according to the seventh numerical value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于2,确定第十四语法元素标识信息的取值,可以包括:若第五数值等于2,则确定第十四语法元素标识信息的取值为第一值;若第五数值不等于2,则确定第十四语法元素标识信息的取值为第二值。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 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.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于3,确定第十五语法元素标识信息的取值,可以包括:若第五数值等于3,则确定第十五语法元素标识信息的取值为第一值;若第五数值不等于3,则确定第十五语法元素标识信息的取值为第二值。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 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 is the first value; if the fifth numerical value is not equal to 3, determining the value of the fifteenth grammatical element identification information is the second value.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于4,确定第十六语法元素标识信息的取值,可以包括:若第五数值等于4,则确定第十六语法元素标识信息的取值为第一值;若第五数值不等于4,则确定第十六语法元素标识信息的取值为第二值。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 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.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于5,确定第十七语法元素标识信息的取值,可以包括:若第五数值等于5,则确定第十七语法元素标识信息的取值为第一值;若第五数值不等于5,则确定第十七语法元素标识信息的取值为第二值。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 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.
在一些实施例中,根据第二待编码值进行第五运算后得到的第五数值是否等于6,确定第十八语法元素标识信息的取值,可以包括:若第五数值等于6,则确定第十八语法元素标识信息的取值为第一值;若第五数值不等于6,则确定第十八语法元素标识信息的取值为第二值。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 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.
在一些实施例中,根据第二待编码值进行第七运算后得到的第七数值,确定第四数值标识信息的取值,可以包括:将第四数值标识信息的取值设置为等于第七数值。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 equal to the seventh numerical value.
在一些实施例中,基于旁路模型对第四数值标识信息的取值进行编码处理,可以包括:对第四数值标识信息的取值进行二值化处理,得到至少一个二值符号;基于旁路模型对至少一个二值符号依次进行编码处理,将所得到的编码比特写入码流。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 turn based on the bypass model, and writing the obtained coded bits into the bit stream.
可以理解地,当反射率量化残差值不为零时,对于第二待编码值(即反射率量化残差值的绝对值)的具体实施步骤如下: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:
a)采用"abs_level_minus1_parity"标志第二待编码值减1的奇偶性,即为第二待编码值减1之后再除2的余数,采用"abs_level_minus1_div2_eq0"标志第二待编码值减一之后再除二的商是否等于0,如果第二待编码值减一之后再除二的商等于0则编码完成,否则进入步骤b);a) "abs_level_minus1_parity" is used 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, and "abs_level_minus1_div2_eq0" is used 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, the encoding is completed, otherwise it goes to step b);
b)采用"abs_level_minus1_div2_eq1"标志第二待编码值减一之后再除二的商是否等于1,如果标志第二待编码值减一之后再除二的商等于1则编码完成,否则进入步骤c);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, the encoding is completed, otherwise, proceed to step c);
c)采用"abs_level_minus1_div2_eq2"标志第二待编码值减一之后再除二的商是否等于2,如果标志第二待编码值减一之后再除二的商等于2则编码完成,否则进入步骤d);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, the encoding is completed, otherwise, proceed to step d);
d)采用"abs_level_minus1_div2_eq3"标志第二待编码值减一之后再除二的商是否等于3,如果标志第二待编码值减一之后再除二的商等于3则编码完成,否则进入步骤e);d) using "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);
e)采用"abs_level_minus1_div2_eq4"标志第二待编码值减一之后再除二的商是否等于4,如果标志第二待编码值减一之后再除二的商等于4则编码完成,否则进入步骤f);e) using "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, the encoding is completed, otherwise, go to step f);
f)采用"abs_level_minus1_div2_eq5"标志第二待编码值减一之后再除二的商是否等于5,如果标志第二待编码值减一之后再除二的商等于5则编码完成,否则进入步骤g);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, the encoding is completed, otherwise proceed to step g);
g)采用"abs_level_minus1_div2_eq6"标志第二待编码值减一之后再除二的商是否等于6,如果标志第二待编码值减一之后再除二的商等于6则编码完成,否则进入步骤h);g) using "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 proceed to step h);
h)"abs_level_minus15_div2"为第二待编码值减15再除2的商,编码"abs_level_minus15_div2"值,则编码完成。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 completed.
在一种具体的实施例中,为了提升硬件吞吐率,该编码过程可以如下:In a specific embodiment, in order to improve the hardware throughput, the encoding process may be as follows:
a)为反射率量化残差分配基于上下文模型编码码字的预算remBinsPass1(初始值可设为2 24); a) Allocate a budget remBinsPass1 of the context model-based coding codeword for the reflectivity quantization residual (the initial value can be set to 2 24 );
b)在反射率量化残差编码开始前,判断remBinsPass1是否大于等于T(如设置为8);b) Before the reflectivity quantization residual coding starts, determine whether remBinsPass1 is greater than or equal to T (such as set to 8);
c)当remBinsPass1≥T时,对可能出现的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采用基于上下文模型的编码方式,且每编完一个标志位/标志符,做remBinsPass1--操作,而abs_level_minus15_div2的所有二值化后的码字采用基于旁路模型的编码方式;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 after each 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;
d)当不满足remBinsPass1≥T时,对反射率量化残差的所有二值化后的码字均采用基于旁路模型的编码方式。d) When remBinsPass1≥T is not satisfied, all binarized codewords of the reflectivity quantization residual are coded using a bypass model-based encoding method.
对于本申请实施例的整个编码过程,在实现中对应解码过程的语法表描述如前述的表6所示。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.
简单来说,在本申请实施例中,如前述表7~表16所示的测试结果,通过设定预算remBinsPass1对零游程编码时使用的基于上下文模型的码字个数进行限制,可以提高吞吐率,提供对硬件更友好的实现方式。Simply put, in the embodiments of the present application, as shown in the test results of 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.
进一步地,本申请实施例还提供了一种码流,该码流是根据待编码信息进行比特编码生成的。Furthermore, an embodiment of the present application also provides a code stream, which is generated by bit encoding according to the information to be encoded.
其中,当属性信息为颜色分量时,待编码信息包括下述至少一项:第一颜色分量的量化残差值、第二颜色分量的量化残差值、第三颜色分量的量化残差值、第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息、第一数值标识信息和第二数值标识信息;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 quantization 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, a third numerical identification information, and a fourth numerical identification information.
在这里,属性量化残差值可以为颜色分量量化残差值或者反射率量化残差值。编码端在对这些待编码信息进行编码后会写入码流;如此,在解码端,可以直接通过解码码流来获得这些待编码信息,进而能够确定属性量化残差值。Here, the attribute quantization residual value can be a color component quantization residual value or a reflectance quantization residual value. The encoder writes the information to be encoded into the bitstream after encoding it; thus, the decoder can directly obtain the information to be encoded by decoding the bitstream, and then determine the attribute quantization residual value.
本实施例提供了一种编码方法,通过上述实施例对前述实施例的具体实现进行了详细阐述,从中可以看出,根据前述实施例的技术方案,首先确定属性量化残差值对应的预置参数,然后判断预置参数是否满足第一预设条件;如果预置参数符合第一预设条件,那么对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理;如此,根据所确定的预置参数,可以限定在解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度,有利于硬件实现;而且还能够提升处理速度。The present 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 scheme of the aforementioned embodiment, the preset parameters corresponding to the attribute quantization residual value are first determined, and then it is determined whether the preset parameters meet the first preset condition; if the preset parameters meet the first preset condition, 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 in 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.
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图10,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图10所示,该编码器100可以包括:第一确定单元1001和编码单元1002;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, see FIG10 , which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in FIG10 , the encoder 100 may include: a first determining unit 1001 and an encoding unit 1002; wherein,
第一确定单元1001,配置为确定属性量化残差值以及属性量化残差值对应的预置参数;以及根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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;
编码单元1002,配置为若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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 encoded bits into the bitstream.
在一些实施例中,参见图10,编码器100还包括第一判断单元1003,配置为确定预置参数的取值大于或等于预设门限值。In some embodiments, referring to FIG. 10 , the encoder 100 further includes a first judging unit 1003 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
在一些实施例中,编码单元1002,还配置为若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息均进行基于旁路模型的编码处理,将所得到的编码比特写入码流。In some embodiments, the encoding unit 1002 is further configured to 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 if the preset parameters meet the second preset condition, and write the obtained encoded bits into the bitstream.
在一些实施例中,第一判断单元1003,还配置为确定预置参数的取值小于预设门限值。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.
在一些实施例中,编码单元1002,还配置为对属性量化残差值对应的预置参数进行编码处理,将所得到的编码比特写入码流。In some embodiments, the encoding unit 1002 is further configured to perform encoding processing on preset parameters corresponding to the attribute quantization residual value, and write the obtained encoding bits into the bit stream.
在一些实施例中,编码单元1002,还配置为在属性量化残差值小于预设阈值时,根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值;若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,将所得到的编码比特写入码流;或者,若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。In some embodiments, the encoding unit 1002 is further configured to determine, when the attribute quantization residual value is less than a preset threshold, the 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, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and write the obtained coded bits into the bitstream; or, if the preset parameter meets the second preset condition, perform bypass model-based encoding processing on the value of at least one first-category syntax element identification information, and write the obtained coded bits into the bitstream.
在一些实施例中,属性量化残差值包括下述其中之一:颜色分量量化残差值和反射率量化残差值;颜色分量量化残差值包括:第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值。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.
在一些实施例中,在属性量化残差值为颜色分量量化残差值时,至少一个第一类语法元素标识信息包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息;其中,第一语法元素标识信息用于指示第一颜色分量的量化残差值是否等于0,第二语法元素标识信息用于指示第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0。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.
在一些实施例中,编码单元1002,还配置为根据第一颜色分量的量化残差值是否等于0,确定第一语法元素标识信息的取值;以及基于目标模型对第一语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第一语法元素标识信息的取值为第一值,则根据第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0,确定第二语法元素标识信息的取值;以及基于目标模型对第二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第一语法元素标识信息的取值为第二值,则分别对第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值进行编码处理,将所得到的编码比特写入码流;若第二语法元素标识信息的取值为第一值,则对第三颜色分量的量化残差值进行编码处理,将所得到的编码比特写入码流;若第二语法元素标识信息的取值为第二值,则分别对第二颜色分量的量化残差值和第三颜色分量的量化残差值进行编码处理,将所得到的编码比特写入码流;其中,若预置参数符合第一预设条件,则将上下文模型确定为目标模型;若预置参数符合第二预设条件,则将旁路模型确定为目标模型。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, 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, encode the value of the first syntax element identification information respectively. 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 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.
在一些实施例中,第一确定单元1001,还配置为在属性量化残差值为颜色分量量化残差值时,设置第一待编码值;其中,第一待编码值包括下述其中之一:第一颜色分量的量化残差值的绝对值、第二颜色分量的量化残差值的绝对值、第三颜色分量的量化残差值的绝对值、第一颜色分量的量化残差值的绝对值减一、第二颜色分量的量化残差值的绝对值减一、第三颜色分量的量化残差值的绝对值减一。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.
在一些实施例中,至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第一数值标识信息;其中,第三语法元素标识信息用于指示第一待编码值是否等于0,第四语法元素标识信息用于指示第一待编码值是否等于1,第五语法元素标识信息用于指示第一待编码值的奇偶特性,第六语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于0,第一数值标识信息用于指示第一待编码值进行第二运算后得到的第二数值。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.
在一些实施例中,至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第二数值标识信息;其中,第三语法元素标识信息用于指示第一待编码值是否等于0,第四语法元素标识信息用于指示第一待编码值是否等于1,第五语法元素标识信息用于指示第一待编码值的奇偶特性,第六语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于0,第七语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于1,第八语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于2,第九语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于3,第十语法元素标识信息用于指示第一待编码值进行第一运算后得到的第一数值是否等于4,第二数值标识信息用于指示第一待编码值进行第三运算后得到的第三数值。In some embodiments, at least one first-category grammatical element identification information also includes at least one of the following: 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; at least one second-category grammatical element identification information includes at least: second numerical identification information; wherein the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical 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 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 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 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 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 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.
在一些实施例中,参见图10,编码器100还包括第一计算单元1004,配置为根据第一待编码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。In some embodiments, referring to FIG. 10 , 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.
在一些实施例中,第一计算单元1004,还配置为根据第一待编码值与第二预设值进行减法运算,得到第二中间值;对第二中间值进行右移一位处理,得到第二数值;或者,将第二数值设置为等于第二中间值除以2的商。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 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.
在一些实施例中,第一计算单元1004,还配置为根据第一待编码值与第三预设值进行减法运算,得到第三中间值;对第三中间值进行右移一位处理,得到第三数值;或者,将第三数值设置为等于第三中间值除以2的商。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; shift the third intermediate value right by one bit 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.
在一些实施例中,第一确定单元1001,还配置为在属性量化残差值为反射率量化残差值时,设置第二待编码值;其中,第二待编码值包括:反射率量化残差值的绝对值。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.
在一些实施例中,至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第三数值标识信息;其中,第十一语法元素标识信息用于指示第二待编码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于1,第 三数值标识信息用于指示第二待编码值进行第六运算后得到的第六数值。In some embodiments, at least one first-category syntax element identification information includes at least one of the following: an eleventh syntax element identification information, a twelfth syntax element identification information, and a thirteenth syntax element identification information; at least one second-category syntax element identification information includes at least: third numerical value identification information; wherein, the eleventh syntax element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be encoded, the twelfth syntax element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second value to be encoded is equal to 0, the thirteenth syntax element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation is performed on the second value to be encoded is equal to 1, and the third numerical value identification information is used to indicate a sixth numerical value obtained after a sixth operation is performed on the second value to be encoded.
在一些实施例中,至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第四数值标识信息;其中,第十一语法元素标识信息用于指示第二待编码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于1,第十四语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于2,第十五语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于3,第十六语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于4,第十七语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于5,第十八语法元素标识信息用于指示第二待编码值进行第五运算后得到的第五数值是否等于6,第四数值标识信息用于指示第二待编码值进行第七运算后得到的第七数值。In some embodiments, at least one first-category grammatical element identification information includes at least one of the following: 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, and an eighteenth grammatical element identification information; and at least one second-category grammatical element identification information includes at least: fourth numerical value identification information; wherein the eleventh grammatical element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second to-be-encoded value, the twelfth grammatical element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second to-be-encoded value is equal to 0, and the thirteenth grammatical element identification information is used to indicate whether the second to-be-encoded value is equal to whether the fifth numerical value obtained after the fifth operation of the encoded 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 encoded 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 encoded 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 encoded 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 encoded 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 encoded 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 encoded.
在一些实施例中,第一计算单元1004,还配置为根据第二待解码值与第四预设值进行减法运算,得到第四数值。In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation on the second value to be decoded and the fourth preset value to obtain a fourth value.
在一些实施例中,第一计算单元1004,还配置为根据第二待编码值与第五预设值进行减法运算,得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。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 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.
在一些实施例中,第一计算单元1004,还配置为根据第二待编码值与第六预设值进行减法运算,得到第五中间值;对第五中间值进行右移一位处理,得到第六数值;或者,将第六数值设置为等于第五中间值除以2的商。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 sixth preset value to obtain a fifth intermediate value; shift the fifth intermediate value right 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.
在一些实施例中,第一计算单元1004,还配置为根据第二待编码值与第七预设值进行减法运算,得到第六中间值;对第六中间值进行右移一位处理,得到第七数值;或者,将第七数值设置为等于第六中间值除以2的商。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; shift the sixth intermediate value right 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.
在一些实施例中,编码单元1002,还配置为在预置参数符合第一预设条件时,根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于上下文模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于上下文模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于上下文模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第二运算后得到的第二数值,确定第一数值标识信息的取值;以及基于旁路模型对第一数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 comprises the steps of: determining a value of fifth grammatical element identification information according to an even-odd characteristic of a value to be encoded; determining a value of sixth grammatical element identification information according to whether a first value obtained after a first operation is performed on the first value to be encoded is equal to 0; and encoding the value of the fifth grammatical element identification information and the value of the sixth grammatical element identification information based on a context model, and writing the obtained coded bits into a bitstream; if the value of the sixth grammatical element identification information is a second value, determining a value of the first value identification information according to a second value obtained after a second operation is performed on the first value to be encoded; and encoding the value of the first value identification information based on a bypass model, and writing the obtained coded bits into a bitstream.
在一些实施例中,编码单元1002,还配置为在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息。In some embodiments, the encoding unit 1002 is also configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following grammatical element identification information based on the context model is completed: 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 and the sixth grammatical element identification information.
在一些实施例中,编码单元1002,还配置为在预置参数符合第二预设条件时,根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于旁路模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于旁路模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于旁路模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第二运算后得到的第二数值,确定第一数值标识信息的取值;以及基于旁路模型对第一数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 comprises the steps of: determining a value of fifth grammatical element identification information according to an even-odd characteristic of a value to be encoded; determining a value of sixth grammatical element identification information according to whether a first value obtained after a first operation is performed on the first value to be encoded is equal to 0; and encoding the value of the fifth grammatical element identification information and the value of the sixth grammatical element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; if the value of the sixth grammatical element identification information is a second value, determining a value of the first value identification information according to a second value obtained after a second operation is performed on the first value to be encoded; and encoding the value of the first value identification information based on the bypass model, and writing the obtained coded bits into the bitstream.
在一些实施例中,编码单元1002,还配置为在预置参数符合第一预设条件时,根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于上下文模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第三语法元素标识信息的取值为第二值,则根据第一 待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于上下文模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于上下文模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于1,确定第七语法元素标识信息的取值;以及基于上下文模型对第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第七语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于2,确定第八语法元素标识信息的取值;以及基于上下文模型对第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第八语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于3,确定第九语法元素标识信息的取值;以及基于上下文模型对第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第九语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于4,确定第十语法元素标识信息的取值;以及基于上下文模型对第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十语法元素标识信息的取值为第二值,则根据第一待编码值进行第三运算后得到的第三数值,确定第二数值标识信息的取值;以及基于旁路模型对第二数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 to-be-encoded value 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, then according to the first whether the value to be encoded is equal to 1, determining the value of the fourth grammatical element identification information; and encoding the value of the fourth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the fourth grammatical element identification information is the second value, determining the value of the fifth grammatical element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth grammatical element identification information according to whether the first value obtained after the first operation on the first value to be encoded is equal to 0; and encoding the values of the fifth grammatical element identification information and the values of the sixth grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the sixth grammatical element identification information is the second value, determining the value of the seventh grammatical element identification information according to whether the first value obtained after the first operation on the first value to be encoded is equal to 1; and encoding the value of the seventh grammatical element identification information based on the context model, and writing the obtained coded bits into the bitstream; if the value of the seventh grammatical element identification information is the second value, determining the value of the seventh grammatical element identification information according to whether the first value obtained after the first operation on the first value to be encoded is equal to 2, determine the value of the eighth syntax element identification information; and encode the value of the eighth syntax element identification information based on the context 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 according to whether the first value obtained after the first operation is performed on the first value to be encoded is equal to 3; and encode the value of the ninth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the ninth syntax element identification information is the second value, determine the value of the tenth syntax element identification information according to whether the first value obtained after the first operation is performed on the first value to be encoded is equal to 4; and encode the value of the tenth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the tenth syntax element identification information is the second value, determine the value of the second value identification information according to the third value obtained after the third operation is performed on the first value to be encoded; and encode the value of the second value identification information based on the bypass model, and write the obtained coded bits into the bitstream.
在一些实施例中,编码单元1002,还配置为在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息。In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of a preset parameter after each encoding of the following grammatical element identification information based on the context model is completed: 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.
在一些实施例中,编码单元1002,还配置为在预置参数符合第二预设条件时,根据第一待编码值是否等于0,确定第三语法元素标识信息的取值;以及基于旁路模型对第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第三语法元素标识信息的取值为第二值,则根据第一待编码值是否等于1,确定第四语法元素标识信息的取值;以及基于旁路模型对第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第四语法元素标识信息的取值为第二值,则根据第一待编码值的奇偶特性,确定第五语法元素标识信息的取值;根据第一待编码值进行第一运算后得到的第一数值是否等于0,确定第六语法元素标识信息的取值;以及基于旁路模型对第五语法元素标识信息的取值和第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第六语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于1,确定第七语法元素标识信息的取值;以及基于旁路模型对第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第七语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于2,确定第八语法元素标识信息的取值;以及基于旁路模型对第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第八语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于3,确定第九语法元素标识信息的取值;以及基于旁路模型对第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第九语法元素标识信息的取值为第二值,则根据第一待编码值进行第一运算后得到的第一数值是否等于4,确定第十语法元素标识信息的取值;以及基于旁路模型对第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十语法元素标识信息的取值为第二值,则根据第一待编码值进行第三运算后得到的第三数值,确定第二数值标识信息的取值;以及基于旁路模型对第二数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 value, then determine the value of the fifth grammatical element identification information according to the parity characteristic of the first value to be coded; determine the value of the sixth grammatical 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 value of the fifth grammatical element identification information and the value of the sixth grammatical element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the sixth grammatical element identification information is the second value, then determine the value of the seventh grammatical 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 grammatical 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 grammatical element identification information is the second value, determine the value of the eighth grammatical element identification information according to whether the first value obtained after the first operation is performed 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 bypass 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 according to whether the first value obtained after the first operation is performed 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 bypass model , and write the obtained coded bits into the bitstream; if the value of the ninth grammatical element identification information is the second value, determining the value of the tenth grammatical element identification information according to 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 grammatical element identification information based on the bypass model, and writing the obtained coded bits into the bitstream; if the value of the tenth grammatical element identification information is the second value, determining the value of the second value identification information according to 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.
在一些实施例中,编码单元1002,还配置为在预置参数符合第一预设条件时,根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于上下文模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于上下文模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第六运算后得到的第六数值,确定第三数值标识信息的取值;以及基于旁路模型对第三数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 performed the fifth operation 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine the value of the third value identification information according to the sixth value obtained after the second value to be encoded is performed the sixth operation; and encode the value of the third value identification information based on the bypass model, and write the obtained coded bits into the bitstream.
在一些实施例中,编码单元1002,还配置为在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:第十一语法元素标识信息、第十二语法元素标识信 息、第十三语法元素标识信息。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 based on the context model is completed: the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
在一些实施例中,编码单元1002,还配置为在预置参数符合第二预设条件时,根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于旁路模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于旁路模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第六运算后得到的第六数值,确定第三数值标识信息的取值;以及基于旁路模型对第三数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 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 performed the fifth operation 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 bypass 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine the value of the third value identification information according to the sixth value obtained after the second value to be encoded is performed the sixth operation; and encode the value of the third value identification information based on the bypass model, and write the obtained coded bits into the bitstream.
在一些实施例中,编码单元1002,还配置为在预置参数符合第一预设条件时,根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于上下文模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于上下文模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于2,确定第十四语法元素标识信息的取值;以及基于上下文模型对第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十四语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于3,确定第十五语法元素标识信息的取值;以及基于上下文模型对第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十五语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于4,确定第十六语法元素标识信息的取值;以及基于上下文模型对第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十六语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于5,确定第十七语法元素标识信息的取值;以及基于上下文模型对第十七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十七语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于6,确定第十八语法元素标识信息的取值;以及基于上下文模型对第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十八语法元素标识信息的取值为第二值,则根据第二待编码值进行第七运算后得到的第七数值,确定第四数值标识信息的取值;以及基于旁路模型对第四数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 grammatical element identification information according to the parity characteristic of the fourth value obtained after the second value to be encoded is performed after the fourth operation; determine the value of the twelfth grammatical 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 grammatical element identification information and the value of the twelfth grammatical element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the twelfth grammatical element identification information is the second value, determine 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 according to whether the fifth value obtained after the fifth operation 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 according to whether the fifth value obtained after the fifth operation 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 value of the identification information is encoded, and the obtained coded bits are written into the bitstream; if the value of the seventeenth grammatical element identification information is the second value, the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 6, and the value of the eighteenth grammatical element identification information is determined; and the value of the eighteenth grammatical element identification information is encoded based on the context model, and the obtained coded bits are written into the bitstream; if the value of the eighteenth grammatical element identification information is the second value, the value of the fourth value identification information is determined based on the seventh value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth value identification information is encoded based on the bypass model, and the obtained coded bits are written into the bitstream.
在一些实施例中,编码单元1002,还配置为在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对预置参数的取值执行一次减1操作:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息。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 based on the context model is completed: 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.
在一些实施例中,编码单元1002,还配置为在预置参数符合第二预设条件时,根据第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定第十一语法元素标识信息的取值;根据第二待编码值进行第五运算后得到的第五数值是否等于0,确定第十二语法元素标识信息的取值;以及基于旁路模型对第十一语法元素标识信息的取值和第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十二语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于1,确定第十三语法元素标识信息的取值;以及基于旁路模型对第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十三语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于2,确定第十四语法元素标识信息的取值;以及基于旁路模型对第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十四语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于3,确定第十五语法元素标识信息的取值;以及基于旁路模型对第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十五语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于4,确定第十六语法元素标识信息的取值;以及基于旁路模型对第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十六语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于5,确定第十七语法元素标识信息的取值;以及基于旁路模型对第十七语法元素标识信息的取值进行编码处理, 将所得到的编码比特写入码流;若第十七语法元素标识信息的取值为第二值,则根据第二待编码值进行第五运算后得到的第五数值是否等于6,确定第十八语法元素标识信息的取值;以及基于旁路模型对第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;若第十八语法元素标识信息的取值为第二值,则根据第二待编码值进行第七运算后得到的第七数值,确定第四数值标识信息的取值;以及基于旁路模型对第四数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。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 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 performed the fifth operation 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 bypass 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 the value of the thirteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation is equal to 1; and encode the value of the thirteenth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the thirteenth syntax element identification information is the second value, determine the value of the fourteenth syntax element identification information according to whether the fifth value obtained after the second value to be encoded is performed the fifth operation 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, then determining the value of the fifteenth syntax 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 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, then determining the value of the sixteenth syntax 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 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, then determining the value of the seventeenth syntax 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 encoding the value of the seventeenth syntax element identification information based on the bypass model, The obtained coded bits are written into the bitstream; if the value of the seventeenth grammatical element identification information is the second value, the value of the eighteenth grammatical element identification information is determined according to whether the fifth value obtained after the fifth operation is performed on the second value to be encoded is equal to 6; and the value of the eighteenth grammatical element identification information is encoded based on the bypass model, and the obtained coded bits are written into the bitstream; if the value of the eighteenth grammatical element identification information is the second value, the value of the fourth value identification information is determined according to the seventh value obtained after the seventh operation is performed on the second value to be encoded; and the value of the fourth value identification information is encoded based on the bypass model, and the obtained coded bits are written into the bitstream.
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It is understandable that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular. Moreover, the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器100,该计算机可读存储介质存储有计算机程序,计算机程序被第一处理器执行时实现前述实施例中任一项所述的编码方法。Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 100. The computer-readable storage medium stores a computer program. When the computer program is executed by the first processor, the encoding method described in any one of the aforementioned embodiments is implemented.
基于编码器100的组成以及计算机可读存储介质,参见图11,其示出了本申请实施例提供的编码器100的具体硬件结构示意图。如图11所示,编码器100可以包括:第一通信接口1101、第一存储器1102和第一处理器1103;各个组件通过第一总线系统1104耦合在一起。可理解,第一总线系统1104用于实现这些组件之间的连接通信。第一总线系统1104除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图11中将各种总线都标为第一总线系统1104。其中,Based on the composition of the encoder 100 and the computer-readable storage medium, refer to Figure 11, which shows a specific hardware structure diagram of the encoder 100 provided in an embodiment of the present application. As shown in Figure 11, the encoder 100 may include: a first communication interface 1101, a first memory 1102 and a first processor 1103; each component is coupled together through a first bus system 1104. It can be understood that the first bus system 1104 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 1104 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1104 in Figure 11. Among them,
第一通信接口1101,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 1101 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
第一存储器1102,用于存储能够在第一处理器1103上运行的计算机程序;A first memory 1102, used to store a computer program that can be run on the first processor 1103;
第一处理器1103,用于在运行所述计算机程序时,执行:The first processor 1103 is configured to, when running the computer program, execute:
确定属性量化残差值以及属性量化残差值对应的预置参数;Determine the attribute quantization residual value and the preset parameters corresponding to the attribute quantization residual value;
根据属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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;
若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。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.
可以理解,本申请实施例中的第一存储器1102可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1102旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the first memory 1102 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The first memory 1102 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
而第一处理器1103可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1103中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1103可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器 1102,第一处理器1103读取第一存储器1102中的信息,结合其硬件完成上述方法的步骤。The first processor 1103 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 1103. The above-mentioned first processor 1103 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102 and completes the steps of the above method in combination with its hardware.
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
可选地,作为另一个实施例,第一处理器1103还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the first processor 1103 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
本实施例提供了一种编码器,在该编码器中,确定出属性量化残差值对应的预置参数之后,可以限定在编码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行编码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度;而且还能够提升处理速度。This embodiment provides an encoder in which, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used in encoding can be limited, so that part of the syntax element identification information is encoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图12,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图12所示,该解码器120可以包括:第二确定单元1201和解码单元1202;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, refer to FIG12, which shows a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application. As shown in FIG12, the decoder 120 may include: a second determination unit 1201 and a decoding unit 1202; wherein,
第二确定单元1201,配置为确定属性量化残差值对应的预置参数;The second determining unit 1201 is configured to determine a preset parameter corresponding to the attribute quantization residual value;
解码单元1202,配置为若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;The decoding unit 1202 is 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;
第二确定单元1201,还配置为根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。The second determining unit 1201 is further configured to determine the attribute quantization residual value according to 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.
在一些实施例中,参见图12,解码器120还包括第二判断单元1203,配置为确定预置参数的取值大于或等于预设门限值。In some embodiments, referring to FIG. 12 , the decoder 120 further includes a second determination unit 1203 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
在一些实施例中,解码单元1202,还配置为若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息和至少一个第二类语法元素标识信息均进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值。In some embodiments, the decoding unit 1202 is further configured to perform 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 if the preset parameters meet the second preset condition, and 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.
在一些实施例中,第二判断单元1203,还配置为确定预置参数的取值小于预设门限值。In some embodiments, the second determination unit 1203 is further configured to determine whether the value of the preset parameter is less than a preset threshold value.
在一些实施例中,解码单元1202,还配置为解码码流,确定属性量化残差值对应的预置参数。In some embodiments, the decoding unit 1202 is further configured to decode the bitstream and determine a preset parameter corresponding to the attribute quantization residual value.
在一些实施例中,解码单元1202,还配置为在属性量化残差值小于预设阈值时,若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,确定至少一个第一类语法元素标识信息的取值;以及根据至少一个第一类语法元素标识信息的取值,确定属性量化残差值;或者,若预置参数符合第二预设条件,则对至少一个第一类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值;以及根据至少一个第一类语法元素标识信息的取值,确定属性量化残差值。In some embodiments, the decoding unit 1202 is further configured to, when the attribute quantization residual value is less than a preset threshold, if the preset parameters meet the first preset condition, perform context model-based decoding processing on at least one first-category syntax element identification information to determine the value of at least one first-category syntax element identification information; and determine the attribute quantization residual value according to the value of at least one first-category syntax element identification information; or, if the preset parameters meet the second preset condition, perform bypass model-based decoding processing on at least one first-category syntax element identification information to determine the value of at least one first-category syntax element identification information; and determine the attribute quantization residual value according to the value of at least one first-category syntax element identification information.
在一些实施例中,属性量化残差值包括下述其中之一:颜色分量量化残差值和反射率量化残差值;颜色分量量化残差值包括:第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值。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.
在一些实施例中,在属性量化残差值为颜色分量量化残差值时,至少一个第一类语法元素标识信息包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息;其中,第一语法元素标识信息用于指示第一颜色分量的量化残差值是否等于0,第二语法元素标识信息用于指示第一颜色分量的量化残差值和第二颜色分量的量化残差值是否均等于0。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.
在一些实施例中,解码单元1202,还配置为基于目标模型对第一语法元素标识信息进行解码处理,确定第一语法元素标识信息的取值;若第一语法元素标识信息的取值为第一值,则确定第一颜色分量的量化残差值等于0,以及基于目标模型对第二语法元素标识信息进行解码处理,确定第二语法元素标识信息的取值;若第一语法元素标识信息的取值为第二值,则分别解码第一颜色分量的量化残差值、第二颜色分量的量化残差值和第三颜色分量的量化残差值;若第二语法元素标识信息的取值为第一值,则确定第二颜色分量的量化残差值等于0,以及解码第三颜色分量的量化残差值;若第二语法元素标识信息的取值为第二值,则分别解码第二颜色分量的量化残差值和第三颜色分量的量化残差值;其中,若预置参数符合第一预设条件,则将上下文模型确定为目标模型;若预置参数符合第二预设条件,则将旁路模型确定为目标模型。In some embodiments, the decoding unit 1202 is further configured to decode the first syntax element identification information based on the target model to determine the value of the first syntax element identification information; if the value of the first syntax element identification information is the first value, determine that the quantized residual value of the first color component is equal to 0, and decode the second syntax element identification information based on the 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, decode 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; if the value of the second syntax element identification information is the first value, determine that the quantized residual value of the second color component is equal to 0, and decode the quantized residual value of the third color component; if the value of the second syntax element identification information is the second value, decode the quantized residual value of the second color component and the quantized residual value of the third color component respectively; wherein, if the preset parameter meets the first preset condition, the context model is determined as the target model; if the preset parameter meets the second preset condition, the bypass model is determined as the target model.
在一些实施例中,第二确定单元1201,还配置为在属性量化残差值为颜色分量量化残差值时,设 置第一待解码值;其中,第一待解码值包括下述其中之一:第一颜色分量的量化残差值的绝对值、第二颜色分量的量化残差值的绝对值、第三颜色分量的量化残差值的绝对值、第一颜色分量的量化残差值的绝对值减一、第二颜色分量的量化残差值的绝对值减一、第三颜色分量的量化残差值的绝对值减一。In some embodiments, the second determination unit 1201 is further configured to set a first value to be decoded when the attribute quantization residual value is a color component quantization residual value; 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.
在一些实施例中,至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第一数值标识信息;其中,第三语法元素标识信息用于指示第一待解码值是否等于0,第四语法元素标识信息用于指示第一待解码值是否等于1,第五语法元素标识信息用于指示第一待解码值的奇偶特性,第六语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于0,第一数值标识信息用于指示第一待解码值进行第二运算后得到的第二数值。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 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 identification information is used to indicate the second numerical value obtained after the second operation on the first value to be decoded.
在一些实施例中,至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第二数值标识信息;其中,第三语法元素标识信息用于指示第一待解码值是否等于0,第四语法元素标识信息用于指示第一待解码值是否等于1,第五语法元素标识信息用于指示第一待解码值的奇偶特性,第六语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于0,第七语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于1,第八语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于2,第九语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于3,第十语法元素标识信息用于指示第一待解码值进行第一运算后得到的第一数值是否等于4,第二数值标识信息用于指示第一待解码值进行第三运算后得到的第三数值。In some embodiments, at least one first-category grammatical element identification information also includes at least one of the following: 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; at least one second-category grammatical element identification information includes at least: second numerical identification information; wherein the third grammatical element identification information is used to indicate whether the first value to be decoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be decoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be decoded, 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 decoded 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 decoded 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 decoded 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 decoded 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 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.
在一些实施例中,参见图12,解码器120还包括第二计算单元1204,配置为根据第一待解码值与第一预设值进行减法运算,得到第一中间值;对第一中间值进行右移一位处理,得到第一数值;或者,将第一数值设置为等于第一中间值除以2的商。In some embodiments, referring to FIG. 12 , the decoder 120 further includes a second calculation unit 1204 configured to perform a subtraction operation on the first value to be decoded and the first preset value to obtain a first intermediate value; to right-shift the first intermediate value by one bit to obtain a first numerical value; or to set the first numerical value to be equal to the quotient of the first intermediate value divided by 2.
在一些实施例中,第二计算单元1204,还配置为根据第一待解码值与第二预设值进行减法运算,得到第二中间值;对第二中间值进行右移一位处理,得到第二数值;或者,将第二数值设置为等于第二中间值除以2的商。In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the first value to be decoded and the second preset value to obtain a second intermediate value; right-shift the second intermediate value by one bit 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.
在一些实施例中,第二计算单元1204,还配置为根据第一待解码值与第三预设值进行减法运算,得到第三中间值;对第三中间值进行右移一位处理,得到第三数值;或者,将第三数值设置为等于第三中间值除以2的商。In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the first value to be decoded and the third preset value to obtain a third intermediate value; right-shift the third intermediate value by one bit 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.
在一些实施例中,第二确定单元1201,还配置为在属性量化残差值为反射率量化残差值时,设置第二待解码值;其中,第二待解码值包括:反射率量化残差值的绝对值。In some embodiments, the second determining unit 1201 is further configured to set a second value to be decoded when the attribute quantization residual value is a reflectivity quantization residual value; wherein the second value to be decoded includes: an absolute value of the reflectivity quantization residual value.
在一些实施例中,至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第三数值标识信息;其中,第十一语法元素标识信息用于指示第二待解码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于1,第三数值标识信息用于指示第二待解码值进行第六运算后得到的第六数值。In some embodiments, at least one first-category syntax element identification information includes at least one of the following: an eleventh syntax element identification information, a twelfth syntax element identification information, and a thirteenth syntax element identification information; at least one second-category syntax element identification information includes at least: third numerical value identification information; wherein the eleventh syntax element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be decoded, the twelfth syntax element identification information is used to indicate whether a fifth numerical value obtained after a 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 numerical value obtained after the fifth operation is performed on the second value to be decoded is equal to 1, and the third numerical value identification information is used to indicate a sixth numerical value obtained after a sixth operation is performed on the second value to be decoded.
在一些实施例中,至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;至少一个第二类语法元素标识信息至少包括:第四数值标识信息;其中,第十一语法元素标识信息用于指示第二待解码值进行第四运算后得到的第四数值的奇偶特性,第十二语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于0,第十三语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于1,第十四语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于2,第十五语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于3,第十六语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于4,第十七语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于5,第十八语法元素标识信息用于指示第二待解码值进行第五运算后得到的第五数值是否等于6,第四数值标识信息用于指示第二待解码值进行第七运算后得到的第七数值。In some embodiments, at least one first-category grammatical element identification information includes at least one of the following: 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, and an eighteenth grammatical element identification information; and at least one second-category grammatical element identification information includes at least: fourth numerical value identification information; wherein the eleventh grammatical element identification information is used to indicate the parity characteristic of a fourth numerical value obtained after a fourth operation is performed on the second value to be decoded, the twelfth grammatical element identification information is used to indicate whether a fifth numerical value obtained after a fifth operation is performed on the second value to be decoded is equal to 0, and the thirteenth grammatical element identification information is used to indicate whether the second value to be decoded is equal to The fifth numerical value obtained after the fifth operation on the decoded 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 on the second value to be decoded is equal to 2, the fifteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation on the second value to be decoded is equal to 3, the sixteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation on the second value to be decoded is equal to 4, the seventeenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation on the second value to be decoded is equal to 5, the eighteenth grammatical element identification information is used to indicate whether the fifth numerical value obtained after the fifth operation on the second value to be decoded is equal to 6, and the fourth numerical value identification information is used to indicate the seventh numerical value obtained after the seventh operation on the second value to be decoded.
在一些实施例中,第二计算单元1204,还配置为根据第二待解码值与第四预设值进行减法运算,得到第四数值。In some embodiments, the second calculation unit 1204 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.
在一些实施例中,第二计算单元1204,还配置为根据第二待解码值与第五预设值进行减法运算, 得到第四中间值;对第四中间值进行右移一位处理,得到第五数值;或者,将第五数值设置为等于第四中间值除以2的商。In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the fifth preset value to obtain a fourth intermediate value; right shift the fourth intermediate value by one bit to obtain a fifth value; or set the fifth value to be equal to the quotient of the fourth intermediate value divided by 2.
在一些实施例中,第二计算单元1204,还配置为根据第二待解码值与第六预设值进行减法运算,得到第五中间值;对第五中间值进行右移一位处理,得到第六数值;或者,将第六数值设置为等于第五中间值除以2的商。In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the sixth preset value to obtain a fifth intermediate value; shift the fifth intermediate value right by one bit to obtain a sixth value; or set the sixth value to be equal to the quotient of the fifth intermediate value divided by 2.
在一些实施例中,第二计算单元1204,还配置为根据第二待解码值与第七预设值进行减法运算,得到第六中间值;对第六中间值进行右移一位处理,得到第七数值;或者,将第七数值设置为等于第六中间值除以2的商。In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the second value to be decoded and the seventh preset value to obtain a sixth intermediate value; shift the sixth intermediate value right 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.
在一些实施例中,解码单元1202,还配置为在预置参数符合第一预设条件时,基于上下文模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;若第三语法元素标识信息的取值为第二值,则基于上下文模型对第四语法元素标识信息进行解码处理,确定第四语法元素标识信息的取值;若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;若第四语法元素标识信息的取值为第二值,则基于上下文模型对第五语法元素标识信息进行解码处理,确定第五语法元素标识信息的取值;以及基于上下文模型对第六语法元素标识信息进行解码处理,确定第六语法元素标识信息的取值;若第六语法元素标识信息的取值为第一值,则确定第一待解码值等于第一预设值与第五语法元素标识信息之和;若第六语法元素标识信息的取值为第二值,则基于旁路模型对第一数值标识信息进行解码处理,确定第一数值标识信息的取值;根据第二预设值、第五语法元素标识信息的取值和第一数值标识信息的取值,确定第一待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the third grammatical element identification information based on the context model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first value to be decoded is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the context model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first value to be decoded is equal to 1; if the value of the fourth grammatical element identification information is the second value, determine that the first value to be decoded is equal to 0 based on the context model. The model decodes the fifth grammatical element identification information to determine the value of the fifth grammatical element identification information; and decodes the sixth grammatical element identification information based on the context model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical element identification information is the second value, the first numerical identification information is decoded based on the bypass model to determine the value of the first numerical identification information; the first value to be decoded is determined according to the second preset value, the value of the fifth grammatical element identification information and the value of the first numerical identification information.
在一些实施例中,解码单元1202,还配置为在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息。In some embodiments, the decoding unit 1202 is also configured to perform 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: 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.
在一些实施例中,解码单元1202,还配置为在预置参数符合第二预设条件时,基于旁路模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;若第三语法元素标识信息的取值为第二值,则基于旁路模型对第四语法元素标识信息进行解码处理,确定第四语法元素标识信息的取值;若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;若第四语法元素标识信息的取值为第二值,则基于旁路模型对第五语法元素标识信息进行解码处理,确定第五语法元素标识信息的取值;以及基于旁路模型对第六语法元素标识信息进行解码处理,确定第六语法元素标识信息的取值;若第六语法元素标识信息的取值为第一值,则确定第一待解码值等于第一预设值与第五语法元素标识信息之和;若第六语法元素标识信息的取值为第二值,则基于旁路模型对第一数值标识信息进行解码处理,确定第一数值标识信息的取值;根据第二预设值、第五语法元素标识信息的取值和第一数值标识信息的取值,确定第一待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the third grammatical element identification information based on the bypass model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the bypass model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 1; if the value of the fourth grammatical element identification information is the second value, determine that the first to-be-decoded value is equal to 0 based on the bypass model. The method comprises the following steps: decoding the fifth grammatical element identification information based on the bypass model to determine the value of the fifth grammatical element identification information; and decoding the sixth grammatical element identification information based on the bypass model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, determining that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical 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; and determining the first value to be decoded according to the second preset value, the value of the fifth grammatical element identification information and the value of the first numerical identification information.
在一些实施例中,解码单元1202,还配置为在预置参数符合第一预设条件时,基于上下文模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;若第三语法元素标识信息的取值为第二值,则基于上下文模型对第四语法元素标识信息进行解码处理,确定第四语法元素标识信息的取值;若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;若第四语法元素标识信息的取值为第二值,则基于上下文模型对第五语法元素标识信息进行解码处理,确定第五语法元素标识信息的取值;以及基于上下文模型对第六语法元素标识信息进行解码处理,确定第六语法元素标识信息的取值;若第六语法元素标识信息的取值为第一值,则确定第一待解码值等于第一预设值与第五语法元素标识信息之和;若第六语法元素标识信息的取值为第二值,则基于上下文模型对第七语法元素标识信息进行解码处理,确定第七语法元素标识信息的取值;若第七语法元素标识信息的取值为第一值,则确定第一待解码值等于第一常数、第一预设值与第五语法元素标识信息之和;若第七语法元素标识信息的取值为第二值,则基于上下文模型对第八语法元素标识信息进行解码处理,确定第八语法元素标识信息的取值;若第八语法元素标识信息的取值为第一值,则确定第一待解码值等于第二常数、第一预设值与第五语法元素标识信息之和;若第八语法元素标识信息的取值为第二值,则基于上下文模型对第九语法元素标识信息进行解码处理,确定第九语法元素标识信息的取值;若第九语法元素标识信息的取值为第一值,则确定第一待解码值等于第三常数、第一预设值与第五语法元素标识信息之和;若第九语法元素标识信息的取值为第二值,则基于上下文模型对第十语法元素标识信息进行解码处理,确定第十语法元素标识信息的取值;若第十语法元素标识信息的取值为第一值,则确定第一待解码值等于第四常数、第一预设值与第五语法元素标识信息之和;若第十语法元素标识信息的取值为第二值,则基于旁路模型对第二数值标识信息进行解码处理,确定第二数值标识信息的取值;根据第三预设值、第五语法元素标识信息的取值和第二数值标识信 息的取值,确定第一待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the third grammatical element identification information based on the context model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first value to be decoded is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the context model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first value to be decoded is equal to 1; if the value of the fourth grammatical element identification information is the second value, then based on the above The following model decodes the fifth grammatical element identification information to determine the value of the fifth grammatical element identification information; and decodes the sixth grammatical element identification information based on the context model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical element identification information is the second value, the seventh grammatical element identification information is decoded based on the context model to determine the value of the seventh grammatical element identification information; if the value of the seventh grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the first constant , the sum of the first preset value and the fifth grammatical element identification information; if the value of the seventh grammatical element identification information is the second value, the eighth grammatical element identification information is decoded based on the context model to determine the value of the eighth grammatical element identification information; if the value of the eighth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the second constant, the first preset value and the fifth grammatical element identification information; if the value of the eighth grammatical element identification information is the second value, the ninth grammatical element identification information is decoded based on the context model to determine the value of the ninth grammatical element identification information; if the value of the ninth grammatical element identification information is the first value, the first value to be decoded is determined, etc. The method comprises the following steps: if the value of the ninth grammatical element identification information is the second value, decoding the tenth grammatical element identification information based on the context model to determine the value of the tenth grammatical element identification information; if the value of the tenth grammatical element identification information is the first value, determining that the first value to be decoded is equal to the sum of the fourth constant, the first preset value and the fifth grammatical element identification information; if the value of the tenth grammatical 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; and determining the first value to be decoded according to the third preset value, the value of the fifth grammatical element identification information and the value of the second numerical identification information.
在一些实施例中,解码单元1202,还配置为在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:第一语法元素标识信息、第二语法元素标识信息、第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息、第十语法元素标识信息。In some embodiments, the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information based on the context model is completed: 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.
在一些实施例中,解码单元1202,还配置为在预置参数符合第二预设条件时,基于旁路模型对第三语法元素标识信息进行解码处理,确定第三语法元素标识信息的取值;若第三语法元素标识信息的取值为第一值,则确定第一待解码值等于0;若第三语法元素标识信息的取值为第二值,则基于旁路模型对第四语法元素标识信息进行解码处理,确定第四语法元素标识信息的取值;若第四语法元素标识信息的取值为第一值,则确定第一待解码值等于1;若第四语法元素标识信息的取值为第二值,则基于旁路模型对第五语法元素标识信息进行解码处理,确定第五语法元素标识信息的取值;以及基于旁路模型对第六语法元素标识信息进行解码处理,确定第六语法元素标识信息的取值;若第六语法元素标识信息的取值为第一值,则确定第一待解码值等于第一预设值与第五语法元素标识信息之和;若第六语法元素标识信息的取值为第二值,则基于旁路模型对第七语法元素标识信息进行解码处理,确定第七语法元素标识信息的取值;若第七语法元素标识信息的取值为第一值,则确定第一待解码值等于第一常数、第一预设值与第五语法元素标识信息之和;若第七语法元素标识信息的取值为第二值,则基于旁路模型对第八语法元素标识信息进行解码处理,确定第八语法元素标识信息的取值;若第八语法元素标识信息的取值为第一值,则确定第一待解码值等于第二常数、第一预设值与第五语法元素标识信息之和;若第八语法元素标识信息的取值为第二值,则基于旁路模型对第九语法元素标识信息进行解码处理,确定第九语法元素标识信息的取值;若第九语法元素标识信息的取值为第一值,则确定第一待解码值等于第三常数、第一预设值与第五语法元素标识信息之和;若第九语法元素标识信息的取值为第二值,则基于旁路模型对第十语法元素标识信息进行解码处理,确定第十语法元素标识信息的取值;若第十语法元素标识信息的取值为第一值,则确定第一待解码值等于第四常数、第一预设值与第五语法元素标识信息之和;若第十语法元素标识信息的取值为第二值,则基于旁路模型对第二数值标识信息进行解码处理,确定第二数值标识信息的取值;根据第三预设值、第五语法元素标识信息的取值和第二数值标识信息的取值,确定第一待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the third grammatical element identification information based on the bypass model to determine the value of the third grammatical element identification information; if the value of the third grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 0; if the value of the third grammatical element identification information is the second value, decode the fourth grammatical element identification information based on the bypass model to determine the value of the fourth grammatical element identification information; if the value of the fourth grammatical element identification information is the first value, determine that the first to-be-decoded value is equal to 1; if the value of the fourth grammatical element identification information is the second value, then based on the bypass model The fifth grammatical element identification information is decoded to determine the value of the fifth grammatical element identification information; and the sixth grammatical element identification information is decoded based on the bypass model to determine the value of the sixth grammatical element identification information; if the value of the sixth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the first preset value and the fifth grammatical element identification information; if the value of the sixth grammatical element identification information is the second value, the seventh grammatical element identification information is decoded based on the bypass model to determine the value of the seventh grammatical element identification information; if the value of the seventh grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the first constant, the first preset value and the first constant. The sum of the five grammatical element identification information; if the value of the seventh grammatical element identification information is the second value, the eighth grammatical element identification information is decoded based on the bypass model to determine the value of the eighth grammatical element identification information; if the value of the eighth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the second constant, the first preset value and the fifth grammatical element identification information; if the value of the eighth grammatical element identification information is the second value, the ninth grammatical element identification information is decoded based on the bypass model to determine the value of the ninth grammatical element identification information; if the value of the ninth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the third constant, the first preset value and the sum of the fifth grammatical element identification information; if the value of the ninth grammatical element identification information is the second value, the tenth grammatical element identification information is decoded based on the bypass model to determine the value of the tenth grammatical element identification information; if the value of the tenth grammatical element identification information is the first value, it is determined that the first value to be decoded is equal to the sum of the fourth constant, the first preset value and the fifth grammatical element identification information; if the value of the tenth grammatical element identification information is the second value, the second numerical identification information is decoded based on the bypass model to determine the value of the second numerical identification information; the first value to be decoded is determined according to the third preset value, the value of the fifth grammatical element identification information and the value of the second numerical identification information.
在一些实施例中,第一常数、第二常数、第三常数和第四常数均为2的倍数。In some embodiments, the first constant, the second constant, the third constant, and the fourth constant are all multiples of 2.
在一些实施例中,解码单元1202,还配置为在预置参数符合第一预设条件时,基于上下文模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于上下文模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;若第十二语法元素标识信息的取值为第二值,则基于上下文模型对第十三语法元素标识信息进行解码处理,确定第十三语法元素标识信息的取值;若第十三语法元素标识信息的取值为第一值,则确定第二待解码值等于第五常数、第五预设值与第十一语法元素标识信息之和;若第十三语法元素标识信息的取值为第二值,则基于旁路模型对第三数值标识信息进行解码处理,确定第三数值标识信息的取值;根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值,确定第二待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the eleventh grammatical element identification information based on the context model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the context model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second value to be decoded is equal to the sum of the fifth preset value and the eleventh grammatical element identification information; if the value of the twelfth grammatical element identification information is the second value, decode the thirteenth grammatical element identification information based on the context model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the first value, determine that the second value to be decoded is equal to the sum of the fifth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the thirteenth grammatical element identification information is the second value, decode the third numerical identification information based on the bypass model to determine the value of the third numerical identification information; determine the second value to be decoded according to the sixth preset value, the value of the eleventh grammatical element identification information and the value of the third numerical identification information.
在一些实施例中,解码单元1202,还配置为在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息。In some embodiments, the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information based on the context model is completed: the eleventh syntax element identification information, the twelfth syntax element identification information, and the thirteenth syntax element identification information.
在一些实施例中,解码单元1202,还配置为在预置参数符合第二预设条件时,基于旁路模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于旁路模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;若第十二语法元素标识信息的取值为第二值,则基于旁路模型对第十三语法元素标识信息进行解码处理,确定第十三语法元素标识信息的取值;若第十三语法元素标识信息的取值为第一值,则确定第二待解码值等于第五常数、第五预设值与第十一语法元素标识信息之和;若第十三语法元素标识信息的取值为第二值,则基于旁路模型对第三数值标识信息进行解码处理,确定第三数值标识信息的取值;根据第六预设值、第十一语法元素标识信息的取值和第三数值标识信息的取值,确定第二待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the eleventh syntax element identification information based on the bypass model to determine the value of the eleventh syntax element identification information; and decode the twelfth syntax element identification information based on the bypass model to determine the value of the twelfth syntax element identification information; if the value of the twelfth syntax element identification information is the first value, determine that the second value to be decoded 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, decode 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, determine that the second value to be decoded 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, decode the third numerical identification information based on the bypass model to determine the value of the third numerical identification information; determine the second value to be decoded according to the sixth preset value, the value of the eleventh syntax element identification information and the value of the third numerical identification information.
在一些实施例中,解码单元1202,还配置为在预置参数符合第一预设条件时,基于上下文模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于上下文模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;若第十二 语法元素标识信息的取值为第二值,则基于上下文模型对第十三语法元素标识信息进行解码处理,确定第十三语法元素标识信息的取值;若第十三语法元素标识信息的取值为第一值,则确定第二待解码值等于第五常数、第五预设值与第十一语法元素标识信息之和;若第十三语法元素标识信息的取值为第二值,则基于上下文模型对第十四语法元素标识信息进行解码处理,确定第十四语法元素标识信息的取值;若第十四语法元素标识信息的取值为第一值,则确定第二待解码值等于第六常数、第五预设值与第十一语法元素标识信息之和;若第十四语法元素标识信息的取值为第二值,则基于上下文模型对第十五语法元素标识信息进行解码处理,确定第十五语法元素标识信息的取值;若第十五语法元素标识信息的取值为第一值,则确定第二待解码值等于第七常数、第五预设值与第十一语法元素标识信息之和;若第十五语法元素标识信息的取值为第二值,则基于上下文模型对第十六语法元素标识信息进行解码处理,确定第十六语法元素标识信息的取值;若第十六语法元素标识信息的取值为第一值,则确定第二待解码值等于第八常数、第五预设值与第十一语法元素标识信息之和;若第十六语法元素标识信息的取值为第二值,则基于上下文模型对第十七语法元素标识信息进行解码处理,确定第十七语法元素标识信息的取值;若第十七语法元素标识信息的取值为第一值,则确定第二待解码值等于第九常数、第五预设值与第十一语法元素标识信息之和;若第十七语法元素标识信息的取值为第二值,则基于上下文模型对第十八语法元素标识信息进行解码处理,确定第十八语法元素标识信息的取值;若第十八语法元素标识信息的取值为第一值,则确定第二待解码值等于第十常数、第五预设值与第十一语法元素标识信息之和;若第十八语法元素标识信息的取值为第二值,则基于旁路模型对第四数值标识信息进行解码处理,确定第四数值标识信息的取值;根据第七预设值、第十一语法元素标识信息的取值和第四数值标识信息的取值,确定第二待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the first preset condition, decode the eleventh grammatical element identification information based on the context model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the context model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleven ... If the value of the grammatical element identification information is the second value, the thirteenth grammatical element identification information is decoded based on the context model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the fifth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the thirteenth grammatical element identification information is the second value, the fourteenth grammatical element identification information is decoded based on the context model to determine the value of the fourteenth grammatical element identification information; if the value of the fourteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the sixth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the fourteenth grammatical element identification information is the second value, the fifteenth grammatical element identification information is decoded based on the context model to determine the value of the fifteenth grammatical element identification information; if the value of the fifteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the seventh constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the fifteenth grammatical element identification information is the second value, the sixteenth grammatical element identification information is decoded based on the context model to determine the sixteenth the value of the grammatical element identification information; if the value of the sixteenth grammatical element identification information is the first value, then the second value to be decoded is determined to be equal to the sum of the eighth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the sixteenth grammatical element identification information is the second value, then the seventeenth grammatical element identification information is decoded based on the context model to determine the value of the seventeenth grammatical element identification information; if the value of the seventeenth grammatical element identification information is the first value, then the second value to be decoded is determined to be equal to the sum of the ninth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the seventeenth grammatical element identification information is the second value, then the eighteenth grammatical element identification information is decoded based on the context model to determine the value of the eighteenth grammatical element identification information; if the value of the eighteenth grammatical element identification information is the first value, then the second value to be decoded is determined to be equal to the sum of the tenth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the eighteenth grammatical element identification information is the second value, then the fourth numerical identification information is decoded based on the bypass model to determine the value of the fourth numerical identification information; according to the seventh preset value, the value of the eleventh grammatical element identification information and the value of the fourth numerical identification information, the second value to be decoded is determined.
在一些实施例中,解码单元1202,还配置为在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对预置参数的取值执行一次减1操作:In some embodiments, the decoding unit 1202 is further configured to perform a subtraction operation on the value of the preset parameter after decoding the following syntax element identification information based on the context model each time:
第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息。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.
在一些实施例中,解码单元1202,还配置为在预置参数符合第二预设条件时,基于旁路模型对第十一语法元素标识信息进行解码处理,确定第十一语法元素标识信息的取值;以及基于旁路模型对第十二语法元素标识信息进行解码处理,确定第十二语法元素标识信息的取值;若第十二语法元素标识信息的取值为第一值,则确定第二待解码值等于第五预设值与第十一语法元素标识信息之和;若第十二语法元素标识信息的取值为第二值,则基于旁路模型对第十三语法元素标识信息进行解码处理,确定第十三语法元素标识信息的取值;若第十三语法元素标识信息的取值为第一值,则确定第二待解码值等于第五常数、第五预设值与第十一语法元素标识信息之和;若第十三语法元素标识信息的取值为第二值,则基于旁路模型对第十四语法元素标识信息进行解码处理,确定第十四语法元素标识信息的取值;若第十四语法元素标识信息的取值为第一值,则确定第二待解码值等于第六常数、第五预设值与第十一语法元素标识信息之和;若第十四语法元素标识信息的取值为第二值,则基于旁路模型对第十五语法元素标识信息进行解码处理,确定第十五语法元素标识信息的取值;若第十五语法元素标识信息的取值为第一值,则确定第二待解码值等于第七常数、第五预设值与第十一语法元素标识信息之和;若第十五语法元素标识信息的取值为第二值,则基于旁路模型对第十六语法元素标识信息进行解码处理,确定第十六语法元素标识信息的取值;若第十六语法元素标识信息的取值为第一值,则确定第二待解码值等于第八常数、第五预设值与第十一语法元素标识信息之和;若第十六语法元素标识信息的取值为第二值,则基于旁路模型对第十七语法元素标识信息进行解码处理,确定第十七语法元素标识信息的取值;若第十七语法元素标识信息的取值为第一值,则确定第二待解码值等于第九常数、第五预设值与第十一语法元素标识信息之和;若第十七语法元素标识信息的取值为第二值,则基于旁路模型对第十八语法元素标识信息进行解码处理,确定第十八语法元素标识信息的取值;若第十八语法元素标识信息的取值为第一值,则确定第二待解码值等于第十常数、第五预设值与第十一语法元素标识信息之和;若第十八语法元素标识信息的取值为第二值,则基于旁路模型对第四数值标识信息进行解码处理,确定第四数值标识信息的取值;根据第七预设值、第十一语法元素标识信息的取值和第四数值标识信息的取值,确定第二待解码值。In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the eleventh grammatical element identification information based on the bypass model to determine the value of the eleventh grammatical element identification information; and decode the twelfth grammatical element identification information based on the bypass model to determine the value of the twelfth grammatical element identification information; if the value of the twelfth grammatical element identification information is the first value, determine that the second to-be-decoded value is equal to the sum of the fifth preset value and the eleventh grammatical element identification information; if the value of the twelfth grammatical element identification information is the second value, decode the thirteenth grammatical element identification information based on the bypass model to determine the value of the thirteenth grammatical element identification information; if the value of the thirteenth grammatical element identification information is the second value, If the value of the 13th grammatical element identification information is the second value, the second value to be decoded is determined to be equal to the sum of the fifth constant, the fifth preset value and the 11th grammatical element identification information; if the value of the 13th grammatical element identification information is the second value, the 14th grammatical element identification information is decoded based on the bypass model to determine the value of the 14th grammatical element identification information; if the value of the 14th grammatical element identification information is the first value, the second value to be decoded is determined to be equal to the sum of the sixth constant, the fifth preset value and the 11th grammatical element identification information; if the value of the 14th grammatical element identification information is the second value, the 15th grammatical element identification information is decoded based on the bypass model to determine the value of the 15th grammatical element identification information; if the value of the 15th grammatical element identification information is the first value, Then it is determined that the second value to be decoded is equal to the sum of the seventh constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the fifteenth grammatical element identification information is the second value, the sixteenth grammatical element identification information is decoded based on the bypass model to determine the value of the sixteenth grammatical element identification information; if the value of the sixteenth grammatical element identification information is the first value, then it is determined that the second value to be decoded is equal to the sum of the eighth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the sixteenth grammatical element identification information is the second value, the seventeenth grammatical element identification information is decoded based on the bypass model to determine the value of the seventeenth grammatical element identification information; if the value of the seventeenth grammatical element identification information is the first value, then the second value to be decoded is determined. is equal to the sum of the ninth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the seventeenth grammatical element identification information is the second value, the eighteenth grammatical element identification information is decoded based on the bypass model to determine the value of the eighteenth grammatical element identification information; if the value of the eighteenth grammatical element identification information is the first value, it is determined that the second value to be decoded is equal to the sum of the tenth constant, the fifth preset value and the eleventh grammatical element identification information; if the value of the eighteenth grammatical element identification information is the second value, the fourth numerical identification information is decoded 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 the seventh preset value, the value of the eleventh grammatical element identification information and the value of the fourth numerical identification information.
在一些实施例中,第五常数、第六常数、第七常数、第八常数、第九常数和第十常数均为2的倍数。In some embodiments, the fifth constant, the sixth constant, the seventh constant, the eighth constant, the ninth constant, and the tenth constant are all multiples of 2.
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储 在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器120,该计算机可读存储介质存储有计算机程序,计算机程序被第二处理器执行时实现前述实施例中任一项所述的解码方法。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 120. The computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the decoding method described in any one of the above embodiments is implemented.
基于解码器120的组成以及计算机可读存储介质,参见图13,其示出了本申请实施例提供的解码器120的具体硬件结构示意图。如图13所示,解码器120可以包括:第二通信接口1301、第二存储器1302和第二处理器1303;各个组件通过第二总线系统1304耦合在一起。可理解,第二总线系统1304用于实现这些组件之间的连接通信。第二总线系统1304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图13中将各种总线都标为第二总线系统1304。其中,Based on the composition of the decoder 120 and the computer-readable storage medium, refer to Figure 13, which shows a specific hardware structure diagram of the decoder 120 provided in an embodiment of the present application. As shown in Figure 13, the decoder 120 may include: a second communication interface 1301, a second memory 1302 and a second processor 1303; each component is coupled together through a second bus system 1304. It can be understood that the second bus system 1304 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 1304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 1304 in Figure 13. Among them,
第二通信接口1301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 1301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
第二存储器1302,用于存储能够在第二处理器1303上运行的计算机程序;The second memory 1302 is used to store a computer program that can be run on the second processor 1303;
第二处理器1303,用于在运行所述计算机程序时,执行:The second processor 1303 is configured to, when running the computer program, execute:
确定属性量化残差值对应的预置参数;Determine preset parameters corresponding to attribute quantization residual values;
若预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;If the preset parameter meets the first preset condition, performing a context model-based decoding process on at least one first-category syntax element identification information, and performing a bypass model-based decoding process on at least one second-category syntax element identification information, to 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;
根据至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值,确定属性量化残差值。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.
可选地,作为另一个实施例,第二处理器1303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the second processor 1303 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
可以理解,第二存储器1302与第一存储器1102的硬件功能类似,第二处理器1303与第一处理器1103的硬件功能类似;这里不再详述。It can be understood that the hardware functions of the second memory 1302 and the first memory 1102 are similar, and the hardware functions of the second processor 1303 and the first processor 1103 are similar; they will not be described in detail here.
本实施例提供了一种解码器,在该解码器中,确定出属性量化残差值对应的预置参数之后,可以限定在解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度;而且还能够提升处理速度。The present embodiment provides a decoder in which, after determining the preset parameters corresponding to the attribute quantization residual value, the number of codewords based on the context model used in decoding can be limited, so that part of the syntax element identification information is decoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and also improving the processing speed.
在本申请的再一实施例中,参见图14,其示出了本申请实施例提供的一种编解码系统的组成结构示意图。如图14所示,编解码系统140可以包括编码器1401和解码器1402。其中,编码器1401可以为前述实施例中任一项所述的编码器,解码器1402可以为前述实施例中任一项所述的解码器。In another embodiment of the present application, referring to Figure 14, it shows a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. As shown in Figure 14, the coding and decoding system 140 may include an encoder 1401 and a decoder 1402. The encoder 1401 may be the encoder described in any one of the aforementioned embodiments, and the decoder 1402 may be the decoder described in any one of the aforementioned embodiments.
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
工业实用性Industrial Applicability
本申请实施例中,无论是编码端还是解码端,无论是编码端还是解码端,首先确定属性量化残差值对应的预置参数,然后判断预置参数是否满足第一预设条件;如果预置参数符合第一预设条件,那么对至少一个第一类语法元素标识信息进行基于上下文模型的编解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的编解码处理;如此,根据所确定的预置参数,可以限定在编解码时使用的基于上下文模型的码字数量,使得部分语法元素标识信息采用旁路模型进行编解码处理,从而可以提高硬件吞吐率,降低了硬件实现的难度,有利于硬件实现;而且还能够提升处理速度。In an embodiment of the present application, whether it is an encoding end or a decoding end, whether it is an encoding end or a decoding end, first determine the preset parameters corresponding to the attribute quantization residual value, and then determine whether the preset parameters meet the first preset condition; if the preset parameters meet the first preset condition, then at least one first-category syntax element identification information is encoded and decoded based on the context model, and at least one second-category syntax element identification information is encoded 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 in encoding and decoding can be limited, so that part of the syntax element identification information is encoded 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.

Claims (76)

  1. 一种解码方法,应用于解码器,所述方法包括:A decoding method, applied to a decoder, comprising:
    确定属性量化残差值对应的预置参数;Determine preset parameters corresponding to attribute quantization residual values;
    若所述预置参数符合第一预设条件,则对至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,以及对至少一个第二类语法元素标识信息进行基于旁路模型的解码处理,确定所述至少一个第一类语法元素标识信息的取值和所述至少一个第二类语法元素标识信息的取值;If the preset parameter meets the first preset condition, performing a context model-based decoding process on at least one first-category syntax element identification information, and performing a bypass model-based decoding process 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;
    根据所述至少一个第一类语法元素标识信息的取值和所述至少一个第二类语法元素标识信息的取值,确定所述属性量化残差值。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. 根据权利要求1所述的方法,其中,所述预置参数符合第一预设条件,包括:确定所述预置参数的取值大于或等于预设门限值。The method according to claim 1, wherein the preset parameter meets the first preset condition, comprising: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
  3. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, 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 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. 根据权利要求3所述的方法,其中,所述预置参数符合第二预设条件,包括:确定所述预置参数的取值小于预设门限值。The method according to claim 3, wherein the preset parameter meets the second preset condition, comprising: determining that the value of the preset parameter is less than a preset threshold value.
  5. 根据权利要求1所述的方法,其中,所述确定属性量化残差值对应的预置参数,包括:The method according to claim 1, wherein the step of determining the preset parameters corresponding to the attribute quantization residual value comprises:
    解码码流,确定所述属性量化残差值对应的预置参数。The code stream is decoded to determine a preset parameter corresponding to the attribute quantization residual value.
  6. 根据权利要求1所述的方法,其中,在所述属性量化残差值小于预设阈值时,所述方法还包括:The method according to claim 1, wherein when the attribute quantization residual value is less than a preset threshold, the method further comprises:
    若所述预置参数符合第一预设条件,则对所述至少一个第一类语法元素标识信息进行基于上下文模型的解码处理,确定所述至少一个第一类语法元素标识信息的取值;以及根据所述至少一个第一类语法元素标识信息的取值,确定所述属性量化残差值;或者,If the preset parameter meets the first preset condition, the at least one first-category syntax element identification information is decoded based on the context model to determine the value of the at least one first-category syntax element identification information; and the attribute quantization residual value is determined according to 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 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.
  7. 根据权利要求1所述的方法,其中,所述属性量化残差值包括下述其中之一:颜色分量量化残差值和反射率量化残差值;The method according to claim 1, wherein the attribute quantization residual value comprises 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.
  8. 根据权利要求7所述的方法,其中,在所述属性量化残差值为所述颜色分量量化残差值时,所述至少一个第一类语法元素标识信息包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息;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 comprises at least one of the following: first syntax element identification information and second syntax element identification information;
    其中,所述第一语法元素标识信息用于指示所述第一颜色分量的量化残差值是否等于0,所述第二语法元素标识信息用于指示所述第一颜色分量的量化残差值和所述第二颜色分量的量化残差值是否均等于0。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. 根据权利要求8所述的方法,其中,所述方法还包括: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;
    若所述第一语法元素标识信息的取值为第一值,则确定所述第一颜色分量的量化残差值等于0,以及基于目标模型对所述第二语法元素标识信息进行解码处理,确定所述第二语法元素标识信息的取值;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;
    若所述第二语法元素标识信息的取值为第一值,则确定所述第二颜色分量的量化残差值等于0,以及解码所述第三颜色分量的量化残差值;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, respectively decoding the quantized residual value of the second color component and the quantized residual value of the third color component;
    其中,若所述预置参数符合第一预设条件,则将所述上下文模型确定为所述目标模型;若所述预置参数符合第二预设条件,则将所述旁路模型确定为所述目标模型。Among them, 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.
  10. 根据权利要求8所述的方法,其中,在所述属性量化残差值为所述颜色分量量化残差值时,所述方法还包括:The method according to claim 8, wherein, when the attribute quantization residual value is the color component quantization residual value, the method further comprises:
    设置第一待解码值;Set a 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. 根据权利要求10所述的方法,其中,所述至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;The method according to claim 10, wherein the at least one first-category syntax element identification information further comprises 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 type of syntax element identification information at least includes: first numerical identification information;
    其中,所述第三语法元素标识信息用于指示所述第一待解码值是否等于0,所述第四语法元素标识信息用于指示所述第一待解码值是否等于1,所述第五语法元素标识信息用于指示所述第一待解码值的奇偶特性,所述第六语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于0,所述第一数值标识信息用于指示所述第一待解码值进行第二运算后得到的第二数值。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 a first numerical value obtained after a first operation is performed on the first value to be decoded is equal to 0, and the first numerical value identification information is used to indicate a second numerical value obtained after a second operation is performed on the first value to be decoded.
  12. 根据权利要求10所述的方法,其中,所述至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;The method according to claim 10, wherein the at least one first-category syntax element identification information further comprises 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;
    其中,所述第三语法元素标识信息用于指示所述第一待解码值是否等于0,所述第四语法元素标识信息用于指示所述第一待解码值是否等于1,所述第五语法元素标识信息用于指示所述第一待解码值的奇偶特性,所述第六语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于0,所述第七语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于1,所述第八语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于2,所述第九语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于3,所述第十语法元素标识信息用于指示所述第一待解码值进行第一运算后得到的第一数值是否等于4,所述第二数值标识信息用于指示所述第一待解码值进行第三运算后得到的第三数值。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.
  13. 根据权利要求11或12所述的方法,其中,对所述第一待解码值进行第一运算,包括:The method according to claim 11 or 12, wherein performing a first operation on the first value to be decoded comprises:
    根据所述第一待解码值与第一预设值进行减法运算,得到第一中间值;Performing a subtraction operation on the first value to be decoded and a first preset value to obtain a first intermediate value;
    对所述第一中间值进行右移一位处理,得到所述第一数值;或者,Shift the first intermediate value right by one bit to obtain the first value; or,
    将所述第一数值设置为等于所述第一中间值除以2的商。The first numerical value is set equal to a quotient of the first intermediate value divided by 2.
  14. 根据权利要求11所述的方法,其中,对所述第一待解码值进行第二运算,包括:The method according to claim 11, wherein performing a second operation on the first value to be decoded comprises:
    根据所述第一待解码值与第二预设值进行减法运算,得到第二中间值;Performing a subtraction operation on the first value to be decoded and the second preset value to obtain a second intermediate value;
    对所述第二中间值进行右移一位处理,得到所述第二数值;或者,Shift the second intermediate value right by one bit to obtain the second value; or,
    将所述第二数值设置为等于所述第二中间值除以2的商。The second numerical value is set equal to a quotient of the second intermediate value divided by 2.
  15. 根据权利要求12所述的方法,其中,对所述第一待解码值进行第三运算,包括:The method according to claim 12, wherein performing a third operation on the first value to be decoded comprises:
    根据所述第一待解码值与第三预设值进行减法运算,得到第三中间值;Performing a subtraction operation on the first value to be decoded and a third preset value to obtain a third intermediate value;
    对所述第三中间值进行右移一位处理,得到所述第三数值;或者,Shift the third intermediate value right by one bit to obtain the third value; or,
    将所述第三数值设置为等于所述第三中间值除以2的商。The third numerical value is set equal to a quotient of the third intermediate value divided by 2.
  16. 根据权利要求7所述的方法,其中,在所述属性量化残差值为所述反射率量化残差值时,所述方法还包括:The method according to claim 7, wherein, when the attribute quantization residual value is the reflectivity quantization residual value, the method further comprises:
    设置第二待解码值;Set the second value to be decoded;
    其中,所述第二待解码值包括:所述反射率量化残差值的绝对值。The second value to be decoded includes: the absolute value of the reflectivity quantization residual value.
  17. 根据权利要求16所述的方法,其中,所述至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;The method according to claim 16, wherein the at least one first-category syntax element identification information comprises 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 type of syntax element identification information at least includes: third numerical identification information;
    其中,所述第十一语法元素标识信息用于指示所述第二待解码值进行第四运算后得到的第四数值的奇偶特性,所述第十二语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于0,所述第十三语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于1,所述第三数值标识信息用于指示所述第二待解码值进行第六运算后得到的第六数值。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 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 decoded 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 decoded is subjected to 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 subjected to the sixth operation.
  18. 根据权利要求16所述的方法,其中,所述至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;The method according to claim 16, wherein the at least one first-category syntax element identification information comprises 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 at least includes: fourth numerical identification information;
    其中,所述第十一语法元素标识信息用于指示所述第二待解码值进行第四运算后得到的第四数值的奇偶特性,所述第十二语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于0,所述第十三语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于1,所述第十四语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于2,所述第十五语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于3,所述第十六语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于4,所述第十七语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于5,所述第十八语法元素标识信息用于指示所述第二待解码值进行第五运算后得到的第五数值是否等于6,所述第四数值标识信息用于指示所述第二待解码值进行第七运算后得到的第七数值。Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth 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 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 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 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 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 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 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 value obtained after the second value to be decoded is performed the fifth operation is equal to 6, and the fourth value identification information is used to indicate the seventh value obtained after the second value to be decoded is performed the seventh operation.
  19. 根据权利要求17或18所述的方法,其中,对所述第二待解码值进行第四运算,包括:The method according to claim 17 or 18, wherein performing a fourth operation on the second value to be decoded comprises:
    根据所述第二待解码值与第四预设值进行减法运算,得到所述第四数值。The fourth value is obtained by performing a subtraction operation on the second value to be decoded and a fourth preset value.
  20. 根据权利要求17或18所述的方法,其中,对所述第二待解码值进行第五运算,包括:The method according to claim 17 or 18, wherein performing a fifth operation on the second value to be decoded comprises:
    根据所述第二待解码值与第五预设值进行减法运算,得到第四中间值;Performing a subtraction operation on the second value to be decoded and the fifth preset value to obtain a fourth intermediate value;
    对所述第四中间值进行右移一位处理,得到所述第五数值;或者,Shift the fourth intermediate value right by one position to obtain the fifth value; or,
    将所述第五数值设置为等于所述第四中间值除以2的商。The fifth value is set equal to a quotient of the fourth intermediate value divided by 2.
  21. 根据权利要求17所述的方法,其中,对所述第二待解码值进行第六运算,包括:The method according to claim 17, wherein performing a sixth operation on the second value to be decoded comprises:
    根据所述第二待解码值与第六预设值进行减法运算,得到第五中间值;Performing a subtraction operation on the second to-be-decoded value and a sixth preset value to obtain a fifth intermediate value;
    对所述第五中间值进行右移一位处理,得到所述第六数值;或者,Shift the fifth intermediate value right by one position to obtain the sixth value; or,
    将所述第六数值设置为等于所述第五中间值除以2的商。The sixth value is set equal to a quotient of the fifth intermediate value divided by 2.
  22. 根据权利要求18所述的方法,其中,对所述第二待解码值进行第七运算,包括:The method according to claim 18, wherein performing a seventh operation on the second value to be decoded comprises:
    根据所述第二待解码值与第七预设值进行减法运算,得到第六中间值;Performing a subtraction operation on the second to-be-decoded value and the seventh preset value to obtain a sixth intermediate value;
    对所述第六中间值进行右移一位处理,得到所述第七数值;或者,Shift the sixth intermediate value right by one position to obtain the seventh value; or,
    将所述第七数值设置为等于所述第六中间值除以2的商。The seventh value is set equal to a quotient of the sixth intermediate value divided by 2.
  23. 根据权利要求11所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第一待解码值进行解码处理,包括:The method according to claim 11, wherein when the preset parameter meets the first preset condition, decoding the first value to be decoded comprises:
    基于上下文模型对所述第三语法元素标识信息进行解码处理,确定所述第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the context model to determine a value of the third syntax element identification information;
    若所述第三语法元素标识信息的取值为第一值,则确定所述第一待解码值等于0;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;
    若所述第四语法元素标识信息的取值为第一值,则确定所述第一待解码值等于1;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 value to be decoded is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical value identification information.
  24. 根据权利要求23所述的方法,其中,所述方法还包括:The method according to claim 23, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对所述预置参数的取值执行一次减1操作: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. 根据权利要求11所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第一待解码值进行解码处理,包括:The method according to claim 11, wherein when the preset parameter meets the second preset condition, decoding the first value to be decoded comprises:
    基于旁路模型对所述第三语法元素标识信息进行解码处理,确定所述第三语法元素标识信息的取值;Decoding the third syntax element identification information based on a bypass model to determine a value of the third syntax element identification information;
    若所述第三语法元素标识信息的取值为第一值,则确定所述第一待解码值等于0;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;
    若所述第四语法元素标识信息的取值为第一值,则确定所述第一待解码值等于1;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 value to be decoded is determined according to a second preset value, a value of the fifth syntax element identification information, and a value of the first numerical value identification information.
  26. 根据权利要求12所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第一待解码值进行解码处理,包括:The method according to claim 12, wherein when the preset parameter meets the first preset condition, decoding the first value to be decoded comprises:
    基于上下文模型对所述第三语法元素标识信息进行解码处理,确定所述第三语法元素标识信息的取值;Decoding the third syntax element identification information based on the context model to determine a value of the third syntax element identification information;
    若所述第三语法元素标识信息的取值为第一值,则确定所述第一待解码值等于0;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;
    若所述第四语法元素标识信息的取值为第一值,则确定所述第一待解码值等于1;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 grammar element identification information is the second value, decoding the seventh grammar element identification information based on the context model to determine the value of the seventh grammar 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 grammar element identification information is the second value, decoding the ninth grammar element identification information based on the context model to determine the value of the ninth grammar 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 a second value, decoding the second numerical identification information based on a bypass model to determine the value of the second numerical identification information;
    根据第三预设值、所述第五语法元素标识信息的取值和所述第二数值标识信息的取值,确定所述第一待解码值。The first value to be decoded is determined according to a third preset value, a value of the fifth syntax element identification information, and a value of the second numerical value identification information.
  27. 根据权利要求26所述的方法,其中,所述方法还包括:The method according to claim 26, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对所述预置参数的取值执行一次减1操作: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. 根据权利要求12所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第一待解码值进行解码处理,包括:The method according to claim 12, wherein when the preset parameter meets the second preset condition, decoding the first value to be decoded comprises:
    基于旁路模型对所述第三语法元素标识信息进行解码处理,确定所述第三语法元素标识信息的取值;Decoding the third syntax element identification information based on a bypass model to determine a value of the third syntax element identification information;
    若所述第三语法元素标识信息的取值为第一值,则确定所述第一待解码值等于0;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;
    若所述第四语法元素标识信息的取值为第一值,则确定所述第一待解码值等于1;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 a second value, decoding the second numerical identification information based on a bypass model to determine the value of the second numerical identification information;
    根据第三预设值、所述第五语法元素标识信息的取值和所述第二数值标识信息的取值,确定所述第一待解码值。The first value to be decoded is determined according to a third preset value, a value of the fifth syntax element identification information, and a value of the second numerical value identification information.
  29. 根据权利要求26或28所述的方法,其中,所述第一常数、所述第二常数、所述第三常数和所述第四常数均为2的倍数。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. 根据权利要求17所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第二待解码值进行解码处理,包括:The method according to claim 17, wherein when the preset parameter meets the first preset condition, decoding the second value to be decoded comprises:
    基于上下文模型对所述第十一语法元素标识信息进行解码处理,确定所述第十一语法元素标识信息的取值;以及基于上下文模型对所述第十二语法元素标识信息进行解码处理,确定所述第十二语法元素标识信息的取值;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;
    若所述第十二语法元素标识信息的取值为第一值,则确定所述第二待解码值等于第五预设值与所述第十一语法元素标识信息之和;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. 根据权利要求30所述的方法,其中,所述方法还包括:The method according to claim 30, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对所述预置参数的取值执行一次减1操作: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. 根据权利要求17所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第二待解码值进行解码处理,包括:The method according to claim 17, wherein when the preset parameter meets the second preset condition, decoding the second value to be decoded comprises:
    基于旁路模型对所述第十一语法元素标识信息进行解码处理,确定所述第十一语法元素标识信息的 取值;以及基于旁路模型对所述第十二语法元素标识信息进行解码处理,确定所述第十二语法元素标识信息的取值;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. 根据权利要求18所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第二待解码值进行解码处理,包括:The method according to claim 18, wherein when the preset parameter meets the first preset condition, decoding the second value to be decoded comprises:
    基于上下文模型对所述第十一语法元素标识信息进行解码处理,确定所述第十一语法元素标识信息的取值;以及基于上下文模型对所述第十二语法元素标识信息进行解码处理,确定所述第十二语法元素标识信息的取值;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;
    若所述第十二语法元素标识信息的取值为第一值,则确定所述第二待解码值等于第五预设值与所述第十一语法元素标识信息之和;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. 根据权利要求33所述的方法,其中,所述方法还包括:The method according to claim 33, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息解码完成后,对所述预置参数的取值执行一次减1操作: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. 根据权利要求18所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第二待解码值进行解码处理,包括:The method according to claim 18, wherein when the preset parameter meets the second preset condition, decoding the second value to be decoded comprises:
    基于旁路模型对所述第十一语法元素标识信息进行解码处理,确定所述第十一语法元素标识信息的取值;以及基于旁路模型对所述第十二语法元素标识信息进行解码处理,确定所述第十二语法元素标识信息的取值;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. 根据权利要求33或35所述的方法,其中,所述第五常数、所述第六常数、所述第七常数、所述第八常数、所述第九常数和所述第十常数均为2的倍数。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:
    确定属性量化残差值以及所述属性量化残差值对应的预置参数;Determine an attribute quantization residual value and a preset parameter corresponding to the attribute quantization residual value;
    根据所述属性量化残差值,确定至少一个第一类语法元素标识信息的取值和至少一个第二类语法元素标识信息的取值;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;
    若所述预置参数符合第一预设条件,则对所述至少一个第一类语法元素标识信息的取值进行基于上下文模型的编码处理,以及对所述至少一个第二类语法元素标识信息的取值进行基于旁路模型的编码处理,将所得到的编码比特写入码流。If the preset parameters meet the first preset condition, the value of the at least one first-category syntax element identification information is coded based on the context model, and the value of the 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.
  38. 根据权利要求37所述的方法,其中,所述预置参数符合第一预设条件,包括:确定所述预置参数的取值大于或等于预设门限值。The method according to claim 37, wherein the preset parameter meets the first preset condition, comprising: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
  39. 根据权利要求37所述的方法,其中,所述方法还包括:The method according to claim 37, wherein the method further comprises:
    若所述预置参数符合第二预设条件,则对所述至少一个第一类语法元素标识信息和所述至少一个第二类语法元素标识信息均进行基于旁路模型的编码处理,将所得到的编码比特写入码流。If the preset parameter meets 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. 根据权利要求39所述的方法,其中,所述预置参数符合第二预设条件,包括:确定所述预置参数的取值小于预设门限值。The method according to claim 39, wherein the preset parameter meets the second preset condition, comprising: determining that the value of the preset parameter is less than a preset threshold value.
  41. 根据权利要求37所述的方法,其中,所述方法还包括:The method according to 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. 根据权利要求37所述的方法,其中,在所述属性量化残差值小于预设阈值时,所述方法还包括:The method according to claim 37, wherein when the attribute quantization residual value is less than a preset threshold, the method further comprises:
    根据所述属性量化残差值,确定至少一个第一类语法元素标识信息的取值;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, the value of the at least one first-category syntax element identification information is coded based on the context model, and the obtained coded bits are written 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. 根据权利要求37所述的方法,其中,所述属性量化残差值包括下述其中之一:颜色分量量化残差值和反射率量化残差值;The method according to claim 37, wherein the attribute quantization residual value comprises 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.
  44. 根据权利要求43所述的方法,其中,在所述属性量化残差值为所述颜色分量量化残差值时,所述至少一个第一类语法元素标识信息包括下述至少一项:第一语法元素标识信息和第二语法元素标识信息;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 comprises at least one of the following: first syntax element identification information and second syntax element identification information;
    其中,所述第一语法元素标识信息用于指示所述第一颜色分量的量化残差值是否等于0,所述第二语法元素标识信息用于指示所述第一颜色分量的量化残差值和所述第二颜色分量的量化残差值是否均等于0。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. 根据权利要求44所述的方法,其中,所述方法还包括:The method according to claim 44, wherein the method further comprises:
    根据所述第一颜色分量的量化残差值是否等于0,确定所述第一语法元素标识信息的取值;以及基于目标模型对所述第一语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a 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 encoding the value of the first syntax element identification information based on a target model, and writing the obtained encoding bits into a bitstream;
    若所述第一语法元素标识信息的取值为第一值,则根据所述第一颜色分量的量化残差值和所述第二颜色分量的量化残差值是否均等于0,确定所述第二语法元素标识信息的取值;以及基于目标模型对所述第二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the first syntax element identification information is a first value, determining 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 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 encoding 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;
    其中,若所述预置参数符合第一预设条件,则将所述上下文模型确定为所述目标模型;若所述预置参数符合第二预设条件,则将所述旁路模型确定为所述目标模型。Among them, 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.
  46. 根据权利要求44所述的方法,其中,在所述属性量化残差值为所述颜色分量量化残差值时,所述方法还包括:The method according to claim 44, wherein, when the attribute quantization residual value is the color component quantization residual value, the method further comprises:
    设置第一待编码值;Set a 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. 根据权利要求46所述的方法,其中,所述至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息和第六语法元素标识信息;The method according to claim 46, wherein the at least one first-category syntax element identification information further comprises 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 type of syntax element identification information at least includes: first numerical identification information;
    其中,所述第三语法元素标识信息用于指示所述第一待编码值是否等于0,所述第四语法元素标识信息用于指示所述第一待编码值是否等于1,所述第五语法元素标识信息用于指示所述第一待编码值的奇偶特性,所述第六语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于0,所述第一数值标识信息用于指示所述第一待编码值进行第二运算后得到的第二数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth grammatical element identification information is used to indicate whether a first numerical value obtained after a first operation on the first value to be encoded is equal to 0, and the first numerical value identification information is used to indicate a second numerical value obtained after a second operation on the first value to be encoded.
  48. 根据权利要求46所述的方法,其中,所述至少一个第一类语法元素标识信息还包括下述至少一项:第三语法元素标识信息、第四语法元素标识信息、第五语法元素标识信息、第六语法元素标识信息、第七语法元素标识信息、第八语法元素标识信息、第九语法元素标识信息和第十语法元素标识信息;The method according to claim 46, wherein the at least one first-category syntax element identification information further comprises 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;
    其中,所述第三语法元素标识信息用于指示所述第一待编码值是否等于0,所述第四语法元素标识信息用于指示所述第一待编码值是否等于1,所述第五语法元素标识信息用于指示所述第一待编码值的奇偶特性,所述第六语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于0,所述第七语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于1,所述第八语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于2,所述第九语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于3,所述第十语法元素标识信息用于指示所述第一待编码值进行第一运算后得到的第一数值是否等于4,所述第二数值标识信息用于指示所述第一待编码值进行第三运算后得到的第三数值。Among them, the third grammatical element identification information is used to indicate whether the first value to be encoded is equal to 0, the fourth grammatical element identification information is used to indicate whether the first value to be encoded is equal to 1, the fifth grammatical element identification information is used to indicate the parity characteristic of the first value to be encoded, the sixth grammatical 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 grammatical 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 grammatical 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 grammatical 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 grammatical 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.
  49. 根据权利要求47或48所述的方法,其中,对所述第一待编码值进行第一运算,包括:The method according to claim 47 or 48, wherein performing a first operation on the first value to be encoded comprises:
    根据所述第一待编码值与第一预设值进行减法运算,得到第一中间值;Performing a subtraction operation on the first value to be encoded and a first preset value to obtain a first intermediate value;
    对所述第一中间值进行右移一位处理,得到所述第一数值;或者,Shift the first intermediate value right by one bit to obtain the first value; or,
    将所述第一数值设置为等于所述第一中间值除以2的商。The first numerical value is set equal to a quotient of the first intermediate value divided by 2.
  50. 根据权利要求47所述的方法,其中,对所述第一待编码值进行第二运算,包括:The method according to claim 47, wherein performing a second operation on the first value to be encoded comprises:
    根据所述第一待编码值与第二预设值进行减法运算,得到第二中间值;Performing a subtraction operation on the first value to be encoded and the second preset value to obtain a second intermediate value;
    对所述第二中间值进行右移一位处理,得到所述第二数值;或者,Shift the second intermediate value right by one bit to obtain the second value; or,
    将所述第二数值设置为等于所述第二中间值除以2的商。The second numerical value is set equal to a quotient of the second intermediate value divided by 2.
  51. 根据权利要求48所述的方法,其中,对所述第一待编码值进行第三运算,包括:The method according to claim 48, wherein performing a third operation on the first value to be encoded comprises:
    根据所述第一待编码值与第三预设值进行减法运算,得到第三中间值;Performing a subtraction operation on the first value to be encoded and a third preset value to obtain a third intermediate value;
    对所述第三中间值进行右移一位处理,得到所述第三数值;或者,Shift the third intermediate value right by one bit to obtain the third value; or,
    将所述第三数值设置为等于所述第三中间值除以2的商。The third numerical value is set equal to a quotient of the third intermediate value divided by 2.
  52. 根据权利要求43所述的方法,其中,在所述属性量化残差值为所述反射率量化残差值时,所述方法还包括:The method according to claim 43, wherein, when the attribute quantization residual value is the reflectivity quantization residual value, the method further comprises:
    设置第二待编码值;Set the second value to be encoded;
    其中,所述第二待编码值包括:所述反射率量化残差值的绝对值。The second value to be encoded includes: the absolute value of the reflectivity quantization residual value.
  53. 根据权利要求52所述的方法,其中,所述至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息;The method according to claim 52, wherein the at least one first-category syntax element identification information comprises 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 type of syntax element identification information at least includes: third numerical identification information;
    其中,所述第十一语法元素标识信息用于指示所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,所述第十二语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于0,所述第十三语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于1,所述第三数值标识信息用于指示所述第二待编码值进行第六运算后得到的第六数值。Among them, the eleventh grammatical 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 grammatical 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 grammatical 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 value identification information is used to indicate the sixth numerical value obtained after the second value to be encoded is subjected to the sixth operation.
  54. 根据权利要求52所述的方法,其中,所述至少一个第一类语法元素标识信息包括下述至少一项:第十一语法元素标识信息、第十二语法元素标识信息、第十三语法元素标识信息、第十四语法元素标识信息、第十五语法元素标识信息、第十六语法元素标识信息、第十七语法元素标识信息和第十八语法元素标识信息;The method according to claim 52, wherein the at least one first-category syntax element identification information comprises 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 at least includes: fourth numerical identification information;
    其中,所述第十一语法元素标识信息用于指示所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,所述第十二语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于0,所述第十三语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于1,所述第十四语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于2,所述第十五语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于3,所述第十六语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于4,所述第十七语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于5,所述第十八语法元素标识信息用于指示所述第二待编码值进行第五运算后得到的第五数值是否等于6,所述第四数值标识信息用于指示所述第二待编码值进行第七运算后得到的第七数值。Among them, the eleventh syntax element identification information is used to indicate the parity characteristic of the fourth 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 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 value obtained after the second value to be encoded is performed 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 value to be encoded is performed 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 value to be encoded is performed 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 value to be encoded is performed 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 value to be encoded is performed 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 value to be encoded is performed the fifth operation is equal to 6, and the fourth value identification information is used to indicate the seventh value obtained after the second value to be encoded is performed the seventh operation.
  55. 根据权利要求53或54所述的方法,其中,对所述第二待编码值进行第四运算,包括:The method according to claim 53 or 54, wherein performing a fourth operation on the second value to be encoded comprises:
    根据所述第二待解码值与第四预设值进行减法运算,得到所述第四数值。The fourth value is obtained by performing a subtraction operation on the second value to be decoded and a fourth preset value.
  56. 根据权利要求53或54所述的方法,其中,对所述第二待编码值进行第五运算,包括:The method according to claim 53 or 54, wherein performing a fifth operation on the second value to be encoded comprises:
    根据所述第二待编码值与第五预设值进行减法运算,得到第四中间值;Performing a subtraction operation 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 the fifth value; or,
    将所述第五数值设置为等于所述第四中间值除以2的商。The fifth value is set equal to a quotient of the fourth intermediate value divided by 2.
  57. 根据权利要求53所述的方法,其中,对所述第二待编码值进行第六运算,包括:The method according to claim 53, wherein performing a sixth operation on the second value to be encoded comprises:
    根据所述第二待编码值与第六预设值进行减法运算,得到第五中间值;Performing a subtraction operation on the second value to be encoded and the sixth preset value to obtain a fifth intermediate value;
    对所述第五中间值进行右移一位处理,得到所述第六数值;或者,Shift the fifth intermediate value right by one position to obtain the sixth value; or,
    将所述第六数值设置为等于所述第五中间值除以2的商。The sixth value is set equal to a quotient of the fifth intermediate value divided by 2.
  58. 根据权利要求54所述的方法,其中,对所述第二待编码值进行第七运算,包括:The method according to claim 54, wherein performing a seventh operation on the second value to be encoded comprises:
    根据所述第二待编码值与第七预设值进行减法运算,得到第六中间值;Performing a subtraction operation on the second value to be encoded and the seventh preset value to obtain a sixth intermediate value;
    对所述第六中间值进行右移一位处理,得到所述第七数值;或者,Shift the sixth intermediate value right by one position to obtain the seventh value; or,
    将所述第七数值设置为等于所述第六中间值除以2的商。The seventh value is set equal to a quotient of the sixth intermediate value divided by 2.
  59. 根据权利要求47所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第一待编码值进行编码处理,包括:The method according to claim 47, wherein when the preset parameter meets the first preset condition, encoding the first value to be encoded comprises:
    根据所述第一待编码值是否等于0,确定所述第三语法元素标识信息的取值;以及基于上下文模型对所述第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
    若所述第三语法元素标识信息的取值为第二值,则根据所述第一待编码值是否等于1,确定所述第四语法元素标识信息的取值;以及基于上下文模型对所述第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
    若所述第四语法元素标识信息的取值为第二值,则根据所述第一待编码值的奇偶特性,确定所述第五语法元素标识信息的取值;根据所述第一待编码值进行第一运算后得到的第一数值是否等于0,确定所述第六语法元素标识信息的取值;以及基于上下文模型对所述第五语法元素标识信息的取值和所述第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth syntax element identification information according to whether a first value obtained after performing a first operation on the first value to be encoded 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 a second value, the value of the first numerical identification information is determined according to a second numerical value obtained after a second operation is performed on the first value to be encoded; and the value of the first numerical identification information is encoded based on a bypass model, and the obtained encoded bits are written into the bitstream.
  60. 根据权利要求59所述的方法,其中,所述方法还包括:The method according to claim 59, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对所述预置参数的取值执行一次减1操作:After the following syntax element identification information is encoded based on the context model each time, 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. 根据权利要求47所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第一待编码值进行编码处理,包括:The method according to claim 47, wherein when the preset parameter meets the second preset condition, encoding the first value to be encoded comprises:
    根据所述第一待编码值是否等于0,确定所述第三语法元素标识信息的取值;以及基于旁路模型对所述第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
    若所述第三语法元素标识信息的取值为第二值,则根据所述第一待编码值是否等于1,确定所述第四语法元素标识信息的取值;以及基于旁路模型对所述第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
    若所述第四语法元素标识信息的取值为第二值,则根据所述第一待编码值的奇偶特性,确定所述第五语法元素标识信息的取值;根据所述第一待编码值进行第一运算后得到的第一数值是否等于0,确定所述第六语法元素标识信息的取值;以及基于旁路模型对所述第五语法元素标识信息的取值和所述第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth syntax element identification information according to whether a first value obtained after performing a first operation on the first value to be encoded 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 a second value, the value of the first numerical identification information is determined according to a second numerical value obtained after a second operation is performed on the first value to be encoded; and the value of the first numerical identification information is encoded based on a bypass model, and the obtained encoded bits are written into the bitstream.
  62. 根据权利要求48所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第一待编码值进行编码处理,包括:The method according to claim 48, wherein, when the preset parameter meets the first preset condition, encoding the first value to be encoded comprises:
    根据所述第一待编码值是否等于0,确定所述第三语法元素标识信息的取值;以及基于上下文模型对所述第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
    若所述第三语法元素标识信息的取值为第二值,则根据所述第一待编码值是否等于1,确定所述第四语法元素标识信息的取值;以及基于上下文模型对所述第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
    若所述第四语法元素标识信息的取值为第二值,则根据所述第一待编码值的奇偶特性,确定所述第五语法元素标识信息的取值;根据所述第一待编码值进行第一运算后得到的第一数值是否等于0,确定所述第六语法元素标识信息的取值;以及基于上下文模型对所述第五语法元素标识信息的取值和所述第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth syntax element identification information according to whether a first value obtained after performing a first operation on the first value to be encoded 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;
    若所述第六语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于1,确定所述第七语法元素标识信息的取值;以及基于上下文模型对所述第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after 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;
    若所述第七语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于2,确定所述第八语法元素标识信息的取值;以及基于上下文模型对所述第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after 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;
    若所述第八语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于3,确定所述第九语法元素标识信息的取值;以及基于上下文模型对所述第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information according to whether the first value obtained after 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;
    若所述第九语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于4,确定所述第十语法元素标识信息的取值;以及基于上下文模型对所述第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether the first value obtained after 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 a second value, determining the value of the second numerical identification information according to a third numerical value obtained after a third operation is performed on the first value to be encoded; and encoding the value of the second numerical identification information based on a bypass model, and writing the obtained coded bits into a bitstream.
  63. 根据权利要求62所述的方法,其中,所述方法还包括:The method according to claim 62, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对所述预置参数的取值执行一次减1操作:After the following syntax element identification information is encoded based on the context model each time, 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. 根据权利要求48所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第一待编码值进行编码处理,包括:The method according to claim 48, wherein when the preset parameter meets the second preset condition, encoding the first value to be encoded comprises:
    根据所述第一待编码值是否等于0,确定所述第三语法元素标识信息的取值;以及基于旁路模型对所述第三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
    若所述第三语法元素标识信息的取值为第二值,则根据所述第一待编码值是否等于1,确定所述第四语法元素标识信息的取值;以及基于旁路模型对所述第四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 value to be encoded 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;
    若所述第四语法元素标识信息的取值为第二值,则根据所述第一待编码值的奇偶特性,确定所述第五语法元素标识信息的取值;根据所述第一待编码值进行第一运算后得到的第一数值是否等于0,确定所述第六语法元素标识信息的取值;以及基于旁路模型对所述第五语法元素标识信息的取值和所述第六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourth syntax element identification information is the second value, determining the value of the fifth syntax element identification information according to the parity characteristic of the first value to be encoded; determining the value of the sixth syntax element identification information according to whether a first value obtained after performing a first operation on the first value to be encoded 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;
    若所述第六语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于1,确定所述第七语法元素标识信息的取值;以及基于旁路模型对所述第七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 after 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 a bitstream;
    若所述第七语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于2,确定所述第八语法元素标识信息的取值;以及基于旁路模型对所述第八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 the first value obtained after 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;
    若所述第八语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于3,确定所述第九语法元素标识信息的取值;以及基于旁路模型对所述第九语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the eighth syntax element identification information is the second value, determining the value of the ninth syntax element identification information according to whether the first value obtained after the first operation is performed 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;
    若所述第九语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第一运算后得到的第一数值是否等于4,确定所述第十语法元素标识信息的取值;以及基于旁路模型对所述第十语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the ninth syntax element identification information is the second value, determining the value of the tenth syntax element identification information according to whether a first value obtained after performing a 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 a bypass model, and writing the obtained coded bits into a bitstream;
    若所述第十语法元素标识信息的取值为第二值,则根据所述第一待编码值进行第三运算后得到的第三数值,确定所述第二数值标识信息的取值;以及基于旁路模型对所述第二数值标识信息的取值进行编码处理,将所得到的编码比特写入码流。If the value of the tenth syntax element identification information is a second value, determining the value of the second numerical identification information according to a third numerical value obtained after a third operation is performed on the first value to be encoded; and encoding the value of the second numerical identification information based on a bypass model, and writing the obtained coded bits into a bitstream.
  65. 根据权利要求53所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第二待编码值进行编码处理,包括:The method according to claim 53, wherein when the preset parameter meets the first preset condition, encoding the second value to be encoded comprises:
    根据所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定所述第十一语法元素标识信息的取值;根据所述第二待编码值进行第五运算后得到的第五数值是否等于0,确定所述第十二语法元素标识信息的取值;以及基于上下文模型对所述第十一语法元素标识信息的取值和所述第十二语法元 素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to a parity characteristic of a fourth value obtained after performing a fourth operation on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether a fifth value obtained after performing a fifth operation on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream;
    若所述第十二语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于1,确定所述第十三语法元素标识信息的取值;以及基于上下文模型对所述第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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, the value of the third numerical identification information is determined according to a sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
  66. 根据权利要求65所述的方法,其中,所述方法还包括:The method according to claim 65, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对所述预置参数的取值执行一次减1操作:After the following syntax element identification information is encoded based on the context model each time, 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. 根据权利要求53所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第二待编码值进行编码处理,包括:The method according to claim 53, wherein when the preset parameter meets the second preset condition, encoding the second value to be encoded comprises:
    根据所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定所述第十一语法元素标识信息的取值;根据所述第二待编码值进行第五运算后得到的第五数值是否等于0,确定所述第十二语法元素标识信息的取值;以及基于旁路模型对所述第十一语法元素标识信息的取值和所述第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to a parity characteristic of a fourth value obtained after performing a fourth operation on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether a fifth value obtained after performing a fifth operation on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream;
    若所述第十二语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于1,确定所述第十三语法元素标识信息的取值;以及基于旁路模型对所述第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 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, the value of the third numerical identification information is determined according to a sixth numerical value obtained after the sixth operation is performed on the second value to be encoded; and the value of the third numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
  68. 根据权利要求54所述的方法,其中,在所述预置参数符合第一预设条件时,对所述第二待编码值进行编码处理,包括:The method according to claim 54, wherein when the preset parameter meets the first preset condition, encoding the second value to be encoded comprises:
    根据所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定所述第十一语法元素标识信息的取值;根据所述第二待编码值进行第五运算后得到的第五数值是否等于0,确定所述第十二语法元素标识信息的取值;以及基于上下文模型对所述第十一语法元素标识信息的取值和所述第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to a parity characteristic of a fourth value obtained after performing a fourth operation on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether a fifth value obtained after performing a fifth operation on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on a context model, and writing the obtained coded bits into a bitstream;
    若所述第十二语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于1,确定所述第十三语法元素标识信息的取值;以及基于上下文模型对所述第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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;
    若所述第十三语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于2,确定所述第十四语法元素标识信息的取值;以及基于上下文模型对所述第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed 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;
    若所述第十四语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于3,确定所述第十五语法元素标识信息的取值;以及基于上下文模型对所述第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth syntax element identification information according to whether a fifth value obtained after performing the fifth operation on the second value to be encoded 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;
    若所述第十五语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于4,确定所述第十六语法元素标识信息的取值;以及基于上下文模型对所述第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether a fifth value obtained after performing the fifth operation on the second value to be encoded 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;
    若所述第十六语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于5,确定所述第十七语法元素标识信息的取值;以及基于上下文模型对所述第十七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed 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;
    若所述第十七语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于6,确定所述第十八语法元素标识信息的取值;以及基于上下文模型对所述第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth syntax element identification information according to whether the fifth value obtained after the fifth operation is performed 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 the seventh numerical value obtained after the seventh operation is performed 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. 根据权利要求68所述的方法,其中,所述方法还包括:The method according to claim 68, wherein the method further comprises:
    在每一次基于上下文模型对以下的语法元素标识信息编码完成后,对所述预置参数的取值执行一次 减1操作:After the following syntax element identification information is encoded based on the context model each time, a minus 1 operation is performed on the value of the preset parameter:
    所述第十一语法元素标识信息、所述第十二语法元素标识信息、所述第十三语法元素标识信息、所述第十四语法元素标识信息、所述第十五语法元素标识信息、所述第十六语法元素标识信息、所述第十七语法元素标识信息和所述第十八语法元素标识信息。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.
  70. 根据权利要求54所述的方法,其中,在所述预置参数符合第二预设条件时,对所述第二待编码值进行编码处理,包括:The method according to claim 54, wherein when the preset parameter meets the second preset condition, encoding the second value to be encoded comprises:
    根据所述第二待编码值进行第四运算后得到的第四数值的奇偶特性,确定所述第十一语法元素标识信息的取值;根据所述第二待编码值进行第五运算后得到的第五数值是否等于0,确定所述第十二语法元素标识信息的取值;以及基于旁路模型对所述第十一语法元素标识信息的取值和所述第十二语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;determining a value of the eleventh syntax element identification information according to a parity characteristic of a fourth value obtained after performing a fourth operation on the second value to be encoded; determining a value of the twelfth syntax element identification information according to whether a fifth value obtained after performing a fifth operation on the second value to be encoded is equal to 0; and encoding the value of the eleventh syntax element identification information and the value of the twelfth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream;
    若所述第十二语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于1,确定所述第十三语法元素标识信息的取值;以及基于旁路模型对所述第十三语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;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 bypass model, and writing the obtained coded bits into the bitstream;
    若所述第十三语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于2,确定所述第十四语法元素标识信息的取值;以及基于旁路模型对所述第十四语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the thirteenth syntax element identification information is the second value, determining the value of the fourteenth 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 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;
    若所述第十四语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于3,确定所述第十五语法元素标识信息的取值;以及基于旁路模型对所述第十五语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fourteenth syntax element identification information is the second value, determining the value of the fifteenth 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 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;
    若所述第十五语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于4,确定所述第十六语法元素标识信息的取值;以及基于旁路模型对所述第十六语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the fifteenth syntax element identification information is the second value, determining the value of the sixteenth syntax element identification information according to whether a fifth value obtained after performing the fifth operation on the second value to be encoded 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;
    若所述第十六语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于5,确定所述第十七语法元素标识信息的取值;以及基于旁路模型对所述第十七语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the sixteenth syntax element identification information is the second value, determining the value of the seventeenth 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 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;
    若所述第十七语法元素标识信息的取值为第二值,则根据所述第二待编码值进行第五运算后得到的第五数值是否等于6,确定所述第十八语法元素标识信息的取值;以及基于旁路模型对所述第十八语法元素标识信息的取值进行编码处理,将所得到的编码比特写入码流;If the value of the seventeenth syntax element identification information is the second value, determining the value of the eighteenth 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 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 the seventh numerical value obtained after the seventh operation is performed 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 encoding according to information to be encoded; 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 quantization 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, a third numerical identification information, and a fourth numerical identification information.
  72. 一种编码器,所述编码器包括第一确定单元和编码单元;其中,An encoder comprises 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 according to 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 encoded bits into the bitstream.
  73. 一种编码器,所述编码器包括第一存储器和第一处理器;其中,An encoder comprises 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;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求37至70中任一项所述的方法。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 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;
    所述第二确定单元,还配置为根据所述至少一个第一类语法元素标识信息的取值和所述至少一个第二类语法元素标识信息的取值,确定所述属性量化残差值。The second determination unit is further configured to determine the attribute quantization 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;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至36中任一项所述的方法。The second processor is configured to execute the method according to any one of claims 1 to 36 when running the computer program.
  76. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至36中任一项所述的方法、或者实现如权利要求37至70中任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it 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.
PCT/CN2022/137376 2022-12-07 2022-12-07 Encoding method, decoding method, bit stream, encoder, decoder, and storage medium WO2024119419A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/137376 WO2024119419A1 (en) 2022-12-07 2022-12-07 Encoding method, decoding method, bit stream, encoder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/137376 WO2024119419A1 (en) 2022-12-07 2022-12-07 Encoding method, decoding method, bit stream, encoder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2024119419A1 true WO2024119419A1 (en) 2024-06-13

Family

ID=91378235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137376 WO2024119419A1 (en) 2022-12-07 2022-12-07 Encoding method, decoding method, bit stream, encoder, decoder, and storage medium

Country Status (1)

Country Link
WO (1) WO2024119419A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014002510A1 (en) * 2012-06-29 2014-01-03 Sharp Kabushiki Kaisha High throughput binarization/de-binarization of a cabac syntax element
CN112640457A (en) * 2018-09-05 2021-04-09 高通股份有限公司 Conventional coding bin reduction for coefficient coding using threshold and rice parameters
CN113412626A (en) * 2019-01-12 2021-09-17 Lg 电子株式会社 Image decoding method using residual information in image coding system and apparatus thereof
US20210337204A1 (en) * 2019-01-02 2021-10-28 Lg Electronics Inc. Image decoding method and device using residual information in image coding system
US20220108484A1 (en) * 2020-10-07 2022-04-07 Qualcomm Incorporated Predictive geometry coding in g-pcc
CN114467310A (en) * 2019-08-31 2022-05-10 Lg 电子株式会社 Image decoding method and device for residual data coding in image coding system
WO2022232061A1 (en) * 2021-04-26 2022-11-03 Innopeak Technology, Inc. Bypass alignment in video coding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014002510A1 (en) * 2012-06-29 2014-01-03 Sharp Kabushiki Kaisha High throughput binarization/de-binarization of a cabac syntax element
CN112640457A (en) * 2018-09-05 2021-04-09 高通股份有限公司 Conventional coding bin reduction for coefficient coding using threshold and rice parameters
US20210337204A1 (en) * 2019-01-02 2021-10-28 Lg Electronics Inc. Image decoding method and device using residual information in image coding system
CN113412626A (en) * 2019-01-12 2021-09-17 Lg 电子株式会社 Image decoding method using residual information in image coding system and apparatus thereof
CN114467310A (en) * 2019-08-31 2022-05-10 Lg 电子株式会社 Image decoding method and device for residual data coding in image coding system
US20220108484A1 (en) * 2020-10-07 2022-04-07 Qualcomm Incorporated Predictive geometry coding in g-pcc
WO2022232061A1 (en) * 2021-04-26 2022-11-03 Innopeak Technology, Inc. Bypass alignment in video coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
F. WANG (OPPO), Z. XIE (OPPO), Y. YU (OPPO), H. YU (OPPO), D. WANG (OPPO): "AHG8: a full-bypass mode in residual coding for high bit depth and high bit rate extensions", 22. JVET MEETING; 20210420 - 20210428; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 20 April 2021 (2021-04-20), XP030294314 *
M. G. SARWER (ALIBABA-INC), R. L. LIAO (ALIBABA-INC), J. LUO (ALIBABA-INC), Y. YE (ALIBABA): "Non-CE7: Signaling of coded_sub_block_flag", 16. JVET MEETING; 20191001 - 20191011; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 4 October 2019 (2019-10-04), XP030217101 *

Similar Documents

Publication Publication Date Title
WO2020128650A1 (en) Point cloud coding structure
KR102659806B1 (en) Scaling parameters for V-PCC
US20220321912A1 (en) Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
US12020461B2 (en) Method and apparatus for Haar-based point cloud coding
CN115086658B (en) Point cloud data processing method and device, storage medium and encoding and decoding equipment
CN114598883A (en) Point cloud attribute prediction method, encoder, decoder and storage medium
WO2024119419A1 (en) Encoding method, decoding method, bit stream, encoder, decoder, and storage medium
WO2024119420A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
Kavitha et al. A survey of image compression methods for low depth-of-field images and image sequences
WO2024007144A1 (en) Encoding method, decoding method, code stream, encoders, decoders and storage medium
WO2024103304A1 (en) Point cloud encoding method, point cloud decoding method, encoder, decoder, code stream, and storage medium
WO2023240662A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2023173237A1 (en) Encoding method, decoding method, bit stream, encoder, decoder, and storage medium
WO2023173238A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024082152A1 (en) Encoding and decoding methods and apparatuses, encoder and decoder, code stream, device, and storage medium
WO2024119518A1 (en) Encoding method, decoding method, and decoder, encoder, code stream and storage medium
WO2023240660A1 (en) Decoding method, encoding method, decoder, and encoder
CN115474041B (en) Method and device for predicting point cloud attribute and related equipment
WO2023103565A1 (en) Point cloud attribute information encoding and decoding method and apparatus, device, and storage medium
WO2024065269A1 (en) Point cloud encoding and decoding method and apparatus, device, and storage medium
US20230412837A1 (en) Point cloud data transmission method, point cloud data transmission device, point cloud data reception method, and point cloud data reception device
WO2024065406A1 (en) Encoding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2023123284A1 (en) Decoding method, encoding method, decoder, encoder, and storage medium
WO2024060161A1 (en) Encoding method, decoding method, encoder, decoder and storage medium
WO2022257145A1 (en) Point cloud attribute prediction method and apparatus, and codec