Encoding and decoding method, code stream, encoder, decoder and storage medium
Patent Information
- Application Number
- CN202280102317.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-07-15
AI Technical Summary
In point cloud compression based on audio and video coding standards, the existing zero-run-value encoding/decoding method results in low hardware throughput and increases the difficulty of hardware implementation.
By determining the preset parameters corresponding to the zero run value, it is judged whether the preset conditions are met. An encoding/decoding processing method combining context model and bypass model is adopted to limit the number of codewords in the context model and improve hardware throughput.
It improves the encoding and decoding speed of the hardware, reduces the difficulty of hardware implementation, and increases the hardware throughput.
Smart Images

Figure CN120323031A_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The present application relates to the field of point cloud encoding and decoding technology, and in particular to an encoding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art
[0002] In the Audio Video Standard-Point Cloud Compression (AVS-PCC) codec framework based on the Audio Video Coding Standard, the geometric and attribute information of a point cloud are encoded separately. For each point's attribute information, the attribute quantization residual of each point can be encoded / decoded sequentially in a pre-set order.
[0003] In related technologies, zero_run_length is used to count whether the attribute quantization residual is zero, which can be called a zero-run value. When encoding zero-run values, the Point Cloud Reference Model (PCRM) uses a context-based encoding / decoding method for all binarized codewords. This makes hardware implementation more difficult and reduces hardware throughput.
[0004] Summary of the Invention
[0005] The present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can improve the hardware throughput.
[0006] The technical solution of this application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:
[0008] Determine the preset parameters corresponding to the zero run value;
[0009] If the preset parameters meet the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information, and performing bypass model-based decoding processing on at least one second-category syntax element identification information, to determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information;
[0010] A zero run value is determined according to a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information.
[0011] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0012] Determine a zero-run value and preset parameters corresponding to the zero-run value;
[0013] Determining, according to the zero-run value, a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information;
[0014] If the preset parameters meet the first preset condition, encoding processing is performed on the value of at least one first-category syntax element identification information based on the context model, and encoding processing is performed on the value of at least one second-category syntax element identification information based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0015] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:
[0016] attribute quantization residual value, 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, first numerical identification information, and second numerical identification information.
[0017] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and an encoding unit; wherein,
[0018] a first determining unit configured to determine a zero-run value and a preset parameter corresponding to the zero-run value; and determine, based on the zero-run 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;
[0019] The encoding unit is configured to, if the preset parameters meet the first preset condition, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of at least one second-category syntax element identification information, and write the obtained encoded bits into the bitstream.
[0020] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,
[0021] a first memory for storing a computer program capable of running on the first processor;
[0022] The first processor is configured to execute the method according to the second aspect when running a computer program.
[0023] 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,
[0024] a second determining unit configured to determine a preset parameter corresponding to the zero-run value;
[0025] a decoding unit configured to, if the preset parameter meets the first preset condition, perform a context model-based decoding process on at least one first-category syntax element identification information, and perform a bypass model-based decoding process on at least one second-category syntax element identification information, and determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information;
[0026] The second determining unit is further configured to determine a zero run 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.
[0027] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein,
[0028] a second memory for storing a computer program capable of running on the second processor;
[0029] The second processor is configured to execute the method according to the first aspect when running a computer program.
[0030] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in the first aspect or the method described in the second aspect.
[0031] The embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the encoding end, a zero-run value and a preset parameter corresponding to the zero-run value are determined; based on the zero-run value, the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined; if the preset parameter meets a first preset condition, the value of the at least one first-category syntax element identification information is encoded based on a context model, and the value of the at least one second-category syntax element identification information is encoded based on a bypass model, and the resulting coded bits are written into the bitstream. At the decoding end, a preset parameter corresponding to the zero-run value is determined; if the preset parameter meets the first preset condition, the at least one first-category syntax element identification information is decoded based on a context model, and the at least one second-category syntax element identification information is decoded based on a bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined; and based on the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information, a zero-run value is determined. In this way, whether it is the encoding end or the decoding end, after determining the preset parameters corresponding to the zero-run value, the number of codewords based on the context model used during encoding and decoding can be limited, so that some syntax element identification information is encoded and decoded using a bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; it can also improve the processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1A is a schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
[0033] FIG1B is a partially enlarged schematic diagram of a three-dimensional point cloud image provided in an embodiment of the present application;
[0034] FIG2A is a schematic diagram of a point cloud image at different viewing angles provided by an embodiment of the present application;
[0035] FIG2B is a schematic diagram of a data storage format corresponding to FIG2A provided in an embodiment of the present application;
[0036] FIG3 is a schematic diagram of a network architecture of point cloud encoding and decoding provided by an embodiment of the present application;
[0037] FIG4 is a schematic diagram of the structure of a point cloud encoder provided in an embodiment of the present application;
[0038] FIG5 is a schematic diagram of the structure of a point cloud decoder provided in an embodiment of the present application;
[0039] FIG6 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;
[0040] FIG7 is a schematic diagram of a detailed flow chart of a decoding method provided in an embodiment of the present application;
[0041] FIG8 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0042] FIG9 is a schematic diagram of a detailed flow chart of an encoding method provided in an embodiment of the present application;
[0043] FIG10 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0044] FIG11 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0045] FIG12 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0046] FIG13 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0047] FIG14 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0050] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0051] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0052] Point cloud is a three-dimensional representation of the surface of an object. Point cloud (data) of the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.
[0053] A point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A shows a three-dimensional point cloud image and Figure 1B shows a partially enlarged view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
[0054] In a two-dimensional image, each pixel contains information and is distributed regularly, so there's no need to record its location. However, the distribution of points in a point cloud in three-dimensional space is random and irregular, so recording the location of each point in space is necessary to fully represent the point cloud. Similar to a two-dimensional image, each location in the acquisition process has corresponding attribute information, typically an RGB color value, which reflects the object's color. For a point cloud, in addition to color information, each point's attribute information often includes a reflectance value, which reflects the surface texture of the object. Therefore, a point in a point cloud can include both location information and attribute information. For example, the location information of a point can be its three-dimensional coordinates (x, y, z). The location information of a point can also be referred to as its geometric information. For example, the attribute information of a point can include color information (three-dimensional color information) and / or reflectance (one-dimensional reflectance information r). For example, the color information can be information in any color space. For example, the color information can be RGB information, where R represents red (R), G represents green (G), and B represents blue (B). For another example, the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.
[0055] For example, a point cloud generated using laser measurement principles can include both its 3D coordinate information and its reflectivity. For another example, a point cloud generated using photogrammetry principles can include both its 3D coordinate information and its 3D color information. For another example, a point cloud generated using a combination of laser measurement and photogrammetry principles can include both its 3D coordinate information, its reflectivity value, and its 3D color information.
[0056] Figures 2A and 2B show a point cloud image and its corresponding data storage format. Figure 2A provides six viewing angles of the point cloud image, while Figure 2B consists of a file header and data. The header includes the data format, data representation type, the total number of points in the point cloud, and the content represented by the point cloud. For example, the point cloud is in ".ply" format, represented by ASCII code, with a total of 207,242 points. Each point has 3D coordinate information (x, y, z) and 3D color information (r, g, b).
[0057] Point clouds can be divided into the following categories according to the acquisition method:
[0058] Static point cloud: the object is stationary and the device that acquires the point cloud is also stationary;
[0059] Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;
[0060] Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.
[0061] For example, point clouds can be divided into two categories according to their usage:
[0062] Category 1: Machine perception point cloud, which can be used in scenarios such as autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, and disaster relief robots;
[0063] Category 2: Human eye perception point cloud, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
[0064] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Moreover, since point clouds are obtained by directly sampling real objects, they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
[0065] Point clouds are primarily collected through computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point clouds of virtual 3D objects and scenes; 3D laser scanning can obtain point clouds of static real-world 3D objects or scenes, generating millions of point clouds per second; and 3D photogrammetry can obtain point clouds of dynamic real-world 3D objects or scenes, generating tens of millions of point clouds per second. These technologies reduce the cost and time required to acquire point cloud data while improving data accuracy. While changes in point cloud data acquisition methods have made it possible to acquire large amounts of point cloud data, the processing of this massive amount of 3D point cloud data is facing bottlenecks due to storage space and transmission bandwidth constraints, as application demands grow.
[0066] For example, taking a point cloud video with a frame rate of 30 frames per second (fps), each frame contains 700,000 points, and each point has coordinate information (xyz, float) and color information (RGB, uchar). The data volume of a 10-second point cloud video is approximately 0.7 million × (4 bytes × 3 + 1 byte × 3) × 30 fps × 10 seconds = 3.15 GB. Where 1 byte is 10 bits, and the YUV sampling format is 4:2:0, and the frame rate is 24 fps, the data volume of a 1280 × 720 2D video is approximately 1280 × 720 × 12 bits × 24 fps × 10 seconds ≈ 0.33 GB. The data volume of a 10-second two-view 3D video is approximately 0.33 × 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of a 2D or 3D 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.
[0067] That is to say, since the point cloud is a collection of massive points, storing the point cloud not only consumes a lot of memory, but is also not conducive to transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.
[0068] Currently, the point cloud coding framework that can compress point clouds can be the geometry-based Point Cloud Compression (G-PCC) codec framework or the video-based Point Cloud Compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by the Audio Video Standard (AVS). The G-PCC codec framework can be used to compress the first type of static point clouds and the third type of dynamically acquired point clouds, and the V-PCC codec framework can be used to compress the second type of dynamic point clouds. The G-PCC codec framework is also called the point cloud codec TMC13, and the V-PCC codec framework is also called the point cloud codec TMC2.
[0069] The embodiment of the present application provides a network architecture of a point cloud encoding and decoding system including a decoding method and an encoding method. FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding system provided by the embodiment of the present application. As shown in FIG3 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with point cloud encoding and decoding functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application does not limit this.
[0070] Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device. In other words, the electronic device in the embodiment of the present application has point cloud encoding and decoding functions, generally including a point cloud encoder (i.e., encoder) and a point cloud decoder (i.e., decoder).
[0071] The following describes point cloud compression technology using the AVS-PCC encoding and decoding framework as an example.
[0072] As you can understand, point cloud compression generally uses a method that compresses point cloud geometry and attribute information separately. On the encoding side, the point cloud geometry is first encoded in the geometry encoder, and the reconstructed geometry is then input as additional information into the attribute encoder to assist in compressing the point cloud attributes. On the decoding side, the point cloud geometry is first decoded in the geometry decoder, and the decoded geometry is then input as additional information into the attribute decoder to assist in compressing the point cloud attributes. The entire codec consists of pre-processing / post-processing, geometry encoding / decoding, and attribute encoding / decoding.
[0073] The present embodiment provides a point cloud encoder. As shown in FIG4 , which is the framework of the point cloud compression reference platform PCRM provided by AVS, the point cloud encoder 11 includes a geometry encoder: a coordinate translation unit 111, a coordinate quantization unit 112, an octree construction unit 113, a geometry entropy encoder 114, and a geometry reconstruction unit 115. An attribute encoder: an attribute recoloring unit 116, a color space conversion unit 117, a first attribute prediction unit 118, a quantization unit 119, and an attribute entropy encoder 1110.
[0074] For PCRM, in the geometric coding part of the encoding end, the original geometric information is first preprocessed, and the geometric origin is normalized to the minimum position in the point cloud space through the coordinate translation unit 111. The geometric information is converted from floating point numbers to integers through the coordinate quantization unit 112 to facilitate subsequent regularization processing; then the regularized geometric information is geometrically encoded, and the octree structure is used in the octree construction unit 113 to recursively divide the point cloud space, each time dividing the current point into eight sub-blocks of the same size, and judging the occupancy codeword of each sub-block. When the sub-block does not contain a point, it is recorded as empty, otherwise it is recorded as non-empty. The occupancy codeword information of all blocks is recorded in the last layer of the recursive division and encoded; the geometric information expressed by the octree structure is input into the geometric entropy encoder 114 to form a geometric code stream on the one hand, and is geometrically reconstructed in the geometric reconstruction unit 115 on the other hand. The reconstructed geometric information is input into the attribute encoder as additional information.
[0075] In the attribute encoding part, the original attribute information is first preprocessed. Since the geometric information changes after geometric encoding, the attribute value is reassigned to each point after geometric encoding through the attribute recoloring unit 116 to achieve attribute recoloring. In addition, if the processed attribute information is color information, the original color information needs to be transformed into a YUV color space that is more in line with the visual characteristics of the human eye through the color space conversion unit 117; then, the preprocessed attribute information is attribute encoded through the first attribute prediction unit 118. Attribute encoding first requires reordering the point cloud. The reordering method is Morton code, so the traversal order of attribute encoding is Morton order. The attribute prediction method in PCRM is a single-point prediction based on the Morton order, that is, the Morton order is used to trace back one point from the current point to be encoded (current point), and the node found is the prediction reference point of the current point to be encoded. Then, the attribute reconstruction value of the prediction reference point is used as the attribute prediction value, and the attribute residual value is the difference between the attribute original value and the attribute prediction value of the current point to be encoded; finally, the attribute residual value is quantized by the quantization unit 119, and the quantized residual information is input into the attribute entropy encoder 1110 to form an attribute code stream.
[0076] The present application also provides a point cloud decoder. FIG5 shows the framework of the point cloud compression reference platform PCRM provided by AVS. The point cloud decoder 12 includes a geometric decoder: a geometric entropy decoder 121, an octree reconstruction unit 122, a coordinate inverse quantization unit 123, and a coordinate inverse translation unit 124. An attribute decoder: an attribute entropy decoder 125, an inverse quantization unit 126, a second attribute prediction unit 127, and a color space inverse transformation unit 128.
[0077] On the decoding side, the same method of separate geometry and attribute decoding is used. In the geometry decoding part, the geometry bitstream is first entropy decoded by the geometry entropy decoder 121 to obtain the geometric information of each node. Then, the octree structure is constructed by the octree reconstruction unit 122 in the same manner as the geometry encoding. Combined with the decoded geometry, the coordinate-transformed geometric information expressed by the octree structure is reconstructed. On the one hand, this information is dequantized by the coordinate dequantization unit 123 and detranslated by the coordinate detranslation unit 124 to obtain the decoded geometric information. On the other hand, it is input into the attribute decoder as additional information.
[0078] In the attribute decoding part, the Morton order is constructed in the same way as the encoding end. The attribute code stream is first entropy decoded by the attribute entropy decoder 125 to obtain the quantized residual information; then, it is dequantized by the dequantization unit 126 to obtain the attribute residual value; similarly, in the same way as the attribute encoding, the attribute prediction value of the current point to be decoded is obtained by the second attribute prediction unit 127, and then the attribute prediction value is added to the attribute residual value to restore the attribute reconstruction value of the current point to be decoded (for example, the YUV attribute value); finally, the decoded attribute information is obtained by color space inverse transformation by the color space inverse transformation unit 128.
[0079] It can also be understood that for the AVS-PCC codec framework, the general test conditions are as follows:
[0080] (1) There are 4 test conditions:
[0081] Condition 1: The geometric position is limited and the attributes are lost;
[0082] Condition 2: Geometric position lossless, attribute lossy;
[0083] Condition 3: Geometric position lossless, attribute loss limited;
[0084] Condition 4: Geometric position and attributes are lossless.
[0085] (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.
[0086] (3) Technical routes: There are two types, which are distinguished by the algorithm used for attribute compression.
[0087] Technical Route 1: Prediction branch, attribute compression adopts prediction-based method;
[0088] Technical route 2: Transformation branch. Attribute compression adopts a transformation-based method, which includes two transformation algorithms: wavelet transform algorithm and k-ary discrete cosine transform (DCT) algorithm.
[0089] In related technologies, current AVS-PCC uses run-length encoding for attribute quantization residuals. The codec uses the same order (e.g., the original point cloud acquisition order, Morton bidirectional, Hilbert order, etc.) to encode / decode the attribute quantization residuals of each point in sequence. Zero_run_length is used to count whether the attribute quantization residual is zero, which can be called a zero run value.
[0090] However, current PCRM uses context-based encoding / decoding for all binarized codewords when encoding zero-run values. This presents significant challenges for hardware implementation. This is because hardware can typically process four to six bypass-model-encoded binary codewords (bins) in a single clock cycle, but only one context-model-encoded bin. From a hardware throughput perspective, using the context model to encode all bins would result in low hardware throughput.
[0091] Based on this, an embodiment of the present application provides a coding and decoding method, whether it is the encoding end or the decoding end, first determine the preset parameters corresponding to the zero run value, and then judge whether the preset parameters meet the first preset conditions; if the preset parameters meet the first preset conditions, then at least one first-category syntax element identification information is coded and decoded based on the context model, and at least one second-category syntax element identification information is coded and decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during coding and decoding can be limited, so that part of the syntax element identification information is coded and decoded using the bypass model, thereby improving the hardware throughput, reducing the difficulty of hardware implementation, and facilitating hardware implementation; and it can also improve the processing speed.
[0092] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0093] In one embodiment of the present application, referring to FIG6 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG6 , the method may include:
[0094] S601: Determine the preset parameters corresponding to the zero-run value.
[0095] 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 a zero-run decoding method; more specifically, a zero-run decoding method that limits the number of codewords based on the context model to improve hardware throughput.
[0096] It should also be noted that in the embodiments of the present application, the zero run value is represented by zero_run_length, which is used to indicate whether the attribute quantization residual values are all 0. The attribute information of the point cloud can refer to the color component, the reflectivity, or even other attributes. Therefore, in some embodiments, the attribute quantization residual value can include one of the following: the color component quantization residual value and the reflectivity quantization residual value.
[0097] In an embodiment of the present application, for the color component quantization residual value, the color component quantization residual value may include: the quantization residual value Res0 of the first color component, the quantization residual value Res1 of the second color component, and the quantization residual value Res2 of the third color component. In this way, the zero-run value is specifically used to indicate whether the quantization residual values of the three color components are all 0. For example, if the decoded zero-run value is greater than 0, it can be said that the quantization residual values of the three color components of the current node are all 0; if the decoded zero-run value is equal to 0, it can be said that the quantization residual values of the three color components of the current node are not all 0.
[0098] In the embodiment of the present application, 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 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.
[0099] In addition, for the reflectivity quantization residual value, there is only one reflectivity quantization residual value at this time, and the zero-run value is specifically used to indicate whether the reflectivity quantization residual value is 0. For example, if the decoded zero-run value is greater than 0, then it can be said that the reflectivity quantization residual value of the current node is 0; if the decoded zero-run value is equal to 0, then it can be said that the reflectivity quantization residual value of the current node is not 0.
[0100] In some embodiments, how to determine the attribute quantization residual value of the current node, the method may further include:
[0101] If the zero-run value is greater than 0, determining the attribute quantization residual value of the current node to be equal to 0; and performing a subtraction operation on the zero-run value to determine the attribute quantization residual value of the next node according to the new zero-run value;
[0102] If the zero-run value is equal to 0, the code stream is decoded to determine the attribute quantization residual value of the current node; and the step of decoding the zero-run value is continued to determine the attribute quantization residual value of the next node according to the new zero-run value.
[0103] That is to say, at the decoding end, the zero-run value zero_run_length is decoded first; taking the color component quantization residual value as an example, if zero_run_length is greater than 0, it means that the quantization residual values of the three color components of the current node are all 0, then the --zero_run_length operation is required, and then the next node is processed; if zero_run_length is equal to 0, it means that the quantization residual values of the three color components of the current node are not all 0, then it is necessary to first decode the code stream to determine the quantization residual values (Res0, Res1, Res2) of the three color components of the current node, and then continue to decode the zero-run value zero_run_length, and then process the next node.
[0104] It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, where the preset parameter is used to represent the budget number of codewords based on the context model allocated to the zero run value. For example, the value of the preset parameter can be set to 2 24 , but is not specifically limited.
[0105] In embodiments of the present application, the preset parameter can be a pre-set parameter value or can be determined from a bitstream. Therefore, in some embodiments, determining the preset parameter corresponding to the zero-run value can include decoding the bitstream to determine the preset parameter corresponding to the zero-run value. In other words, the encoder can write the value of the preset parameter into the bitstream, and the decoder can then obtain the value of the preset parameter by decoding the bitstream.
[0106] In this way, before the zero-run value decoding begins, it is necessary to first determine the value of the preset parameter, and then judge whether the preset parameter meets the first preset condition, so as to limit the number of codewords based on the context model used during decoding and improve the hardware throughput.
[0107] S602: If the preset parameters meet the first preset conditions, at least one first-category syntax element identification information is decoded based on the context model, and at least one second-category syntax element identification information is decoded based on the bypass model to determine the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information.
[0108] It should be noted that, in the embodiment of the present application, the preset parameter meeting the first preset condition may include: determining that the value of the preset parameter is greater than or equal to a preset threshold value. The preset threshold value may be a judgment value pre-set based on the hardware configuration. For example, the preset threshold value may be set to 4, 8, or even other values, which are not specifically limited here.
[0109] It should also be noted that, in the embodiment of the present application, if the preset parameters do not meet the first preset condition, then in some embodiments, the method may further include:
[0110] If the preset parameters meet the second preset conditions, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are both decoded based on the bypass model to determine the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information.
[0111] 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.
[0112] It should also be noted that in the embodiment of the present application, since the hardware can usually process 4 to 6 codewords decoded based on the bypass model in one clock cycle, but can only process 1 codeword decoded based on the context model; taking into account the hardware throughput, the decoding method proposed in the embodiment of the present application can avoid the situation where all codewords are decoded based on the context model.
[0113] Specifically, if the value of the preset parameter is greater than or equal to a preset threshold value, then a portion of the syntax elements (such as at least one first-category syntax element identification information) may be decoded based on the context model, and another portion of the syntax elements (such as at least one second-category syntax element identification information) may be decoded based on the bypass model; if the value of the preset parameter is less than the preset threshold value, then all syntax elements (such as at least one first-category syntax element identification information and at least one second-category syntax element identification information) may be decoded based on the bypass model.
[0114] 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.
[0115] 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.
[0116] S603: Determine a zero run 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.
[0117] 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 zero run 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.
[0118] It should also be noted that in some cases, such as when the zero-run value is less than a preset threshold, the zero-run value can be determined solely by the value of at least one first-category syntax element identification information. In some embodiments, the method may further include:
[0119] If the preset parameters meet the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information to determine a value of the at least one first-category syntax element identification information; and determining a zero-run value based on the value of the at least one first-category syntax element identification information; or
[0120] 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 zero run value is determined based on the value of the at least one first-category syntax element identification information.
[0121] 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 zero-run value is equal to 0, or whether the zero-run value is equal to 1, or whether the zero-run value is equal to 2, or whether the quotient of the zero-run value minus a preset constant and then divided by 2 is equal to 0, whether it is equal to 1, and so on, thereby determining the zero-run value.
[0122] An embodiment of the present application provides a decoding method for determining a preset parameter corresponding to a zero-run value; if the preset parameter meets a first preset condition, decoding processing is performed on at least one first-category syntax element identification information based on a context model, and decoding processing is performed on at least one second-category syntax element identification information based on a bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined; and the zero-run value is determined based on the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information. In this way, after determining the preset parameter corresponding to the zero-run value, the number of codewords based on the context model used during decoding can be limited, so that some syntax element identification information is decoded using the bypass model, thereby improving hardware throughput, reducing the difficulty of hardware implementation, and also improving processing speed.
[0123] In another embodiment of the present application, based on the decoding method described in the above embodiment, see Figure 7, which shows a detailed flowchart of a decoding method provided by an embodiment of the present application. As shown in Figure 7, the method may include:
[0124] S701: Determine the preset parameters corresponding to the zero-run value.
[0125] S702: Determine whether the preset parameter is greater than or equal to a preset threshold.
[0126] S703: If the preset parameter is greater than or equal to the preset threshold value, decoding and processing is performed on at least one possible first-category syntax element identification information based on the context model, and decoding and processing is performed on at least one possible second-category syntax element identification information based on the bypass model, and the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information are determined.
[0127] S704: If the preset parameter is less than the preset threshold value, decoding processing is performed on at least one first-category syntax element identification information and at least one second-category syntax element identification information that may appear based on the bypass model, and the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information are determined.
[0128] S705: Determine a zero run 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.
[0129] It should be noted that in the embodiments of the present application, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are not specifically limited. In one possible implementation, the at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; and the at least one second-category syntax element identification information includes at least first numerical identification information.
[0130] Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, and the first numerical value identification information is used to indicate the second numerical value obtained after the zero run value is subjected to the second operation.
[0131] In some embodiments, performing the first operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value.
[0132] In some embodiments, performing the second operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; and setting the second value equal to the quotient of the first value divided by 2. Alternatively, after obtaining the first value, the second operation may include: right-shifting the first value by one position to obtain the second value.
[0133] It should be noted that in the embodiments of the present application, for division operations, right shift operations can be used instead, “>>” represents the right shift operator; “divide by 2” is equivalent to shifting one bit right; for multiplication operations, left shift operations can be used instead, “<<” represents the left shift operator; “multiply by 2” is equivalent to shifting one bit left.
[0134] It should also be noted that, in the embodiment of the present application, the first preset value can be set to 3, but this is not specifically limited. In addition, the first syntax element identification information can be represented by zero_run_length_equal_zero, the second syntax element identification information can be represented by zero_run_length_equal_one, the third syntax element identification information can be represented by zero_run_length_equal_two, the fourth syntax element identification information can be represented by zero_run_length_minus3_parity, and the first numerical identification information can be represented by zero_run_length_minus3_div2.
[0135] In some embodiments, when the preset parameters meet the first preset condition, decoding the zero run value may include: decoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information and the fourth syntax element identification information that may appear based on the context model to determine the value of at least one first-category syntax element identification information; and decoding the first numerical identification information that may appear based on the bypass model to determine the value of the first numerical identification information; determining the zero run value based on the value of at least one first-category syntax element identification information and the value of the first numerical identification information.
[0136] In a specific embodiment, when the preset parameters meet the first preset condition, decoding the zero-run value may include:
[0137] Decoding the first syntax element identification information based on the context model to determine a value of the first syntax element identification information;
[0138] If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0;
[0139] If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the context model to determine the value of the second syntax element identification information;
[0140] If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1;
[0141] If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the context model to determine the value of the third syntax element identification information;
[0142] If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2;
[0143] 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; and decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information;
[0144] A zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
[0145] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0146] First syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information.
[0147] In other embodiments, when the preset parameters meet the second preset condition, decoding the zero-run value 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, and the first numerical value identification information based on a bypass model to determine the zero-run value. In other words, if the preset parameters meet the second preset condition, then all binarized codewords corresponding to the zero-run value are decoded using the bypass model.
[0148] In a specific embodiment, when the preset parameters meet the second preset condition, decoding the zero-run value may include:
[0149] Decoding the first syntax element identification information based on the bypass model to determine a value of the first syntax element identification information;
[0150] If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0;
[0151] If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information;
[0152] If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1;
[0153] If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the bypass model to determine the value of the third syntax element identification information;
[0154] If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2;
[0155] 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; and decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information;
[0156] A zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
[0157] 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 and the fourth syntax element identification information, the corresponding first value and the second value may be the same or different, and there is no specific limitation here.
[0158] It should also be noted that in the embodiments 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 a flag / identifier value, which is not specifically limited here.
[0159] 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.
[0160] In this way, the first syntax element identification information is decoded first. If the value of the first syntax element identification information is 1, then it can be determined that the zero run value is equal to 0; otherwise, if the value of the first syntax element identification information is 0, it means that the zero run value is not equal to 0, then it is necessary to continue decoding the second syntax element identification information. If the value of the second syntax element identification information is 1, then it can be determined that the zero run value is equal to 1; otherwise, if the value of the second syntax element identification information is 0, it means that the zero run value is not equal to 1, then it is necessary to continue decoding the third syntax element identification information. If the value of the third syntax element identification information is 1, then it can be determined that the zero run value is equal to 2; otherwise, if the value of the third syntax element identification information is 0, it means that the zero run value is not equal to 2, then it is necessary to continue decoding the fourth syntax element identification information and the first numerical identification information to determine the zero run value.
[0161] In some embodiments, for the first numerical identification information, decoding the first numerical identification information based on a bypass model to determine the value of the first numerical identification information may include: decoding the first numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the first numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the first numerical identification information.
[0162] For example, taking the second-order exponential Golomb decoding as an example, the codeword corresponding to the first numerical identification information is decoded based on the bypass model to obtain a set of binary symbols 011. Then, after the debinarization process, the value of the first numerical identification information is 3.
[0163] It should also be noted that, in the embodiment of the present application, the fourth syntax element identification information is used to indicate the parity characteristic of a first value obtained by subtracting a first preset value from a zero-run value. In some embodiments, for the value of the fourth syntax element identification information, the method may further include: if the value of the fourth syntax element identification information is a first value, determining that the first value is an odd number; if the value of the fourth syntax element identification information is a second value, determining that the first value is an even number;
[0164] Alternatively, if the value of the fourth syntax element identification information is the first value, it is determined that the remainder after the first value is divided by 2 is 1; if the value of the fourth syntax element identification information is the second value, it is determined that the remainder after the first value is divided by 2 is 0.
[0165] In short, in this embodiment of the present application, taking the example of the first value being set to 1 and the second value being set to 0, for the zero-run value, if the first value is an odd number, then the zero-run value needs to be incremented by 1; if the first value is an even number, then the zero-run value needs to be incremented by 0. That is, the zero-run value is determined based on the first preset value, the value of the first value identification information, and the value of the fourth syntax element identification information.
[0166] Further, in some embodiments, determining the zero run value based on the first preset value, the value of the fourth syntax element identification information and the value of the first numerical identification information may include: performing a third operation on the value of the first numerical identification information to obtain a third numerical value; and determining the zero run value based on the first preset value, the third numerical value and the value of the fourth syntax element identification information.
[0167] It should also be noted that, in the embodiment of the present application, performing a third operation on the value of the first numerical identification information to obtain a third numerical value may include: multiplying the value of the first numerical identification information by 2 to obtain the third numerical value; or shifting the value of the first numerical identification information left by one position to obtain the third numerical value.
[0168] Further, in some embodiments, determining the zero run value based on the values of the first preset value, the third numerical value, and the fourth syntax element identification information may include: performing an addition operation on the values of the first preset value, the third numerical value, and the fourth syntax element identification information to obtain the zero run value.
[0169] Exemplarily, assuming that the first preset value is set to 3, the fourth syntax element identification information is represented by zero_run_length_minus3_parity, and the first numerical identification information is represented by zero_run_length_minus3_div2; then, the zero run value zero_run_length=3+zero_run_length_minus3_parity+(zero_run_length_minus3_div2<<1).
[0170] It can be understood that run-length decoding is used for the attribute quantization residual value. The specific implementation steps are as follows:
[0171] (1) The attribute quantization residual value is the color component quantization residual value.
[0172] The decoding end uses the same order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.) to decode the quantized residual values (Res0, Res1, Res2) of the three color components of each node in turn. Zero_run_length is used to count whether the quantized residual values of the three color components are all 0, which is called the zero run value. Its initial value is set to 0. For each node, the specific details are as follows:
[0173] First decode the zero run value zero_run_length. If zero_run_length>0, it means that the quantized residual values of the three color components of the current node are all zero, then perform the --zero_run_length operation, and then process the next node;
[0174] If zero_run_length == 0, it means that the quantized residual values of the three color components of the current node are not all zero, so the quantized residual values of the three color components (Res0, Res1, Res2) are decoded first, then the zero run value zero_run_length is decoded, and then the next node is processed.
[0175] (2) The attribute quantization residual value is the reflectivity quantization residual value.
[0176] The decoding end uses the same order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.) to decode the reflectivity quantization residual value of each node in turn. Zero_run_length is used to count whether the reflectivity quantization residual value is 0, which is called the zero run value. Its initial value is set to 0. For each node, the specific details are as follows:
[0177] First decode the zero run value zero_run_length. If zero_run_length>0, it means that the reflectivity quantization residual value of the current node is zero, then perform the --zero_run_length operation, and then process the next node.
[0178] If zero_run_length==0, it means that the reflectivity quantization residual value of the current node is not zero, then the reflectivity quantization residual value is decoded first, then the zero run value zero_run_length is decoded, and then the next node is processed.
[0179] The specific zero run value decoding process is:
[0180] a) Decode zero_run_length_equal_zero. If the decoded value of the zero_run_length_equal_zero flag is equal to 1, the zero run value is equal to 0 and decoding is completed.
[0181] b) If the zero run value is not equal to 0, continue decoding zero_run_length_equal_one. If the decoded value of the zero_run_length_equal_one flag is equal to 1, the zero run value is equal to 1 and decoding is completed.
[0182] c) If the zero run value is not equal to 1, continue decoding zero_run_length_equal_two. If the decoded value of the zero_run_length_equal_two flag is equal to 1, the zero run value is equal to 2, and decoding is complete.
[0183] d) If the zero run value is not equal to 2, continue decoding zero_run_length_minus3_parity and zero_run_length_minus3_div2. The zero run value is equal to zero_run_length_minus3_div2 multiplied by 2 plus 3 plus the value of the parity characteristic indicator zero_run_length_minus3_parity, that is, zero_run_length = 3 + zero_run_length_minus3_parity + (zero_run_length_minus3_div2 << 1).
[0184] In the related art, when decoding zero-run values, PCRM currently uses a context model-based decoding method for all binarized codewords. For example, if the zero-run value to be decoded is 10, the binarization process is as follows:
[0185] The zero_run_length_equal_zero flag is 0;
[0186] The zero_run_length_equal_one flag is 0;
[0187] The zero_run_length_equal_two flag is 0;
[0188] The zero_run_length_minus3_parity flag is 1;
[0189] Zero_run_length_minus3_div2 is 3, and 3 is binarized. Taking the second-order exponential Golomb coding as an example, the result of binarization of 3 is 0 1 1.
[0190] Therefore, for a zero-run value of 10, the binarized codeword result is 0 0 0 1 0 1 1. At the decoding end, all codewords after the zero-run value is binarized are decoded using a context model, 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:
[0191] (i) Allocate a budget of remBinsPass1 based on the context model decoding codeword for the zero run value (the initial value can be set to 2 24 );
[0192] (ii) Before zero-run decoding begins, determine whether remBinsPass1 is greater than or equal to T (e.g., set to 4);
[0193] (iii) When remBinsPass1 ≥ T, the possible zero_run_length_equal_zero, zero_run_length_equal_one, zero_run_length_equal_two, and zero_run_length_minus3_parity are decoded using a context model, and after each flag bit / flag is decoded, a remBinsPass1-- operation is performed, while all binary codewords of zero_run_length_minus3_div2 are decoded using a bypass model;
[0194] (iv) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is adopted for all binarized codewords with zero run values.
[0195] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 1.
[0196] Table 1
[0197]
[0198]
[0199] In another possible implementation, at least one first-category syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; and at least one second-category syntax element identification information includes at least: second numerical identification information.
[0200] Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, the fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 0, the sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 1, the seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 2, the eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 3, and the second numerical value identification information is used to indicate the fourth numerical value obtained after the zero run value is subjected to the fourth operation.
[0201] In some embodiments, performing the first operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value.
[0202] In some embodiments, performing a second operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; and setting the second value to be equal to a quotient of the first value divided by 2.
[0203] In some embodiments, performing a fourth operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; setting the second value to be equal to the quotient of the first value divided by 2; and performing a subtraction operation on the second value and a second preset value to obtain a fourth value.
[0204] In some embodiments, after obtaining the first value, the method may further include: right-shifting the first value by one position to obtain a second value.
[0205] In an 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 3, and the second preset value may be set to 4. In addition, the first syntax element identification information may be represented by zero_run_length_equal_zero, the second syntax element identification information may be represented by zero_run_length_equal_one, the third syntax element identification information may be represented by zero_run_length_equal_two, the fourth syntax element identification information may be represented by zero_run_length_minus3_parity, the fifth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_zero, the sixth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_one, the seventh syntax element identification information may be represented by zero_run_length_minus3_div2_equal_two, the eighth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_three, and the second value identification information may be represented by zero_run_length_minus3_div2_minus4.
[0206] In some embodiments, when the preset parameters meet the first preset condition, decoding the zero run value 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, the seventh syntax element identification information and the eighth syntax element identification information based on the context model to determine the value of at least one first-category syntax element identification information; and decoding the second numerical identification information that may appear based on the bypass model to determine the value of the second numerical identification information; determining the zero run value based on the value of at least one first-category syntax element identification information and the value of the second numerical identification information.
[0207] In a specific embodiment, when the preset parameters meet the first preset condition, decoding the zero-run value may include:
[0208] Decoding the first syntax element identification information based on the context model to determine a value of the first syntax element identification information;
[0209] If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0;
[0210] If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the context model to determine the value of the second syntax element identification information;
[0211] If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1;
[0212] If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the context model to determine the value of the third syntax element identification information;
[0213] If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2;
[0214] 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; and decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information;
[0215] If the value of the fifth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first preset value and the value of the fourth syntax element identification information;
[0216] If the value of the fifth syntax element identification information is the second value, decoding the sixth syntax element identification information based on the context model to determine the value of the sixth syntax element identification information;
[0217] If the value of the sixth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first constant, the first preset value, and the value of the fourth syntax element identification information;
[0218] If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the context model to determine the value of the seventh syntax element identification information;
[0219] If the value of the seventh syntax element identification information is the first value, determining that the zero run value is equal to the sum of the second constant, the first preset value, and the value of the fourth syntax element identification information;
[0220] 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;
[0221] If the value of the eighth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the third constant, the first preset value, and the value of the fourth syntax element identification information;
[0222] If the value of the eighth 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;
[0223] The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
[0224] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after each decoding of the following syntax element identification information is completed based on the context model:
[0225] 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, and eighth syntax element identification information.
[0226] In other embodiments, when the preset parameters meet the second preset condition, decoding the zero-run value 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, the seventh syntax element identification information, the eighth syntax element identification information, and the second numerical identification information based on the bypass model to determine the zero-run value. In other words, if the preset parameters meet the second preset condition, decoding is performed using the bypass model for all binarized codewords corresponding to the zero-run value.
[0227] In a specific embodiment, when the preset parameters meet the second preset condition, decoding the zero-run value may include:
[0228] Decoding the first syntax element identification information based on the bypass model to determine a value of the first syntax element identification information;
[0229] If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0;
[0230] If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information;
[0231] If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1;
[0232] If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the bypass model to determine the value of the third syntax element identification information;
[0233] If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2;
[0234] 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; and decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information;
[0235] If the value of the fifth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first preset value and the value of the fourth syntax element identification information;
[0236] If the value of the fifth syntax element identification information is the second value, decoding the sixth syntax element identification information based on the bypass model to determine the value of the sixth syntax element identification information;
[0237] If the value of the sixth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first constant, the first preset value, and the value of the fourth syntax element identification information;
[0238] 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;
[0239] If the value of the seventh syntax element identification information is the first value, determining that the zero run value is equal to the sum of the second constant, the first preset value, and the value of the fourth syntax element identification information;
[0240] 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;
[0241] If the value of the eighth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the third constant, the first preset value, and the value of the fourth syntax element identification information;
[0242] If the value of the eighth 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;
[0243] The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
[0244] In the embodiment of the present application, the first constant, the second constant, and the third constant are all multiples of 2. For example, the first constant is set to 2, the second constant is set to 4, and the third constant is set to 6.
[0245] 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 and the eighth grammatical element identification information, etc., the corresponding first value and the second value may be the same, or may be different, and there is no specific limitation here.
[0246] It should also be noted that in the embodiments 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 a flag / identifier value, which is not specifically limited here.
[0247] For example, for each syntax element identification information, the first value may be set to 1 and the second value may be set to 0; or, the first value may be set to 0 and the second value may be set to 1; or, the first value may be set to true and the second value may be set to false; or, the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0248] In this way, taking the first preset value of 3 as an example, first decode the first syntax element identification information. If the value of the first syntax element identification information is 1, then it can be determined that the zero run value is equal to 0; otherwise, if the value of the first syntax element identification information is 0, it means that the zero run value is not equal to 0, then it is necessary to continue decoding the second syntax element identification information. If the value of the second syntax element identification information is 1, then it can be determined that the zero run value is equal to 1; otherwise, if the value of the second syntax element identification information is 0, it means that the zero run value is not equal to 1, then it is necessary to continue decoding the third syntax element identification information. If the value of the third syntax element identification information is 1, then it can be determined that the zero run value is equal to 2; otherwise, if the value of the third syntax element identification information is 0, it means that the zero run value is not equal to 2, then it is necessary to continue decoding the fourth syntax element identification information and the fifth syntax element identification information. If the value of the fifth syntax element identification information is 1, then it can be determined that the zero run value is equal to 1. The value is equal to the sum of 3 and the value of the fourth grammatical element identification information; if the value of the fifth grammatical element identification information is 0, then it is necessary to continue decoding the sixth grammatical element identification information, and if the value of the sixth grammatical element identification information is 1, then it can be determined that the zero run value is equal to the sum of 5 and the value of the fourth grammatical element identification information; 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, and if the value of the seventh grammatical element identification information is 1, then it can be determined that the zero run value is equal to the sum of 7 and the value of the fourth grammatical element identification information; if the value of the seventh grammatical element identification information is 0, then it is necessary to continue decoding the eighth grammatical element identification information, and if the value of the eighth grammatical element identification information is 1, then it can be determined that the zero run value is equal to the sum of 9 and the value of the fourth grammatical element identification information; if the value of the eighth grammatical element identification information is 0, then it is necessary to continue decoding the second numerical identification information to determine the zero run value.
[0249] In some embodiments, for the second numerical identification information, decoding the second numerical identification information based on a bypass model to determine the value of the second numerical identification information may include: decoding the second numerical identification information based on the bypass model to determine at least one binary symbol corresponding to the second numerical identification information; and debinarizing the at least one binary symbol to obtain the value of the second numerical identification information.
[0250] It should also be noted that in this embodiment of the present application, the fourth syntax element identification information is used to indicate the parity of the first value obtained by subtracting the first preset value from the zero-run value, that is, the remainder after dividing the first value by 2. If the first value is odd, the zero-run value is incremented by 1; if the first value is even, the zero-run value is incremented by 0. In other words, the zero-run value is determined based on the first preset value, the value of the second value identification information, and the value of the fourth syntax element identification information.
[0251] Furthermore, in some embodiments, determining the zero-run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information includes:
[0252] Determine the first operation result according to the value of the second numerical identification information and the second preset value;
[0253] Performing a fifth operation on the first operation result to obtain a second operation result;
[0254] A zero-run value is determined according to the first preset value, the second operation result, and the value of the fourth syntax element identification information.
[0255] It should also be noted that, in an embodiment of the present application, determining the first operation result based on the value of the second numerical identification information and the second preset value may include: performing an addition operation based on the value of the second numerical identification information and the second preset value to determine the first operation result.
[0256] It should also be noted that, in the embodiment of the present application, performing the fifth operation on the first operation result to obtain the second operation result may include: multiplying the first operation result by 2 to obtain the second operation result; or shifting the first operation result left by one position to obtain the second operation result.
[0257] Further, in some embodiments, determining the zero run value based on the first preset value, the second operation result and the value of the fourth syntax element identification information may include: performing an addition operation on the first preset value, the second operation result and the value of the fourth syntax element identification information to obtain the zero run value.
[0258] Exemplarily, assuming that the first preset value is set to 3, the second preset value is set to 4, the fourth syntax element identification information is represented by zero_run_length_minus3_parity, and the second numerical identification information is represented by zero_run_length_minus3_div2_minus4; then, the zero run value zero_run_length = 3 + zero_run_length_minus3_parity + ((zero_run_length_minus3_div2_minus4+4) << 1).
[0259] It can be understood that run-length decoding is used for the attribute quantization residual value. The specific zero-run value decoding process is:
[0260] a) Decode zero_run_length_equal_zero. If the decoded value of the zero_run_length_equal_zero flag is equal to 1, the zero run value is equal to 0 and decoding is completed.
[0261] b) If the zero run value is not equal to 0, continue decoding zero_run_length_equal_one. If the decoded value of the zero_run_length_equal_one flag is equal to 1, the zero run value is equal to 1 and decoding is completed.
[0262] c) If the zero run value is not equal to 1, continue decoding zero_run_length_equal_two. If the decoded value of the zero_run_length_equal_two flag is equal to 1, the zero run value is equal to 2, and decoding is complete.
[0263] d) If the zero run value is not equal to 2, continue decoding zero_run_length_minus3_parity;
[0264] e) Decode zero_run_length_minus3_div2_equal_zero. If the decoded value of the zero_run_length_equal_zero flag is equal to 1, the zero run value is equal to (3 + zero_run_length_minus3_parity), and decoding is complete.
[0265] f) If the decoded value of the zero_run_length_minus3_div2_equal_zero flag is equal to 0, continue decoding zero_run_length_minus3_div2_equal_one. If the decoded value of the zero_run_length_minus3_div2_equal_one flag is equal to 1, the zero run value is equal to (5 + zero_run_length_minus3_parity), and decoding is complete.
[0266] g) If the decoded value of the zero_run_length_minus3_div2_equal_one flag is equal to 0, continue decoding zero_run_length_minus3_div2_equal_two. If the decoded value of the zero_run_length_minus3_div2_equal_two flag is equal to 1, the attribute residual zero run value is equal to (7 + zero_run_length_minus3_parity), and decoding is complete.
[0267] h) If the decoded value of the zero_run_length_minus3_div2_equal_two flag is equal to 0, continue decoding zero_run_length_minus3_div2_equal_three. If the decoded value of the zero_run_length_minus3_div2_equal_three flag is equal to 1, the attribute residual zero run value is equal to (9 + zero_run_length_minus3_parity), and decoding is complete.
[0268] i) If the decoded value of the zero_run_length_minus3_div2_equal_three flag is equal to 0, then zero_run_length_minus3_div2_minus4 is decoded, and the attribute residual zero run value is 3+zero_run_length_minus3_parity+((zero_run_length_minus3_div2_minus4+4)<<1), and decoding is completed.
[0269] In a specific embodiment, in order to improve hardware throughput, the decoding process may be as follows:
[0270] (i) Allocate a budget of remBinsPass1 based on the context model decoding codeword for the zero run value (the initial value can be set to 2 24 );
[0271] (ii) Before zero-run decoding begins, determine whether remBinsPass1 is greater than or equal to T (e.g., set to 8);
[0272] (iii) When remBinsPass1 ≥ T, the possible zero_run_length_equal_zero, zero_run_length_equal_one, zero_run_length_equal_two, zero_run_length_minus3_parity, zero_run_length_minus3_div2_equal_zero, zero_run_length_minus3_div2_equal_one, zero_run_length_minus3_div2_equal_two, and zero_run_length_minus3_div2_equal_three are decoded using a context model-based decoding method, and each time a flag bit / flag is decoded, a remBinsPass1-- operation is performed, and all binary codewords of zero_run_length_minus3_div2_minus4 are decoded using a bypass model-based decoding method;
[0273] (iv) When remBinsPass1 ≥ T is not satisfied, a bypass model-based decoding method is adopted for all binarized codewords with zero run values.
[0274] In implementation, the syntax table description of the entire decoding process of the embodiment of the present application is shown in Table 2.
[0275] Table 2
[0276]
[0277]
[0278] Simply put, in the embodiment of the present application, setting the budget remBinsPass1 to limit the number of codewords based on the context model used in zero-run decoding can improve the throughput and provide a more hardware-friendly implementation.
[0279] For example, Tables 3 and 4 show the test results for the prediction branch. Table 3 shows the test results for the test condition C3 (lossless geometry, limit-lossy attributes), and Table 4 shows the test results for the test condition C4 (lossless geometry, lossless attributes).
[0280] Table 3
[0281]
[0282] Table 4
[0283]
[0284] For example, Tables 5, 6, 7, and 8 show the test results of the multi-layer transformation branch. Table 5 shows the test results corresponding to the test condition C1-limit-lossy geometry, lossy attributes, Table 6 shows the test results corresponding to the test condition C2-lossless geometry, lossy attributes, Table 7 shows the test results corresponding to the test condition C3-lossless geometry, limit-lossy attributes, and Table 8 shows the test results corresponding to the test condition C4-lossless geometry, lossless attributes.
[0285] Table 5
[0286]
[0287] Table 6
[0288]
[0289] Table 7
[0290]
[0291] Table 8
[0292]
[0293] For example, Tables 9 and 10 show the test results for the resource-constrained prediction transform branch. Table 9 shows the test results for the test condition C1-limit-lossy geometry, lossy attributes, and Table 10 shows the test results for the test condition C2-lossless geometry, lossy attributes.
[0294] Table 9
[0295]
[0296] Table 10
[0297]
[0298] For example, Tables 11 and 12 show the test results for the predictive transform branch with unlimited resources. Table 11 shows the test results corresponding to the test condition C1-limit-lossy geometry, lossy attributes, and Table 12 shows the test results corresponding to the test condition C2-lossless geometry, lossy attributes.
[0299] Table 11
[0300]
[0301] Table 12
[0302]
[0303] This embodiment provides a decoding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiment. It can be seen that according to the technical solution of the aforementioned embodiment, the preset parameters corresponding to the zero-run value are first determined, and then it is determined whether the preset parameters meet the first preset conditions; if the preset parameters meet the first preset conditions, then at least one first-category syntax element identification information is decoded based on the context model, and at least one second-category syntax element identification information is decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during decoding can be limited, so that part of the syntax element identification information is decoded using the bypass model, thereby improving the hardware throughput and reducing the difficulty of hardware implementation; and it can also improve the processing speed.
[0304] In another embodiment of the present application, referring to FIG8 , a schematic flow chart of an encoding method provided by an embodiment of the present application is shown. As shown in FIG8 , the method may include:
[0305] S801: Determine a zero-run value and preset parameters corresponding to the zero-run value.
[0306] 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 a zero-run encoding method; more specifically, a zero-run encoding method that limits the number of codewords based on a context model.
[0307] It should also be noted that in the embodiments of the present application, the zero run value is represented by zero_run_length, which is used to indicate whether the attribute quantization residual values are all 0. The attribute information of the point cloud can refer to the color component, the reflectivity, or even other attributes. Therefore, in some embodiments, the attribute quantization residual value can include one of the following: the color component quantization residual value and the reflectivity quantization residual value.
[0308] In the embodiment of the present application, the color component quantization residual values may include: the quantization residual value Res0 of the first color component, the quantization residual value Res1 of the second color component, and the quantization residual value Res2 of the third color component. Thus, the zero-run value is specifically used to indicate whether the quantization residual values of the three color components are all 0. In contrast, for the reflectance quantization residual value, there is only one reflectance quantization residual value, and the zero-run value is specifically used to indicate whether the reflectance quantization residual value is 0.
[0309] It should also be noted that in the embodiments of the present application, the first color component, the second color component, and the third color component may be in RGB format, or in YUV format, or even in other formats. Furthermore, the order of the three color components, taking YUV as an example, may be in YUV order, UYV order, UVY order, or even VYU order, etc. In other words, the format and order of the color components are not specifically limited here.
[0310] In some embodiments, determining the zero-run value may include:
[0311] If the attribute quantization residual value of the current node is equal to 0, then the zero run value is incremented by 1, and the zero run value is determined based on the attribute quantization residual value of the next node.
[0312] If the attribute quantization residual value of the current node is not all equal to 0, the zero-run value is encoded, and the attribute quantization residual value of the current node is encoded, and the obtained encoding bits are written into the bitstream; and the zero-run value is reset to 0, and the zero-run value is continued to be determined according to the attribute quantization residual value of the next node.
[0313] In an embodiment of the present application, the method may further include: setting an initial value of the zero-run value to be equal to 0.
[0314] That is, the initial value of zero_run_length is 0. For each node, at the encoding end, the attribute quantization residual value is first determined. Taking the color component quantization residual value as an example, if the quantization residual values of the three color components are all zero, then ++zero_run_length is used, and then the next node is processed. If the quantization residual value of any of the three color components is not zero, the zero run value is first encoded, and then the zero run value zero_run_length is reset to 0. Then the specific color component quantization residual value (Res0, Res1, Res2) is encoded, and then the next node is processed.
[0315] In addition, for the last node, if the quantized residual values of its three color components are all 0, then ++zero_run_length is used and the zero run value is encoded; if the quantized residual value of any of its three color components is not zero, the zero run value is encoded first, then the zero run value zero_run_length is reset to 0, and then the specific color component quantized residual value (Res0, Res1, Res2) is encoded, and finally the zero run value is encoded.
[0316] It should also be noted that in the embodiment of the present application, the preset parameter is represented by remBinsPass1, where the preset parameter is used to represent the budget number of codewords based on the context model allocated to the zero run value. For example, the value of the preset parameter can be set to 2 24 , but is not specifically limited.
[0317] The preset parameters can be pre-set parameter values, or the values of the preset parameters can be written into the bitstream. Therefore, in some embodiments, the method can further include encoding the preset parameters corresponding to the zero-run values and writing the resulting encoded bits into the bitstream. This allows the decoder to subsequently obtain the values of the preset parameters by decoding the bitstream.
[0318] In this way, before the zero-run 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 during encoding and improving the hardware throughput.
[0319] S802: Determine, according to the zero run 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.
[0320] In an embodiment of the present application, a zero-run value may be represented by syntax element identification information. For example, the first syntax element identification information is used to indicate whether the zero-run value is equal to 0, the second syntax element identification information is used to indicate whether the zero-run value is equal to 1, and the third syntax element identification information is used to indicate whether the zero-run value is equal to 2, etc.
[0321] In this way, according to the zero-run 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.
[0322] 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.
[0323] It should be noted that, in the embodiment of the present application, the preset parameter meeting the first preset condition may include: determining that the value of the preset parameter is greater than or equal to a preset threshold value. The preset threshold value may be a judgment value pre-set based on the hardware configuration. For example, the preset threshold value may be set to 4, 8, or even other values, which are not specifically limited here.
[0324] It should also be noted that, in an embodiment of the present application, if the preset parameters do not meet the first preset conditions, then in some embodiments, the method may further include: if the preset parameters meet the second preset conditions, performing bypass model-based encoding processing on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and writing the obtained encoded bits into the bitstream.
[0325] 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.
[0326] It should also be noted that in the embodiment of the present application, since the hardware can usually process 4 to 6 codewords encoded based on the bypass model in one clock cycle, but can only process 1 codeword encoded based on the context model; taking into account the hardware throughput, the encoding method proposed in the embodiment of the present application can avoid the situation where all codewords are encoded based on the context model. 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 encoded 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 encoded 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 encoded based on the bypass model.
[0327] 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.
[0328] That is to say, in an embodiment of the present application, for at least one first-category syntax element identification information that may appear, a context model-based encoding method is used, and each time a first-category syntax element identification information is encoded, a --remBinsPass1 operation needs to be performed.
[0329] It should also be noted that in some cases, such as when the zero-run value is less than a preset threshold, the zero-run value can be determined solely by the value of at least one first-category syntax element identification information. In some embodiments, the method may further include:
[0330] Determining, according to the zero-run value, a value of at least one first-category syntax element identification information;
[0331] If the preset parameters meet the first preset condition, performing context model-based encoding processing on the value of at least one first-category syntax element identification information, and writing the obtained coded bits into the bitstream; or,
[0332] 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.
[0333] That is, in some cases, based on the value of at least one first-category syntax element identification information, it is possible to determine whether the zero-run value is equal to 0, or whether the zero-run value is equal to 1, or whether the zero-run value is equal to 2, or whether the quotient of the zero-run value minus a preset constant and then divided by 2 is equal to 0, or equal to 1, and thus determine the zero-run value. In this case, encoding processing can be performed only on the value indicating the first-category syntax element identification information.
[0334] For example, taking the reflectivity quantization residual value as an example, assuming that there is a set of reflectivity quantization residual values: 2310004501; then in the encoding process, since the first value is 2, the zero run value is 0 at this time, the zero run value is encoded first and then 2 is encoded; the second value is 3, the zero run value is 0 at this time, the zero run value is encoded first and then 3 is encoded; the third value is 1, the zero run value is 0 at this time, the zero run value is encoded first and then 1 is encoded; the fourth value is 0, the zero run value is added by 1, that is, the zero run value is 1; the fifth value is 0, and the zero run value is continued to be added by 1. , that is, the zero run value is 2; the sixth value is 0, and the zero run value continues to add 1, that is, the zero run value is 3; the seventh value is 4, at this time you need to encode the zero run value 3 first, then reset the zero run value to 0, and then continue to encode 4; the eighth value is 5, at this time the zero run value is 0, first encode the zero run value 0 and then encode 5; the ninth value is 0, at this time the zero run value adds 1, that is, the zero run value is 1; the tenth value is 1, at this time first encode the zero run value 1, then reset the zero run value to 0, continue to encode 1, and finally encode the zero run value 0 again.
[0335] An embodiment of the present application provides an encoding method that determines a zero-run value and a preset parameter corresponding to the zero-run value; determines the value of at least one first-category syntax element identification information and the value of at least one second-category syntax element identification information based on the zero-run value; if the preset parameter meets a first preset condition, performs context-based encoding processing on the value of the at least one first-category syntax element identification information, and performs bypass-model-based encoding processing on the value of the at least one second-category syntax element identification information, and writes the resulting encoded bits into a bitstream. Thus, after determining the preset parameter corresponding to the zero-run value, the number of codewords based on the context model used during encoding can be limited, allowing some syntax element identification information to be encoded using the bypass model, thereby improving hardware throughput and reducing the difficulty of hardware implementation; and also improving processing speed.
[0336] 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:
[0337] S901: Determine the preset parameters corresponding to the zero-run value.
[0338] S902: Determine whether the preset parameter is greater than or equal to a preset threshold value.
[0339] S903: If the preset parameter is greater than or equal to the preset threshold value, encoding is performed on at least one possible first-category syntax element identification information based on the context model, and encoding is performed on at least one possible second-category syntax element identification information based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0340] 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.
[0341] It should be noted that in the embodiments of the present application, there are no specific limitations on the at least one first-category syntax element identification information and the at least one second-category syntax element identification information indicating a zero-run value. In one possible implementation, the at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; and the at least one second-category syntax element identification information includes at least first numerical identification information.
[0342] Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, and the first numerical value identification information is used to indicate the second numerical value obtained after the zero run value is subjected to the second operation.
[0343] In some embodiments, performing the first operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value.
[0344] In some embodiments, performing the second operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; and setting the second value equal to the quotient of the first value divided by 2. Alternatively, after obtaining the first value, the second operation may include: right-shifting the first value by one position to obtain the second value.
[0345] It should be noted that, in the embodiment of the present application, the first preset value can be set to 3, but this is not specifically limited. In addition, the first syntax element identification information can be represented by zero_run_length_equal_zero, the second syntax element identification information can be represented by zero_run_length_equal_one, the third syntax element identification information can be represented by zero_run_length_equal_two, the fourth syntax element identification information can be represented by zero_run_length_minus3_parity, and the first numerical identification information can be represented by zero_run_length_minus3_div2.
[0346] In some embodiments, when the preset parameters meet the first preset condition, encoding the zero-run value may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, and the fourth syntax element identification information that may appear based on the context model, and encoding the first numerical identification information that may appear based on the bypass model, and writing the obtained encoded bits into the bitstream.
[0347] In a specific embodiment, when the preset parameters meet the first preset condition, encoding the zero-run value may include:
[0348] Determining a value of first syntax element identification information according to the zero run value;
[0349] encoding the value of the first syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0350] If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value;
[0351] encoding the value of the second syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0352] If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value;
[0353] encoding the value of the third syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0354] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the first numerical identification information according to the zero run value;
[0355] The value of the fourth syntax element identification information is coded based on the context model, and the value of the first numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
[0356] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0357] First syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information.
[0358] In other embodiments, when the preset parameters meet the second preset condition, encoding the zero-run value 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, and the first numerical value identification information based on a bypass model, and writing the resulting encoded bits into the bitstream. In other words, if the preset parameters meet the second preset condition, encoding is performed using the bypass model for all binary codewords corresponding to the zero-run value.
[0359] In a specific embodiment, when the preset parameters meet the second preset condition, encoding the zero-run value may include:
[0360] Determining a value of first syntax element identification information according to the zero run value;
[0361] encoding the value of the first syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0362] If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value;
[0363] encoding the value of the second syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0364] If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value;
[0365] encoding the value of the third syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0366] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the first numerical identification information according to the zero run value;
[0367] The value of the fourth syntax element identification information is coded based on the bypass model, and the value of the first numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
[0368] In some embodiments, determining the value of the first syntax element identification information according to the zero run value may include:
[0369] If the zero-run value is equal to 0, the value of the first syntax element identification information is determined to be the first value; if the zero-run value is not equal to 0, the value of the first syntax element identification information is determined to be the second value.
[0370] In some embodiments, determining the value of the second syntax element identification information according to the zero run value may include:
[0371] If the zero-run value is equal to 1, the value of the second syntax element identification information is determined to be the first value; if the zero-run value is not equal to 1, the value of the second syntax element identification information is determined to be the second value.
[0372] In some embodiments, determining the value of the third syntax element identification information according to the zero run value may include:
[0373] If the zero-run value is equal to 2, the value of the third syntax element identification information is determined to be the first value; if the zero-run value is not equal to 2, the value of the third syntax element identification information is determined to be the second value.
[0374] In some embodiments, determining the value of the fourth syntax element identification information according to the zero run value may include:
[0375] If the first value is an odd number, determining that the value of the fourth syntax element identification information is the first value; if the first value is an even number, determining that the value of the fourth syntax element identification information is the second value;
[0376] Alternatively, if the remainder when the first value is divided by 2 is 1, the value of the fourth syntax element identification information is determined to be the first value; if the remainder when the first value is divided by 2 is 0, the value of the fourth syntax element identification information is determined to be the second value.
[0377] 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 and the fourth syntax element identification information, the corresponding first value and the second value may be the same or different, and there is no specific limitation here.
[0378] It should also be noted that in the embodiments 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 a flag / identifier value, which is not specifically limited here.
[0379] 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.
[0380] In this way, the first syntax element identification information is first encoded to indicate whether the zero-run value is equal to 0. If the zero-run value is equal to 0, the encoding of the zero-run value is completed. Otherwise, the second syntax element identification information is encoded to indicate whether the zero-run value is equal to 1. If the zero-run value is equal to 1, the encoding of the zero-run value is completed. Otherwise, the third syntax element identification information is encoded to indicate whether the zero-run value is equal to 2. If the zero-run value is equal to 2, the encoding of the zero-run value is completed. Otherwise, the fourth syntax element identification information is encoded to indicate the parity of the zero-run value minus 3, and the first value identification information is encoded to indicate the quotient of the zero-run value minus 3 divided by 2. The encoding of the zero-run value is completed. In this way, the decoding end can subsequently obtain these syntax element identification information by decoding the bitstream to determine the zero-run value.
[0381] In some embodiments, encoding the value of the first numerical identification information based on the bypass model may include: binarizing the value of the first numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0382] It should be noted that, in an embodiment of the present application, how to determine the value of the first numerical identification information based on the zero-run value may include: performing a subtraction operation between the zero-run value and the first preset value to obtain the first numerical value; and setting the value of the first numerical identification information to be equal to the quotient of the first numerical value divided by 2.
[0383] For example, assuming that the value of the first numerical identification information is 3, 3 is first binarized. Taking the second-order exponential Golomb code as an example, after binarization of 3, a group of binary symbols 011 is obtained; then, this group of binary symbols is encoded in sequence based on the bypass model, and the obtained coded bits are written into the code stream.
[0384] It can be understood that run-length encoding is used for attribute quantization residual values. The specific implementation steps are as follows:
[0385] (1) The attribute quantization residual value is the color component quantization residual value.
[0386] The encoding end uses the same order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.) to encode the quantized residual values (Res0, Res1, Res2) of the three color components of each node in turn. Zero_run_length is used to count whether the quantized residual values of the three color components are all 0, which is called the zero run value. Its initial value is set to 0. For each node, the specific details are as follows:
[0387] If the quantized residual values of the three component colors are all zero, then ++zero_run_length, and then process the next node;
[0388] If any of the three color components has a non-zero quantized residual value, the zero run value is first encoded, and then the zero run value zero_run_length is reset to 0, and then the specific color component quantized residual value (Res0, Res1, Res2) is encoded, and then the next node is processed.
[0389] For the last node, if the quantized residual values of its three color components are all 0, then ++zero_run_length is added and the zero run value is encoded; if the quantized residual value of any of its three color components is not zero, the zero run value is encoded first, then the zero run value zero_run_length is reset to 0, and then the specific color component quantized residual value (Res0, Res1, Res2) is encoded, and finally the zero run value is encoded.
[0390] (2) The attribute quantization residual value is the reflectivity quantization residual value.
[0391] The encoding end uses the same order (the original acquisition order of the point cloud, Morton order, Hilbert order, etc.) to encode the reflectivity quantization residual value of each node in turn. Zero_run_length is used to count whether the reflectivity quantization residual value is 0, which is called the zero run value. Its initial value is set to 0. For each node, the specific details are as follows:
[0392] If the reflectivity quantization residual value is zero, then ++zero_run_length, and then process the next node;
[0393] If the reflectivity quantization residual value is not zero, the zero run value is first encoded, and then the zero run value zero_run_length is reset to 0, and then the specific reflectivity quantization residual value is encoded, and then the next node is processed.
[0394] For the last node, if its reflectivity quantization residual value is 0, then ++zero_run_length is added and the zero run value is encoded; if the reflectivity quantization residual value is not zero, the zero run value is encoded first, then the zero run value zero_run_length is reset to 0, and then the specific reflectivity quantization residual value is encoded, and finally the zero run value is encoded.
[0395] The specific zero run value encoding process is:
[0396] a) Use "zero_run_length_equal_zero" to mark whether the zero run value is equal to 0, encode the "zero_run_length_equal_zero" flag bit, if the zero run value is 0, then the encoding of the zero run value is completed; otherwise, go to step b);
[0397] b) using "zero_run_length_equal_one" to mark whether the zero run value is equal to 1, encoding the "zero_run_length_equal_one" flag bit; if the zero run value is 1, encoding the zero run value is completed; otherwise, proceed to step c);
[0398] c) using "zero_run_length_equal_two" to mark whether the zero run value is equal to 2, encoding the "zero_run_length_equal_two" flag bit; if the zero run value is 2, encoding the zero run value is completed; otherwise, proceed to step d);
[0399] d) Use "zero_run_length_minus3_parity" to mark the parity of the zero run value minus 3, that is, the remainder of the zero run value minus 3 divided by 2, and "zero_run_length_minus3_div2" is the quotient of the zero run value minus 3 divided by 2. Encode the "zero_run_length_minus3_parity" flag and the "zero_run_length_minus3_div2" value to complete the encoding of the zero run value.
[0400] In the related art, when encoding zero-run values, PCRM currently uses a context-based encoding method for all binarized codewords. For example, if the zero-run value to be encoded is 10, the binarization process is as follows:
[0401] The zero_run_length_equal_zero flag is 0;
[0402] The zero_run_length_equal_one flag is 0;
[0403] The zero_run_length_equal_two flag is 0;
[0404] The zero_run_length_minus3_parity flag is 1;
[0405] Zero_run_length_minus3_div2 is 3, and 3 is binarized. Taking the second-order exponential Golomb coding as an example, the result of binarization of 3 is 0 1 1.
[0406] Therefore, for a zero-run value of 10, the binarized codeword result is 0 0 0 1 0 1 1. At the encoding end, all codewords after the zero-run value is binarized are encoded using a context model, which will bring great difficulty to hardware implementation and low hardware throughput efficiency. Based on this, in the embodiment of the present application, the encoding process can be as follows:
[0407] (i) Allocate a budget of remBinsPass1 based on the context model encoding codeword for the zero run value (the initial value can be set to 2 24 );
[0408] (ii) Before the start of zero-run encoding, determine whether remBinsPass1 is greater than or equal to T (for example, set to 4);
[0409] (iii) When remBinsPass1 ≥ T, the possible zero_run_length_equal_zero, zero_run_length_equal_one, zero_run_length_equal_two, and zero_run_length_minus3_parity are coded using a context model, and after each flag bit / marker is coded, a remBinsPass1-- operation is performed, while all the binarized codewords of zero_run_length_minus3_div2 are coded using a bypass model;
[0410] (iv) When remBinsPass1≥T is not satisfied, the bypass model-based encoding method is used for all binarized code words with zero run values.
[0411] 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 1.
[0412] In another possible implementation, at least one first-category syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; and at least one second-category syntax element identification information includes at least: second numerical identification information.
[0413] Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, the fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 0, the sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 1, the seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 2, the eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 3, and the second numerical value identification information is used to indicate the fourth numerical value obtained after the zero run value is subjected to the fourth operation.
[0414] In some embodiments, performing the first operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value.
[0415] In some embodiments, performing a second operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; and setting the second value to be equal to a quotient of the first value divided by 2.
[0416] In some embodiments, after obtaining the first value, the method may further include: right-shifting the first value by one position to obtain a second value.
[0417] In some embodiments, performing a fourth operation on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first value; setting the second value to be equal to the quotient of the first value divided by 2; and performing a subtraction operation on the second value and a second preset value to obtain a fourth value.
[0418] In an 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 3, and the second preset value may be set to 4. In addition, the first syntax element identification information may be represented by zero_run_length_equal_zero, the second syntax element identification information may be represented by zero_run_length_equal_one, the third syntax element identification information may be represented by zero_run_length_equal_two, the fourth syntax element identification information may be represented by zero_run_length_minus3_parity, the fifth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_zero, the sixth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_one, the seventh syntax element identification information may be represented by zero_run_length_minus3_div2_equal_two, the eighth syntax element identification information may be represented by zero_run_length_minus3_div2_equal_three, and the second value identification information may be represented by zero_run_length_minus3_div2_minus4.
[0419] In some embodiments, when the preset parameters meet the first preset condition, encoding the zero-run value may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, and the eighth syntax 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 encoded bits into the bitstream.
[0420] In a specific embodiment, when the preset parameters meet the first preset condition, encoding the zero-run value may include:
[0421] Determining a value of first syntax element identification information according to the zero run value;
[0422] encoding the value of the first syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0423] If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value;
[0424] encoding the value of the second syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0425] If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value;
[0426] encoding the value of the third syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0427] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the fifth syntax element identification information according to the zero run value;
[0428] encoding the value of the fourth syntax element identification information based on the context model, and encoding the value of the fifth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0429] If the value of the fifth syntax element identification information is the second value, determining the value of the sixth syntax element identification information according to the zero run value;
[0430] encoding the value of the sixth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0431] 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 the zero run value;
[0432] encoding the value of the seventh syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0433] 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 the zero run value;
[0434] encoding the value of the eighth syntax element identification information based on the context model, and writing the obtained coded bits into the bitstream;
[0435] If the value of the eighth syntax element identification information is the second value, determining the value of the second numerical value identification information according to the zero run value;
[0436] The value of the second numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
[0437] Furthermore, in some embodiments, the method may further include: performing a subtraction operation on the value of the preset parameter after encoding the following syntax element identification information based on the context model each time:
[0438] 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, and eighth syntax element identification information.
[0439] In other embodiments, when the preset parameters meet the second preset condition, encoding the zero-run value may include: encoding the first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information, the eighth syntax element identification information, and the second numerical value identification information based on a bypass model, and writing the resulting encoded bits into the bitstream. In other words, if the preset parameters meet the second preset condition, encoding is performed using the bypass model for all binary codewords corresponding to the zero-run value.
[0440] In a specific embodiment, when the preset parameters meet the second preset condition, encoding the zero-run value may include:
[0441] Determining a value of first syntax element identification information according to the zero run value;
[0442] encoding the value of the first syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0443] If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value;
[0444] encoding the value of the second syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0445] If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value;
[0446] encoding the value of the third syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0447] If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the fifth syntax element identification information according to the zero run value;
[0448] encoding the value of the fourth syntax element identification information based on the bypass model, and encoding the value of the fifth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0449] If the value of the fifth syntax element identification information is the second value, determining the value of the sixth syntax element identification information according to the zero run value;
[0450] encoding the value of the sixth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0451] 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 the zero run value;
[0452] encoding the value of the seventh syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0453] 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 the zero run value;
[0454] encoding the value of the eighth syntax element identification information based on the bypass model, and writing the obtained coded bits into the bitstream;
[0455] If the value of the eighth syntax element identification information is the second value, determining the value of the second numerical value identification information according to the zero run value;
[0456] The value of the second numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
[0457] In some embodiments, determining the value of the first syntax element identification information according to the zero run value may include:
[0458] If the zero-run value is equal to 0, the value of the first syntax element identification information is determined to be the first value; if the zero-run value is not equal to 0, the value of the first syntax element identification information is determined to be the second value.
[0459] In some embodiments, determining the value of the second syntax element identification information according to the zero run value may include:
[0460] If the zero-run value is equal to 1, the value of the second syntax element identification information is determined to be the first value; if the zero-run value is not equal to 1, the value of the second syntax element identification information is determined to be the second value.
[0461] In some embodiments, determining the value of the third syntax element identification information according to the zero run value may include:
[0462] If the zero-run value is equal to 2, the value of the third syntax element identification information is determined to be the first value; if the zero-run value is not equal to 2, the value of the third syntax element identification information is determined to be the second value.
[0463] In some embodiments, determining the value of the fourth syntax element identification information according to the zero run value may include:
[0464] If the first value is an odd number, determining that the value of the fourth syntax element identification information is the first value; if the first value is an even number, determining that the value of the fourth syntax element identification information is the second value;
[0465] Alternatively, if the remainder when the first value is divided by 2 is 1, the value of the fourth syntax element identification information is determined to be the first value; if the remainder when the first value is divided by 2 is 0, the value of the fourth syntax element identification information is determined to be the second value.
[0466] In some embodiments, determining the value of the fifth syntax element identification information according to the zero run value may include:
[0467] If the second value is equal to 0, it is determined that the value of the fifth syntax element identification information is the first value; if the second value is not equal to 0, it is determined that the value of the fifth syntax element identification information is the second value.
[0468] In some embodiments, determining the value of the sixth syntax element identification information according to the zero run value may include:
[0469] If the second value is equal to 1, it is determined that the value of the sixth syntax element identification information is the first value; if the second value is not equal to 1, it is determined that the value of the sixth syntax element identification information is the second value.
[0470] In some embodiments, determining the value of the seventh syntax element identification information according to the zero run value may include:
[0471] If the second value is equal to 2, it is determined that the value of the seventh syntax element identification information is the first value; if the second value is not equal to 2, it is determined that the value of the seventh syntax element identification information is the second value.
[0472] In some embodiments, determining the value of the eighth syntax element identification information according to the zero run value may include:
[0473] If the second value is equal to 3, it is determined that the value of the eighth syntax element identification information is the first value; if the second value is not equal to 3, it is determined that the value of the eighth syntax element identification information is the second value.
[0474] 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 and the eighth grammatical element identification information, etc., the corresponding first value and the second value may be the same, or may be different, and there is no specific limitation here.
[0475] It should also be noted that in the embodiments 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 a flag / identifier value, which is not specifically limited here.
[0476] For example, for each syntax element identification information, the first value may be set to 1 and the second value may be set to 0; or, the first value may be set to 0 and the second value may be set to 1; or, the first value may be set to true and the second value may be set to false; or, the first value may be set to false and the second value may be set to true. In the embodiment of the present application, the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
[0477] In this way, taking the first preset value of 3 as an example, first encode the first syntax element identification information to indicate whether the zero run value is equal to 0. If the zero run value is equal to 0, encoding the zero run value is completed; otherwise, continue to encode the second syntax element identification information to indicate whether the zero run value is equal to 1. If the zero run value is equal to 1, encoding the zero run value is completed; otherwise, continue to encode the third syntax element identification information to indicate whether the zero run value is equal to 2. If the zero run value is equal to 2, encoding the zero run value is completed; otherwise, continue to encode the fourth syntax element identification information to indicate the parity characteristic of the zero run value minus 3, and encode the fifth syntax element identification information to indicate whether the quotient of the zero run value minus 3 divided by 2 is equal to 0. If the quotient of the zero run value minus 3 divided by 2 is equal to 0, encoding the zero run value is completed; otherwise, continue to encode the sixth syntax element identification information to indicate whether the quotient of the zero run value minus 3 divided by 2 is equal to 1. If the quotient of the zero run value minus 3 divided by 2 is equal to 1, The encoding of the zero-run value is completed; otherwise, the seventh syntax element identification information is encoded to indicate whether the quotient of the zero-run value minus 3 and then divided by 2 is equal to 2. If the quotient of the zero-run value minus 3 and then divided by 2 is equal to 2, the encoding of the zero-run value is completed; otherwise, the eighth syntax element identification information is encoded to indicate whether the quotient of the zero-run value minus 3 and then divided by 2 is equal to 3. If the quotient of the zero-run value minus 3 and then divided by 2 is equal to 3, the encoding of the zero-run value is completed; otherwise, the second value identification information is encoded to indicate the value of the quotient of the zero-run value minus 3 and then divided by 2 minus 4, and the encoding of the zero-run value is completed. In this way, the zero-run value can be determined by subsequently decoding the bitstream to obtain these syntax element identification information.
[0478] In some embodiments, encoding the value of the second numerical identification information based on the bypass model may include: binarizing the value of the second numerical identification information to obtain at least one binary symbol; encoding the at least one binary symbol in sequence based on the bypass model, and writing the obtained encoded bits into the code stream.
[0479] It should be noted that, in the embodiment of the present application, determining the value of the second numerical identification information based on the zero-run value may include: performing a subtraction operation on the zero-run value and a first preset value to obtain a first numerical value; setting the second numerical value equal to the quotient of the first numerical value divided by 2; and performing a subtraction operation on the second numerical value and the second preset value to determine the value of the second numerical identification information. For example, the first preset value may be set to 3, and the second preset value may be set to 4.
[0480] In a specific embodiment, in order to improve hardware throughput, the encoding process may be as follows:
[0481] (i) Allocate a budget of remBinsPass1 based on the context model encoding codeword for the zero run value (the initial value can be set to 2 24 );
[0482] (ii) Before the start of zero-run encoding, determine whether remBinsPass1 is greater than or equal to T (e.g., set to 8);
[0483] (iii) When remBinsPass1 ≥ T, the possible zero_run_length_equal_zero, zero_run_length_equal_one, zero_run_length_equal_two, zero_run_length_minus3_parity, zero_run_length_minus3_div2_equal_zero, zero_run_length_minus3_div2_equal_one, zero_run_length_minus3_div2_equal_two, and zero_run_length_minus3_div2_equal_three are coded using a context model, and after each flag bit / flag is coded, a remBinsPass1-- operation is performed, and all the binarized codewords of zero_run_length_minus3_div2_minus4 are coded using a bypass model;
[0484] (iv) When remBinsPass1≥T is not satisfied, the bypass model-based encoding method is used for all binarized code words with zero run values.
[0485] For the entire encoding process of the embodiment of the present application, in implementation, the syntax table description of the corresponding decoding process is shown in the aforementioned Table 2.
[0486] In short, in the embodiment of the present application, as shown in the test results in Tables 3 to 12 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.
[0487] Furthermore, an embodiment of the present application also provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: an attribute quantization residual value, a first syntax element identification information, a second syntax element identification information, a third syntax element identification information, a fourth syntax element identification information, a fifth syntax element identification information, a sixth syntax element identification information, a seventh syntax element identification information, an eighth syntax element identification information, a first numerical identification information, and a second numerical identification information.
[0488] Here, the attribute quantization residual value can be a color component quantization residual value or a reflectance quantization residual value. After encoding these to-be-encoded information, the encoder writes them into the bitstream. Thus, the decoder can directly obtain these to-be-encoded information by decoding the bitstream, thereby determining the zero-run value.
[0489] This embodiment provides a coding method, and the specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiment. It can be seen that according to the technical solution of the aforementioned embodiment, the preset parameters corresponding to the zero-run value 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 coded based on the context model, and at least one second-category syntax element identification information is coded 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 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 it can also improve the processing speed.
[0490] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 10, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in Figure 10, the encoder 100 may include: a first determining unit 1001 and an encoding unit 1002; wherein,
[0491] The first determining unit 1001 is configured to determine a zero-run value and a preset parameter corresponding to the zero-run 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 zero-run value;
[0492] The encoding unit 1002 is configured to, if the preset parameters meet the first preset condition, perform context model-based encoding processing on the value of at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of at least one second-category syntax element identification information, and write the obtained coded bits into the bitstream.
[0493] In some embodiments, referring to FIG. 10 , the encoder 100 further includes a first judgment unit 1003 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
[0494] In some embodiments, the encoding unit 1002 is further configured to, if the preset parameters meet the second preset condition, perform bypass model-based encoding processing on at least one first-category syntax element identification information and at least one second-category syntax element identification information, and write the obtained encoded bits into the bitstream.
[0495] 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.
[0496] In some embodiments, the encoding unit 1002 is further configured to perform encoding processing on the preset parameters corresponding to the zero-run value, and write the obtained encoded bits into the bitstream.
[0497] In some embodiments, the first determination unit 1001 is further configured to, if the attribute quantization residual value of the current node is equal to 0, perform a plus 1 operation on the zero-run value, and continue to determine the zero-run value based on the attribute quantization residual value of the next node; if the attribute quantization residual value of the current node is not all equal to 0, encode the zero-run value, and encode the attribute quantization residual value of the current node, and write the obtained encoded bits into the bitstream; and reset the zero-run value to 0, and continue to determine the zero-run value based on the attribute quantization residual value of the next node.
[0498] In some embodiments, the first determining unit 1001 is further configured to set an initial value of the zero-run value to be equal to 0.
[0499] In some embodiments, the zero-run value is used to indicate whether the attribute quantization residual values are all 0; wherein the attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value.
[0500] In some embodiments, the first determining unit 1001 is further configured to determine a value of at least one first-category syntax element identification information according to the zero-run value when the zero-run value is less than a preset threshold;
[0501] The encoding unit 1002 is further configured to, if the preset parameters meet a 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 resulting coded bits into the bitstream; or, if the preset parameters meet a second preset condition, perform bypass model-based encoding processing on the value of at least one first-category syntax element identification information, and write the resulting coded bits into the bitstream.
[0502] In some embodiments, at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; at least one second-category syntax element identification information includes at least: first numerical identification information; wherein, the first syntax element identification information is used to indicate whether the zero-run value is equal to 0, the second syntax element identification information is used to indicate whether the zero-run value is equal to 1, the third syntax element identification information is used to indicate whether the zero-run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero-run value is subjected to a first operation, and the first numerical identification information is used to indicate the second numerical value obtained after the zero-run value is subjected to a second operation.
[0503] In some embodiments, the first determining unit 1001 is further configured to perform a subtraction operation on the zero-run value and the first preset value to obtain the first value.
[0504] In some embodiments, the first determining unit 1001 is further configured to perform a subtraction operation on the zero-run value and the first preset value to obtain a first value; and set the second value to be equal to the quotient of the first value divided by 2.
[0505] In some embodiments, the first determining unit 1001 is further configured to right-shift the first value by one bit to obtain the second value.
[0506] In some embodiments, the encoding unit 1002 is further configured to, when a preset parameter meets a first preset condition, determine a value of first syntax element identification information based on the zero-run value; perform encoding processing on the value of the first syntax element identification information based on a context model, and write the resulting coded bits into the bitstream; if the value of the first syntax element identification information is a second value, determine a value of the second syntax element identification information based on the zero-run value; perform encoding processing on the value of the second syntax element identification information based on the context model, and write the resulting coded bits into the bitstream; if the value of the second syntax element identification information is the second value, determine a value of third syntax element identification information based on the zero-run value; perform encoding processing on the value of the third syntax element identification information based on the context model, and write the resulting coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine a value of fourth syntax element identification information and a value of the first value identification information based on the zero-run value; perform encoding processing on the value of the fourth syntax element identification information based on the context model, and perform encoding processing on the value of the first value identification information based on the bypass model, and write the resulting coded bits into the bitstream.
[0507] In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following syntax element identification information is completed based on the context model: the first syntax element identification information, the second syntax element identification information, the third syntax element identification information and the fourth syntax element identification information.
[0508] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the second preset condition, determine a value of the first syntax element identification information based on the zero-run value; perform encoding processing on the value of the first syntax element identification information based on the bypass model, and write the resulting coded bits into the bitstream; if the value of the first syntax element identification information is the second value, determine a value of the second syntax element identification information based on the zero-run value; perform encoding processing on the value of the second syntax element identification information based on the bypass model, and write the resulting coded bits into the bitstream; if the value of the second syntax element identification information is the second value, determine a value of the third syntax element identification information based on the zero-run value; perform encoding processing on the value of the third syntax element identification information based on the bypass model, and write the resulting coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine a value of the fourth syntax element identification information and a value of the first value identification information based on the zero-run value; perform encoding processing on the value of the fourth syntax element identification information based on the bypass model, and perform encoding processing on the value of the first value identification information based on the bypass model, and write the resulting coded bits into the bitstream.
[0509] In some embodiments, the encoding unit 1002 is further configured to binarize the value of the first numerical identification information to obtain at least one binary symbol; and to encode the at least one binary symbol in sequence based on the bypass model, and write the obtained encoded bits into the code stream.
[0510] In some embodiments, at least one first type of syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; at least one second type of syntax element identification information includes at least: second numerical identification information; wherein the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, and the third syntax element identification information is used to indicate whether the zero run value is equal to 2. The fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero-run value is subjected to the first operation. The fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 0. The sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 1. The seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 2. The eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 3. The second numerical value identification information is used to indicate the fourth numerical value obtained after the zero-run value is subjected to the fourth operation.
[0511] In some embodiments, referring to FIG10 , the encoder 100 further includes a first computing unit 1004 configured to perform a subtraction operation on the zero-run value and the first preset value to obtain a first numerical value; and set the second numerical value to be equal to the quotient of the first numerical value divided by 2; and perform a subtraction operation on the second numerical value and the second preset value to obtain a fourth numerical value.
[0512] 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 first syntax element identification information based on the zero-run value; encode the value of the first syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the first syntax element identification information is the second value, determine the value of the second syntax element identification information based on the zero-run value; encode the value of the second syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the second syntax element identification information is the second value, determine the value of the third syntax element identification information based on the zero-run value; encode the value of the third syntax element identification information based on the context model, and write the obtained coded bits into the bitstream; if the value of the third syntax element identification information is the second value, determine the value of the fourth syntax element identification information and the value of the fifth syntax element identification information based on the zero-run value; encode the value of the fourth syntax element identification information based on the context model, and encode the value of the third syntax element identification information based on the context model. The method further comprises encoding the value of the fifth syntax element identifier information, and writing the resulting coded bits to the bitstream. If the value of the fifth syntax element identifier information is the second value, determining the value of the sixth syntax element identifier information based on the zero-run value. The method further comprises encoding the value of the sixth syntax element identifier information based on the context model, and writing the resulting coded bits to the bitstream. If the value of the sixth syntax element identifier information is the second value, determining the value of the seventh syntax element identifier information based on the zero-run value. The method further comprises encoding the value of the seventh syntax element identifier information based on the context model, and writing the resulting coded bits to the bitstream. If the value of the seventh syntax element identifier information is the second value, determining the value of the eighth syntax element identifier information based on the zero-run value. The method further comprises encoding the value of the eighth syntax element identifier information based on the context model, and writing the resulting coded bits to the bitstream. If the value of the eighth syntax element identifier information is the second value, determining the value of the second value identifier information based on the zero-run value. The method further comprises encoding the value of the second value identifier information based on the bypass model, and writing the resulting coded bits to the bitstream.
[0513] In some embodiments, the encoding unit 1002 is further configured to perform a subtraction operation on the value of the preset parameter after each encoding of the following grammatical element identification information is completed based on the context model: the first grammatical element identification information, the second grammatical element identification information, the third grammatical element identification information, the fourth grammatical element identification information, the fifth grammatical element identification information, the sixth grammatical element identification information, the seventh grammatical element identification information and the eighth grammatical element identification information.
[0514] In some embodiments, the encoding unit 1002 is further configured to, when the preset parameter meets the second preset condition, determine a value of the first syntax element identification information based on the zero-run value; perform encoding processing on the value of the first syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the first syntax element identification information is the second value, determine a value of the second syntax element identification information based on the zero-run value; perform encoding processing on the value of the second syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream; if the value of the second syntax element identification information is the second value, determine a value of the third syntax element identification information based on the zero-run value; 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 a value of the fourth syntax element identification information and a value of the fifth syntax element identification information based on the zero-run value; perform encoding processing on the fourth syntax element identification information based on the bypass model, and write the obtained coded bits into the bitstream. encoding the value of the syntax element identification information, and encoding the value of the fifth syntax element identification information based on the bypass model, and writing the resulting coded bits into the bitstream; if the value of the fifth syntax element identification information is the second value, determining the value of the sixth syntax element identification information based on the zero-run value; encoding the value of the sixth syntax element identification information based on the bypass model, and writing the resulting coded bits into the bitstream; if the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information based on the zero-run value; encoding the value of the seventh syntax element identification information based on the bypass model, and writing the resulting coded bits into the bitstream; if the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information based on the zero-run value; encoding the value of the eighth syntax element identification information based on the bypass model, and writing the resulting coded bits into the bitstream; if the value of the eighth syntax element identification information is the second value, determining the value of the second value identification information based on the zero-run value; encoding the value of the second value identification information based on the bypass model, and writing the resulting coded bits into the bitstream.
[0515] In some embodiments, the first calculation unit 1004 is further configured to perform a subtraction operation on the zero-run value and the first preset value to obtain a first numerical value; and set the second numerical value to be equal to the quotient of the first numerical value divided by 2; and perform a subtraction operation on the second numerical value and the second preset value to determine the value of the second numerical identification information.
[0516] In some embodiments, the encoding unit 1002 is further configured to binarize the value of the second numerical identification information to obtain at least one binary symbol; and to encode the at least one binary symbol in sequence based on the bypass model, and write the obtained coded bits into the code stream.
[0517] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the first syntax element identification information is the first value if the zero run value is equal to 0; if the zero run value is not equal to 0, determine that the value of the first syntax element identification information is the second value.
[0518] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the second syntax element identification information is the first value if the zero run value is equal to 1; if the zero run value is not equal to 1, determine that the value of the second syntax element identification information is the second value.
[0519] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the third syntax element identification information is the first value if the zero run value is equal to 2; if the zero run value is not equal to 2, determine that the value of the third syntax element identification information is the second value.
[0520] In some embodiments, the first determination unit 1001 is further configured to, if the first numerical value is an odd number, determine that the value of the fourth grammatical element identification information is the first value; if the first numerical value is an even number, determine that the value of the fourth grammatical element identification information is the second value; or, if the remainder when the first numerical value is divided by 2 is 1, determine that the value of the fourth grammatical element identification information is the first value; if the remainder when the first numerical value is divided by 2 is 0, determine that the value of the fourth grammatical element identification information is the second value.
[0521] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the fifth syntax element identification information is the first value if the second value is equal to 0; and to determine that the value of the fifth syntax element identification information is the second value if the second value is not equal to 0.
[0522] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the sixth grammatical element identification information is the first value if the second numerical value is equal to 1; and to determine that the value of the sixth grammatical element identification information is the second value if the second numerical value is not equal to 1.
[0523] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the seventh grammatical element identification information is the first value if the second numerical value is equal to 2; and to determine that the value of the seventh grammatical element identification information is the second value if the second numerical value is not equal to 2.
[0524] In some embodiments, the first determination unit 1001 is further configured to determine that the value of the eighth grammatical element identification information is the first value if the second numerical value is equal to 3; if the second numerical value is not equal to 3, determine that the value of the eighth grammatical element identification information is the second value.
[0525] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various 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 a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.
[0526] If the integrated unit is implemented as a software functional 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, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0527] 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, and when the computer program is executed by the first processor, it implements the encoding method described in any one of the aforementioned embodiments.
[0528] Based on the composition of the above-mentioned 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 realize the 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 marked as the first bus system 1104 in Figure 11. Among them,
[0529] The first communication interface 1101 is used to receive and send signals when sending and receiving information with other external network elements;
[0530] A first memory 1102 is used to store computer programs that can be run on the first processor 1103;
[0531] The first processor 1103 is configured to, when running the computer program, execute:
[0532] Determine a zero-run value and preset parameters corresponding to the zero-run value;
[0533] Determining, according to the zero-run 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;
[0534] If the preset parameters meet the first preset condition, encoding processing is performed on the value of at least one first-category syntax element identification information based on the context model, and encoding processing is performed on the value of at least one second-category syntax element identification information based on the bypass model, and the obtained encoded bits are written into the bitstream.
[0535] It is 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 random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (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.
[0536] The first processor 1103 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1103. The above-mentioned first processor 1103 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented as a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, 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.
[0537] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present 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.
[0538] 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.
[0539] This embodiment provides an encoder in which, after determining the preset parameters corresponding to the zero-run value, the number of codewords based on the context model used during encoding can be limited, so that some syntax element identification information is encoded using a bypass model, thereby improving hardware throughput and reducing the difficulty of hardware implementation; and also improving processing speed.
[0540] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG12 , which shows a schematic diagram of the structure of a decoder provided by the embodiment of the present application. As shown in FIG12 , the decoder 120 may include: a second determination unit 2201 and a second prediction unit 2202; wherein,
[0541] The second determining unit 1201 is configured to determine a preset parameter corresponding to a zero-run value;
[0542] The decoding unit 1202 is configured to, if the preset parameter meets the first preset condition, perform context model-based decoding processing on at least one first-category syntax element identification information, and perform bypass model-based decoding processing 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;
[0543] The second determining unit 1201 is further configured to determine a zero run 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.
[0544] In some embodiments, referring to FIG. 12 , the decoder 120 further includes a second determining unit 1203 configured to determine whether the value of the preset parameter is greater than or equal to a preset threshold value.
[0545] 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.
[0546] In some embodiments, the second determining unit 1203 is further configured to determine whether the value of the preset parameter is less than a preset threshold.
[0547] In some embodiments, the decoding unit 1202 is further configured to decode the code stream and determine a preset parameter corresponding to the zero-run value.
[0548] In some embodiments, the second determination unit 1201 is further configured to determine that the attribute quantization residual value of the current node is equal to 0 if the zero run value is greater than 0; and perform a subtraction operation on the zero run value to determine the attribute quantization residual value of the next node based on the new zero run value; if the zero run value is equal to 0, decode the code stream to determine the attribute quantization residual value of the current node; and continue to perform the step of decoding the zero run value to determine the attribute quantization residual value of the next node based on the new zero run value.
[0549] In some embodiments, the zero-run value is used to indicate whether the attribute quantization residual values are all 0; wherein the attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value.
[0550] In some embodiments, the decoding unit 1202 is further configured to, when the zero-run value is less than a preset threshold, perform decoding processing based on a context model on at least one first-category syntax element identification information to determine the value of at least one first-category syntax element identification information if the preset parameters meet a first preset condition; and determine the zero-run value based on the value of at least one first-category syntax element identification information; or, if the preset parameters meet a second preset condition, perform decoding processing based on a bypass model 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 zero-run value based on the value of at least one first-category syntax element identification information.
[0551] In some embodiments, at least one first-category syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; at least one second-category syntax element identification information includes at least: first numerical identification information; wherein, the first syntax element identification information is used to indicate whether the zero-run value is equal to 0, the second syntax element identification information is used to indicate whether the zero-run value is equal to 1, the third syntax element identification information is used to indicate whether the zero-run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero-run value is subjected to a first operation, and the first numerical identification information is used to indicate the second numerical value obtained after the zero-run value is subjected to a second operation.
[0552] 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 zero-run value and the first preset value to obtain a first value.
[0553] In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the zero-run value and the first preset value to obtain a first value; and set the second value to be equal to the quotient of the first value divided by 2.
[0554] In some embodiments, the second calculation unit 1204 is further configured to right-shift the first value by one bit to obtain a second value.
[0555] In some embodiments, the decoding unit 1202 is further configured to decode the first syntax element identification information based on the context model to determine a value of the first syntax element identification information; if the value of the first syntax element identification information is a first value, determine that the zero run value is equal to 0; if the value of the first syntax element identification information is a second value, decode the second syntax element identification information based on the context model to determine a value of the second syntax element identification information; if the value of the second syntax element identification information is the first value, determine that the zero run value is equal to 1; if the value of the second syntax element identification information is the second value, decode the third syntax element identification information based on the context model to determine a value of the third syntax element identification information; if the value of the third syntax element identification information is the first value, determine that the zero run value is equal to 2; if the value of the third syntax element identification information is the second value, decode the fourth syntax element identification information based on the context model to determine a value of the fourth syntax element identification information; and decode the first numerical identification information based on the bypass model to determine the value of the first numerical identification information.
[0556] The second determining unit 1201 is further configured to determine a zero run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
[0557] 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 and the fourth syntax element identification information.
[0558] In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the first syntax element identification information based on the bypass 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 zero-run value is equal to 0; if the value of the first syntax element identification information is the second value, decode the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information; if the value of the second syntax element identification information is the first value, determine that the zero-run value is equal to 1; if the value of the second syntax element identification information is the second value, decode the third syntax element identification information based on the bypass model to determine the value of the third syntax element identification information; if the value of the third syntax element identification information is the first value, determine that the zero-run value is equal to 2; if the value of the third syntax element identification information is the second value, decode the fourth syntax element identification information based on the bypass model to determine the value of the fourth syntax element identification information; and decode the first numerical identification information based on the bypass model to determine the value of the first numerical identification information.
[0559] The second determining unit 1201 is further configured to determine a zero run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
[0560] In some embodiments, the decoding unit 1202 is further configured to decode the first numerical identification information based on a bypass model to determine at least one binary symbol corresponding to the first numerical identification information; and to debinarize the at least one binary symbol to obtain the value of the first numerical identification information.
[0561] In some embodiments, the second calculation unit 1204 is further configured to perform a third operation on the value of the first numerical identification information to obtain a third numerical value; and determine the zero run value based on the first preset value, the third numerical value and the value of the fourth syntax element identification information.
[0562] In some embodiments, the second calculation unit 1204 is further configured to multiply the value of the first numerical identification information by 2 to obtain a third numerical value; or to left-shift the value of the first numerical identification information by one position to obtain the third numerical value.
[0563] In some embodiments, the second calculation unit 1204 is further configured to perform an addition operation on the first preset value, the third numerical value, and the value of the fourth syntax element identification information to obtain a zero-run value.
[0564] In some embodiments, at least one first type of syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; at least one second type of syntax element identification information includes at least: second numerical identification information; wherein the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, and the third syntax element identification information is used to indicate whether the zero run value is equal to 2. The fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero-run value is subjected to the first operation. The fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 0. The sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 1. The seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 2. The eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero-run value is subjected to the second operation is equal to 3. The second numerical value identification information is used to indicate the fourth numerical value obtained after the zero-run value is subjected to the fourth operation.
[0565] In some embodiments, the second calculation unit 1204 is further configured to perform a subtraction operation on the zero-run value and the first preset value to obtain a first value; and set the second value to be equal to the quotient of the first value divided by 2; and perform a subtraction operation on the second value and the second preset value to obtain a fourth value.
[0566] In some embodiments, the decoding unit 1202 is further configured to decode the first syntax element identification information based on the context model to determine the value of the first syntax element identification information; if the value of the first syntax element identification information is a first value, determine that the zero run value is equal to 0; if the value of the first syntax element identification information is a second value, decode the second syntax element identification information based on the context model to determine the value of the second syntax element identification information; if the value of the second syntax element identification information is a first value, determine that the zero run value is equal to 1; if the value of the second syntax element identification information is a second value, decode the third syntax element identification information based on the context model to determine the value of the third syntax element identification information; if the value of the third syntax element identification information is a first value, determine that the zero run value is equal to 2; if the value of the third syntax element identification information is a second value, decode the fourth syntax element identification information based on the context model to determine the value of the fourth syntax element identification information; and decode the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; if the value of the fifth syntax element identification information is a first value, determine that the zero run value is equal to the first preset value and the fourth syntax element identification information. The sum of the values of the element identification information; if the value of the fifth grammatical element identification information is the second value, 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 grammatical element identification information is the first value, determining that the zero run value is equal to the sum of the first constant, the first preset value and the value of the fourth grammatical element identification information; if the value of the sixth grammatical element identification information is the second value, decoding the seventh grammatical element identification information 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, then determining that the zero-run value is equal to the sum of the second constant, the first preset value, and the values of the fourth 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, then determining that the zero-run value is equal to the sum of the values of the third constant, the first preset value, and the fourth syntax element identification information; if the value of the eighth 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;
[0567] The second determining unit 1201 is further configured to determine a zero run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
[0568] 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 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, the sixth syntax element identification information, the seventh syntax element identification information and the eighth syntax element identification information.
[0569] In some embodiments, the decoding unit 1202 is further configured to, when the preset parameter meets the second preset condition, decode the first syntax element identification information based on the bypass 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 zero run value is equal to 0; if the value of the first syntax element identification information is the second value, decode the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information; if the value of the second syntax element identification information is the first value, determine that the zero run value is equal to 1; if the value of the second syntax element identification information is the first value, determine that the zero run value is equal to 0; If the value of the third grammatical element identification information is the second value, the third grammatical element identification information is decoded 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, the zero-run value is determined to be 2; if the value of the third grammatical element identification information is the second value, the fourth grammatical element identification information is decoded based on the bypass model to determine the value of the fourth grammatical element identification information; and the fifth grammatical element identification information is decoded based on the bypass model to determine the value of the fifth grammatical element identification information; if the value of the fifth grammatical element identification information is the first value, the zero-run value is determined to be equal to the first predicted value. The sum of the value of the first constant, the first preset value and the value of the fourth grammatical element identification information is determined; if the value of the fifth grammatical element identification information is the second value, 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, the zero run value is determined to be equal to the sum of the first constant, the first preset value and the value of the fourth 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, the zero run value is determined to be equal to the sum of the first constant, the first preset value and the value of the fourth grammatical element identification information. if the value of the seventh syntax element identification information is the second value, then the zero-run value is determined to be equal to the sum of the values of the second constant, the first preset value, and the fourth syntax element identification information; if the value of the seventh syntax element identification information is the second value, then the eighth syntax element identification information is decoded 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, then the zero-run value is determined to be equal to the sum of the values of the third constant, the first preset value, and the fourth syntax element identification information; if the value of the eighth syntax element identification information is the second value, then the second numerical identification information is decoded based on the bypass model to determine the value of the second numerical identification information;
[0570] The second determining unit 1201 is further configured to determine a zero run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
[0571] In some embodiments, the first constant, the second constant, and the third constant are all multiples of 2.
[0572] In some embodiments, the second calculation unit 1204 is further configured to determine the second operation result based on the value of the second numerical identification information and the second preset value; and perform a fourth operation on the second operation result to obtain a third operation result; and determine the zero run value based on the first preset value, the third operation result and the value of the fourth syntax element identification information.
[0573] In some embodiments, the second calculation unit 1204 is further configured to perform a multiplication operation on the second operation result and 2 to obtain a third operation result; or to perform a left shift operation on the second operation result by one bit to obtain a third operation result.
[0574] In some embodiments, the second calculation unit 1204 is further configured to perform an addition operation on the first preset value, the third operation result, and the value of the fourth syntax element identification information to obtain a zero-run value.
[0575] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.
[0576] If the integrated unit is implemented as a software functional module and 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 for use in decoder 120. The computer-readable storage medium stores a computer program that, when executed by a second processor, implements any of the decoding methods described in the aforementioned embodiments.
[0577] Based on the composition of the above-mentioned 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,
[0578] The second communication interface 1301 is used to receive and send signals during the process of sending and receiving information between other external network elements;
[0579] The second memory 1302 is used to store computer programs that can be run on the second processor 1303;
[0580] The second processor 1303 is configured to, when running the computer program, execute:
[0581] Determine the preset parameters corresponding to the zero run value;
[0582] If the preset parameters meet the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information, and performing bypass model-based decoding processing on at least one second-category syntax element identification information, to determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information;
[0583] A zero run 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.
[0584] 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.
[0585] It can be understood that the hardware functions of the second memory 1302 and the first memory 2102 are similar, and the hardware functions of the second processor 1303 and the first processor 2103 are similar; they will not be described in detail here.
[0586] This embodiment provides a decoder in which, after determining the preset parameters corresponding to the zero-run value, the number of codewords based on the context model used during decoding can be limited, so that some syntax element identification information is decoded using a bypass model, thereby improving hardware throughput and reducing the difficulty of hardware implementation; and also improving processing speed.
[0587] In yet another embodiment of the present application, referring to FIG14 , a schematic diagram illustrating the structure of a coding and decoding system provided in an embodiment of the present application is shown. As shown in FIG14 , the coding and decoding system 140 may include an encoder 1401 and a decoder 1402. The encoder 1401 may be any of the encoders described in the aforementioned embodiments, and the decoder 1402 may be any of the decoders described in the aforementioned embodiments.
[0588] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0589] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0590] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0591] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0592] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0593] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability
[0594] In an embodiment of the present application, whether it is the encoding end or the decoding end, the preset parameters corresponding to the zero-run value 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 coded and decoded based on the context model, and at least one second-category syntax element identification information is coded and decoded based on the bypass model; in this way, according to the determined preset parameters, the number of codewords based on the context model used during encoding 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 and reducing the difficulty of hardware implementation; and it can also improve the processing speed.
Claims
1. A decoding method, applied to a decoder, comprising: Determine the preset parameters corresponding to the zero run value; If the preset parameter meets the first preset condition, performing context model-based decoding processing on at least one first-category syntax element identification information, and performing bypass model-based decoding processing on at least one second-category syntax element identification information, and determining a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information; The zero run value is determined according to a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information.
2. The method according to claim 1, wherein The preset parameter meets the first preset condition, including: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
3. The method according to claim 1, wherein The method further comprises: If the preset parameters meet the second preset conditions, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are both decoded based on the bypass model to determine the value of the at least one first-category syntax element identification information and the value of the at least one second-category syntax element identification information.
4. The method according to claim 3, wherein: The preset parameter meets the second preset condition, including: determining that the value of the preset parameter is less than a preset threshold value.
5. The method according to claim 1, wherein The step of determining the preset parameters corresponding to the zero-run value includes: The code stream is decoded to determine the preset parameters corresponding to the zero-run value.
6. The method according to claim 1, wherein The method further comprises: If the zero-run value is greater than 0, determining that the attribute quantization residual value of the current node is equal to 0; and performing a subtraction operation on the zero-run value to determine the attribute quantization residual value of the next node according to the new zero-run value; If the zero-run value is equal to 0, the code stream is decoded to determine the attribute quantization residual value of the current node; and the step of decoding the zero-run value is continued to determine the attribute quantization residual value of the next node according to the new zero-run value.
7. The method according to claim 6, wherein: The zero run value is used to indicate whether the attribute quantization residual values are all 0; The attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value.
8. The method according to claim 1, wherein When the zero-run value is less than a preset threshold, the method further includes: If the preset parameter meets the first preset condition, performing context model-based decoding processing on the at least one first-category syntax element identification information to determine a value of the at least one first-category syntax element identification information; and determining the zero-run value based on the value of the at least one first-category syntax element identification information; or, If the preset parameters meet the second preset condition, the at least one first-category syntax element identification information is decoded based on a bypass model to determine the value of the at least one first-category syntax element identification information; and the zero run value is determined based on the value of the at least one first-category syntax element identification information.
9. The method according to claim 1, wherein: The at least one first type of syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; The at least one second-category syntax element identification information includes at least: first numerical identification information; Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, and the first numerical value identification information is used to indicate the second numerical value obtained after the zero run value is subjected to the second operation.
10. The method according to claim 9, wherein: Performing a first operation on the zero-run value includes: The first value is obtained by performing a subtraction operation on the zero-run value and a first preset value.
11. The method according to claim 9, wherein Performing a second operation on the zero-run value includes: Performing a subtraction operation on the zero-run value and a first preset value to obtain the first value; The second value is set equal to the quotient of the first value divided by 2.
12. The method according to claim 11, wherein The method further comprises: The first value is right-shifted by one position to obtain the second value.
13. The method according to claim 9, wherein: When the preset parameter meets the first preset condition, decoding the zero-run value includes: Decoding the first syntax element identification information based on a context model to determine a value of the first syntax element identification information; If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0; If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the context model to determine the value of the second syntax element identification information; If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1; If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the context model to determine the value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2; 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; and decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information; The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
14. The method according to claim 13, wherein: The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information and the fourth syntax element identification information.
15. The method according to claim 9, wherein When the preset parameter meets the second preset condition, decoding the zero-run value includes: Decoding the first syntax element identification information based on a bypass model to determine a value of the first syntax element identification information; If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0; If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information; If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1; If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the bypass model to determine the value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2; 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; and decoding the first numerical identification information based on the bypass model to determine the value of the first numerical identification information; The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information.
16. The method according to claim 13 or 15, wherein: The decoding process of the first numerical identification information based on the bypass model to determine the value of the first numerical identification information includes: Decoding the first numerical identification information based on a bypass model to determine at least one binary symbol corresponding to the first numerical identification information; Debinarization is performed on the at least one binary symbol to obtain a value of the first numerical identification information.
17. The method according to claim 13 or 15, wherein: The determining the zero-run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the first numerical identification information includes: performing a third operation on the value of the first numerical identification information to obtain a third numerical value; The zero run value is determined according to the first preset value, the third value, and the value of the fourth syntax element identification information.
18. The method according to claim 17, wherein The performing a third operation on the value of the first numerical identification information to obtain a third numerical value includes: multiplying the value of the first numerical identification information by 2 to obtain the third numerical value; or The value of the first numerical identification information is shifted left by one bit to obtain the third numerical value.
19. The method according to claim 17, wherein The determining the zero-run value according to the first preset value, the third value, and the value of the fourth syntax element identification information includes: An addition operation is performed on the first preset value, the third value, and the value of the fourth syntax element identification information to obtain the zero-run value.
20. The method according to claim 1, wherein The at least one first-category syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; The at least one second type of syntax element identification information at least includes: second numerical identification information; Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, the fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 0, the sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 1, the seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 2, the eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 3, and the second numerical value identification information is used to indicate the fourth numerical value obtained after the zero run value is subjected to the fourth operation.
21. The method according to claim 20, wherein Performing a fourth operation on the zero-run value includes: Performing a subtraction operation on the zero-run value and a first preset value to obtain the first value; Setting the second value to be equal to the quotient of the first value divided by 2; The fourth value is obtained by performing a subtraction operation on the second value and a second preset value.
22. The method according to claim 20, wherein When the preset parameter meets the first preset condition, decoding the zero-run value includes: Decoding the first syntax element identification information based on a context model to determine a value of the first syntax element identification information; If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0; If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the context model to determine the value of the second syntax element identification information; If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1; If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the context model to determine the value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2; 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; and decoding the fifth syntax element identification information based on the context model to determine the value of the fifth syntax element identification information; If the value of the fifth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first preset value and the value of the fourth syntax element identification information; If the value of the fifth syntax element identification information is the second value, 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 zero run value is equal to the sum of the first constant, the first preset value, and the value of the fourth syntax element identification information; If the value of the sixth syntax element identification information is the second value, decoding the seventh syntax element identification information based on the context model to determine the value of the seventh syntax element identification information; If the value of the seventh syntax element identification information is the first value, determining that the zero run value is equal to the sum of the second constant, the first preset value, and the value of the fourth 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 zero run value is equal to the sum of the third constant, the first preset value, and the value of the fourth syntax element identification information; If the value of the eighth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information; The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
23. The method according to claim 22, wherein The method further comprises: After each decoding of the following syntax element identification information based on the context model is completed, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information and the eighth syntax element identification information.
24. The method according to claim 20, wherein When the preset parameter meets the second preset condition, decoding the zero-run value includes: Decoding the first syntax element identification information based on a bypass model to determine a value of the first syntax element identification information; If the value of the first syntax element identification information is the first value, determining that the zero run value is equal to 0; If the value of the first syntax element identification information is the second value, decoding the second syntax element identification information based on the bypass model to determine the value of the second syntax element identification information; If the value of the second syntax element identification information is the first value, determining that the zero run value is equal to 1; If the value of the second syntax element identification information is the second value, decoding the third syntax element identification information based on the bypass model to determine the value of the third syntax element identification information; If the value of the third syntax element identification information is the first value, determining that the zero run value is equal to 2; 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; and decoding the fifth syntax element identification information based on the bypass model to determine the value of the fifth syntax element identification information; If the value of the fifth syntax element identification information is the first value, determining that the zero run value is equal to the sum of the first preset value and the value of the fourth syntax element identification information; If the value of the fifth syntax element identification information is the second value, 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 zero run value is equal to the sum of the first constant, the first preset value, and the value of the fourth 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 zero run value is equal to the sum of the second constant, the first preset value, and the value of the fourth 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 zero run value is equal to the sum of the third constant, the first preset value, and the value of the fourth syntax element identification information; If the value of the eighth syntax element identification information is the second value, decoding the second numerical identification information based on the bypass model to determine the value of the second numerical identification information; The zero run value is determined according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information.
25. The method according to claim 22 or 24, wherein The first constant, the second constant, and the third constant are all multiples of 2.
26. The method according to claim 22 or 24, wherein The determining the zero-run value according to the first preset value, the value of the fourth syntax element identification information, and the value of the second numerical identification information includes: Determine a second operation result according to the value of the second numerical identification information and a second preset value; performing a fourth operation on the second operation result to obtain a third operation result; The zero run value is determined according to the first preset value, the third operation result, and the value of the fourth syntax element identification information.
27. The method according to claim 26, wherein The performing a fourth operation on the second operation result to obtain a third operation result includes: performing a multiplication operation on the second operation result and 2 to obtain the third operation result; or, The second operation result is shifted left by one bit to obtain the third operation result.
28. The method according to claim 26, wherein The determining the zero-run value according to the first preset value, the third operation result, and the value of the fourth syntax element identification information includes: An addition operation is performed on the first preset value, the third operation result, and the value of the fourth syntax element identification information to obtain the zero-run value.
29. A coding method, applied to an encoder, comprising: Determining a zero-run value and a preset parameter corresponding to the zero-run value; Determining, according to the zero-run value, a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information; If the preset parameters meet the first preset condition, encoding processing is performed on the value of the at least one first-category syntax element identification information based on the context model, and encoding processing is performed on the value of the at least one second-category syntax element identification information based on the bypass model, and the obtained coded bits are written into the bitstream.
30. The method according to claim 29, wherein The preset parameter meets the first preset condition, including: determining that the value of the preset parameter is greater than or equal to a preset threshold value.
31. The method according to claim 29, wherein The method further comprises: If the preset parameters meet the second preset condition, the at least one first-category syntax element identification information and the at least one second-category syntax element identification information are both coded based on the bypass model, and the obtained coded bits are written into the bitstream.
32. The method according to claim 31, wherein The preset parameter meets the second preset condition, including: determining that the value of the preset parameter is less than a preset threshold value.
33. The method of claim 29, wherein: The method further comprises: The preset parameters corresponding to the zero-run value are coded, and the obtained coded bits are written into a bit stream.
34. The method of claim 29, wherein: Determining the zero run value includes: If the attribute quantization residual value of the current node is equal to 0, then perform an addition operation on the zero-run value, and continue to determine the zero-run value according to the attribute quantization residual value of the next node; If the attribute quantization residual value of the current node is not all equal to 0, the zero-run value is encoded, and the attribute quantization residual value of the current node is encoded, and the obtained encoding bits are written into the bitstream; and the zero-run value is reset to 0, and the zero-run value is continued to be determined according to the attribute quantization residual value of the next node.
35. The method of claim 29, wherein: The method further comprises: The initial value of the zero-run value is set equal to 0.
36. The method of claim 34, wherein: The zero run value is used to indicate whether the attribute quantization residual values are all 0; The attribute quantization residual value includes one of the following: a color component quantization residual value and a reflectance quantization residual value.
37. The method of claim 29, wherein: When the zero-run value is less than a preset threshold, the method further includes: Determining a value of at least one first-category syntax element identification information according to the zero-run value; If the preset parameter meets the first preset condition, performing context model-based encoding processing on the value of the at least one first-category syntax element identification information, and writing the obtained coded bits into the bitstream; or, If the preset parameter meets the second preset condition, the value of the at least one first-category syntax element identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
38. The method of claim 29, wherein: The at least one first type of syntax element identification information includes at least one of the following: first syntax element identification information, second syntax element identification information, third syntax element identification information, and fourth syntax element identification information; The at least one second-category syntax element identification information includes at least: first numerical identification information; Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, and the first numerical value identification information is used to indicate the second numerical value obtained after the zero run value is subjected to the second operation.
39. The method according to claim 38, wherein Performing a first operation on the zero-run value includes: The first value is obtained by performing a subtraction operation on the zero-run value and a first preset value.
40. The method of claim 38, wherein Performing a second operation on the zero-run value includes: Performing a subtraction operation on the zero-run value and a first preset value to obtain the first value; The second value is set equal to the quotient of the first value divided by 2.
41. The method according to claim 40, wherein The method further comprises: The first value is right-shifted by one position to obtain the second value.
42. The method of claim 38, wherein When the preset parameter meets the first preset condition, encoding processing is performed on the zero-run value, including: Determining a value of the first syntax element identification information according to the zero-run value; performing encoding processing on the value of the first syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value; performing encoding processing on the value of the second syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value; performing encoding processing on the value of the third syntax element identification information based on the context model, and writing the obtained encoding bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the first numerical identification information according to the zero run value; The value of the fourth syntax element identification information is encoded based on the context model, and the value of the first numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
43. The method according to claim 42, wherein The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information and the fourth syntax element identification information.
44. The method of claim 38, wherein When the preset parameter meets the second preset condition, encoding the zero-run value includes: Determining a value of the first syntax element identification information according to the zero-run value; performing encoding processing on the value of the first syntax element identification information based on a bypass model, and writing the obtained encoded bits into a bitstream; If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value; performing encoding processing on the value of the second syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value; performing encoding processing on the value of the third syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the first numerical identification information according to the zero run value; The value of the fourth syntax element identification information is encoded based on the bypass model, and the value of the first numerical identification information is encoded based on the bypass model, and the obtained encoded bits are written into the bitstream.
45. The method according to claim 42 or 44, wherein The encoding processing of the value of the first numerical identification information based on the bypass model includes: Binarizing the value of the first numerical identification information to obtain at least one binary symbol; The at least one binary symbol is sequentially coded based on the bypass model, and the obtained coded bits are written into a bit stream.
46. The method of claim 29, wherein The at least one first-category syntax element identification information includes at least one of the following: 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, and eighth syntax element identification information; The at least one second type of syntax element identification information at least includes: second numerical identification information; Among them, the first syntax element identification information is used to indicate whether the zero run value is equal to 0, the second syntax element identification information is used to indicate whether the zero run value is equal to 1, the third syntax element identification information is used to indicate whether the zero run value is equal to 2, the fourth syntax element identification information is used to indicate the parity characteristic of the first numerical value obtained after the zero run value is subjected to the first operation, the fifth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 0, the sixth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 1, the seventh syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 2, the eighth syntax element identification information is used to indicate whether the second numerical value obtained after the zero run value is subjected to the second operation is equal to 3, and the second numerical value identification information is used to indicate the fourth numerical value obtained after the zero run value is subjected to the fourth operation.
47. The method of claim 46, wherein Performing a fourth operation on the zero-run value includes: Performing a subtraction operation on the zero-run value and a first preset value to obtain the first value; Setting the second value to be equal to the quotient of the first value divided by 2; The fourth value is obtained by performing a subtraction operation on the second value and a second preset value.
48. The method of claim 46, wherein When the preset parameter meets the first preset condition, encoding processing is performed on the zero-run value, including: Determining a value of the first syntax element identification information according to the zero-run value; performing encoding processing on the value of the first syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value; performing encoding processing on the value of the second syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value; performing encoding processing on the value of the third syntax element identification information based on the context model, and writing the obtained encoding bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the fifth syntax element identification information according to the zero run value; encoding the value of the fourth syntax element identification information based on the context model, and encoding the value of the fifth syntax element identification information based on the context model, and writing the obtained coded bits into a bitstream; If the value of the fifth syntax element identification information is the second value, determining the value of the sixth syntax element identification information according to the zero run value; encoding the value of the sixth syntax element identification information based on the context model, and writing the obtained coded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information according to the zero run value; performing encoding processing on the value of the seventh syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information according to the zero run value; performing encoding processing on the value of the eighth syntax element identification information based on the context model, and writing the obtained encoded bits into a bitstream; If the value of the eighth syntax element identification information is the second value, determining the value of the second numerical identification information according to the zero run value; The value of the second numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
49. The method according to claim 48, wherein The method further comprises: After each encoding of the following syntax element identification information is completed based on the context model, a subtraction operation is performed on the value of the preset parameter: The first syntax element identification information, the second syntax element identification information, the third syntax element identification information, the fourth syntax element identification information, the fifth syntax element identification information, the sixth syntax element identification information, the seventh syntax element identification information and the eighth syntax element identification information.
50. The method of claim 46, wherein When the preset parameter meets the second preset condition, encoding the zero-run value includes: Determining a value of the first syntax element identification information according to the zero-run value; performing encoding processing on the value of the first syntax element identification information based on a bypass model, and writing the obtained encoded bits into a bitstream; If the value of the first syntax element identification information is the second value, determining the value of the second syntax element identification information according to the zero run value; performing encoding processing on the value of the second syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the second syntax element identification information is the second value, determining the value of the third syntax element identification information according to the zero run value; performing encoding processing on the value of the third syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the third syntax element identification information is the second value, determining the value of the fourth syntax element identification information and the value of the fifth syntax element identification information according to the zero run value; encoding the value of the fourth syntax element identification information based on a bypass model, and encoding the value of the fifth syntax element identification information based on a bypass model, and writing the obtained coded bits into a bitstream; If the value of the fifth syntax element identification information is the second value, determining the value of the sixth syntax element identification information according to the zero run value; performing encoding processing on the value of the sixth syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the sixth syntax element identification information is the second value, determining the value of the seventh syntax element identification information according to the zero run value; performing encoding processing on the value of the seventh syntax element identification information based on the bypass model, and writing the obtained coded bits into a bitstream; If the value of the seventh syntax element identification information is the second value, determining the value of the eighth syntax element identification information according to the zero run value; performing encoding processing on the value of the eighth syntax element identification information based on the bypass model, and writing the obtained encoded bits into a bitstream; If the value of the eighth syntax element identification information is the second value, determining the value of the second numerical identification information according to the zero run value; The value of the second numerical identification information is coded based on the bypass model, and the obtained coded bits are written into the bitstream.
51. The method according to claim 48 or 50, wherein The determining, according to the zero-run value, a value of the second numerical identification information includes: Performing a subtraction operation on the zero-run value and a first preset value to obtain the first value; Setting the second value to be equal to the quotient of the first value divided by 2; The value of the second numerical identification information is determined by performing a subtraction operation on the second numerical value and a second preset value.
52. The method of claim 48 or 50, wherein: The encoding processing of the value of the second numerical identification information based on the bypass model includes: Binarizing the value of the second numerical identification information to obtain at least one binary symbol; The at least one binary symbol is sequentially coded based on the bypass model, and the obtained coded bits are written into a bit stream.
53. The method of any one of claims 42, 44, 48, and 50, wherein: The determining, according to the zero-run value, a value of the first syntax element identification information includes: If the zero-run value is equal to 0, determining that the value of the first syntax element identification information is a first value; If the zero-run value is not equal to 0, it is determined that the value of the first syntax element identification information is the second value.
54. The method of any one of claims 42, 44, 48, and 50, wherein: The determining, according to the zero-run value, a value of the second syntax element identification information includes: If the zero-run value is equal to 1, determining that the value of the second syntax element identification information is the first value; If the zero-run value is not equal to 1, it is determined that the value of the second syntax element identification information is a second value.
55. The method of any one of claims 42, 44, 48, and 50, wherein: The determining, according to the zero-run value, a value of the third syntax element identification information includes: If the zero-run value is equal to 2, determining that the value of the third syntax element identification information is the first value; If the zero-run value is not equal to 2, it is determined that the value of the third syntax element identification information is the second value.
56. The method of any one of claims 42, 44, 48, and 50, wherein: The determining, according to the zero-run value, a value of the fourth syntax element identification information includes: If the first value is an odd number, determining that the value of the fourth syntax element identification information is the first value; If the first value is an even number, determining that the value of the fourth syntax element identification information is the second value; or, If the remainder when the first value is divided by 2 is 1, determining that the value of the fourth syntax element identification information is the first value; If the remainder when the first value is divided by 2 is 0, it is determined that the value of the fourth syntax element identification information is the second value.
57. The method according to claim 48 or 50, wherein The determining, according to the zero-run value, a value of the fifth syntax element identification information includes: If the second value is equal to 0, determining that the value of the fifth syntax element identification information is the first value; If the second value is not equal to 0, it is determined that the value of the fifth syntax element identification information is the second value.
58. The method of claim 48 or 50, wherein The determining, according to the zero-run value, a value of the sixth syntax element identification information includes: If the second value is equal to 1, determining that the value of the sixth syntax element identification information is the first value; If the second value is not equal to 1, it is determined that the value of the sixth syntax element identification information is the second value.
59. The method according to claim 48 or 50, wherein The determining, according to the zero-run value, a value of the seventh syntax element identification information includes: If the second value is equal to 2, determining that the value of the seventh syntax element identification information is the first value; If the second value is not equal to 2, it is determined that the value of the seventh syntax element identification information is the second value.
60. The method of claim 48 or 50, wherein The determining, according to the zero-run value, a value of the eighth syntax element identification information includes: If the second value is equal to 3, determining that the value of the eighth syntax element identification information is the first value; If the second value is not equal to 3, it is determined that the value of the eighth syntax element identification information is the second value.
61. A code stream, wherein The code stream is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following: attribute quantization residual value, 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, first numerical identification information, and second numerical identification information.
62. An encoder, comprising a first determining unit and an encoding unit; wherein: The first determining unit is configured to determine a zero-run value and a preset parameter corresponding to the zero-run value; and determine a value of at least one first-category syntax element identification information and a value of at least one second-category syntax element identification information based on the zero-run value; The encoding unit is configured to, if the preset parameter meets the first preset condition, perform context model-based encoding processing on the value of the at least one first-category syntax element identification information, and perform bypass model-based encoding processing on the value of the at least one second-category syntax element identification information, and write the obtained coded bits into the bitstream.
63. An encoder comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 29 to 60 when running the computer program.
64. 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 zero-run value; The decoding unit is configured to, if the preset parameter meets the first preset condition, perform decoding processing on at least one first-category syntax element identification information based on a context model, and perform decoding processing on at least one second-category syntax element identification information based on a bypass model, and determine a value of the at least one first-category syntax element identification information and a value of the at least one second-category syntax element identification information; The second determining unit is further configured to determine the zero run 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.
65. A decoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 28 when running the computer program.
66. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 28 or the method according to any one of claims 29 to 60 is implemented.