Encoding and decoding method, code stream, encoder, decoder and storage medium
Patent Information
- Application Number
- CN202380095787.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2026-01-16
AI Technical Summary
The existing geometric coding and decoding technology based on prediction trees has poor performance when encoding the number of inter-frame prediction modes, resulting in reduced coding and decoding efficiency.
The value of the mode identification information is determined by determining the inter-frame prediction mode value, and the value is encoded, taking into account the frequency distribution of the inter-frame prediction mode, reducing the number of encoding bits and saving the code rate.
The encoding and decoding efficiency is improved and the compression performance of point cloud data is improved.
Smart Images

Figure CN121359451A_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field
[0001] The embodiments of the present application relate 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 geometry-based point cloud compression (G-PCC) codec framework, the geometric information and attribute information of the point cloud are encoded separately. G-PCC's geometry coding can be divided into octree-based geometry coding and prediction tree-based geometry coding. For prediction tree-based geometry coding, it is first necessary to establish a prediction tree; then, each node in the prediction tree is traversed, and after determining the prediction mode of each node, the geometric position information of the node is predicted according to the prediction mode to obtain the prediction residual. Finally, the parameters such as the prediction mode and prediction residual of each node are encoded to generate a binary code stream.
[0003] In related technologies, the encoding of inter-frame prediction mode numbers is usually performed by converting the inter-frame prediction mode numbers into binary and then encoding them directly. However, due to incomplete considerations, the performance of encoding the inter-frame prediction mode numbers is not optimal, which reduces the encoding and decoding efficiency.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium, which can reduce the number of coding bits, thereby saving bit rate and improving coding and decoding efficiency.
[0006] The technical solution of the embodiment of the present 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] Decoding a bitstream and determining a value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0009] Determining an inter-frame prediction mode value of a current node according to a value of at least one mode identification information;
[0010] Determine the prediction value of the current node according to the inter-frame prediction mode value.
[0011] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:
[0012] Determine the inter-frame prediction mode value of the current node;
[0013] Determining a value of at least one mode identification information according to the inter-frame prediction mode value; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0014] The value of at least one mode identification information is encoded, and the obtained encoded bits are written into the code stream.
[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] The prediction residual value of the current node, the quantization parameter, the value of at least one mode identification information, the inter-frame prediction mode residual value, the value of the first identification information, and the value of the second identification information;
[0017] Among them, the first identification information is used to indicate whether the current node uses the inter-frame prediction mode, and the second identification information is used to indicate whether the current node enables the target inter-frame encoding / decoding method; the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode.
[0018] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determining unit and an encoding unit; wherein,
[0019] A first determining unit configured to determine an inter-frame prediction mode value of a current node;
[0020] The first determining unit is further configured to determine a value of at least one mode identification information according to the inter-frame prediction mode value; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0021] The encoding unit is configured to encode the value of at least one mode identification information and write the obtained encoding bits into the code stream.
[0022] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor; wherein,
[0023] a first memory for storing a computer program capable of running on the first processor;
[0024] The first processor is configured to execute the method according to the second aspect when running a computer program.
[0025] In a sixth aspect, an embodiment of the present application provides a decoder, comprising a decoding unit and a second determining unit; wherein,
[0026] a decoding unit configured to decode a bitstream and determine a value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0027] The second determining unit is configured to determine the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; and determine the prediction value of the current node according to the inter-frame prediction mode value.
[0028] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein,
[0029] a second memory for storing a computer program capable of running on the second processor;
[0030] The second processor is configured to execute the method according to the first aspect when running a computer program.
[0031] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in the first aspect or the method described in the second aspect.
[0032] The embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. At the encoding end, the inter-frame prediction mode value of the current node is determined; based on the inter-frame prediction mode value, the value of at least one mode identification information is determined; wherein the mode identification information at least includes the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; the value of at least one mode identification information is encoded, and the obtained coding bits are written into the code stream. At the decoding end, the code stream is decoded, and the value of at least one mode identification information is determined; wherein the mode identification information at least includes the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; based on the value of at least one mode identification information, the inter-frame prediction mode value of the current node is determined; based on the inter-frame prediction mode value, the prediction value of the current node is determined. In this way, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct encoding, but the value of at least one mode identification information is determined according to the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein, the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of encoding bits, saving bit rate, and thus improving encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] FIG1A is a schematic diagram of a three-dimensional point cloud image;
[0034] FIG1B is a partially enlarged view of a three-dimensional point cloud image;
[0035] FIG2A is a schematic diagram of six viewing angles of a point cloud image;
[0036] FIG2B is a schematic diagram of a data storage format corresponding to a point cloud image;
[0037] FIG3 is a schematic diagram of a network architecture for point cloud encoding and decoding;
[0038] FIG4A is a schematic diagram of a composition framework of a G-PCC encoder;
[0039] FIG4B is a schematic diagram of a composition framework of a G-PCC decoder;
[0040] FIG5A is a schematic diagram of a low plane position in the Z-axis direction;
[0041] FIG5B is a schematic diagram of a high plane position in the Z-axis direction;
[0042] FIG6 is a schematic diagram of a node coding sequence;
[0043] FIG7A is a schematic diagram of plane identification information;
[0044] FIG7B is a schematic diagram of another type of planar identification information;
[0045] FIG8 is a schematic diagram of sibling nodes of a current node;
[0046] Figure 9 is a schematic diagram of the intersection of a laser radar and a node;
[0047] FIG10 is a schematic diagram of neighborhood nodes at the same partition depth and the same coordinates;
[0048] FIG11 is a schematic diagram of a current node being located at a low plane position of a parent node;
[0049] FIG12 is a schematic diagram showing a current node being located at a high plane position of a parent node;
[0050] FIG13 is a schematic diagram of predictive coding of planar position information of a laser radar point cloud;
[0051] FIG14 is a schematic diagram of IDCM encoding;
[0052] FIG15 is a schematic diagram of coordinate transformation of a rotating laser radar to obtain a point cloud;
[0053] FIG16 is a schematic diagram of predictive coding in the X-axis or Y-axis direction;
[0054] FIG17A is a schematic diagram showing an angle of the Y plane predicted by the horizontal azimuth angle;
[0055] FIG17B is a schematic diagram showing an angle of the X-plane predicted by the horizontal azimuth angle;
[0056] FIG18 is another schematic diagram of predictive coding in the X-axis or Y-axis direction;
[0057] FIG19A is a schematic diagram of three intersection points included in a sub-block;
[0058] FIG19B is a schematic diagram of a triangular facet set fitted using three intersection points;
[0059] FIG19C is a schematic diagram of upsampling of a triangle face set;
[0060] FIG20 is a schematic diagram of the structure of a geometric information inter-frame encoding and decoding;
[0061] FIG21 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;
[0062] FIG22 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0063] FIG23 is a schematic diagram of a flow chart of another encoding method provided in an embodiment of the present application;
[0064] FIG24 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0065] FIG25 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;
[0066] FIG26 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0067] FIG27 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;
[0068] FIG28 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] 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 corresponding attribute information often includes reflectance values, which reflect the surface texture of the object. Therefore, point cloud data typically includes both point location information and point attribute information. Point location information can also be referred to as point geometric information. For example, point geometric information can be the point's three-dimensional coordinates (x, y, z). Point attribute information can include color information and / or reflectance. For example, reflectance can be one-dimensional reflectance information (r). Color information can be information in any color space, or it can be three-dimensional color information, such as RGB. Here, 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.
[0076] 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.
[0077] 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).
[0078] Point clouds can be divided into the following categories according to the acquisition method:
[0079] Static point cloud: the object is stationary and the device that acquires the point cloud is also stationary;
[0080] Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;
[0081] Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.
[0082] For example, point clouds can be divided into two categories according to their usage:
[0083] 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;
[0084] 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.
[0085] 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.
[0086] 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.
[0087] For example, taking a point cloud video with a frame rate of 30 frames per second (fps), each frame contains 700,000 points, and each point has coordinate information (xyz, float) and color information (RGB, uchar). Therefore, the data volume of a 10-second point cloud video is approximately 0.7 million × (4 bytes × 3 + 1 byte × 3) × 30 fps × 10 seconds = 3.15 GB, where 1 byte is 10 bits. For a 1280 × 720 2D video with a YUV sampling format of 4:2:0 and a frame rate of 24 fps, the data volume for 10 seconds is approximately 1280 × 720 × 12 bits × 24 fps × 10 seconds ≈ 0.33 GB. The data volume of a 10-second two-view 3D video is approximately 0.33 × 2 = 0.66 GB. This shows that the data volume of a point cloud video far exceeds that of 2D and 3D videos of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.
[0088] 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.
[0089] 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 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, which can be based on the Point Cloud Compression Test Platform (Test Model Compression 13, TMC13). The V-PCC codec framework can be used to compress the second type of dynamic point clouds, which can be based on the Point Cloud Compression Test Platform (Test Model Compression 2, TMC2). Therefore, 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.
[0090] An 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 an embodiment of the present application. As shown in FIG3 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During the implementation process, the electronic device can be various types of devices with point cloud encoding and decoding functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which is not limited by the embodiment of the present application. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
[0091] Among them, the electronic device in the embodiment of the present application has a point cloud encoding and decoding function, generally including a point cloud encoder (ie, encoder) and a point cloud decoder (ie, decoder).
[0092] The following describes the related technologies using the G-PCC codec framework and the AVS codec framework as examples.
[0093] As you can understand, in the point cloud G-PCC codec framework, the point cloud data to be encoded is first divided into multiple slices through slice partitioning. In each slice, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately.
[0094] Figure 4A shows a schematic diagram of the G-PCC encoder architecture. As shown in Figure 4A, during the geometry encoding process, the geometric information is transformed so that the entire point cloud is contained within a bounding box. Quantization is then performed. This quantization step primarily serves a scaling purpose. Due to quantization rounding, the geometric information of some point clouds becomes identical. Parameters are then used to determine whether to remove duplicate points. This process of quantization and removing duplicate points is also known as voxelization. The bounding box is then partitioned into an octree or a prediction tree is constructed. During this process, arithmetic coding is performed on the points in the leaf nodes of the partition to generate a binary geometry bitstream. Alternatively, arithmetic coding is performed on the intersection points (vertices) generated by the partition (surface fitting is performed based on the intersection points) to generate a binary geometry bitstream. During the attribute encoding process, after the geometry encoding is completed and the geometric information is reconstructed, color conversion is performed to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. The reconstructed geometry information is then used to recolor the point cloud so that the unencoded attribute information corresponds to the reconstructed geometry information. Attribute encoding is mainly performed on color information. In the color information encoding process, there are two main transformation methods. One is the distance-based lifting transformation that relies on the level of detail (LOD) division, and the other is the direct region adaptive hierarchical transformation (RAHT). Both methods convert color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through transformation, and finally quantize the coefficients. Then, the quantized coefficients are arithmetically encoded to generate a binary attribute bit stream.
[0095] Figure 4B shows a schematic diagram of the composition framework of a G-PCC decoder. As shown in Figure 4B, for the acquired binary bit stream, the geometric bit stream and attribute bit stream in the binary bit stream are first decoded independently. When decoding the geometric bit stream, the geometric information of the point cloud is obtained through arithmetic decoding-reconstruction of the octree / reconstruction of the prediction tree-reconstruction of the geometry-coordinate inverse conversion; when decoding the attribute bit stream, the attribute information of the point cloud is obtained through arithmetic decoding-inverse quantization-LOD partitioning / RAHT-color inverse conversion, and the point cloud data to be encoded (i.e., the output point cloud) is restored based on the geometric information and attribute information.
[0096] It should be noted that, as shown in FIG4A or FIG4B , the current geometric coding and decoding of G-PCC can be divided into octree-based geometric coding and decoding (marked by a dotted box) and prediction tree-based geometric coding and decoding (marked by a dotted box).
[0097] For Octree geometry encoding (OctGeomEnc), the octree-based geometry encoding includes: first, coordinate conversion of the geometric information so that all point clouds are contained in a Bounding Box. Then quantization is performed. This step of quantization mainly plays a role of scaling. Due to the quantization rounding, the geometric information of some points is the same. The parameters are used to decide whether to remove duplicate points. The process of quantization and removal of duplicate points is also called voxelization. Next, the Bounding Box is continuously divided into trees (such as octrees, quadtrees, binary trees, etc.) in the order of breadth-first traversal, and the placeholder code of each node is encoded. In related technologies, a company proposed an implicit geometric division method. First, the bounding box of the point cloud is calculated. Assume d x >d y >d z , the bounding box corresponds to a cuboid. When geometrically partitioning, the binary tree partitioning will be performed based on the x-axis to obtain two child nodes; until d is satisfied x =d y >d z When the conditions are met, the quadtree partitioning will be performed based on the x and y axes to obtain four child nodes; when d is finally satisfied x =d y =d z When the conditions are met, the octree partitioning will continue until the leaf node obtained by the partitioning is a 1×1×1 unit cube. The partitioning will stop and the points in the leaf node will be encoded to generate a binary code stream. In the process of binary tree / quadtree / octree partitioning, two parameters are introduced: K and M. Parameter K indicates the maximum number of binary tree / quadtree partitions before octree partitioning; parameter M is used to indicate that the minimum block side length corresponding to binary tree / quadtree partitioning is 2 M . At the same time, K and M must meet the following conditions: Assume d max =max(d x ,d y ,d z ), d min =min(d x ,d y ,d z ), parameter K satisfies: K ≥ d max -d min ; Parameter M satisfies: M≥d minThe reason why the parameters K and M meet the above conditions is that in the current G-PCC geometric implicit partitioning process, the priority of the partitioning method is binary tree, quadtree and octree. When the node block size does not meet the conditions of binary tree / quadtree, the node will be divided into octree until the minimum unit of leaf node is 1×1×1. The octree-based geometric information coding mode can effectively encode the geometric information of the point cloud by utilizing the correlation between adjacent points in space. However, for some relatively flat nodes or nodes with planar characteristics, the coding efficiency of the point cloud geometric information can be further improved by using plane coding.
[0098] Exemplarily, Figure 5A and Figure 5B provide a kind of plane position schematic diagram.Wherein, Figure 5A shows a kind of low plane position schematic diagram in the Z-axis direction, and Figure 5B shows a kind of high plane position schematic diagram in the Z-axis direction.As shown in Figure 5A, here (a), (a0), (a1), (a2), (a3) all belong to the low plane position in the Z-axis direction. Taking (a) as an example, it can be seen that the four child nodes occupied in the current node are all located at the low plane position of the current node in the Z-axis direction, so it can be considered that the current node belongs to a Z plane and is a low plane in the Z-axis direction. Similarly, as shown in Figure 5B, here (b), (b0), (b1), (b2), (b3) all belong to the high plane position in the Z-axis direction. Taking (b) as an example, it can be seen that the four child nodes occupied in the current node are located at the high plane position of the current node in the Z-axis direction, so it can be considered that the current node belongs to a Z plane and is a high plane in the Z-axis direction.
[0099] Taking (a) in Figure 5A as an example, the efficiency of octree encoding and plane encoding is compared. Figure 6 provides a schematic diagram of the node encoding sequence, that is, node encoding is performed in the order of 0, 1, 2, 3, 4, 5, 6, and 7 as shown in Figure 6. Here, if octree encoding is used for (a) in Figure 5A, the placeholder information of the current node is represented as: 11001100. However, if plane encoding is used, first, an identifier must be encoded to indicate that the current node is a plane in the Z-axis direction. Secondly, if the current node is a plane in the Z-axis direction, the plane position of the current node must also be represented. Finally, only the placeholder information of the lower plane node in the Z-axis direction needs to be encoded (i.e., the placeholder information of the four child nodes 0, 2, 4, and 6). Therefore, encoding the current node based on plane encoding only requires 6 bits, which can reduce the representation by 2 bits compared to the related art octree encoding. Based on this analysis, plane encoding has significantly higher coding efficiency than octree encoding. Therefore, for an occupied node, if a plane encoding method is used in a certain dimension, it is first necessary to represent the plane identification (planarMode) and plane position (PlanePos) information of the current node in that dimension, and then encode the occupancy information of the current node based on the plane information of the current node. For example, FIG7A shows a schematic diagram of plane identification information. As shown in FIG7A, there is a low plane in the Z-axis direction; correspondingly, the value of the plane identification information is true (true) or 1, that is, planarMode_ Z = true; the plane position information is the low plane (low), that is, PlanePosition_ Z =low. FIG7B shows another schematic diagram of plane identification information. As shown in FIG7B, here it is not a plane in the Z-axis direction; correspondingly, the value of the plane identification information is false or 0, that is, planarMode_ Z =false.
[0100] It should be noted that for PlaneMode_ i :0 means the current node is not a plane in the i-axis direction, 1 means the current node is a plane in the i-axis direction. If the current node is a plane in the i-axis direction, then for PlanePosition_ i : 0 means the current node is a plane in the i-axis direction and the plane position is low, 1 means the current node is a high plane in the i-axis direction. Here, i represents the coordinate dimension, which can be the X-axis direction, Y-axis direction, or Z-axis direction, so i = 0, 1, 2.
[0101] In the G-PCC standard, when determining whether a node meets the conditions for planar coding and when the node meets the conditions for planar coding, it is necessary to perform predictive coding on the planar identifier and planar position information of the node.
[0102] In the embodiments of the present application, there are three judgment conditions in the current G-PCC standard for determining whether a node meets the conditions for planar coding. The following will explain each of them in detail.
[0103] 1. Judge according to the planar probability of the node in each dimension.
[0104] (1) Determine the local area density (local_node_density) of the current node;
[0105] (2) Determine the probability Prob(i) of the current node in each dimension.
[0106] When the local area density of the node is less than the threshold Th (for example, Th = 3), compare the planar probability Prob(i) of the current node in the three coordinate dimensions with the thresholds Th0, Th1, and Th2, where Th0 < Th1 < Th2 (for example, Th0 = 0.6, Th1 = 0.77, Th2 = 0.88). Here, Eligible i (i = 0, 1, 2) represents whether planar coding is enabled in each dimension: Eligible i = Prob(i) >= threshold.
[0107] It should be noted that the threshold is adaptively changed. For example, when Prob(0) > Prob(1) > Prob(2), the settings of Eligible i are as follows: Eligible0 = Prob(0) >= Th0; Eligible1 = Prob(1) >= Th1; Eligible2 = Prob(2) >= Th2 (1)
[0108] When Prob(1) > Prob(0) > Prob(2), the settings of Eligible i are as follows: Eligible0 = Prob(0) >= Th1; Eligible1 = Prob(1) >= Th0; Eligible2 = Prob(2) >= Th2 (2)
[0109] Here, the update of Prob(i) is as follows: new =(L×Prob(i)+δ(coded node)) / L+1 (3)
[0110] Where L = 255; in addition, if the coded node is a plane, δ(coded node) is 1; otherwise, δ(coded node) is 0.
[0111] Here, the update of local_node_density is as follows: local_node_density new =local_node_density+4*numSiblings (4)
[0112] Where local_node_density is initialized to 4, and numSiblings is the number of sibling nodes of the node. For example, FIG8 shows a schematic diagram of the sibling nodes of the current node. As shown in FIG8 , the current node is a node filled with slashes, and the nodes filled with grids are sibling nodes. Then, the number of sibling nodes of the current node is 5 (including the current node itself).
[0113] Second, determine whether the current layer nodes meet the plane coding requirements based on the point cloud density of the current layer.
[0114] The density of the current layer points is used to determine whether to perform planar coding on the nodes of the current layer. Assuming that the number of points in the current point cloud to be coded is pointCount, the number of points reconstructed by the inferred direct coding model (IDCM) coding is numPointCountRecon, and because the octree is coded based on the order of breadth-first traversal, the number of nodes to be coded in the current layer can be obtained as nodeCount. Then, the assumption to determine whether to start planar coding in the current layer is planarEligibleKOctreeDepth, specifically: planarEligibleK OctreeDepth = (pointCount-numPointCountRecon) <nodeCount×1.3。
[0115] Among them, if (pointCount-numPointCountRecon) is less than nodeCount×1.3, then planarEligibleK OctreeDepth is true; if (pointCount-numPointCountRecon) is not less than nodeCount×1.3, then planarEligibleKOctreeDepth is false. In this way, when planarEligibleKOctreeDepth is true, all nodes in the current layer are planar coded; otherwise, all nodes in the current layer are not planar coded and only octree coding is used.
[0116] 3. Determine whether the current node meets the plane coding requirements based on the acquisition parameters of the lidar point cloud.
[0117] Figure 9 shows a schematic diagram of the intersection of a laser radar and a node. As shown in Figure 9, a node filled with a grid is simultaneously traversed by two laser beams, so the current node is not a plane in the direction perpendicular to the Z axis. A node filled with a diagonal line is small enough to be traversed by two laser beams simultaneously, so it is possible that the node filled with a diagonal line is a plane in the direction perpendicular to the Z axis.
[0118] Furthermore, for nodes that meet the plane coding conditions, predictive coding may be performed on the plane identification information and the plane position information.
[0119] First, predictive coding of plane identification information.
[0120] Here, only three context information are used for encoding, that is, the plane identification in each coordinate dimension is designed separately for context.
[0121] Secondly, predictive coding of plane position information.
[0122] It should be understood that for the encoding of non-lidar point cloud planar position information, the predictive encoding of the planar position information may include:
[0123] (a) Using the occupancy information of neighboring nodes, the plane position information of the current node is predicted to be three elements: predicted as low plane, predicted as high plane, and unpredictable;
[0124] (b) Spatial distance between nodes at the same partition depth and coordinates as the current node and the current node: “near” and “far”;
[0125] (c) If the node at the same partition depth and the same coordinates as the current node is a plane, determine the plane position of the node;
[0126] (d) Coordinate dimension (i=0, 1, 2).
[0127] It should be noted that in an embodiment of the present application, after determining the spatial distance between the node at the same division depth and the same coordinates as the current node and the current node, if the spatial distance is less than the preset distance threshold, then the spatial distance can be determined to be "near"; or, if the spatial distance is greater than the preset distance threshold, then the spatial distance can be determined to be "far".
[0128] For example, Figure 10 shows a schematic diagram of neighboring nodes at the same partition depth and coordinates. As shown in Figure 10, the bold large cube represents the parent node, the small grid-filled cube inside it represents the current node, and the vertex position of the current node is shown. The small white-filled cube represents neighboring nodes at the same partition depth and coordinates. The distance between the current node and the neighboring node is the spatial distance, which can be judged as "near" or "far." In addition, if the neighboring node is a plane, the planar position of the neighboring node is also required.
[0129] In this way, as shown in Figure 10, the current node is a small cube filled with a grid, and the neighboring node is a small cube filled with white at the same octree partition depth level and the same vertical coordinate, and the distance between the two nodes is judged as "near" and "far", and the plane position of the reference node is used.
[0130] Furthermore, in an embodiment of the present application, FIG11 shows a schematic diagram of a current node being located at a low plane position of a parent node. As shown in FIG11 , (a), (b), and (c) show three examples of the current node being located at a low plane position of a parent node. Specific descriptions are as follows:
[0131] ① If any of the child nodes 4 to 7 of the point fill node is occupied, and all the grid fill nodes are not occupied, it is very likely that there is a plane in the current node (filled with a slash), and the plane is located lower.
[0132] ② If the child nodes 4 to 7 of the point fill node are not occupied, and any grid fill node is occupied, it is very likely that there is a plane in the current node (filled with diagonal lines), and the plane is located higher.
[0133] ③ If the child nodes 4 to 7 of the point fill node are all empty nodes and the grid fill nodes are all empty nodes, the plane position cannot be inferred and is therefore marked as unknown.
[0134] ④ If any of the child nodes 4 to 7 of the point fill node is occupied and any of the grid fill nodes is occupied, the plane position cannot be inferred at this time, so it is marked as unknown.
[0135] In an embodiment of the present application, FIG12 shows a schematic diagram of a current node being located at a high plane position of a parent node. As shown in FIG12, (a), (b), and (c) show three examples of the current node being located at a high plane position of a parent node. The specific description is as follows:
[0136] ① If any of the child nodes 4 to 7 of the grid fill node is occupied, and the point fill node is not occupied, it is very likely that there is a plane in the current node (filled with diagonal lines), and the plane position is low.
[0137] ② If the child nodes 4 to 7 of the grid fill node are not occupied, and the point fill node is occupied, it is very likely that there is a plane in the current node (filled with a slash), and the plane position is higher.
[0138] ③If the child nodes 4 to 7 of the grid fill node are all unoccupied, and the point fill node is unoccupied, the plane position cannot be inferred at this time, so it is marked as unknown.
[0139] ④ If one of the child nodes 4 to 7 of the grid fill node is occupied and the point fill node is occupied, the plane position cannot be inferred at this time and is therefore marked as unknown.
[0140] It should also be understood that, with respect to the coding of the laser radar point cloud plane position information, FIG13 shows a schematic diagram of the predictive coding of the laser radar point cloud plane position information. As shown in FIG13, when the laser radar emission angle is θ bottom When , it can be mapped to the bottom virtual plane; when the laser radar emission angle is θ top At this time, it can be mapped to the high plane (Top virtual plane).
[0141] That is, by using the laser radar acquisition parameters to predict the plane position of the current node, and by using the position where the current node intersects with the laser ray to quantize the position into multiple intervals, the final result is the context information of the plane position of the current node. The specific calculation process is as follows: Assume that the coordinates of the laser radar are (x Lidar ,y Lidar ,z Lidar ), the geometric coordinates of the current node are (x, y, z), then first calculate the vertical tangent value tanθ of the current node relative to the lidar, the calculation formula is as follows:
[0142] Furthermore, because each laser has a certain offset angle relative to the laser radar, it is also necessary to calculate the relative tangent value tanθ of the current node relative to the laser corr,L , the specific calculation is as follows:
[0143] Finally, the relative tangent value tanθ of the current node will be used corr,L To predict the plane position of the current node, as follows, assuming that the tangent value of the lower boundary of the current node is tan(θ bottom ), the tangent value of the upper boundary is tan(θ top ), according to tanθ corr,L The plane position is quantized into four quantization intervals, that is, the context information of the plane position is determined.
[0144] However, the octree-based geometric information coding mode only has an efficient compression rate for points that are correlated in space. For points that are isolated in the geometric space, the use of the Direct Coding Model (DCM) can greatly reduce the complexity. For all nodes in the octree, the use of DCM is not indicated by flag information, but is inferred from the parent node and neighbor information of the current node. There are three ways to determine whether the current node is eligible for DCM coding, as follows:
[0145] (1) The current node has no sibling child nodes, that is, the parent node of the current node has only one child node, and the parent node of the parent node of the current node has only two occupied child nodes, that is, the current node has at most one neighbor node.
[0146] (2) The parent node of the current node has only one child node, the current node, and the six neighbor nodes that share a face with the current node are all empty nodes.
[0147] (3) The number of sibling nodes of the current node is greater than 1.
[0148] Exemplarily, FIG14 provides a schematic diagram of IDCM coding. If the current node does not have the DCM coding qualification, it will be divided into octrees. If it has the DCM coding qualification, the number of points contained in the node will be further determined. When the number of points is less than a threshold (for example, 2), the node will be DCM-encoded, otherwise the octree division will continue. When the DCM coding mode is applied, it is first necessary to encode whether the current node is a true isolated point, that is, IDCM_flag. When IDCM_flag is true, the current node is DCM-encoded, otherwise octree coding is still used. When the current node meets the DCM coding requirements, the DCM coding mode of the current node needs to be encoded. There are currently two DCM modes: (a) there is only one point (or multiple points, but they are duplicate points); (b) there are two points. Finally, the geometric information of each point needs to be encoded. Assuming that the side length of the node is 2 d When encoding each component of the node's geometric coordinates, d bits are required, and these bits are directly encoded into the bitstream. It is important to note that when encoding LiDAR point clouds, the efficiency of geometric information coding can be further improved by predictively encoding the three-dimensional coordinate information using LiDAR acquisition parameters.
[0149] Furthermore, the IDCM encoding process is described in detail below.
[0150] When the current node meets the DCM encoding mode, the number of points of the current node, numPoints, is encoded first; the number of points of the current node is encoded according to different DirectModes:
[0151] (1) If the current node does not meet the requirements of the DCM node, exit directly (that is, the number of points is greater than 2 points and is not a duplicate point).
[0152] (2) If the number of points numPonts in the current node is less than or equal to 2, the encoding process is as follows:
[0153] i) First encode whether the numPonts of the current node is greater than 1;
[0154] ii) If the current node has only one point and the geometry coding environment is geometry lossless coding, it is necessary to encode that the second point of the current node is not a duplicate point.
[0155] (3) If the number of points numPonts in the current node is greater than 2, the encoding process is as follows:
[0156] i) First encode the numPonts of the current node to be less than or equal to 1;
[0157] ii) Secondly, it is encoded that the second point of the current node is a repeated point, and then it is encoded whether the number of repeated points of the current node is greater than 1. When the number of repeated points is greater than 1, it is necessary to perform exponential Golomb decoding on the remaining number of repeated points.
[0158] After encoding the number of points in the current node, the coordinate information of the points contained in the current node is encoded. The following will introduce the lidar point cloud and the human eye point cloud in detail.
[0159] (1) Point cloud facing the human eye.
[0160] (1) If the current node contains only one point, the geometric information of the point in three dimensions will be directly encoded (Bypass coding);
[0161] (2) If the current node contains two points, the first coordinate axis dirextAxis will be obtained by using the geometric coordinates of the points. It should be noted that the coordinate axes currently compared only include the x-axis and y-axis, not the z-axis. Assuming that the geometric coordinates of the current node are nodePos, the judgment method is as follows: dirextAxis = !(nodePos[0]<nodePos[1])
[0162] That is, the axis with the smallest node coordinate geometry position will be used as the priority encoding axis dirextAxis, and then the geometry information of the priority encoding axis dirextAxis will be encoded as follows. Assume that the encoding geometry bit depth corresponding to the priority encoding axis is nodeSizeLog2, and assume that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:
[0163] After encoding the priority axis dirextAxis, the geometric coordinates of the current node are directly encoded. Assuming that the remaining encoding bit depth of each point is nodeSizeLog2, the specific encoding process is as follows:
[0164] for(int axisIdx=0; axisIdx<3; ++axisIdx)
[0165] for(int mask=(1<<nodeSizeLog2[axisIdx])> >1;mask;mask>>1)
[0166] encodePosBit(!!(pointPos[axisIdx]&mask)).
[0167] (2) LiDAR point cloud.
[0168] If the current node contains two points, the priority coded coordinate axis dirextAxis will be obtained first by using the geometric coordinates of the points. Assuming that the geometric coordinates of the current node are nodePos, the judgment method is as follows: dirextAxis = !(nodePos[0]<nodePos[1])
[0169] That is, the axis with the smaller node coordinate geometry position will be used as the priority encoding axis dirextAxis. It should be noted that the currently compared coordinate axes only include the x-axis and y-axis, not the z-axis. Then, the geometric information of the priority encoded coordinate axis dirextAxis is first encoded as follows, assuming that the encoding geometry bit depth corresponding to the priority encoded axis is nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:
[0170] After encoding the priority-encoded coordinate axis dirextAxis, the geometric coordinates of the current node are encoded.
[0171] Since the LiDAR point cloud can obtain the acquisition parameters of the LiDAR point cloud, the geometric coordinate information of the current node can be predicted, thereby further improving the efficiency of the geometric information encoding of the point cloud. Similarly, the geometric information nodePos of the current node is first used to obtain a directly encoded main axis direction, and then the geometric information of the already encoded direction is used to predict the geometric information of another dimension. Assuming that the directly encoded axis direction is directAxis and the bit depth of the direct encoding is nodeSizeLog2, the encoding method is as follows:
[0172] for(int mask=(1<<nodeSizeLog2)> >1;mask;mask>>1)
[0173] encodePosBit(!!(pointPos[directAxis]&mask)).
[0174] It should be noted here that all geometric accuracy information in the directAxis direction will be encoded here.
[0175] For example, Figure 15 provides a schematic diagram of coordinate transformation for obtaining point clouds using a rotating laser radar. In the Cartesian coordinate system, the (x, y, z) coordinates of each node can be converted to (R, φ, i). In addition, the laser scanner can perform laser scanning at a preset angle, and different θ(i) can be obtained under different values of i. For example, when i is equal to 1, θ(1) can be obtained, and the corresponding scanning angle is -15°; when i is equal to 2, θ(2) can be obtained, and the corresponding scanning angle is -13°; when i is equal to 10, θ(10) can be obtained, and the corresponding scanning angle is +13°; when i is equal to 9, θ(19) can be obtained, and the corresponding scanning angle is +15°.
[0176] In this way, after encoding all the precision of the directAxis coordinate direction, the LaserIdx corresponding to the current point will be calculated first, that is, the pointLaserIdx number in Figure 15, and the LaserIdx of the current node, that is, nodeLaserIdx; secondly, the LaserIdx of the node, that is, nodeLaserIdx, will be used to predict the LaserIdx of the point, that is, pointLaserIdx. The calculation method of the LaserIdx of the node or point is as follows. Assuming that the geometric coordinates of the point are pointPos, the starting coordinates of the laser ray are LidarOrigin, and assuming that the number of Lasers is LaserNum, the tangent value of each Laser is tanθ i , the vertical offset position of each Laser is Z i ,but:
[0177] After calculating the current point's LaserIdx, the LaserIdx of the current node is first used to predictively encode the pointLaserIdx. After encoding the current point's LaserIdx, the three-dimensional geometric information of the current point is predictively encoded using the LiDAR acquisition parameters.
[0178] For example, FIG16 shows a schematic diagram of predictive coding in the X-axis or Y-axis direction. As shown in FIG16 , the box filled with a grid represents the current node, and the box filled with a slash represents the already coded node. Here, the LaserIdx corresponding to the current point is first used to obtain the corresponding predicted value of the horizontal azimuth, that is, Secondly, the node geometry information corresponding to the current point is used to obtain the horizontal azimuth angle corresponding to the node Assuming that the geometric coordinates of the node are nodePos, the horizontal azimuth angle The calculation method between the node geometry information is as follows:
[0179] By using the acquisition parameters of the laser radar, we can get the number of rotation points of each laser, numPoints, which represents the number of points obtained by each laser ray rotating one circle. Then, we can use the number of rotation points of each laser to calculate the rotation angular velocity deltaPhi of each laser. The calculation method is as follows:
[0180] Furthermore, using the horizontal azimuth angle of the node And the horizontal azimuth of the previous Laser code point corresponding to the current point Calculate the predicted horizontal azimuth angle corresponding to the current point That is, the predicted value of the horizontal azimuth angle as shown in Figure 17A and Figure 17B. Figure 17A shows a schematic diagram of predicting the angle of the Y plane through the horizontal azimuth angle, and Figure 17B shows a schematic diagram of predicting the angle of the X plane through the horizontal azimuth angle. Here, the predicted value of the horizontal azimuth angle corresponding to the current point is The calculation is as follows:
[0181] For example, FIG18 shows another schematic diagram of predictive coding in the X-axis or Y-axis direction. As shown in FIG18 , the portion filled with a grid (left side) represents a low plane, and the portion filled with dots (right side) represents a high plane. Indicates the low plane horizontal azimuth of the current node, Indicates the horizontal azimuth of the current node’s high plane. Indicates the predicted horizontal azimuth angle corresponding to the current node.
[0182] Thus, by using the predicted value of the horizontal azimuth and the low plane horizontal azimuth of the current node and the high plane horizontal azimuth To predict the geometric information of the current node. The details are as follows: int context=(angLel≥0&&angLeR≥0)||(angLel<0&&angLeR<0)? 0:2; int minAngle=std∷min(abs(angLel),abs(angLeR)); int maxAngle=std∷max(abs(angLel),abs(angLeR)); context+=maxAngle>minAngle? 0:1; context+=maxAngle>minAngle? 0:4.
[0183] After encoding the LaserIdx of the point, the Z-axis direction of the current point is predicted using the LaserIdx corresponding to the current point. That is, the radius of the radar coordinate system is calculated using the x and y information of the current point. Then, the tangent value of the current point and the vertical offset are obtained using the LaserIdx of the current point. The predicted value of the Z-axis direction of the current point, namely Z_pred, can be obtained. The details are as follows: int tanTheta=tanθ laserIdx ; int zOffset = Z laserIdx ; Z_pred=radius×tanTheta-zOffset.
[0184] Furthermore, Z_pred is used to perform predictive coding on the geometric information of the current point in the Z-axis direction to obtain the prediction residual Z_res, and finally Z_res is encoded.
[0185] It is important to note that when partitioning nodes into leaf nodes, the number of duplicate points in the leaf nodes must be encoded in the case of lossless geometric coding. Ultimately, the placeholder information for all nodes is encoded to generate a binary bitstream. Furthermore, G-PCC currently introduces a plane coding mode. During the geometric partitioning process, it determines whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the condition of being in the same plane, the child nodes of the current node are represented by that plane.
[0186] For octree-based geometric decoding, the decoder follows a breadth-first traversal. Before decoding each node's occupancy information, it first uses the reconstructed geometric information to determine whether the current node is for plane decoding or IDCM decoding. If the current node meets the requirements for plane decoding, it first decodes the plane identifier and plane position information of the current node. Then, based on the plane information, it decodes the current node's occupancy information. If the current node meets the requirements for IDCM decoding, it first decodes whether the current node is a true IDCM node. If so, it continues to parse the DCM decoding mode of the current node, then obtains the number of points in the current DCM node, and finally decodes the geometric information of each point. For nodes that do not meet either plane decoding or DCM decoding requirements, the current node's occupancy information is decoded. By continuously parsing in this way, the placeholder code of each node is obtained, and the node is continuously partitioned until a 1×1×1 unit cube is obtained. The number of points contained in each leaf node is parsed, and the geometrically reconstructed point cloud information is finally recovered.
[0187] The following is a detailed introduction to the IDCM decoding process.
[0188] Similar to the processing at the encoding end, we first use prior information to determine whether the node should start IDCM. The starting conditions of IDCM are as follows:
[0189] (1) The current node has no sibling child nodes, that is, the parent node of the current node has only one child node, and the parent node of the parent node of the current node has only two occupied child nodes, that is, the current node has at most one neighbor node.
[0190] (2) The parent node of the current node has only one child node, the current node, and the six neighbor nodes that share a face with the current node are all empty nodes.
[0191] (3) The number of sibling nodes of the current node is greater than 1.
[0192] Furthermore, when a node meets the conditions for DCM coding, it is first decoded to determine whether the current node is a true DCM node, that is, IDCM_flag; when IDCM_flag is true, the current node adopts DCM coding, otherwise it still adopts octree coding.
[0193] Next, decode the number of points numPoints of the current node. The specific decoding method is as follows:
[0194] i) First decode whether numPonts of the current node is greater than 1;
[0195] ii) If the numPonts of the current node is greater than 1, continue decoding to see if the second point is a duplicate point; if the second point is not a duplicate point, it can be implicitly inferred that the second type of DCM mode contains only two points;
[0196] iii) If the numPonts of the current node obtained by decoding is less than or equal to 1, continue decoding to see if the second point is a repeated point; if the second point is not a repeated point, it can be implicitly inferred that the second type of DCM pattern is satisfied, which contains only one point; if the second point obtained by decoding is a repeated point, it can be inferred that the third type of DCM pattern is satisfied, which contains multiple points, but they are all repeated points, then continue decoding to see if the number of repeated points is greater than 1 (entropy decoding), and if it is greater than 1, continue decoding the number of remaining repeated points (using exponential Columbus decoding).
[0197] If the current node does not meet the requirements of the DCM node, it will exit directly (that is, the number of points is greater than 2 points and it is not a duplicate point).
[0198] After decoding the number of points in the current node, the coordinate information of the points contained in the current node is decoded. The following will introduce the lidar point cloud and the human eye point cloud in detail.
[0199] (1) Point cloud facing the human eye.
[0200] (1) If the current node contains only one point, the geometric information of the point in three dimensions will be directly decoded (Bypass coding);
[0201] (2) If the current node contains two points, the first coordinate axis to be decoded is obtained by using the geometric coordinates of the points. It should be noted that the coordinate axes currently compared only include the x and y axes, not the z axis. Assuming that the geometric coordinates of the current node are nodePos, the judgment method is as follows: dirextAxis = (nodePos[0] < nodePos[1]) (10)
[0202] That is, the axis with the smallest node coordinate geometry position will be used as the priority decoding axis dirextAxis, and then the geometry information of the priority decoding axis dirextAxis will be decoded first in the following way. Assume that the geometry bit depth to be decoded corresponding to the priority decoding axis is nodeSizeLog2, and assume that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:
[0203] After decoding the prioritized axis dirextAxis, the geometric coordinates of the current point are directly decoded. Assuming the remaining encoding bit depth of each point is nodeSizeLog2 and the coordinate information of the point is pointPos, the specific decoding process is as follows:
[0204] (2) LiDAR point cloud.
[0205] If the current node contains two points, the priority decoding coordinate axis dirextAxis will be obtained first by using the geometric coordinates of the points. Assuming that the geometric coordinates of the current node are nodePos, the judgment method is as follows: dirextAxis = ! (nodePos[0] < nodePos[1]) (11)
[0206] That is, the axis with the smaller node coordinate geometry position will be used as the priority decoding axis dirextAxis. It should be noted that the currently compared coordinate axes only include the x-axis and y-axis, not the z-axis. Secondly, the priority encoded coordinate axis dirextAxis geometry information is first decoded as follows, assuming that the encoding geometry bit depth corresponding to the priority decoded axis is nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:
[0207] After decoding the priority coordinate axis dirextAxis, the geometric coordinates of the current point are decoded.
[0208] Similarly, we first use the current node's geometry information nodePos to get a direct decoding main axis direction, and then use the geometry information of the decoded direction to decode the geometry information of the other dimension. Assuming that the axis direction of direct decoding is directAxis and the bit depth to be decoded in direct decoding is nodeSizeLog2, the decoding method is as follows:
[0209] It should be noted here that all geometric accuracy information in the directAxis direction will be decoded here.
[0210] After decoding all the precision of the directAxis coordinate direction, the LaserIdx of the current node, i.e., nodeLaserIdx, is calculated first. Then, the LaserIdx of the node, i.e., nodeLaserIdx, is used to predict and decode the LaserIdx of the point, i.e., pointLaserIdx. The calculation method of the LaserIdx of the node or point is the same as that of the encoder. Finally, the predicted residual information of the LaserIdx of the current point and the LaserIdx of the node is decoded to obtain ResLaserIdx. The decoding method is as follows: PointLaserIdx = nodeLaserIdx + ResLaserIdx (12)
[0211] After decoding the LaserIdx of the current point, the three-dimensional geometric information of the current point is predicted and decoded using the acquisition parameters of the laser radar. The specific algorithm is as follows:
[0212] As shown in Figure 11, the LaserIdx corresponding to the current point is first used to obtain the corresponding predicted value of the horizontal azimuth angle, that is, Secondly, the node geometry information corresponding to the current point is used to obtain the horizontal azimuth angle corresponding to the node Assuming that the geometric coordinates of the node are nodePos, the horizontal azimuth angle The calculation method between the node geometry information is as follows:
[0213] By using the acquisition parameters of the laser radar, we can get the number of rotation points of each laser, numPoints, which represents the number of points obtained by each laser ray rotating one circle. Then, we can use the number of rotation points of each laser to calculate the rotation angular velocity deltaPhi of each laser. The calculation method is as follows:
[0214] Furthermore, using the horizontal azimuth angle of the node And the horizontal azimuth of the previous Laser code point corresponding to the current point Calculate the predicted horizontal azimuth angle corresponding to the current point That is, the predicted value of the horizontal azimuth angle as shown in Figures 17A and 17B. The calculation method is as follows:
[0215] Thus, by using the predicted value of the horizontal azimuth and the low plane horizontal azimuth of the current node and the horizontal azimuth of the high plane To predict and decode the geometric information of the current node. The details are as follows: int context=(angLel≥0&&angLeR≥0)||(angLel<0&&angLeR<0)? 0:2; int absAngleL=abs(angLel); int absAngleR=abs(angLeR); context+=absAngleL>absAngleR? 0:1; context+=maxAngle>minAngle<<1? 4:0.
[0216] After decoding the LaserIdx of the point, the Z-axis direction of the current point is predicted and decoded using the LaserIdx corresponding to the current point. That is, the radius of the radar coordinate system is calculated using the x and y information of the current point. Then, the tangent value of the current point and the vertical offset are obtained using the LaserIdx of the current point. The predicted Z-axis direction value of the current point, namely Z_pred, can be obtained. The details are as follows: int tanTheta=tanθ laserIdx ; int zOffset = Z laserIdx ; Z_pred=radius×tanTheta-zOffset.
[0217] Furthermore, the decoded Z_res and Z_pred are used to reconstruct and restore the geometric information of the current point in the Z-axis direction.
[0218] For triangle soup (trisoup)-based geometric information coding, geometric partitioning must also be performed first in the trisoup-based geometric information coding framework. However, unlike geometric information coding based on binary trees, quadtrees, and octrees, this method does not require step-by-step partitioning of the point cloud into unit cubes with side lengths of 1×1×1. Instead, the partitioning stops when the sub-blocks (blocks) have a side length of W. Based on the surface formed by the distribution of the point cloud in each block, the surface and the twelve edges of the block are obtained. The vertex coordinates of each block are encoded in sequence to generate a binary code stream.
[0219] For trisoup-based point cloud geometry reconstruction, when performing point cloud geometry reconstruction at the decoding end, the vertex coordinates are first decoded to complete the triangle face reconstruction. This process is shown in Figures 19A, 19B, and 19C. Among them, there are three intersection points (v1, v2, v3) in the block shown in Figure 19A. The set of triangle faces formed by these three intersection points in a certain order is called triangle soup, or trisoup, as shown in Figure 19B. Afterwards, sampling is performed on the triangle face set, and the obtained sampling points are used as the reconstructed point cloud within the block, as shown in Figure 19C.
[0220] For predictive geometry coding (PredGeomTree), the following steps are involved: first, sort the input point cloud. Currently, the sorting methods used include unordered, Morton order, azimuth order, and radial distance order. At the encoding end, the prediction tree structure is established using two different methods: KD-Tree (high-latency slow mode) and low-latency fast mode (using lidar calibration information). When using lidar calibration information, each point is divided into different lasers, and a prediction tree structure is established according to the different lasers. Next, based on the structure of the prediction tree, each node in the prediction tree is traversed, and the geometric position information of the node is predicted by selecting different prediction modes to obtain the prediction residual, and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the prediction residual of the prediction tree node position information, the prediction tree structure, and the quantization parameter are encoded to generate a binary code stream.
[0221] For geometric decoding based on the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream. Secondly, the geometric position prediction residual information and quantization parameters of each prediction node are obtained through parsing, and the prediction residual is dequantized to restore the reconstructed geometric position information of each node, finally completing the geometric reconstruction at the decoding end.
[0222] After the geometric encoding is completed, the geometric information needs to be reconstructed. At present, attribute encoding is mainly performed on color information. First, the color information is converted from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. In color information encoding, there are two main transformation methods. One is the distance-based lifting transformation that relies on LOD partitioning, and the other is to directly perform RAHT transformation. Both methods will convert the color information from the spatial domain to the frequency domain, and obtain high-frequency coefficients and low-frequency coefficients through transformation. Finally, the coefficients are quantized and encoded to generate a binary code stream, as shown in Figures 4A and 4B.
[0223] Furthermore, when using geometric information to predict attribute information, Morton codes can be used to perform nearest neighbor search. The Morton code corresponding to each point in the point cloud can be obtained from the geometric coordinates of the point. The specific method for calculating the Morton code is described below. For a three-dimensional coordinate represented by a d-bit binary number for each component, its three components can be expressed as:
[0224] Among them, x l ,y l ,z l ∈{0,1} are the binary values corresponding to the highest bit (l=1) to the lowest bit (l=d) of x, y, and z respectively. The Morton code M is to cross-arrange x, y, and z starting from the highest bit. l ,y l ,z l To the lowest bit, the calculation formula of M is as follows:
[0225] Among them, m l′ ∈P0,1} are the values of the highest bit (l′=1) to the lowest bit (l′=3d) of M. After obtaining the Morton code M of each point in the point cloud, the points in the point cloud are arranged in ascending order of the Morton code, and the weight value w of each point is set to 1.
[0226] It can also be understood that for the G-PCC codec framework, the general test conditions are as follows:
[0227] (1) There are 4 test conditions:
[0228] Condition 1: The geometric position is limited and the attributes are lost;
[0229] Condition 2: Geometric position lossless, attribute lossy;
[0230] Condition 3: Geometric position lossless, attribute loss limited;
[0231] Condition 4: Geometric position and attributes are lossless.
[0232] (2) The general test sequence includes four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame. Among them, Cat2-frame point cloud only contains reflectance attribute information, Cat1A and Cat1B point clouds only contain color attribute information, and Cat3-fused point cloud contains both color and reflectance attribute information.
[0233] (3) Technical routes: There are two types in total, which are distinguished by the algorithm used for geometric compression.
[0234] Technical route 1: Octree encoding branch.
[0235] At the encoding end, the bounding box is divided into sub-cubes in sequence, and the non-empty sub-cubes (containing points in the point cloud) are divided again until the leaf node obtained is a 1×1×1 unit cube. In the case of geometric lossless coding, the number of points contained in the leaf node needs to be encoded, and finally the geometric octree encoding is completed to generate a binary code stream.
[0236] At the decoding end, the decoding end obtains the placeholder code of each node by continuously parsing in the order of breadth-first traversal, and continuously divides the nodes in turn until a 1×1×1 unit cube is obtained. In the case of geometric lossless decoding, it is necessary to parse the number of points contained in each leaf node and finally recover the geometrically reconstructed point cloud information.
[0237] Technical route 2: prediction tree encoding branch.
[0238] On the encoding side, the prediction tree structure is established using two different methods: based on KD-Tree (high-latency slow mode) and using lidar calibration information (low-latency fast mode). Using lidar calibration information, each point can be divided into different lasers, and the prediction tree structure is established according to different lasers. Next, based on the structure of the prediction tree, each node in the prediction tree is traversed, and the geometric position information of the node is predicted by selecting different prediction modes to obtain the prediction residual, and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the prediction residual of the prediction tree node position information, the prediction tree structure, and the quantization parameters are encoded to generate a binary code stream.
[0239] At the decoding end, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream. Secondly, the geometric position prediction residual information and quantization parameters of each prediction node are obtained through parsing, and the prediction residual is dequantized to restore the reconstructed geometric position information of each node, finally completing the geometric reconstruction at the decoding end.
[0240] In a possible implementation manner, the following specifically describes the inter-frame coding and decoding of geometric information in the related art.
[0241] Taking Figure 15 as an example, the point coordinates of the point cloud input are (x, y, z). Using the prior radar information of the current point cloud, the position information of the point cloud is converted into the radar coordinate system (radius, laserIdx). Assume that the geometric coordinates of the point are pointPos, the starting coordinates of the laser ray are LidarOrigin, and the number of lasers is LaserNum, and the tangent value of each laser is tanθ i , the vertical offset position of each Laser is Z i , then the LaserIdx of a node or point is calculated as follows:
[0242] Furthermore, assuming that the geometric coordinates of the node are pointPos, the horizontal azimuth The calculation of is as follows:
[0243] Furthermore, the depth information radius is calculated as follows:
[0244] Among them, LidarOrigin is generally 0.
[0245] For example, Figure 20 shows a schematic diagram of the structure of inter-frame coding and decoding of geometric information. As shown in Figure 20, the current point to be encoded in the current frame is filled with a grid, and the previous encoded node of the current point is represented by a. There is a first reference frame and a second reference frame. The first reference frame can be the frame before the current frame, and the second reference frame can be a global motion compensation (GMC) reference frame.
[0246] Thus, taking FIG. 20 as an example, when performing inter-frame prediction coding on the current point to be coded, the previous coded node a of the current point to be coded in the prediction tree is traversed;
[0247] In the first reference frame (i.e. the previous reference frame), find the node a that has the same value as the node a that has been encoded before the current point. For node b with laserID, points c and d encoded or decoded after point b in the first reference frame are used as inter-frame candidate points;
[0248] In the second reference frame (i.e. the reference frame of the previous frame after global motion), find the node a that has been encoded before the current point is encoded. and point g of laserID, and the points e and f encoded or decoded after point g in the second reference frame are used as inter-frame candidate points; at the same time, the points e and f Replaced by the parent node of the current point to be encoded
[0249] Then, using rate-distortion optimization (RDO), different prediction points (including several intra-frame candidate points and up to four inter-frame candidate points) are selected to predict the node's geometric position information, generating a prediction residual. This geometric prediction residual is then quantized using a quantization parameter. Finally, through continuous iteration, parameters such as the prediction mode, prediction residual, prediction tree structure, and quantization parameter for the prediction tree node position information are encoded to generate a binary bitstream.
[0250] At the decoding end, the decoding end reconstructs the prediction tree structure by continuously parsing the bitstream and traversing the prediction tree to find the decoded node a before the current point to be decoded;
[0251] First, the prediction mode is decoded; if the prediction mode is inter-frame prediction mode, the prediction point is selected from the following up to four candidate points using the decoded prediction mode:
[0252] In the first reference frame (i.e. the previous reference frame), find the node a that has the same value as the node a that has been decoded before the current point. For node b with laserID, points c and d encoded or decoded after point b in the first reference frame are used as inter-frame candidate points;
[0253] In the second reference frame (i.e. the reference frame of the previous frame after global motion), find the node a that has the same decoding as the previous node a that has been decoded before the current point is decoded. and point g of laserID, and the points e and f encoded or decoded after point g in the second reference frame are used as inter-frame candidate points; at the same time, the points e and f Replaced by the parent node of the current point to be decoded
[0254] Secondly, the geometric position prediction residual information and quantization parameters of different prediction points are obtained by analysis, and the prediction residual is dequantized, so that the reconstructed geometric position information of each node can be restored, and finally the geometric reconstruction at the decoding end is completed.
[0255] If the current prediction mode is inter-frame prediction mode, then the inter-frame prediction mode number (inter mode) needs to be encoded or decoded. Related technologies, however, directly encode the inter-frame prediction mode number by converting it into binary. In other words, existing solutions simply decompose the encoded inter-frame prediction mode number into binary and then encode it directly, without considering the frequency of different inter-frame prediction mode numbers. This results in suboptimal performance of the inter-frame prediction mode number encoding, reducing encoding and decoding efficiency.
[0256] Based on this, an embodiment of the present application provides an encoding method to determine the inter-frame prediction mode value of the current node; determine the value of at least one mode identification information based on the inter-frame prediction mode value; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; encode the value of at least one mode identification information, and write the obtained encoding bits into the code stream.
[0257] An embodiment of the present application also provides an encoding method for decoding a code stream and determining a value of at least one mode identification information; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; based on the value of at least one mode identification information, determining the inter-frame prediction mode value of the current node; and based on the inter-frame prediction mode value, determining the prediction value of the current node.
[0258] In this way, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct encoding, but the value of at least one mode identification information is determined according to the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein, the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of encoding bits, saving bit rate, and thereby improving encoding and decoding efficiency, and can also achieve the purpose of improving compression efficiency.
[0259] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0260] In one embodiment of the present application, referring to FIG21 , a flowchart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG21 , the method may include:
[0261] S2101: Decode a code stream and determine a value of at least one mode identification information.
[0262] It should be noted that the decoding method in the embodiments of the present application is applied to a decoder. Furthermore, the decoding method may specifically refer to a point cloud inter-frame prediction method; more specifically, a decoding method for a point cloud inter-frame geometric information coding mode, or a Columbus decoding method for a point cloud inter-frame geometric information coding mode, to implement decoding processing of inter-frame prediction mode values.
[0263] It should also be noted that, in an embodiment of the present application, the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; wherein i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode.
[0264] In the embodiment of the present application, in the point cloud, a point can be all points in the point cloud, or a portion of points in the point cloud, which are relatively concentrated in space. Here, the current node can specifically refer to the node currently to be decoded in the point cloud.
[0265] It should also be noted that in the embodiment of the present application, the inter-frame prediction mode value can be from 0 to N, that is, there can be a maximum of N+1 inter-frame prediction modes. Among them, the i-th mode identification information can be represented by flagi. For the mode identification information, here, a maximum of N mode identification information can be included, specifically: flag0, flag1, ..., flagN-1.
[0266] In some embodiments, decoding the code stream and determining a value of at least one mode identification information may include: decoding the code stream based on a first decoding mode and determining a value of the at least one mode identification information.
[0267] In the embodiment of the present application, the first decoding mode may include at least one of the following: a decoding mode with fixed context information, a decoding mode with adaptive context information, and a decoding mode without using context information.
[0268] That is to say, in an embodiment of the present application, the value of at least one mode identification information can be obtained by decoding using a decoding mode of fixed context information, or by decoding using a decoding mode of adaptive context information, or by decoding using a decoding mode that does not use context information, and no specific limitation is made here.
[0269] Exemplarily, for the value of the i-th mode identification information, flagi can be decoded using a decoding mode of fixed context information / a decoding mode of adaptive context information / a decoding mode without context information; then, based on the value of flagi, it can be determined whether the inter-frame prediction mode value of the current node is greater than or equal to i.
[0270] In a possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, decoding the code stream and determining the value of at least one mode identification information may include:
[0271] Decode the code stream to determine the value of the i-th mode identification information;
[0272] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then the i+1 mode identification information is used as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0273] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i is updated based on i+1, and the decoding code stream is continued to determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0274] It should be noted that, in an embodiment of the present application, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then the decoding operation is terminated, and the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information and other i+1 mode identification information can be used as at least one mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i=i+1, and the decoding code stream is continued to determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, at which time the decoding operation is terminated.
[0275] Exemplarily, first decode the value of flag0, and then determine whether the inter-frame prediction mode value of the current node is greater than 0; if the inter-frame prediction mode value is not greater than 0, terminate the decoding operation, and at this time, at least one mode identification information includes flag0; if the inter-frame prediction mode value is greater than 0, continue to decode the value of flag1, and then determine whether the inter-frame prediction mode value of the current node is greater than 1; if the inter-frame prediction mode value is not greater than 1, terminate the decoding operation, and at this time, at least one mode identification information may include flag0 and flag1; if the inter-frame prediction mode value is greater than 1, continue to decode the value of flag2, and then determine whether the inter-frame prediction mode value of the current node is greater than 2; and so on, if the inter-frame prediction mode value is greater than M-1, continue to decode the value of flagM, and then determine whether the inter-frame prediction mode value of the current node is greater than M, and at this time, at least one mode identification information may include flag0, flag1, ..., flagM; where M is an integer greater than or equal to 0 and less than N.
[0276] In some embodiments, for the value of the i-th mode identification information, the method may further include:
[0277] If the value of the i-th mode identification information is the first value, determining that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i;
[0278] If the value of the i-th mode identification information is the second value, it is determined that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i.
[0279] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the i-th mode identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0280] Exemplarily, for the first value and the second value, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true; but this is not specifically limited here.
[0281] In an embodiment of the present application, taking flagi written into the bitstream as an example, assuming that the first value is set to 0 and the second value is set to 1, if the value of flagi is 0, then it can be determined that the inter-frame prediction mode value of the current node is less than or equal to i; if the value of flagi is 1, then it can be determined that the inter-frame prediction mode value of the current node is greater than i.
[0282] In another possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, decoding the code stream and determining the value of at least one mode identification information may include:
[0283] Decode the code stream to determine the value of the i-th mode identification information;
[0284] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the i+1 mode identification information is used as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0285] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i is updated based on i+1, and the decoding code stream is continued to determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0286] It should be noted that, in an embodiment of the present application, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the decoding operation is terminated, and the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information and other i+1 mode identification information can be used as at least one mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i=i+1, and the decoding code stream is continued to determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, at which time the decoding operation is terminated.
[0287] Exemplarily, first decode the value of flag0, and then determine whether the inter-frame prediction mode value of the current node is equal to 0; if the inter-frame prediction mode value is equal to 0, terminate the decoding operation, and at this time, at least one mode identification information includes flag0; if the inter-frame prediction mode value is not equal to 0, continue to decode the value of flag1, and then determine whether the inter-frame prediction mode value of the current node is equal to 1; if the inter-frame prediction mode value is equal to 1, terminate the decoding operation, and at this time, at least one mode identification information may include flag0 and flag1; if the inter-frame prediction mode value is not equal to 1, continue to decode the value of flag2, and then determine whether the inter-frame prediction mode value of the current node is equal to 2; and so on, if the inter-frame prediction mode value is not equal to M-1, continue to decode the value of flagM, and then determine whether the inter-frame prediction mode value of the current node is equal to M, and at this time, at least one mode identification information may include flag0, flag1, ..., flagM; where M is an integer greater than or equal to 0 and less than N.
[0288] In some embodiments, for the value of the i-th mode identification information, the method may further include:
[0289] If the value of the i-th mode identification information is the first value, determining that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i;
[0290] If the value of the i-th mode identification information is the second value, it is determined that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0291] In the embodiment of the present application, the first value and the second value are different. Taking flagi written into the bitstream as an example, assuming that the first value is set to 0 and the second value is set to 1, if the value of flagi is 0, then it can be determined that the inter-frame prediction mode value of the current node is not equal to i; if the value of flagi is 1, then it can be determined that the inter-frame prediction mode value of the current node is equal to i.
[0292] S2102: Determine the inter-frame prediction mode value of the current node according to the value of at least one mode identification information.
[0293] It should be noted that, in the embodiment of the present application, after obtaining the value of at least one mode identification information, the inter-frame prediction mode value of the current node can be determined based on the value of the at least one mode identification information.
[0294] In one possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, determining the inter-frame prediction mode value of the current node based on the value of at least one mode identification information may include: when the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, setting the inter-frame prediction mode value of the current node to be equal to i.
[0295] In a specific embodiment, when i is equal to N-1, the method may further include:
[0296] If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to N-1, the inter-frame prediction mode value of the current node is set to be equal to N-1;
[0297] If the (N-1)th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than N-1, the inter-frame prediction mode value of the current node is set to be equal to N.
[0298] That is to say, first use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is less than or equal to 0, the decoding operation is terminated, and the inter-frame prediction mode value is equal to 0 at this time; if the value of flag0 indicates that the inter-frame prediction mode value of the current node is greater than 0, then use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag1; if the value of flag1 indicates that the inter-frame prediction mode value of the current node is less than or equal to 1, the decoding operation is terminated, and the inter-frame prediction mode value is equal to 1 at this time; if the value of flag1 indicates that the inter-frame prediction mode value of the current node is greater than 1, then use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag2.
[0299] By analogy, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagi; if the value of flagi indicates that the inter-frame prediction mode value of the current node is less than or equal to i, the decoding operation is terminated, and the inter-frame prediction mode value is equal to i; if the value of flagi indicates that the inter-frame prediction mode value of the current node is greater than i, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagi+1; until i is equal to N-1, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagN-1; if the value of flagN-1 indicates that the inter-frame prediction mode value of the current node is less than or equal to N-1, the decoding operation is terminated, and the inter-frame prediction mode value is equal to N-1; if the value of flagN-1 indicates that the inter-frame prediction mode value of the current node is greater than N-1, the decoding operation is terminated, and the inter-frame prediction mode value is equal to N.
[0300] In another specific embodiment, if the inter-frame prediction mode value of the current node is greater than M, exponential Golomb decoding may also be used. In some embodiments, when i is equal to M, determining the inter-frame prediction mode value of the current node based on the value of at least one mode identification information may include:
[0301] If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M, decoding the code stream based on the second decoding mode to determine the first inter-frame prediction mode residual value of the current node;
[0302] The inter-frame prediction mode value of the current node is determined according to the values of the M+1 mode identification information and the first inter-frame prediction mode residual value.
[0303] In an embodiment of the present application, the M+1 mode identification information may include: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0304] In an embodiment of the present application, the second decoding mode may be an Exponential-Golomb decoding method, such as a K-order Exponential-Golomb decoding method. K-order Exponential-Golomb coding is a lossless data compression method that can achieve very high coding efficiency. Therefore, to improve coding efficiency, when the inter-frame prediction mode value of the current node is greater than M, the Exponential-Golomb decoding method may be used to decode the residual value of the first inter-frame prediction mode.
[0305] In some embodiments, the method may further include initializing the inter prediction mode value to 0.
[0306] That is, at the decoding end, first, the inter-frame prediction mode value is initialized to 0; secondly, the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information is used to decode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is less than or equal to 0, the decoding operation is terminated, and the inter-frame prediction mode value is equal to 0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is greater than 0, the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information is used to decode flag1. By analogy, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagM; if the value of flagM indicates that the inter-frame prediction mode value of the current node is less than or equal to M, then the decoding operation is terminated, and the inter-frame prediction mode value is equal to M; if the value of flagM indicates that the inter-frame prediction mode value of the current node is greater than M, then use the exponential Columbus decoding method to decode the first inter-frame prediction mode residual value; then determine the inter-frame prediction mode value of the current node based on the values of M+1 mode identification information and the first inter-frame prediction mode residual value.
[0307] In some embodiments, determining the inter-frame prediction mode value of the current node based on the values of M+1 mode identification information and the residual value of the first inter-frame prediction mode may include: adding the values of the M+1 mode identification information and the residual value of the first inter-frame prediction mode to determine the inter-frame prediction mode value of the current node.
[0308] In the embodiment of the present application, after obtaining the values of M+1 mode identification information such as flag0, flag1, ..., flagM, assuming that the residual value of the first inter-frame prediction mode is represented by residual mode1, the calculation formula of the inter-frame prediction mode value inter mode of the current node can be as follows: inter mode = residual mode1 + (flag0 + flag1 + ... + flagM) (20)
[0309] In some embodiments, determining the inter-frame prediction mode value of the current node based on the values of M+1 mode identification information and the residual value of the first inter-frame prediction mode may include: adding the residual value of the first inter-frame prediction mode to (M+1) to determine the inter-frame prediction mode value of the current node.
[0310] In the embodiment of the present application, it is assumed that the first value is set to 0 and the second value is set to 1. That is, when the value of flagi is 1, it is determined that the inter-frame prediction mode value of the current node is greater than i, and the decoding operation needs to be continued. Therefore, if the inter-frame prediction mode value of the current node is greater than M, at this time, the values of flag0, flag1, ..., flagM are all equal to 1, then the calculation formula of the inter-frame prediction mode value inter mode of the current node can also be as follows: inter mode = residual mode1 + (M + 1) (21)
[0311] In another possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, determining the inter-frame prediction mode value of the current node based on the value of at least one mode identification information may include: when the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, setting the inter-frame prediction mode value of the current node to be equal to i.
[0312] In a specific embodiment, when i is equal to N-1, the method may further include:
[0313] If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to N-1, the inter-frame prediction mode value of the current node is set to be equal to N-1;
[0314] If the (N-1)th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to N-1, the inter-frame prediction mode value of the current node is set to be equal to N.
[0315] That is to say, first use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is equal to 0, the decoding operation is terminated, and the inter-frame prediction mode value is equal to 0 at this time; if the value of flag0 indicates that the inter-frame prediction mode value of the current node is not equal to 0, then use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag1; if the value of flag1 indicates that the inter-frame prediction mode value of the current node is equal to 1, then the decoding operation is terminated, and the inter-frame prediction mode value is equal to 1 at this time; if the value of flag1 indicates that the inter-frame prediction mode value of the current node is not equal to 1, then use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without using context information to decode flag2.
[0316] By analogy, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagi; if the value of flagi indicates that the inter-frame prediction mode value of the current node is equal to i, the decoding operation is terminated, and the inter-frame prediction mode value is equal to i; if the value of flagi indicates that the inter-frame prediction mode value of the current node is not equal to i, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagi+1; until i is equal to N-1, use the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information to decode flagN-1; if the value of flagN-1 indicates that the inter-frame prediction mode value of the current node is equal to N-1, the decoding operation is terminated, and the inter-frame prediction mode value is equal to N-1; if the value of flagN-1 indicates that the inter-frame prediction mode value of the current node is not equal to N-1, the decoding operation is terminated, and the inter-frame prediction mode value is equal to N.
[0317] In another specific embodiment, under this implementation, if the inter-frame prediction mode value of the current node is not equal to M, exponential Golomb decoding may also be used. In some embodiments, when i is equal to M, determining the inter-frame prediction mode value of the current node based on the value of at least one mode identification information may include:
[0318] If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to M, decoding the code stream based on the second decoding mode to determine the second inter-frame prediction mode residual value of the current node;
[0319] The inter-frame prediction mode value of the current node is determined according to the values of the M+1 mode identification information and the second inter-frame prediction mode residual value.
[0320] In an embodiment of the present application, the M+1 mode identification information may include: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0321] In an embodiment of the present application, the second decoding mode may be an Exponential Golomb decoding method, such as a K-order Exponential Golomb decoding method. K-order Exponential Golomb is a lossless data compression method that can achieve very high coding efficiency. Therefore, to improve coding efficiency, when the inter-frame prediction mode value of the current node is not equal to M, the Exponential Golomb decoding method may also be used to decode the second inter-frame prediction mode residual value.
[0322] In some embodiments, the method may further include initializing the inter prediction mode value to 0.
[0323] That is to say, in this implementation, for the decoding end, first, the inter-frame prediction mode value is initialized to 0; secondly, the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information is used to decode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is equal to 0, the decoding operation is terminated, and the inter-frame prediction mode value is equal to 0 at this time; if the value of flag0 indicates that the inter-frame prediction mode value of the current node is not equal to 0, the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information is used. flag1; and so on, decode flagM using the decoding mode of fixed context information / the decoding mode of adaptive context information / the decoding mode without context information; if the value of flagM indicates that the inter-frame prediction mode value of the current node is equal to M, then end the decoding operation, and at this time the inter-frame prediction mode value is equal to M; if the value of flagM indicates that the inter-frame prediction mode value of the current node is not equal to M, then use the exponential Columbus decoding method to decode the second inter-frame prediction mode residual value; then determine the inter-frame prediction mode value of the current node based on the values of the M+1 mode identification information and the second inter-frame prediction mode residual value.
[0324] In some embodiments, determining the inter-frame prediction mode value of the current node based on the values of M+1 mode identification information and the residual value of the second inter-frame prediction mode can include: performing a negation operation on the values of the M+1 mode identification information to determine the negated value of the M+1 mode identification information; performing an addition operation on the negated value of the M+1 mode identification information and the residual value of the second inter-frame prediction mode to determine the inter-frame prediction mode value of the current node.
[0325] In the embodiment of the present application, it is assumed that the first value is set to 0 and the second value is set to 1, that is, when the value of flagi is 0, it is determined that the inter-frame prediction mode value of the current node is not equal to i, and at this time it is necessary to continue to perform the decoding operation. In this way, after obtaining the values of M+1 mode identification information such as flag0, flag1, ..., flagM, it is necessary to perform a negation operation on the values of these M+1 mode identification information so that the values of !(flag0), !(flag1), ..., !(flagM) are all equal to 1; assuming that the residual value of the second inter-frame prediction mode is represented by residual mode2, then the calculation formula of the inter-frame prediction mode value inter mode of the current node can be as follows: inter mode=residual mode2+(!(flag0)+!(flag1)+...+!(flagM)) (22)
[0326] In some embodiments, determining the inter-frame prediction mode value of the current node based on the values of M+1 mode identification information and the second inter-frame prediction mode residual value can include: adding the second inter-frame prediction mode residual value and (M+1) to determine the inter-frame prediction mode value of the current node.
[0327] In the embodiment of the present application, assuming that the first value is set to 0 and the second value is set to 1, the value of (flag0)+(flag1)+…+(flagM) can be regarded as M+1; then the calculation formula of the inter-frame prediction mode value inter mode of the current node can also be as follows: inter mode=residual mode2+(M+1) (23)
[0328] That is to say, in an embodiment of the present application, after obtaining the value of at least one mode identification information, the inter-frame prediction mode value of the current node can be determined based on the value of the i-th mode identification information; or, in order to improve coding efficiency, the exponential Golomb decoding method can be combined to determine the inter-frame prediction mode value of the current node.
[0329] S2103: Determine the prediction value of the current node according to the inter-frame prediction mode value.
[0330] It should be noted that, in embodiments of the present application, a selected node can be determined based on the inter-frame prediction mode value, and thus the prediction value of the current node can be determined. Specifically, in some embodiments, determining the prediction value of the current node based on the inter-frame prediction mode value may include: determining a selected node from at least one candidate node based on the inter-frame prediction mode value; and determining the prediction value of the current node based on the selected node.
[0331] It should also be noted that in this embodiment of the present application, the at least one candidate node includes at least one of the following: at least one second candidate node and at least one fourth candidate node; wherein the at least one second candidate node is a candidate node in the first reference frame, and the at least one fourth candidate node is a candidate node in the second reference frame. In other words, the at least one candidate node can be composed of at least one second candidate node and / or at least one fourth candidate node, and there is no limit on the number of candidate nodes.
[0332] It should also be noted that in the embodiment of the present application, the current node is located in the current frame, where the current frame refers to the frame currently to be decoded, and the first reference frame and the second reference frame are both frames that have been decoded, and the first reference frame is different from the second reference frame.
[0333] In some embodiments, the first reference frame may be the K frames preceding the current frame, where K is an integer greater than 0; the second reference frame may be obtained by performing global motion on the first reference frame. For example, in a specific embodiment, the first reference frame may be the frame preceding the current frame; the second reference frame may be obtained by performing global motion on the preceding frame.
[0334] In some embodiments, the first reference frame may be the frame preceding the current frame, and the second reference frame may be the frame preceding the frame preceding the current frame. For example, if the current frame is Frame t, the first reference frame may be Frame t-1, and the second reference frame may be Frame t-2, where t is an integer.
[0335] In a possible implementation, when the inter-frame prediction mode value indicates that the selected node is one of the at least one second candidate node, the method may further include:
[0336] Determine the previous decoded node of the current node;
[0337] Determining a first candidate node in a first reference frame based on a previously decoded node; wherein geometric parameters of the previously decoded node and the first candidate node satisfy a first condition;
[0338] According to the first candidate node, determining the first second candidate node to the pth second candidate node in the first reference frame according to a preset method;
[0339] The selected node is determined according to the p-th second candidate node; wherein p is a positive integer greater than 0, and the value of p is associated with the inter-frame prediction mode value.
[0340] In another possible implementation, when the inter-frame prediction mode value indicates that the selected node is one of the at least one fourth candidate node, the method may further include:
[0341] Determine the previous decoded node of the current node;
[0342] Determining a third candidate node in the second reference frame based on the previously decoded node; wherein geometric parameters of the previously decoded node and the third candidate node satisfy a first condition;
[0343] According to the third candidate node, determining the first fourth candidate node to the qth fourth candidate node in the second reference frame according to a preset method;
[0344] The qth fourth candidate node is selected as the node; wherein q is a positive integer greater than 0, and the value of q is associated with the inter-frame prediction mode value.
[0345] It should be noted that, in an embodiment of the present application, determining the previous decoded node of the current node may include: determining a prediction tree corresponding to the current frame; and determining the previous decoded node of the current node based on the decoding order of the prediction tree.
[0346] In the embodiments of the present application, two different methods can be used to construct the prediction tree structure, including: KD-Tree (high-latency slow mode) and low-latency fast mode (using lidar calibration information). When using lidar calibration information, each point is divided into different lasers, and the prediction tree structure is established according to the different lasers.
[0347] It should also be noted that, in the embodiment of the present application, the decoding order of the prediction tree can be one of the following: unordered, Morton order, azimuth order, radial distance order, etc., which is not specifically limited here.
[0348] In this way, at the decoding end, the prediction tree structure is reconstructed by decoding the bitstream. Then, the prediction tree is traversed to determine the previous decoded node of the current node in the decoding order of the prediction tree.
[0349] It should also be noted that in the embodiment of the present application, the geometric parameters here refer to the parameters in the radar coordinate system. Among them, the geometric parameters may include: horizontal azimuth And the radar laser index number laserID.
[0350] In some embodiments, the geometric parameters satisfying the first condition may include: the radar laser index signal is the same as the radar laser index sequence number of the previous decoded node; the horizontal azimuth angle is the same as the horizontal azimuth angle of the previous decoded node.
[0351] In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node meet the first condition, which may specifically include: the radar laser index signal of the first candidate node is the same as the radar laser index serial number of the previous decoded node; and the horizontal azimuth angle of the first candidate node is the same as the horizontal azimuth angle of the previous decoded node.
[0352] In an embodiment of the present application, the geometric parameters of the previous decoded node and the third candidate node meet the first condition, which may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index serial number of the previous decoded node; and the horizontal azimuth angle of the third candidate node is the same as the horizontal azimuth angle of the previous decoded node.
[0353] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous decoded node, and With the previous decoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous decoded node, and With the previous decoded node same.
[0354] In some embodiments, the geometric parameters satisfy the first condition, which may include: the radar laser index signal is the same as the radar laser index sequence number of the previous decoded node; the horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the previous decoded node.
[0355] In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node meet the first condition, which may specifically include: the radar laser index signal of the first candidate node is the same as the radar laser index serial number of the previous decoded node; and the horizontal azimuth angle of the first candidate node is greater than and closest to the horizontal azimuth angle of the previous decoded node.
[0356] In an embodiment of the present application, the geometric parameters of the previous decoded node and the third candidate node meet the first condition, which may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index sequence number of the previous decoded node; and the horizontal azimuth angle of the third candidate node is greater than and closest to the horizontal azimuth angle of the previous decoded node.
[0357] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous decoded node, and is the first node that is greater than the previous decoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous decoded node, and is the first node that is greater than the previous decoded node
[0358] In some embodiments, the geometric parameters satisfy the first condition, which may include: the radar laser index signal is the same as the radar laser index sequence number of the previous decoded node; the horizontal azimuth angle is less than and closest to the horizontal azimuth angle of the previous decoded node.
[0359] In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node meet the first condition, which may specifically include: the radar laser index signal of the first candidate node is the same as the radar laser index sequence number of the previous decoded node; and the horizontal azimuth angle of the first candidate node is less than and closest to the horizontal azimuth angle of the previous decoded node.
[0360] In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node meet the first condition, which may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index sequence number of the previous decoded node; and the horizontal azimuth angle of the third candidate node is smaller than and closest to the horizontal azimuth angle of the previous decoded node.
[0361] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous decoded node, and is the first node that is smaller than the previous decoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous decoded node, and is the first node that is smaller than the previous decoded node
[0362] Furthermore, when the second reference frame is a reference frame obtained by global motion of the first reference frame, the horizontal azimuth angles of the third candidate node and at least one fourth candidate node are Need to be replaced with the parent node of the current node
[0363] Furthermore, in the embodiment of the present application, the preset manner may be based on the decoding order of the prediction tree or the order of the horizontal azimuth angle, which is not specifically limited here.
[0364] In a specific implementation method, based on the first candidate node, determining the first second candidate node to the pth second candidate node in a preset manner in the first reference frame may include: determining the first second candidate node, the second second candidate node, ..., the pth second candidate node decoded after the first candidate node in the first reference frame in sequence according to the decoding order of the prediction tree.
[0365] In a specific implementation method, based on the third candidate node, determining the first fourth candidate node to the qth fourth candidate node in the second reference frame according to a preset method may include: according to the decoding order of the prediction tree, determining the first fourth candidate node, the second fourth candidate node,..., the qth fourth candidate node decoded after the third candidate node in the second reference frame.
[0366] It should be noted that, no matter in the first reference frame or the second reference frame, the preset methods are similar. Taking the first reference frame as an example, it is assumed that the at least one second candidate node includes node c and node d.
[0367] For example, if the selected node is determined to be node d based on the inter-frame prediction mode value, the previous decoded node a of the current node is first determined; then the first candidate node b whose geometric parameters meet the first condition with the previous decoded node a is determined; according to the decoding order of the prediction tree, the first second candidate node c and the second second candidate node d encoded or decoded after the first candidate node b are determined in sequence in the first reference frame; the second second candidate node d determined at this time is the selected node.
[0368] In another specific implementation, based on the first candidate node, determining the first second candidate node to the pth second candidate node in a preset manner in the first reference frame may include: determining in order of size of the horizontal azimuth angles, in the first reference frame, the first second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node, the second second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first second candidate node, ..., the pth second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the i-1th second candidate node; wherein, the radar laser index numbers of the first second candidate node, the second second candidate node, ..., and the pth second candidate node are all the same as the radar laser index number of the previous decoded node.
[0369] In another specific implementation method, based on the third candidate node, determining the 1st fourth candidate node to the qth fourth candidate node in a preset manner in the second reference frame may include: determining in order of size of the horizontal azimuth angles, in the second reference frame, the 1st fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the third candidate node, the 2nd fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the 1st fourth candidate node, ..., the qth fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the j-1th fourth candidate node; wherein, the radar laser index numbers of the 1st fourth candidate node, the 2nd fourth candidate node, ..., and the qth fourth candidate node are all the same as the radar laser index number of the previous decoded node.
[0370] It should also be noted that, still taking the first reference frame as an example, assuming that the at least one second candidate node includes node c and node d. For example, if the selected node is determined to be node d based on the inter-frame prediction mode value, the first step is to determine the previous decoded node a of the current node; then determine the first candidate node b whose geometric parameters meet the first condition with the previous decoded node a; and then, based on the order of the horizontal azimuth angle, the specific steps are as follows:
[0371] In the first reference frame, the first second candidate node c with the same radar laser index number and a first horizontal azimuth angle greater than the horizontal azimuth angle of the first candidate node b is determined, and the second second candidate node d with the same radar laser index number and a first horizontal azimuth angle greater than the horizontal azimuth angle of the first second candidate node c is determined; the second second candidate node d determined at this time is the selected node.
[0372] For example, taking FIG. 20 as an example, when performing inter-frame prediction decoding on the current node to be decoded, the previous decoded node a of the current node in the prediction tree is traversed;
[0373] In the first reference frame (i.e. the previous reference frame), find the node a that has the same value as the node a that has been decoded before the current node is decoded. and node b with laserID, and nodes c and d encoded or decoded after node b in the first reference frame as inter-frame candidate points;
[0374] In the second reference frame (i.e. the reference frame of the previous frame after global motion), find the node a that has the same value as the previous decoded node a of the current node. and laserID node g, the nodes e and f encoded or decoded after node g in the second reference frame are used as inter-frame candidate points, and the nodes e and f are Replaced by the parent node of the current node
[0375] At this time, if the prediction mode is an inter-frame prediction mode, then the inter-frame prediction mode value obtained by decoding can be used to determine the selected node from at least one of node c, node d, node e and node f, and then determine the prediction value of the current node; or, the first candidate node and the second candidate node can also be included here, so the selected node can also be determined from at least one of node b, node g, node c, node d, node e and node f, and then determine the prediction value of the current node; there is no specific limitation on this.
[0376] It should also be noted that in the embodiment of the present application, the selected node is determined based on the inter-frame prediction mode value. Here, a set of inter-frame candidate nodes identical to that used by the encoder can also be constructed. The inter-frame candidate node set can be composed of at least one of node c, node d, node e, and node f, or at least one of node b, node g, node c, node d, node e, and node f. The inter-frame prediction mode value obtained by decoding can then be used to determine the selected node from the inter-frame candidate node set, thereby determining the predicted value of the current node.
[0377] Furthermore, in some embodiments, the method may also include: decoding the code stream to determine the predicted residual value and quantization parameter of the current node; performing inverse quantization processing on the predicted residual value according to the quantization parameter to obtain an inverse quantized residual value; and determining the reconstruction information of the current node based on the inverse quantized residual value and the predicted value.
[0378] In a specific embodiment, determining the reconstruction information of the current node according to the inverse quantization residual value and the prediction value may include: performing an addition operation according to the inverse quantization residual value and the prediction value to determine the reconstruction information of the current node.
[0379] That is to say, in an embodiment of the present application, the predicted residual value of the current node is obtained by decoding the code stream, and the quantization parameter is obtained by decoding the code stream; then the predicted residual value is inversely quantized according to the quantization parameter to obtain an inversely quantized residual value; then the inversely quantized residual value and the predicted value are summed to obtain the reconstruction information of the current node, such as restoring the reconstructed geometric position information of the current node, and finally completing the geometric reconstruction at the decoding end.
[0380] Furthermore, in embodiments of the present application, the decoding method primarily optimizes decoding of inter-frame prediction mode values. A flag may also be used to determine whether the current node is using inter-frame prediction mode. Therefore, in some embodiments, the method further includes: decoding the bitstream to determine the value of the first identification information; if the first identification information indicates that the current node is using inter-frame prediction mode, then performing the steps of decoding the bitstream to determine the value of at least one mode identification information.
[0381] Furthermore, with respect to the first identification information, in some embodiments, the method further includes:
[0382] If the value of the first identification information is the third value, determining that the first identification information indicates that the current node does not use the inter-frame prediction mode;
[0383] If the value of the first identification information is the fourth value, it is determined that the first identification information indicates that the current node uses the inter-frame prediction mode.
[0384] It should be noted that in the embodiment of the present application, the third value is different from the fourth value, and the third value and the fourth value can be in parameter form or in digital form. Specifically, the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0385] Exemplarily, for the third value and the fourth value, the third value can be set to 1 and the fourth value can be set to 0; or, the third value can be set to 0 and the fourth value can be set to 1; or, the third value can be set to true and the fourth value can be set to false; or, the third value can be set to false and the fourth value can be set to true; but this is not specifically limited here.
[0386] In an embodiment of the present application, taking the flag written into the code stream as an example, assuming that the third value is set to 0 and the fourth value is set to 1, if the value of the first identification information is 0, then it can be determined that the current node does not use the inter-frame prediction mode, that is, there is no need to execute the decoding method described in the embodiment of the present application; if the value of the first identification information is 1, then it can be determined that the current node uses the inter-frame prediction mode, that is, it is necessary to execute the decoding method described in the embodiment of the present application.
[0387] Furthermore, in the embodiments of the present application, a flag may be set to determine whether the decoding method of the embodiments of the present application is enabled. Therefore, in some embodiments, the method further includes: decoding the bitstream to determine the value of the second identification information; if the second identification information indicates that the current node has enabled the target inter-frame decoding mode, then performing the steps of decoding the bitstream to determine the value of at least one mode identification information.
[0388] Furthermore, with respect to the second identification information, in some embodiments, the method further includes:
[0389] If the value of the second identification information is the fifth value, it is determined that the second identification information indicates that the current node does not enable the target inter-frame decoding mode;
[0390] If the value of the second identification information is the sixth value, it is determined that the second identification information indicates that the current node enables the target inter-frame decoding mode.
[0391] It should be noted that in the embodiment of the present application, the fifth value and the sixth value are different, and the fifth value and the sixth value can be in parameter form or in digital form. Specifically, the second identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0392] Exemplarily, for the fifth value and the sixth value, the fifth value can be set to 1 and the sixth value can be set to 0; or, the fifth value can be set to 0 and the sixth value can be set to 1; or, the fifth value can be set to true and the sixth value can be set to false; or, the fifth value can be set to false and the sixth value can be set to true; but this is not specifically limited here.
[0393] In an embodiment of the present application, taking the flag written into the code stream as an example, assuming that the fifth value is set to 0 and the sixth value is set to 1, if the value of the second identification information is 0, then it can be determined that the current node does not enable the target inter-frame decoding mode, that is, there is no need to execute the decoding method described in the embodiment of the present application; if the value of the second identification information is 1, then it can be determined that the current node enables the target inter-frame decoding mode, that is, it is necessary to execute the decoding method described in the embodiment of the present application.
[0394] In short, in the embodiment of the present application, a 1-bit flag (i.e., the second identification information) can be used to indicate whether the target inter-frame decoding mode is enabled or not. This flag can be placed in the header information of a high-level syntax element, such as a geometry header; and this flag can be conditionally enabled under certain conditions. If this flag does not appear in the bitstream, its default value is a fixed value. At the decoding end, if this flag does not appear in the bitstream, decoding may not be performed, and its default value is a fixed value.
[0395] This embodiment provides a decoding method, which first decodes a bitstream and determines the value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode; then, based on the value of the at least one mode identification information, the inter-frame prediction mode value of the current node is determined; and then, based on the inter-frame prediction mode value, the prediction value of the current node is determined. In this way, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct decoding. Instead, the value of at least one mode identification information is determined by decoding the bitstream, and then the inter-frame prediction mode value is determined based on the value of the at least one mode identification information; wherein the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This method takes into account the frequency distribution of inter-frame prediction modes, i.e., the more likely an inter-frame prediction mode is to appear, the earlier the corresponding inter-frame prediction mode value is, thereby reducing the number of coded bits, saving bit rate, and thereby improving encoding and decoding efficiency.
[0396] In another embodiment of the present application, see Figure 22, which shows a schematic flow chart of an encoding method provided by an embodiment of the present application. As shown in Figure 22, the method may include:
[0397] S2201: Determine the inter-frame prediction mode value of the current node.
[0398] It should be noted that the encoding method of the embodiment of the present application is applied to an encoder. In addition, the encoding method can specifically refer to a point cloud inter-frame prediction method; more specifically, it can be an encoding method of a point cloud inter-frame geometric information encoding mode, or it can also be a Golomb coding method of a point cloud inter-frame geometric information encoding mode to implement encoding processing of inter-frame prediction mode values.
[0399] It should also be noted that in the embodiment of the present application, in the point cloud, a point can be all points in the point cloud, or it can be a portion of points in the point cloud, which are relatively concentrated in space. Here, the current node can specifically refer to the node currently to be encoded in the point cloud.
[0400] In some embodiments, determining the inter-frame prediction mode value of the current node may include:
[0401] Determine an inter-frame candidate node set; wherein the inter-frame candidate node set includes at least one candidate node;
[0402] A selected node is determined from the inter-frame candidate node set, and an inter-frame prediction mode value of the current node is determined according to an index position of the selected node in the inter-frame candidate node set.
[0403] In a specific embodiment, determining the selected node from the inter-frame candidate node set may include:
[0404] Based on the rate-distortion cost method, a cost is calculated for at least one candidate node in the inter-frame candidate node set to determine a cost value of each of the at least one candidate node; a minimum cost value is determined from the cost values of each of the at least one candidate node, and the candidate node corresponding to the minimum cost value is selected as the node.
[0405] In the embodiment of the present application, the inter-frame candidate node set includes at least one candidate node. Here, the inter-frame candidate node set may include one candidate node, two candidate nodes, or more candidate nodes, which is not specifically limited here.
[0406] Furthermore, in some embodiments, referring to FIG. 23 , determining an inter-frame candidate node set may include:
[0407] S2301: Determine the previous encoded node of the current node.
[0408] S2302: Determine a first candidate node whose geometric parameters satisfy a first condition with those of a previous encoded node in a first reference frame, and determine at least one second candidate node in the first reference frame based on the first candidate node.
[0409] S2303: Determine a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame, determine at least one fourth candidate node in the second reference frame based on the third candidate node, and set the horizontal azimuth angle of the at least one fourth candidate node to the horizontal azimuth angle of the parent node of the current node.
[0410] S2304: Determine an inter-frame candidate node set according to at least one second candidate node and / or at least one fourth candidate node.
[0411] It should be noted that in the embodiment of the present application, the current node is located in the current frame. The current frame refers to the frame currently to be encoded, and the first reference frame and the second reference frame are both frames that have already been encoded, and the first reference frame and the second reference frame are different. Furthermore, determining the previous encoded node of the current node may include: determining a prediction tree corresponding to the current frame; and determining the previous encoded node of the current node based on the encoding order of the prediction tree.
[0412] In the embodiments of the present application, two different methods can be used to construct the prediction tree structure, including: KD-Tree (high-latency slow mode) and low-latency fast mode (using lidar calibration information). When using lidar calibration information, each point is divided into different lasers, and the prediction tree structure is established according to the different lasers.
[0413] It should also be noted that, in the embodiment of the present application, the encoding order of the prediction tree can be one of the following: unordered, Morton order, azimuth order, radial distance order, etc., which is not specifically limited here.
[0414] In some embodiments, the first reference frame may be the K frames preceding the current frame, where K is an integer greater than 0; the second reference frame may be obtained by performing global motion on the first reference frame. For example, in a specific embodiment, the first reference frame may be the frame preceding the current frame; the second reference frame may be obtained by performing global motion on the preceding frame.
[0415] In some embodiments, the first reference frame may be the frame preceding the current frame, and the second reference frame may be the frame preceding the frame preceding the current frame. For example, if the current frame is Frame t, the first reference frame may be Frame t-1, and the second reference frame may be Frame t-2, where t is an integer.
[0416] It should also be noted that in the embodiment of the present application, the geometric parameters here refer to the parameters in the radar coordinate system. Among them, the geometric parameters may include: horizontal azimuth And the radar laser index number laserID.
[0417] In some embodiments, the geometric parameters satisfy the first condition, which may include: the radar laser index signal is the same as the radar laser index sequence number of the previous encoded node; the horizontal azimuth angle is the same as the horizontal azimuth angle of the previous encoded node.
[0418] In an embodiment of the present application, determining a first candidate node whose geometric parameters meet a first condition with respect to a previous encoded node in a first reference frame may specifically include: a radar laser index signal of the first candidate node is the same as a radar laser index sequence number of the previous encoded node; and a horizontal azimuth angle of the first candidate node is the same as a horizontal azimuth angle of the previous encoded node.
[0419] In an embodiment of the present application, determining a third candidate node whose geometric parameters meet the first condition with the previous encoded node in the second reference frame may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index sequence number of the previous encoded node; and the horizontal azimuth angle of the third candidate node is the same as the horizontal azimuth angle of the previous encoded node.
[0420] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous encoded node, and With the previous encoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous encoded node, and With the previous encoded node same.
[0421] In some embodiments, the geometric parameters satisfy the first condition, which may include: the radar laser index signal is the same as the radar laser index sequence number of the previous encoded node; the horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the previous encoded node.
[0422] In an embodiment of the present application, determining a first candidate node whose geometric parameters meet a first condition with respect to a previous encoded node in a first reference frame may specifically include: a radar laser index signal of the first candidate node is the same as a radar laser index sequence number of the previous encoded node; and a horizontal azimuth angle of the first candidate node is greater than and closest to the horizontal azimuth angle of the previous encoded node.
[0423] In an embodiment of the present application, determining a third candidate node whose geometric parameters meet the first condition with the previous encoded node in the second reference frame may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index sequence number of the previous encoded node; and the horizontal azimuth angle of the third candidate node is greater than and closest to the horizontal azimuth angle of the previous encoded node.
[0424] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous encoded node, and is the first node that is greater than the previous encoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous encoded node, and is the first node that is greater than the previous encoded node
[0425] In some embodiments, the geometric parameters satisfy the first condition, which may include: the radar laser index signal is the same as the radar laser index sequence number of the previous encoded node; the horizontal azimuth angle is less than and closest to the horizontal azimuth angle of the previous encoded node.
[0426] In an embodiment of the present application, determining a first candidate node whose geometric parameters meet a first condition with respect to a previous encoded node in a first reference frame may specifically include: a radar laser index signal of the first candidate node is the same as a radar laser index sequence number of the previous encoded node; and a horizontal azimuth angle of the first candidate node is smaller than and closest to the horizontal azimuth angle of the previous encoded node.
[0427] In an embodiment of the present application, determining a third candidate node whose geometric parameters meet the first condition with the previous encoded node in the second reference frame may specifically include: the radar laser index signal of the third candidate node is the same as the radar laser index sequence number of the previous encoded node; and the horizontal azimuth angle of the third candidate node is smaller than and closest to the horizontal azimuth angle of the previous encoded node.
[0428] That is, in the first reference frame, the first candidate node found has the same laserID as the laserID of the previous encoded node, and is the first node that is smaller than the previous encoded node In the second reference frame, the third candidate node found has the same laserID as the laserID of the previous encoded node, and is the first node that is smaller than the previous encoded node
[0429] Furthermore, when the second reference frame is a reference frame obtained by global motion of the first reference frame, the horizontal azimuth angles of the third candidate node and at least one fourth candidate node are Need to be replaced with the parent node of the current node
[0430] In some embodiments, determining at least one second candidate node in the first reference frame according to the first candidate node may include:
[0431] The determination of at least one second candidate node and at least one fourth candidate node is described in detail below in conjunction with several specific implementations.
[0432] In a specific implementation, determining at least one second candidate node in the first reference frame based on the first candidate node may include: determining the first second candidate node to the mth second candidate node in the first reference frame in sequence according to the encoding order of the prediction tree; wherein m is a positive integer greater than 0. Exemplarily, the first second candidate node to the mth second candidate node may specifically be: the first second candidate node, the second second candidate node, ..., the mth second candidate node. It should be noted that m here may be the same as or different from p at the decoding end, and p is less than or equal to the value of m.
[0433] In a specific implementation, determining at least one fourth candidate node in the second reference frame based on the third candidate node may include: determining the first fourth candidate node to the nth fourth candidate node in the second reference frame in sequence according to the encoding order of the prediction tree; wherein n is a positive integer greater than 0. Exemplarily, the first fourth candidate node to the nth fourth candidate node may specifically be: the first fourth candidate node, the second fourth candidate node, ..., the nth fourth candidate node. It should be noted that n here may be the same as or different from q at the decoding end, and q is less than or equal to the value of n.
[0434] Taking the first reference frame as an example, assuming that the at least one second candidate node includes node c and node d. Exemplarily, the previous coded node a of the current node is first determined; then, a first candidate node b is determined whose geometric parameters satisfy a first condition with respect to the previous coded node a; and according to the coding order of the prediction tree, the first second candidate node c and the second second candidate node d, which are encoded or decoded after the first candidate node b, are sequentially determined in the first reference frame.
[0435] In another specific implementation, based on the first candidate node, determining the first second candidate node to the mth second candidate node in a preset manner in the first reference frame may include: determining in order of size of the horizontal azimuth angles, in the first reference frame, the first second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node, the second second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first second candidate node, ..., the mth second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the m-1th second candidate node; wherein, the radar laser index numbers of the first second candidate node, the second second candidate node, ..., the mth second candidate node are all the same as the radar laser index number of the previous encoded node.
[0436] In another specific implementation method, based on the third candidate node, determining the first fourth candidate node to the nth fourth candidate node in a preset manner in the second reference frame may include: determining in order of size of the horizontal azimuth angles, in the second reference frame, the first fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the third candidate node, the second fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first fourth candidate node, ..., the nth fourth candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the n-1th fourth candidate node; wherein, the radar laser index numbers of the first fourth candidate node, the second fourth candidate node, ..., and the nth fourth candidate node are all the same as the radar laser index number of the previous decoded node.
[0437] Still taking the first reference frame as an example, assuming that the at least one second candidate node includes node c and node d. For example, first determine the previous coded node a of the current node; then determine a first candidate node b whose geometric parameters satisfy the first condition with respect to the previous coded node a; and then, based on the magnitude of the horizontal azimuth angle, perform the following operations:
[0438] In the first reference frame, the first second candidate node c is determined, which has the same radar laser index number and a first horizontal azimuth angle greater than the horizontal azimuth angle of the first candidate node b, and the second second candidate node d is determined, which has the same radar laser index number and a first horizontal azimuth angle greater than the horizontal azimuth angle of the first second candidate node c.
[0439] For example, taking FIG. 20 as an example, when performing inter-frame prediction coding on the current node to be coded, the previous coded node a of the current node in the prediction tree is traversed;
[0440] In the first reference frame (i.e. the previous reference frame), find the node a that has the same encoding as the node a that has been encoded before the current node. and node b with laserID, and nodes c and d encoded or decoded after node b in the first reference frame as inter-frame candidate points;
[0441] In the second reference frame (i.e. the reference frame of the previous frame after global motion), find the node a that has been encoded before the current node is encoded. and laserID node g, the nodes e and f encoded or decoded after node g in the second reference frame are used as inter-frame candidate points; at the same time, nodes e and f Replaced by the parent node of the current node
[0442] It should also be noted that, in the embodiment of the present application, the selection of nodes c and d may also be performed in the first reference frame according to the horizontal azimuth angle. In the order of size, determine the node c whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node b, and determine the node d whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of node c. Similarly, for the selection of nodes e and f, it can also be in the second reference frame, according to the horizontal azimuth angle , determine the node e whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the third candidate node g, and determine the node f whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of node e; no specific limitation is made here.
[0443] In this way, the inter-frame candidate node set may include at least one of node c, node d, node e and node f; or, the inter-frame candidate node set may also include at least one of node b, node g, node c, node d, node e and node f, without specific limitation.
[0444] Furthermore, if the prediction mode is an inter-frame prediction mode, a selected node can be determined from the inter-frame candidate node set. The determination of the selected node from the inter-frame candidate node set can involve selecting different candidate nodes using an RDO method. In a specific embodiment, the method can be: calculating the cost of each candidate node in the inter-frame candidate node set using a rate-distortion cost method to determine a cost value for at least one candidate node; selecting the minimum cost value from these cost values, and then selecting the candidate node corresponding to the minimum cost value as the selected node.
[0445] In this way, after the selected node is determined from the inter-frame candidate node set, the inter-frame prediction mode value of the current node can be determined according to the index position of the selected node in the inter-frame candidate node set.
[0446] S2202: Determine a value of at least one mode identification information according to the inter-frame prediction mode value.
[0447] It should be noted that, in an embodiment of the present application, the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; wherein i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode.
[0448] It should also be noted that in the embodiment of the present application, the inter-frame prediction mode value can be from 0 to N, that is, there can be a maximum of N+1 inter-frame prediction modes. Among them, the i-th mode identification information can be represented by flagi. For the mode identification information, here, a maximum of N mode identification information can be included, specifically: flag0, flag1, ..., flagN-1.
[0449] In a possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, determining the value of at least one mode identification information according to the inter-frame prediction mode value may include:
[0450] Determine the value of the i-th mode identification information according to the inter-frame prediction mode value;
[0451] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then the i+1 mode identification information is used as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0452] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0453] It should be noted that, in an embodiment of the present application, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then the operation of determining the mode identification information is terminated, and the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information and other i+1 mode identification information can be used as at least one mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i=i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, at which time the operation of determining the mode identification information is terminated.
[0454] Exemplarily, first determine whether the inter-frame prediction mode value of the current node is greater than 0, and determine the value of flag0; if the inter-frame prediction mode value is not greater than 0, end the operation of determining the mode identification information, and at this time at least one mode identification information includes flag0; if the inter-frame prediction mode value is greater than 0, continue to determine whether the inter-frame prediction mode value of the current node is greater than 1, and determine the value of flag1; if the inter-frame prediction mode value is not greater than 1, end the operation of determining the mode identification information, and at this time at least one mode identification information may include flag0 and flag1; if the inter-frame prediction mode value is greater than 1, continue to determine whether the inter-frame prediction mode value of the current node is greater than 2, and determine the value of flag2; and so on, if the inter-frame prediction mode value is greater than M-1, continue to determine whether the inter-frame prediction mode value of the current node is greater than M, and determine the value of flagM, and at this time at least one mode identification information may include flag0, flag1, ..., flagM; wherein M is an integer greater than or equal to 0 and less than N.
[0455] In some embodiments, determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:
[0456] If the inter-frame prediction mode value is less than or equal to i, determining the value of the i-th mode identification information to be the first value;
[0457] If the inter-frame prediction mode value is greater than i, the value of the i-th mode identification information is determined to be the second value.
[0458] In the embodiment of the present application, the first value and the second value are different, and the first value and the second value can be in parameter form or in digital form. Specifically, the i-th mode identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0459] Exemplarily, for the first value and the second value, the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true; but this is not specifically limited here.
[0460] In an embodiment of the present application, taking flagi written into the bitstream as an example, assuming that the first value is set to 0 and the second value is set to 1, at this time, if the inter-frame prediction mode value of the current node is less than or equal to i, then it can be determined that the value of flagi is 0; if the inter-frame prediction mode value of the current node is greater than i, then it can be determined that the value of flagi is 1.
[0461] In another possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, determining the value of at least one mode identification information according to the inter-frame prediction mode value may include:
[0462] Determine the value of the i-th mode identification information according to the inter-frame prediction mode value;
[0463] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the i+1 mode identification information is used as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0464] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0465] It should be noted that, in an embodiment of the present application, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the operation of determining the mode identification information is terminated, and the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information and other i+1 mode identification information can be used as at least one mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i=i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, at which time the operation of determining the mode identification information is terminated.
[0466] Exemplarily, first determine whether the inter-frame prediction mode value of the current node is equal to 0, and determine the value of flag0; if the inter-frame prediction mode value is equal to 0, then end the operation of determining the mode identification information, at this time at least one mode identification information includes flag0; if the inter-frame prediction mode value is not equal to 0, then continue to determine whether the inter-frame prediction mode value of the current node is equal to 1, and determine the value of flag1; if the inter-frame prediction mode value is equal to 1, then end the operation of determining the mode identification information, at this time at least one mode identification information may include flag0 and flag1; if the inter-frame prediction mode value is not equal to 1, then continue to determine whether the inter-frame prediction mode value of the current node is equal to 2, and determine the value of flag2; and so on, if the inter-frame prediction mode value is not equal to M-1, then continue to determine whether the inter-frame prediction mode value of the current node is equal to M, and determine the value of flagM, at this time at least one mode identification information may include flag0, flag1, ..., flagM; wherein M is an integer greater than or equal to 0 and less than N.
[0467] In some embodiments, determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:
[0468] If the inter-frame prediction mode value is not equal to i, determining the value of the i-th mode identification information to be the first value;
[0469] If the inter-frame prediction mode value is equal to i, the value of the i-th mode identification information is determined to be the second value.
[0470] In the embodiment of the present application, the first value and the second value may be different.
[0471] For example, taking flagi written into the bitstream as an example, assuming that the first value is set to 0 and the second value is set to 1, at this time if the inter-frame prediction mode value of the current node is not equal to i, then it can be determined that the value of flagi is 0; if the inter-frame prediction mode value of the current node is equal to i, then it can be determined that the value of flagi is 1.
[0472] S2203: Encode the value of at least one mode identification information, and write the obtained coded bits into the bitstream.
[0473] It should be noted that in the embodiment of the present application, after obtaining the value of at least one mode identification information, the encoding end needs to write the value of the at least one mode identification information into the bit stream; in this way, the value of the at least one mode identification information can be obtained by decoding the bit stream at the decoding end.
[0474] In some embodiments, encoding the value of at least one mode identification information and writing the resulting coded bits into the bitstream may include: encoding the value of at least one mode identification information based on a first coding mode and writing the resulting coded bits into the bitstream.
[0475] In the embodiment of the present application, the first encoding mode may include at least one of the following: an encoding mode with fixed context information, an encoding mode with adaptive context information, and an encoding mode without using context information.
[0476] That is to say, in an embodiment of the present application, for the value of at least one mode identification information, encoding processing can be performed using an encoding mode of fixed context information, or encoding processing can be performed using an encoding mode of adaptive context information, or encoding processing can be performed using an encoding mode that does not use context information, and no specific limitation is made here.
[0477] Exemplarily, for the value of the i-th mode identification information, the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information can be used to encode flagi, and the obtained coded bits are written into the bitstream.
[0478] In a possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, encoding the value of at least one mode identification information and writing the obtained coded bits into the bitstream may include:
[0479] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then encoding the value of the i-th mode identification information and writing the obtained coded bits into the bitstream;
[0480] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, the value of the i-th mode identification information is encoded and the obtained coding bits are written into the bitstream; and i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0481] It should be noted that, in the embodiment of the present application, the value of the i-th mode identification information is first encoded, the obtained coding bits are written into the code stream, and it is determined whether the inter-frame prediction mode value of the current node is less than or equal to i; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, the encoding operation is terminated; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, i=i+1 is executed, and then the value of the i-th mode identification information is continued to be encoded, the obtained coding bits are written into the code stream, and it is continued to determine whether the inter-frame prediction mode value of the current node is less than or equal to i, until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, at which time the encoding operation is terminated.
[0482] Exemplarily, first use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag0, and judge whether the inter-frame prediction mode value of the current node is greater than 0; if the inter-frame prediction mode value is not greater than 0, then end the encoding operation; if the inter-frame prediction mode value is greater than 0, then continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag1, and judge whether the inter-frame prediction mode value of the current node is greater than 1; if the inter-frame prediction mode value is not greater than 1, then end the encoding operation; if the inter-frame prediction mode value is greater than 0, then continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag1, and judge whether the inter-frame prediction mode value of the current node is greater than 1; if the inter-frame prediction mode value is not greater than 1, then end the encoding operation; if the inter-frame prediction If the mode value is greater than 1, continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag2, and judge whether the inter-frame prediction mode value of the current node is greater than 2; similarly, if the inter-frame prediction mode value is greater than M-1, continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flagM, and judge whether the inter-frame prediction mode value of the current node is greater than M. If the inter-frame prediction mode value is not greater than M, end the encoding operation; where M is an integer greater than or equal to 0 and less than N.
[0483] In a specific embodiment, when i is equal to N-1, the method may further include:
[0484] Determine the value of the N-1th mode identification information according to the inter-frame prediction mode value;
[0485] The value of the (N-1)th mode identification information is encoded, and the obtained encoded bits are written into the code stream.
[0486] Furthermore, in some embodiments, determining the value of the (N-1)th mode identification information according to the inter-frame prediction mode value may include:
[0487] If the inter-frame prediction mode value is less than or equal to N-1, determining the value of the N-1th mode identification information to be the first value;
[0488] If the inter-frame prediction mode value is equal to N, the value of the (N-1)th mode identification information is determined to be the second value.
[0489] It should be noted that in the embodiment of the present application, for N+1 inter-frame prediction modes, there are at most N corresponding mode identification information, namely: the 0th mode identification information flag0, the 1st mode identification information flag1, ..., the N-1th mode identification information flagN-1.
[0490] It should also be noted that, in the embodiment of the present application, the encoding mode of fixed context information / the encoding mode of adaptive context information / the encoding mode without context information can be used to encode the value of flagi, and determine whether the inter-frame prediction mode value of the current node is greater than i; if the inter-frame prediction mode value is not greater than i, the encoding operation is terminated; if the inter-frame prediction mode value is greater than i, the encoding mode of fixed context information / the encoding mode of adaptive context information / the encoding mode without context information is continued to encode the value of flagi+1, and determine whether the inter-frame prediction mode value of the current node is greater than i+1. Wherein, i is an integer greater than or equal to 0 and less than N-1.
[0491] In this way, when i is equal to N-1, the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information can still be used to encode the value of flagN-1, and determine whether the inter-frame prediction mode value of the current node is greater than N-1; if the inter-frame prediction mode value is not greater than N-1, the coding operation is terminated, that is, the inter-frame prediction mode value is equal to N-1; if the inter-frame prediction mode value is greater than N-1, the coding operation is terminated, that is, the inter-frame prediction mode value is equal to N.
[0492] In another specific embodiment, if the inter-frame prediction mode value of the current node is greater than M, Exponential Golomb coding may be used. In some embodiments, when i is equal to M, the method may further include:
[0493] If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M, determining the first inter-frame prediction mode residual value of the current node according to the inter-frame prediction mode value and the values of the M+1 mode identification information;
[0494] The first inter-frame prediction mode residual value of the current node is encoded based on the second encoding mode, and the obtained encoding bits are written into the bitstream.
[0495] In an embodiment of the present application, the M+1 mode identification information may include: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0496] In an embodiment of the present application, the second coding mode may be an Exponential Golomb coding method, such as a K-order Exponential Golomb coding method. K-order Exponential Golomb coding is a lossless data compression method that can achieve very high coding efficiency. Therefore, to improve coding efficiency, when the inter-frame prediction mode value of the current node is greater than M, the Exponential Golomb coding method may be used to encode the residual value of the first inter-frame prediction mode.
[0497] That is to say, for the encoding end, first use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is less than or equal to 0, the encoding operation is terminated; if the value of flag0 indicates that the inter-frame prediction mode value of the current node is greater than 0, then use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flag1; and so on, use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flagM; if the value of flagM indicates that the inter-frame prediction mode value of the current node is less than or equal to M, the encoding operation is terminated; if the value of flagM indicates that the inter-frame prediction mode value of the current node is greater than M, it is necessary to calculate the first inter-frame prediction mode residual value based on the values of M+1 mode identification information, and then use the exponential Columbus coding method to encode the first inter-frame prediction mode residual value.
[0498] In some embodiments, determining the first inter-frame prediction mode residual value of the current node based on the inter-frame prediction mode value and the values of M+1 mode identification information may include: performing a subtraction operation on the inter-frame prediction mode value and the values of M+1 mode identification information to determine the first inter-frame prediction mode residual value of the current node.
[0499] In the embodiment of the present application, after obtaining the values of M+1 mode identification information such as flag0, flag1, ..., flagM, assuming that the inter-frame prediction mode value of the current node is represented by inter mode and the residual value of the first inter-frame prediction mode is represented by residual mode1, the calculation formula of residual mode1 can be as follows: residual mode1 = inter mode - (flag0 + flag1 + ... + flagM) (24)
[0500] In some embodiments, determining the first inter-frame prediction mode residual value of the current node based on the inter-frame prediction mode value and the values of M+1 mode identification information may include: performing a subtraction operation on the inter-frame prediction mode value and (M+1) to determine the first inter-frame prediction mode residual value of the current node.
[0501] In the embodiment of the present application, it is assumed that the first value is set to 0 and the second value is set to 1. That is, when the value of flagi is 1, it is determined that the inter-frame prediction mode value of the current node is greater than i, and the encoding operation needs to be continued. Therefore, if the inter-frame prediction mode value of the current node is greater than M, at this time, the values of flag0, flag1, ..., flagM are all equal to 1, then the calculation formula of the residual value of the first inter-frame prediction mode residual mode1 can also be as follows: residual mode1 = inter mode - (M + 1) (25)
[0502] In another possible implementation, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, encoding the value of at least one mode identification information and writing the obtained coded bits into the bitstream may include:
[0503] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the value of the i-th mode identification information is encoded, and the obtained encoding bits are written into the bitstream;
[0504] If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, the value of the i-th mode identification information is encoded and the obtained coding bits are written into the bitstream; and i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0505] It should be noted that, in the embodiment of the present application, the value of the i-th mode identification information is first encoded, the obtained coding bits are written into the code stream, and it is determined whether the inter-frame prediction mode value of the current node is equal to i; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, the encoding operation is terminated; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, i=i+1 is executed, and then the value of the i-th mode identification information is continued to be encoded, the obtained coding bits are written into the code stream, and it is continued to determine whether the inter-frame prediction mode value of the current node is equal to i, until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, at which time the encoding operation is terminated.
[0506] Exemplarily, first use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag0, and judge whether the inter-frame prediction mode value of the current node is equal to 0; if the inter-frame prediction mode value is equal to 0, then end the encoding operation; if the inter-frame prediction mode value is not equal to 0, then continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag1, and judge whether the inter-frame prediction mode value of the current node is equal to 1; if the inter-frame prediction mode value is equal to 1, then end the encoding operation; if the inter-frame prediction mode value is equal to 1 If the value is not equal to 1, continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flag2, and judge whether the inter-frame prediction mode value of the current node is equal to 2; similarly, if the inter-frame prediction mode value is not equal to M-1, continue to use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode the value of flagM, and judge whether the inter-frame prediction mode value of the current node is equal to M. If the inter-frame prediction mode value is equal to M, end the encoding operation; where M is an integer greater than or equal to 0 and less than N.
[0507] In a specific embodiment, when i is equal to N-1, the method may further include:
[0508] Determine the value of the N-1th mode identification information according to the inter-frame prediction mode value;
[0509] The value of the (N-1)th mode identification information is encoded, and the obtained encoded bits are written into the code stream.
[0510] Furthermore, in some embodiments, determining the value of the (N-1)th mode identification information according to the inter-frame prediction mode value may include:
[0511] If the inter-frame prediction mode value is equal to N, determining the value of the N-1th mode identification information to be the first value;
[0512] If the inter-frame prediction mode value is equal to N-1, the value of the N-1th mode identification information is determined to be the second value.
[0513] It should be noted that in the embodiment of the present application, for N+1 inter-frame prediction modes, there are at most N corresponding mode identification information, namely: the 0th mode identification information flag0, the 1st mode identification information flag1, ..., the N-1th mode identification information flagN-1.
[0514] It should also be noted that, in the embodiment of the present application, the encoding mode of fixed context information / the encoding mode of adaptive context information / the encoding mode without context information can be used to encode the value of flagi, and determine whether the inter-frame prediction mode value of the current node is equal to i; if the inter-frame prediction mode value is equal to i, the encoding operation is terminated; if the inter-frame prediction mode value is not equal to i, the encoding mode of fixed context information / the encoding mode of adaptive context information / the encoding mode without context information is continued to encode the value of flagi+1, and determine whether the inter-frame prediction mode value of the current node is equal to i+1. Wherein, i is an integer greater than or equal to 0 and less than N-1.
[0515] In this way, when i is equal to N-1, the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information can still be used to encode the value of flagN-1, and determine whether the inter-frame prediction mode value of the current node is equal to N-1; if the inter-frame prediction mode value is equal to N-1, the coding operation is terminated, that is, the inter-frame prediction mode value is equal to N-1; if the inter-frame prediction mode value is not equal to N-1, the coding operation is terminated, that is, the inter-frame prediction mode value is equal to N.
[0516] In another specific embodiment, under this implementation, if the inter-frame prediction mode value of the current node is not equal to M, Exponential Golomb coding may also be used. In some embodiments, when i is equal to M, the method may further include:
[0517] If the Mth mode identification information indicates that the inter prediction mode value of the current node is not equal to M, determining the second inter prediction mode residual value of the current node according to the inter prediction mode value and the values of the M+1 mode identification information;
[0518] The second inter-frame prediction mode residual value of the current node is encoded based on the second encoding mode, and the obtained encoding bits are written into the bitstream.
[0519] In an embodiment of the present application, the M+1 mode identification information may include: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0520] In an embodiment of the present application, the second coding mode may be an Exponential Golomb coding method, such as a K-order Exponential Golomb coding method. K-order Exponential Golomb coding is a lossless data compression method that can achieve very high coding efficiency. Therefore, to improve coding efficiency, when the inter-frame prediction mode value of the current node is not equal to M, the Exponential Golomb coding method may be used to encode the second inter-frame prediction mode residual value.
[0521] That is to say, for the encoding end, first use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flag0. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is equal to 0, the encoding operation is terminated; if the value of flag0 indicates that the inter-frame prediction mode value of the current node is not equal to 0, then use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flag1; and so on, use the coding mode of fixed context information / the coding mode of adaptive context information / the coding mode without context information to encode flagM; if the value of flagM indicates that the inter-frame prediction mode value of the current node is equal to M, the encoding operation is terminated; if the value of flagM indicates that the inter-frame prediction mode value of the current node is not equal to M, it is necessary to calculate the second inter-frame prediction mode residual value based on the values of M+1 mode identification information, and then use the exponential Columbus coding method to encode the second inter-frame prediction mode residual value.
[0522] In some embodiments, determining the second inter-frame prediction mode residual value of the current node based on the inter-frame prediction mode value and the values of M+1 mode identification information can include: performing a negation operation on the values of the M+1 mode identification information to determine the negated value of the M+1 mode identification information; performing a subtraction operation based on the inter-frame prediction mode value and the negated value of the M+1 mode identification information to determine the second inter-frame prediction mode residual value of the current node.
[0523] In the embodiment of the present application, it is assumed that the first value is set to 0 and the second value is set to 1, that is, when the value of flagi is 0, it is determined that the inter-frame prediction mode value of the current node is not equal to i, and the encoding operation needs to be continued at this time. In this way, after obtaining the values of M+1 mode identification information such as flag0, flag1, ..., flagM, it is necessary to perform a negation operation on the values of these M+1 mode identification information so that the values of !(flag0), !(flag1), ..., !(flagM) are all equal to 1; assuming that the inter-frame prediction mode value of the current node is represented by inter mode, and the residual value of the second inter-frame prediction mode is represented by residual mode2, then the calculation formula of residual mode2 can be as follows: residual mode2=inter mode-(!(flag0)+!(flag1)+...+!(flagM)) (26)
[0524] In some embodiments, determining the second inter-frame prediction mode residual value of the current node based on the inter-frame prediction mode value and the values of M+1 mode identification information may include: performing a subtraction operation on the inter-frame prediction mode value and (M+1) to determine the second inter-frame prediction mode residual value of the current node.
[0525] In the embodiment of the present application, assuming that the first value is set to 0 and the second value is set to 1, the value of !(flag0)+!(flag1)+…+!(flagM) can be regarded as M+1; then the calculation formula of the residual value of the second inter-frame prediction mode residual mode2 can also be as follows: residual mode2=inter mode-(M+1) (27)
[0526] That is to say, in an embodiment of the present application, after obtaining the value of at least one mode identification information based on the inter-frame prediction mode value of the current node, the point cloud inter-frame geometric information coding mode can be used for encoding; or, in order to improve the coding efficiency, the exponential Golomb coding method can also be combined for encoding.
[0527] Furthermore, in the embodiment of the present application, after the selected node is determined based on the inter-frame candidate node set, it can be used to determine the prediction residual value of the current node. Specifically, in some embodiments, the method may further include:
[0528] Determine the predicted value of the current node based on the selected node;
[0529] Determine the initial residual value of the current node based on the original value and predicted value of the current node;
[0530] The initial residual value is quantized according to the quantization parameter to determine the predicted residual value of the current node.
[0531] In a specific embodiment, determining the initial residual value of the current node according to the original value and the predicted value of the current node may include: performing a subtraction operation according to the original value and the predicted value of the current node to determine the initial residual value of the current node.
[0532] It should be noted that, based on the selected node determined by the inter-frame prediction mode value, the prediction value of the current node can be determined; then, the prediction residual value of the current node can be calculated by subtracting the original value of the current node from the prediction value; and the initial residual value is quantized according to the quantization parameter to obtain the prediction residual value of the current node.
[0533] In some embodiments, the method may further include: encoding the prediction residual value of the current node, and writing the obtained coded bits into the bitstream.
[0534] In some embodiments, the method may further include: encoding the quantization parameter, and writing the obtained encoded bits into a bitstream.
[0535] For example, using geometric position information as an example, the geometric prediction value of the current node is first determined. A difference operation is then performed between the geometric position information of the current node and the geometric prediction value to obtain a geometric prediction residual. This geometric prediction residual is then quantized using a quantization parameter. Finally, through continuous iteration, the inter-frame prediction mode value, prediction residual, prediction tree structure, and quantization parameter for each node position information in the prediction tree are encoded, and the resulting coded bits are written into the bitstream.
[0536] Furthermore, in the embodiment of the present application, the encoding method is mainly for encoding optimization of inter-frame prediction mode values. Here, a flag bit can also be used to determine whether the current node uses the inter-frame prediction mode. Therefore, in some embodiments, the method can also include:
[0537] Determining a value of the first identification information;
[0538] If the first identification information indicates that the current node uses the inter-frame prediction mode, the step of determining the inter-frame prediction mode value of the current node is performed.
[0539] Furthermore, with respect to the first identification information, in some embodiments, determining the value of the first identification information may include:
[0540] If the first identification information indicates that the current node does not use the inter-frame prediction mode, determining that the value of the first identification information is a third value;
[0541] If the first identification information indicates that the current node uses the inter-frame prediction mode, the value of the first identification information is determined to be the fourth value.
[0542] It should be noted that in the embodiment of the present application, the third value is different from the fourth value, and the third value and the fourth value can be in parameter form or in digital form. Specifically, the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0543] Exemplarily, for the third value and the fourth value, the third value can be set to 1 and the fourth value can be set to 0; or, the third value can be set to 0 and the fourth value can be set to 1; or, the third value can be set to true and the fourth value can be set to false; or, the third value can be set to false and the fourth value can be set to true; but this is not specifically limited here.
[0544] Furthermore, in some embodiments, the method may further include: encoding the value of the first identification information, and writing the obtained encoded bits into the bitstream.
[0545] It should also be noted that, in the embodiment of the present application, taking the flag written into the bitstream as an example, assuming that the third value is set to 0 and the fourth value is set to 1, if the value of the first identification information is 0, then it can be determined that the current node does not use the inter-frame prediction mode, that is, there is no need to execute the encoding method described in the embodiment of the present application; if the value of the first identification information is 1, then it can be determined that the current node uses the inter-frame prediction mode, that is, it is necessary to execute the encoding method described in the embodiment of the present application. In this way, at the subsequent decoding end, by decoding the value of the first identification information, it can be determined whether the current node uses the inter-frame prediction mode, thereby improving decoding efficiency.
[0546] Furthermore, in the embodiment of the present application, a flag bit may be set to determine whether to enable the decoding method of the embodiment of the present application. Therefore, in some embodiments, the method may further include:
[0547] Determining a value of the second identification information;
[0548] If the second identification information indicates that the current node enables the target inter-frame coding mode, a step of determining a value of at least one mode identification information according to the inter-frame prediction mode value is performed.
[0549] Furthermore, with respect to the second identification information, in some embodiments, determining the value of the second identification information may include:
[0550] If the second identification information indicates that the current node does not enable the target inter-frame coding mode, determining that the value of the second identification information is a fifth value;
[0551] If the second identification information indicates that the current node enables the target inter-frame coding mode, the value of the second identification information is determined to be the sixth value.
[0552] It should be noted that in the embodiment of the present application, the fifth value and the sixth value are different, and the fifth value and the sixth value can be in parameter form or in digital form. Specifically, the second identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
[0553] Exemplarily, for the fifth value and the sixth value, the fifth value can be set to 1 and the sixth value can be set to 0; or, the fifth value can be set to 0 and the sixth value can be set to 1; or, the fifth value can be set to true and the sixth value can be set to false; or, the fifth value can be set to false and the sixth value can be set to true; but this is not specifically limited here.
[0554] Furthermore, in some embodiments, the method may further include: encoding the value of the second identification information, and writing the obtained encoded bits into the bitstream.
[0555] It should also be noted that, in the embodiment of the present application, taking the flag written into the code stream as an example, assuming that the fifth value is set to 0 and the sixth value is set to 1, if the value of the second identification information is 0, then it can be determined that the current node does not enable the target inter-frame coding method, that is, there is no need to execute the encoding method described in the embodiment of the present application; if the value of the second identification information is 1, then it can be determined that the current node enables the target inter-frame coding method, that is, it is necessary to execute the encoding method described in the embodiment of the present application. In this way, the value of the second identification information can be directly obtained through decoding at the decoding end, and it can be determined whether the current node enables the target inter-frame coding method, thereby improving decoding efficiency.
[0556] In short, in this embodiment of the present application, a 1-bit flag (i.e., second identification information) can be used to indicate whether the target inter-frame coding mode is enabled. This flag can be placed in the header information of a higher-level syntax element, such as the geometry header; and this flag can be conditionally enabled under certain conditions. If this flag is not present in the bitstream, its default value is a fixed value.
[0557] In another embodiment of the present application, the embodiment of the present application further provides a code stream, which is generated by bit encoding based on the information to be encoded; wherein the information to be encoded may include at least one of the following:
[0558] The prediction residual value of the current node, the quantization parameter, the value of at least one mode identification information, the inter-frame prediction mode residual value, the value of the first identification information, and the value of the second identification information.
[0559] In this embodiment of the present application, the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode. In addition, the first identification information is used to indicate whether the current node uses the inter-frame prediction mode, and the second identification information is used to indicate whether the current node enables the target inter-frame encoding / decoding mode.
[0560] After determining the information to be encoded, the encoder can encode it and write the resulting coded bits into a bitstream, which is then transmitted to the decoder. The decoder then decodes the bitstream to obtain information such as the value of at least one mode identifier and the inter-frame prediction mode residual value for the current node, allowing it to directly determine the inter-frame prediction mode value for the current node.
[0561] This embodiment provides an encoding method that first determines an inter-frame prediction mode value of a current node; then, based on the inter-frame prediction mode value, determines the value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode; finally, the value of the at least one mode identification information is encoded, and the resulting coded bits are written into a bitstream. In this way, for the inter-frame prediction mode value, instead of converting the inter-frame prediction mode value into binary for direct encoding, the value of at least one mode identification information is determined based on the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This method takes into account the frequency distribution of inter-frame prediction modes, i.e., the more likely an inter-frame prediction mode is to appear, the earlier its corresponding inter-frame prediction mode value is, thereby reducing the number of coded bits, saving bit rate, and thereby improving encoding and decoding efficiency.
[0562] In another embodiment of the present application, based on the encoding / decoding method described in the above embodiment, the prediction mode of the inter-frame prediction tree is mainly improved. In the encoding end, the specific performance of the encoding prediction mode is as follows:
[0563] First, encode a flag to indicate whether to use the inter-frame prediction scheme;
[0564] Secondly, the inter-frame prediction mode value is encoded. The solution adopted in the related art is to convert the inter-frame prediction mode digital into binary and encode it directly.
[0565] In addition, at the decoding end, the specific performance of the decoding prediction mode is as follows:
[0566] First, decode a flag to indicate whether inter-frame prediction is used;
[0567] Next, the inter prediction mode value is decoded.
[0568] Because related technologies simply split the inter-frame prediction mode values into binary bits for direct encoding, without considering the frequency of different inter-frame prediction modes, this results in suboptimal performance. Based on this, a coding scheme for inter-modes is designed that takes into account the frequency distribution of inter-frame coding modes. The more likely inter-modes are positioned at the front, which reduces the number of coding bits and improves compression efficiency.
[0569] In this embodiment, the tool proposed by this technology can use a 1-bit flag to indicate whether it is enabled. This flag is placed in the header information of high-level syntax elements, such as the geometry header, and is conditionally enabled under certain conditions. If this flag is not present in the bitstream, its default value is a fixed value. Similarly, the decoder needs to decode this flag. If this flag is not present in the bitstream, decoding is not required, and its default value is a fixed value.
[0570] In one possible implementation, this technology is a scheme for designing encoding and decoding for inter-frame prediction mode values (or "inter-frame prediction mode number", denoted by inter mode):
[0571] In a specific embodiment, flagx represents whether inter mode is greater than x. If so, flagx is 1 (i.e., inter mode is greater than x, and processing continues downward); if not, flagx is 0 (i.e., inter mode is not greater than x, and encoding ends at this time).
[0572] For the encoding end, the input is inter mode, which defaults to 0 to N, that is, there are at most N+1 inter modes. The specific process is as follows:
[0573] A flag flag0 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than 0; if not, the encoding is terminated.
[0574] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than 1; if not, the encoding is terminated.
[0575] ......
[0576] A flag N-1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than N-1; the encoding ends.
[0577] For the decoding end, the specific process is as follows:
[0578] A flag flag 0 is used for decoding using a fixed context, no context, or adaptive context to indicate whether the inter mode is greater than 0; if not, decoding is terminated and the inter mode is 0.
[0579] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than 1; if not, decoding is terminated and the inter mode is 1.
[0580] ......
[0581] A flag flag N-1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than N-1; if not, decoding is terminated, and the inter mode is N-1; if yes, decoding is terminated, and the inter mode is N.
[0582] In another specific embodiment, flagx represents whether inter mode is equal to x. If not, flagx is 0 (i.e., inter mode is not equal to x, and processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and encoding ends at this time).
[0583] For the encoding end, the input is inter mode, which defaults to 0 to N, that is, there are at most N+1 inter modes. The specific process is as follows:
[0584] A flag flag0 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to 0; if so, the encoding is terminated.
[0585] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to 1; if so, the encoding is terminated.
[0586] ......
[0587] A flag N-1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to N-1; the encoding ends.
[0588] For the decoding end, the specific process is as follows:
[0589] A flag flag0 is used for decoding using fixed context / no context / adaptive context to indicate whether the inter mode is equal to 0; if so, decoding is terminated and the inter mode is 0.
[0590] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to 1; if so, decoding is terminated, and the inter mode is 1 at this time.
[0591] ......
[0592] A flag flag N-1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to N-1; if yes, decoding is terminated, and the inter mode is N-1; if not, decoding is terminated, and the inter mode is N.
[0593] In another possible implementation, the present technology is a Columbus scheme designed to encode and decode inter-frame prediction mode values (or "inter-frame prediction mode number", denoted by "inter mode"):
[0594] In a specific embodiment, flagx represents whether inter mode is greater than x. If so, flagx is 1 (i.e., inter mode is greater than x, and processing continues downward); if not, flagx is 0 (i.e., inter mode is not greater than x, and encoding ends at this time).
[0595] For the encoding end, the input is inter mode, which defaults to 0 to N, that is, there are at most N+1 inter modes. The specific process is as follows:
[0596] A flag flag0 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than 0; if not, the encoding is terminated.
[0597] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than 1; if not, the encoding is terminated.
[0598] ......
[0599] A flag flagM is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is greater than M; if not, the encoding is terminated.
[0600] If yes, that is, flagM indicates that the inter mode is greater than M, then:
[0601] inter mode = inter mode - (M + 1); or,
[0602] inter mode=inter mode-(flag0+flag1+...+flagM).
[0603] Then use K-order Exponential Golomb coding inter mode.
[0604] For the decoding end, the specific process is as follows:
[0605] inter mode is initialized to 0.
[0606] Decoding using fixed context / no context / adaptive context A flag flag0 indicates whether the inter mode is greater than 0; if not, decoding is terminated.
[0607] Decoding using fixed context / no context / adaptive context A flag flag1 indicates whether the inter mode is greater than 1; if not, decoding is terminated.
[0608] ......
[0609] A flag flagM is used for decoding using fixed context / no context / adaptive context to indicate whether the inter mode is greater than M; if not, decoding is terminated.
[0610] If yes, that is, flagM indicates that the inter mode is greater than M, then:
[0611] Use K-order Exponential Columbus decoding inter mode;
[0612] Finally inter mode=inter mode+flag0+flag1+...flagM.
[0613] In another specific embodiment, flagx represents whether inter mode is equal to x. If not, flagx is 0 (i.e., inter mode is not equal to x, and processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and encoding ends at this time).
[0614] For the encoding end, the input is inter mode, which defaults to 0 to N, that is, there are at most N+1 inter modes. The specific process is as follows:
[0615] A flag flag0 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to 0; if so, the encoding is terminated.
[0616] A flag flag1 is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to 1; if so, the encoding is terminated.
[0617] ......
[0618] A flag flagM is encoded using a fixed context / no context / adaptive context to indicate whether the inter mode is equal to M; if so, the encoding is terminated.
[0619] If not, that is, flagM indicates that the inter mode is not equal to M, then:
[0620] inter mode = inter mode - (M + 1), or;
[0621] inter mode=inter mode-(!(flag0)+!(flag1)+...+!(flagM)).
[0622] Then use K-order exponential Columbus coding inter mode
[0623] For the decoding end, the specific process is as follows:
[0624] inter mode is initialized to 0.
[0625] Decoding using fixed context / no context / adaptive context A flag flag0 indicates whether the inter mode is equal to 0; if so, decoding ends.
[0626] Decoding using fixed context / no context / adaptive context A flag flag1 indicates whether the inter mode is equal to 1; if so, decoding ends.
[0627] ......
[0628] A flag flagM is used for decoding using fixed context / no context / adaptive context to indicate whether the inter mode is equal to M; if so, decoding is terminated.
[0629] If not, that is, flagM indicates that the inter mode is not equal to M, then:
[0630] Use K-order Exponential Columbus decoding inter mode;
[0631] Finally inter mode=inter mode+(!(flag0)+!(flag1)+...!(flagM)).
[0632] In the embodiments of the present application, the specific implementation of the aforementioned embodiments is elaborated in detail through the above embodiments. It can be seen that according to the technical solution of the aforementioned embodiments, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct encoding, but the value of at least one mode identification information is determined according to the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein, the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i, which takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of encoding bits, saving bit rate, and thus improving encoding and decoding efficiency.
[0633] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 24, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in Figure 24, the encoder 240 may include: a first determining unit 2401 and an encoding unit 2402; wherein,
[0634] A first determining unit 2401 is configured to determine an inter-frame prediction mode value of a current node;
[0635] The first determining unit 2401 is further configured to determine a value of at least one mode identification information according to the inter-frame prediction mode value; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode;
[0636] The encoding unit 2402 is configured to encode the value of at least one mode identification information and write the obtained coded bits into the bit stream.
[0637] In some embodiments, the encoding unit 2402 is further configured to encode a value of at least one mode identification information based on the first encoding mode, and write the obtained encoding bits into the bitstream.
[0638] In some embodiments, the first encoding mode includes at least one of the following: an encoding mode with fixed context information, an encoding mode with adaptive context information, and an encoding mode without using context information.
[0639] In some embodiments, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, the first determination unit 2401 is further configured to determine the value of the i-th mode identification information according to the inter-frame prediction mode value; and if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then i+1 mode identification information is used as at least one mode identification information; wherein, the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0640] In some embodiments, the first determination unit 2401 is further configured to determine that the value of the i-th mode identification information is the first value if the inter-frame prediction mode value is less than or equal to i; if the inter-frame prediction mode value is greater than i, determine that the value of the i-th mode identification information is the second value.
[0641] In some embodiments, the encoding unit 2402 is further configured to, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, encode the value of the i-th mode identification information and write the obtained coding bits into the bitstream; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, encode the value of the i-th mode identification information and write the obtained coding bits into the bitstream; and update i based on i+1, and continue to execute the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value, until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0642] In some embodiments, the first determining unit 2401 is further configured to determine the value of the N-1th mode identification information according to the inter-frame prediction mode value when i is equal to N-1;
[0643] The encoding unit 2402 is further configured to encode the value of the (N-1)th mode identification information and write the obtained coded bits into the bitstream.
[0644] In some embodiments, the first determination unit 2401 is further configured to determine that the value of the N-1th mode identification information is the first value if the inter-frame prediction mode value is less than or equal to N-1; if the inter-frame prediction mode value is equal to N, determine that the value of the N-1th mode identification information is the second value.
[0645] In some embodiments, the first determining unit 2401 is further configured to, when i is equal to M, determine the first inter-frame prediction mode residual value of the current node according to the inter-frame prediction mode value and the values of the M+1 mode identification information if the M-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M;
[0646] The encoding unit 2402 is further configured to encode the first inter-frame prediction mode residual value of the current node based on the second encoding mode, and write the obtained encoding bits into the bitstream; wherein the M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information,..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0647] In some embodiments, the first determining unit 2401 is further configured to perform a subtraction operation on the inter-frame prediction mode value and the values of the M+1 mode identification information to determine the first inter-frame prediction mode residual value of the current node.
[0648] In some embodiments, the first determining unit 2401 is further configured to perform a subtraction operation on the inter-frame prediction mode value and (M+1) to determine the first inter-frame prediction mode residual value of the current node.
[0649] In some embodiments, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, the first determination unit 2401 is further configured to determine the value of the i-th mode identification information according to the inter-frame prediction mode value; and if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then the i+1 mode identification information is used as at least one mode identification information; wherein, the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0650] In some embodiments, the first determination unit 2401 is further configured to determine that the value of the i-th mode identification information is the first value if the inter-frame prediction mode value is not equal to i; if the inter-frame prediction mode value is equal to i, determine that the value of the i-th mode identification information is the second value.
[0651] In some embodiments, the encoding unit 2402 is further configured to, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, encode the value of the i-th mode identification information and write the obtained coding bits into the bitstream; if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, encode the value of the i-th mode identification information and write the obtained coding bits into the bitstream; and update i based on i+1, and continue to execute the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value, until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0652] In some embodiments, the first determining unit 2401 is further configured to determine the value of the N-1th mode identification information according to the inter-frame prediction mode value when i is equal to N-1;
[0653] The encoding unit 2402 is further configured to encode the value of the (N-1)th mode identification information and write the obtained coded bits into the bitstream.
[0654] In some embodiments, the first determination unit 2401 is further configured to determine that if the inter-frame prediction mode value is equal to N, the value of the N-1th mode identification information is the first value; if the inter-frame prediction mode value is equal to N-1, the value of the N-1th mode identification information is determined to be the second value.
[0655] In some embodiments, the first determining unit 2401 is further configured to, when i is equal to M, determine a second inter-frame prediction mode residual value of the current node based on the inter-frame prediction mode value and values of M+1 mode identification information if the M-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to M;
[0656] The encoding unit 2402 is further configured to encode the second inter-frame prediction mode residual value of the current node based on the second encoding mode, and write the obtained encoding bits into the bitstream; wherein the M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information,..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0657] In some embodiments, the first determination unit 2401 is further configured to perform a negation operation on the values of the M+1 mode identification information to determine the negated values of the M+1 mode identification information; and perform a subtraction operation based on the inter-frame prediction mode value and the negated values of the M+1 mode identification information to determine the second inter-frame prediction mode residual value of the current node.
[0658] In some embodiments, the first determining unit 2401 is further configured to perform a subtraction operation on the inter-frame prediction mode value and (M+1) to determine the second inter-frame prediction mode residual value of the current node.
[0659] In some embodiments, the second encoding mode comprises: an Exponential Golomb encoding mode.
[0660] In some embodiments, the first determination unit 2401 is further configured to determine an inter-frame candidate node set; wherein the inter-frame candidate node set includes at least one candidate node; determine a selected node from the inter-frame candidate node set, and determine the inter-frame prediction mode value of the current node based on the index position of the selected node in the inter-frame candidate node set.
[0661] In some embodiments, the first determination unit 2401 is further configured to perform cost calculation on at least one candidate node in the inter-frame candidate node set based on a rate-distortion cost method to determine the cost value of at least one candidate node; and determine the minimum cost value from the cost values of at least one candidate node, and select the candidate node corresponding to the minimum cost value as the selected node.
[0662] In some embodiments, the first determination unit 2401 is further configured to determine a previous encoded node of the current node; determine a first candidate node whose geometric parameters satisfy a first condition with those of the previous encoded node in the first reference frame, and determine at least one second candidate node in the first reference frame based on the first candidate node; determine a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame, and determine at least one fourth candidate node in the second reference frame based on the third candidate node, and set the horizontal azimuth angle of at least one fourth candidate node to the horizontal azimuth angle of the father node of the current node; and determine an inter-frame candidate node set based on at least one second candidate node and / or at least one fourth candidate node.
[0663] In some embodiments, the first determining unit 2401 is further configured to determine a prediction tree corresponding to a current frame, wherein the current frame includes a current node; and determine a previous encoded node of the current node based on a coding order of the prediction tree.
[0664] In some embodiments, the first reference frame is a frame before the current frame; and the second reference frame is obtained by performing global motion on the previous frame.
[0665] In some embodiments, the first determination unit 2401 is further configured to determine the predicted value of the current node based on the selected node; determine the initial residual value of the current node based on the original value and the predicted value of the current node; and quantize the initial residual value based on the quantization parameter to determine the predicted residual value of the current node.
[0666] In some embodiments, the encoding unit 2402 is further configured to encode the prediction residual value of the current node and write the obtained coded bits into the bitstream.
[0667] In some embodiments, the encoding unit 2402 is further configured to encode the quantization parameter and write the obtained encoded bits into the bitstream.
[0668] In some embodiments, the first determining unit 2401 is further configured to determine a value of the first identification information; and if the first identification information indicates that the current node uses the inter-frame prediction mode, perform the step of determining the inter-frame prediction mode value of the current node.
[0669] In some embodiments, the first determination unit 2401 is further configured to determine that the value of the first identification information is a third value if the first identification information indicates that the current node does not use the inter-frame prediction mode; if the first identification information indicates that the current node uses the inter-frame prediction mode, determine that the value of the first identification information is a fourth value.
[0670] In some embodiments, the encoding unit 2402 is further configured to encode the value of the first identification information and write the obtained encoded bits into the bit stream.
[0671] In some embodiments, the first determination unit 2401 is further configured to determine the value of the second identification information; and if the second identification information indicates that the current node enables the target inter-frame coding method, then perform the step of determining the value of at least one mode identification information according to the inter-frame prediction mode value.
[0672] In some embodiments, the first determination unit 2401 is further configured to determine that the value of the second identification information is the fifth value if the second identification information indicates that the current node does not enable the target inter-frame coding method; if the second identification information indicates that the current node enables the target inter-frame coding method, determine that the value of the second identification information is the sixth value.
[0673] In some embodiments, the encoding unit 2402 is further configured to encode the value of the second identification information and write the obtained encoded bits into the bit stream.
[0674] 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.
[0675] 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.
[0676] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 240. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the aforementioned embodiments.
[0677] Based on the composition of the above-mentioned encoder 240 and the computer-readable storage medium, refer to Figure 25, which shows a specific hardware structure diagram of the encoder 240 provided in an embodiment of the present application. As shown in Figure 25, the encoder 240 may include: a first communication interface 2501, a first memory 2502 and a first processor 2503; each component is coupled together through a first bus system 2504. It can be understood that the first bus system 2504 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 2504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 2504 in Figure 25. Among them,
[0678] The first communication interface 2501 is used to receive and send signals when sending and receiving information with other external network elements;
[0679] A first memory 2502 is used to store computer programs that can be run on the first processor 2503;
[0680] The first processor 2503 is configured to, when running the computer program, execute:
[0681] Determine the inter-frame prediction mode value of the current node;
[0682] Determining a value of at least one mode identification information according to the inter-frame prediction mode value; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0683] The value of at least one mode identification information is encoded, and the obtained encoded bits are written into the code stream.
[0684] It is understood that the first memory 2502 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 2502 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0685] The first processor 2503 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 2503. The above-mentioned first processor 2503 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 and executed by a hardware decoding processor, or 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, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 2502 , and the first processor 2503 reads the information in the first memory 2502 and completes the steps of the above method in combination with its hardware.
[0686] 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.
[0687] Optionally, as another embodiment, the first processor 2503 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0688] This embodiment provides an encoder, in which, for inter-frame prediction mode values, the inter-frame prediction mode values are no longer converted into binary for direct encoding, but the value of at least one mode identification information is determined based on the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i, which takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of encoding bits, saving bit rate, and thus improving encoding efficiency.
[0689] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see FIG26 , which shows a schematic diagram of the structure of a decoder provided by the embodiment of the present application. As shown in FIG26 , the decoder 260 may include: a decoding unit 2601 and a second determining unit 2602; wherein,
[0690] The decoding unit 2601 is configured to decode the bitstream and determine a value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode;
[0691] The second determining unit 2602 is configured to determine the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; and determine the prediction value of the current node according to the inter-frame prediction mode value.
[0692] In some embodiments, the decoding unit 2601 is further configured to decode the code stream based on the first decoding mode and determine a value of at least one mode identification information.
[0693] In some embodiments, the first decoding mode includes at least one of the following: a decoding mode with fixed context information, a decoding mode with adaptive context information, and a decoding mode without using context information.
[0694] In some embodiments, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, the decoding unit 2601 is further configured to decode the code stream to determine the value of the i-th mode identification information;
[0695] The second determining unit 2602 is further configured to, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, use i+1 mode identification information as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0696] The decoding unit 2601 is further configured to update i based on i+1 if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, and continue to perform the steps of decoding the code stream and determining the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0697] In some embodiments, the second determination unit 2602 is further configured to determine that if the value of the i-th mode identification information is a first value, then the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i; if the value of the i-th mode identification information is a second value, then the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i.
[0698] In some embodiments, the second determining unit 2602 is further configured to set the inter-frame prediction mode value of the current node to be equal to i when the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
[0699] In some embodiments, the second determination unit 2602 is further configured to, when i is equal to N-1, if the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to N-1, then set the inter-frame prediction mode value of the current node to be equal to N-1; if the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than N-1, then set the inter-frame prediction mode value of the current node to be equal to N.
[0700] In some embodiments, the second determination unit 2602 is further configured to, when i is equal to M, if the M-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M, then determine the first inter-frame prediction mode residual value of the current node based on the decoded code stream in the second decoding mode; determine the inter-frame prediction mode value of the current node according to the values of M+1 mode identification information and the first inter-frame prediction mode residual value; wherein the M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0701] In some embodiments, the second determining unit 2602 is further configured to perform an addition operation on the values of the M+1 mode identification information and the residual value of the first inter-frame prediction mode to determine the inter-frame prediction mode value of the current node.
[0702] In some embodiments, the second determining unit 2602 is further configured to perform an addition operation on the first inter-frame prediction mode residual value and (M+1) to determine the inter-frame prediction mode value of the current node.
[0703] In some embodiments, when the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, the decoding unit 2601 is further configured to decode the code stream to determine the value of the i-th mode identification information;
[0704] The second determining unit 2602 is further configured to, if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, use i+1 mode identification information as at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
[0705] The decoding unit 2601 is further configured to update i based on i+1 if the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, and continue to perform the steps of decoding the code stream and determining the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0706] In some embodiments, the second determination unit 2602 is further configured to, if the value of the i-th mode identification information is a first value, determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is not equal to i; if the value of the i-th mode identification information is a second value, determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is equal to i.
[0707] In some embodiments, the second determining unit 2602 is further configured to set the inter-frame prediction mode value of the current node to be equal to i when the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
[0708] In some embodiments, the second determination unit 2602 is further configured to, when i is equal to N-1, if the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to N-1, then the inter-frame prediction mode value of the current node is set to be equal to N-1; if the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to N-1, then the inter-frame prediction mode value of the current node is set to be equal to N.
[0709] In some embodiments, the second determination unit 2602 is further configured to, when i is equal to M, if the M-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to M, determine the second inter-frame prediction mode residual value of the current node based on the decoded code stream in the second decoding mode; determine the inter-frame prediction mode value of the current node according to the values of M+1 mode identification information and the second inter-frame prediction mode residual value; wherein the M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
[0710] In some embodiments, the second determination unit 2602 is further configured to perform a negation operation on the values of the M+1 mode identification information to determine the negated values of the M+1 mode identification information; and perform an addition operation on the negated values of the M+1 mode identification information and the residual value of the second inter-frame prediction mode to determine the inter-frame prediction mode value of the current node.
[0711] In some embodiments, the second determining unit 2602 is further configured to perform an addition operation on the second inter-frame prediction mode residual value and (M+1) to determine the inter-frame prediction mode value of the current node.
[0712] In some embodiments, the second decoding mode comprises an Exponential Golomb decoding mode.
[0713] In some embodiments, the decoding unit 2601 is further configured to decode the code stream and determine the value of the first identification information; and if the first identification information indicates that the current node uses the inter-frame prediction mode, perform the step of decoding the code stream and determining the value of at least one mode identification information.
[0714] In some embodiments, the second determination unit 2602 is further configured to determine that the first identification information indicates that the current node does not use the inter-frame prediction mode if the value of the first identification information is the third value; and to determine that the first identification information indicates that the current node uses the inter-frame prediction mode if the value of the first identification information is the fourth value.
[0715] In some embodiments, the decoding unit 2601 is further configured to decode the code stream and determine the value of the second identification information; and if the second identification information indicates that the current node enables the target inter-frame decoding mode, perform the step of decoding the code stream and determining the value of at least one mode identification information.
[0716] In some embodiments, the second determination unit 2602 is further configured to determine that the second identification information indicates that the current node does not enable the target inter-frame decoding method if the value of the second identification information is the fifth value; if the value of the second identification information is the sixth value, determine that the second identification information indicates that the current node enables the target inter-frame decoding method.
[0717] In some embodiments, the second determining unit 2602 is further configured to determine a selected node from at least one candidate node according to the inter-frame prediction mode value; and determine a prediction value of the current node according to the selected node.
[0718] In some embodiments, at least one candidate node includes at least one of the following: at least one second candidate node and at least one fourth candidate node; wherein, at least one second candidate node is a candidate node in the first reference frame, and at least one fourth candidate node is a candidate node in the second reference frame; and the first reference frame is the previous frame of the current frame, the second reference frame is obtained by global motion of the previous frame, and the current frame includes the current node.
[0719] In some embodiments, when the inter-frame prediction mode value indicates that the selected node is one of the at least one second candidate nodes, the second determination unit 2602 is further configured to determine the previous decoded node of the current node; based on the previous decoded node, determine the first candidate node in the first reference frame; wherein the geometric parameters of the previous decoded node and the first candidate node meet the first condition; based on the first candidate node, determine the 1st second candidate node to the pth second candidate node in the first reference frame according to a preset method; and use the pth second candidate node as the selected node; wherein p is a positive integer greater than 0, and the value of p is associated with the inter-frame prediction mode value.
[0720] In some embodiments, when the inter-frame prediction mode value indicates that the selected node is one of at least one fourth candidate nodes, accordingly, the second determination unit 2602 is also configured to determine the previous decoded node of the current node; based on the previous decoded node, determine the third candidate node in the second reference frame; wherein the geometric parameters of the previous decoded node and the third candidate node meet the first condition; based on the third candidate node, determine the 1st fourth candidate node to the qth fourth candidate node in the second reference frame according to a preset method; and use the qth fourth candidate node as the selected node; wherein q is a positive integer greater than 0, and the value of q is associated with the inter-frame prediction mode value.
[0721] In some embodiments, the decoding unit 2601 is further configured to decode the bitstream and determine the prediction residual value and quantization parameter of the current node;
[0722] The second determining unit 2602 is further configured to perform inverse quantization processing on the prediction residual value according to the quantization parameter to obtain an inverse quantized residual value; and determine the reconstruction information of the current node according to the inverse quantized residual value and the prediction value.
[0723] 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.
[0724] 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, this embodiment provides a computer-readable storage medium for use in decoder 260. The computer-readable storage medium stores a computer program that, when executed by a second processor, implements any of the methods described in the aforementioned embodiments.
[0725] Based on the composition of the above-mentioned decoder 260 and the computer-readable storage medium, refer to Figure 27, which shows a specific hardware structure diagram of the decoder 260 provided in an embodiment of the present application. As shown in Figure 27, the decoder 260 may include: a second communication interface 2701, a second memory 2702 and a second processor 2703; each component is coupled together through a second bus system 2704. It can be understood that the second bus system 2704 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 2704 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 second bus system 2704 in Figure 27. Among them,
[0726] The second communication interface 2701 is used to receive and send signals when sending and receiving information with other external network elements;
[0727] The second memory 2702 is used to store computer programs that can be run on the second processor 2703;
[0728] The second processor 2703 is configured to, when running the computer program, execute:
[0729] Decoding a bitstream and determining a value of at least one mode identification information; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, where N represents a maximum value of the inter-frame prediction mode;
[0730] Determining an inter-frame prediction mode value of a current node according to a value of at least one mode identification information;
[0731] Determine the prediction value of the current node according to the inter-frame prediction mode value.
[0732] Optionally, as another embodiment, the second processor 2703 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
[0733] It can be understood that the hardware functions of the second memory 2702 are similar to those of the first memory 2502, and the hardware functions of the second processor 2703 are similar to those of the first processor 2503; they will not be described in detail here.
[0734] This embodiment provides a decoder, in which, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct decoding. Instead, the value of at least one mode identification information is determined by decoding the code stream, and then the inter-frame prediction mode value is determined based on the value of the at least one mode identification information; wherein the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of coding bits, saving bit rate, and thus improving encoding and decoding efficiency.
[0735] In yet another embodiment of the present application, referring to FIG28 , a schematic diagram of the structure of a coding and decoding system provided by an embodiment of the present application is shown. As shown in FIG28 , the coding and decoding system 280 may include an encoder 2801 and a decoder 2802 .
[0736] In the embodiment of the present application, the encoder 2801 may be the encoder described in any one of the aforementioned embodiments, and the decoder 2802 may be the decoder described in any one of the aforementioned embodiments.
[0737] 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.
[0738] 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.
[0739] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0740] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0741] 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.
[0742] 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
[0743] In an embodiment of the present application, at the encoding end, the inter-frame prediction mode value of the current node is determined; based on the inter-frame prediction mode value, the value of at least one mode identification information is determined; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; the value of at least one mode identification information is encoded, and the obtained coding bits are written into the bitstream. At the decoding end, the bitstream is decoded, and the value of at least one mode identification information is determined; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; based on the value of at least one mode identification information, the inter-frame prediction mode value of the current node is determined; based on the inter-frame prediction mode value, the prediction value of the current node is determined. In this way, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct encoding, but the value of at least one mode identification information is determined according to the inter-frame prediction mode value, and then the value of the at least one mode identification information is encoded; wherein, the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i. This takes into account the frequency distribution of the inter-frame prediction mode, that is, the more likely the inter-frame prediction mode is to appear, the closer its corresponding inter-frame prediction mode value is, thereby reducing the number of encoding bits, saving bit rate, and thus improving encoding and decoding efficiency.
Claims
1. A decoding method, applied to a decoder, the method comprising: Decoding a bitstream, determining a value of at least one mode identification information; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; Determining the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information; Determine the prediction value of the current node according to the inter-frame prediction mode value.
2. The method according to claim 1, wherein: The decoding code stream determines the value of at least one mode identification information, including: The code stream is decoded based on a first decoding mode to determine a value of the at least one mode identification information.
3. The method according to claim 2, wherein: The first decoding mode includes at least one of the following: The decoding mode includes a decoding mode with fixed context information, a decoding mode with adaptive context information, and a decoding mode without using context information.
4. The method according to claim 1, wherein: When the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, the decoding bitstream determines the value of at least one mode identification information, including: Decode the code stream to determine the value of the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then i+1 mode identification information is used as the at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i is updated based on i+1, and the decoding code stream is continued to determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
5. The method according to claim 4, wherein: The method further comprises: If the value of the i-th mode identification information is the first value, determining that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i; If the value of the i-th mode identification information is the second value, it is determined that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i.
6. The method according to claim 4, wherein: The determining, according to the value of the at least one mode identification information, the inter-frame prediction mode value of the current node includes: When the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, the inter-frame prediction mode value of the current node is set to be equal to i.
7. The method according to claim 6, wherein: When i is equal to N-1, the method further includes: If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to N-1, setting the inter-frame prediction mode value of the current node to be equal to N-1; If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than N-1, the inter-frame prediction mode value of the current node is set to be equal to N.
8. The method according to claim 4, wherein: When i is equal to M, determining the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information includes: If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M, decoding the bitstream based on the second decoding mode to determine the first inter-frame prediction mode residual value of the current node; Determine the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the first inter-frame prediction mode residual value; The M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
9. The method according to claim 8, wherein: The determining the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the first inter-frame prediction mode residual value includes: An addition operation is performed on the values of the M+1 mode identification information and the first inter-frame prediction mode residual value to determine the inter-frame prediction mode value of the current node.
10. The method according to claim 8, wherein: The determining the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the first inter-frame prediction mode residual value includes: An addition operation is performed on the first inter-frame prediction mode residual value and (M+1) to determine the inter-frame prediction mode value of the current node.
11. The method according to claim 1, wherein: When the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, the decoding bitstream determines the value of at least one mode identification information, including: Decode the code stream to determine the value of the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then i+1 mode identification information is used as the at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then update i based on i+1, continue to execute the decoding code stream, and determine the value of the i-th mode identification information until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
12. The method according to claim 11, wherein: The method further comprises: If the value of the i-th mode identification information is the first value, determining that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i; If the value of the i-th mode identification information is the second value, it is determined that the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
13. The method according to claim 11, wherein: The determining, according to the value of the at least one mode identification information, the inter-frame prediction mode value of the current node includes: When the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, the inter-frame prediction mode value of the current node is set to be equal to i.
14. The method according to claim 13, wherein: When i is equal to N-1, the method further includes: If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to N-1, setting the inter-frame prediction mode value of the current node to be equal to N-1; If the N-1th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to N-1, the inter-frame prediction mode value of the current node is set to be equal to N.
15. The method according to claim 11, wherein: When i is equal to M, determining the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information includes: If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to M, decoding the bitstream based on the second decoding mode to determine the second inter-frame prediction mode residual value of the current node; Determining the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the second inter-frame prediction mode residual value; The M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
16. The method according to claim 15, wherein: The determining the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the second inter-frame prediction mode residual value includes: Performing a negation operation on the values of the M+1 mode identification information to determine the negated values of the M+1 mode identification information; An addition operation is performed on the negated value of the M+1 mode identification information and the second inter-frame prediction mode residual value to determine the inter-frame prediction mode value of the current node.
17. The method according to claim 15, wherein: The determining the inter-frame prediction mode value of the current node according to the values of the M+1 mode identification information and the second inter-frame prediction mode residual value includes: An addition operation is performed on the second inter-frame prediction mode residual value and (M+1) to determine the inter-frame prediction mode value of the current node.
18. The method according to claim 8 or 15, wherein: The second decoding mode includes: an Exponential Columbus decoding mode.
19. The method according to any one of claims 1 to 18, wherein: The method further comprises: Decoding the code stream to determine the value of the first identification information; If the first identification information indicates that the current node uses the inter-frame prediction mode, the decoding bit stream is executed to determine the value of at least one mode identification information.
20. The method according to claim 19, wherein: The method further comprises: If the value of the first identification information is the third value, determining that the first identification information indicates that the current node does not use the inter-frame prediction mode; If the value of the first identification information is the fourth value, it is determined that the first identification information indicates that the current node uses the inter-frame prediction mode.
21. The method according to any one of claims 1 to 18, wherein: The method further comprises: Decoding the code stream to determine the value of the second identification information; If the second identification information indicates that the current node enables the target inter-frame decoding mode, the decoding code stream is executed to determine the value of at least one mode identification information.
22. The method according to claim 21, wherein: The method further comprises: If the value of the second identification information is the fifth value, it is determined that the second identification information indicates that the current node does not enable the target inter-frame decoding mode; If the value of the second identification information is the sixth value, it is determined that the second identification information indicates that the current node enables the target inter-frame decoding mode.
23. The method according to any one of claims 1 to 22, wherein: The step of determining the prediction value of the current node according to the inter-frame prediction mode value includes: Determining a selected node from at least one candidate node according to the inter-frame prediction mode value; A predicted value of the current node is determined according to the selected node.
24. The method according to claim 23, wherein: The at least one candidate node includes at least one of the following: at least one second candidate node and at least one fourth candidate node; Among them, the at least one second candidate node is a candidate node in the first reference frame, the at least one fourth candidate node is a candidate node in the second reference frame; and the first reference frame is the previous frame of the current frame, the second reference frame is obtained by global motion of the previous frame, and the current frame includes the current node.
25. The method according to claim 24, wherein: When the inter-frame prediction mode value indicates that the selected node is one of the at least one second candidate node, the method further includes: Determine a decoded node before the current node; Determine a first candidate node in the first reference frame according to the previously decoded node; wherein geometric parameters of the previously decoded node and the first candidate node satisfy a first condition; According to the first candidate node, determining the first second candidate node to the pth second candidate node in the first reference frame in a preset manner; The p-th second candidate node is used as the selected node; wherein p is a positive integer greater than 0, and the value of p is associated with the inter-frame prediction mode value.
26. The method according to claim 24, wherein: When the inter-frame prediction mode value indicates that the selected node is one of the at least one fourth candidate nodes, the method further includes: Determine a decoded node before the current node; Determine a third candidate node in the second reference frame according to the previously decoded node; wherein geometric parameters of the previously decoded node and the third candidate node satisfy a first condition; According to the third candidate node, determining the first fourth candidate node to the qth fourth candidate node in the second reference frame in a preset manner; The qth fourth candidate node is used as the selected node; wherein q is a positive integer greater than 0, and the value of q is associated with the inter-frame prediction mode value.
27. The method according to claim 23, wherein: The method further comprises: Decoding the bitstream to determine the prediction residual value and quantization parameter of the current node; Performing inverse quantization processing on the prediction residual value according to the quantization parameter to obtain an inverse quantized residual value; The reconstruction information of the current node is determined according to the inverse quantized residual value and the predicted value.
28. A coding method, applied to an encoder, the method comprising: Determine the inter-frame prediction mode value of the current node; According to the inter-frame prediction mode value, determining a value of at least one mode identification information; wherein the mode identification information includes at least the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode; The value of the at least one mode identification information is encoded, and the obtained encoded bits are written into a bit stream.
29. The method according to claim 28, wherein: The step of encoding the value of the at least one mode identification information and writing the obtained coded bits into a bit stream comprises: The value of the at least one mode identification information is encoded based on the first encoding mode, and the obtained encoding bits are written into the bit stream.
30. The method of claim 29, wherein: The first coding mode includes at least one of the following: Coding mode with fixed context information, coding mode with adaptive context information and coding mode without using context information.
31. The method of claim 28, wherein: When the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than i, determining the value of at least one mode identification information according to the inter-frame prediction mode value includes: Determining a value of the i-th mode identification information according to the inter-frame prediction mode value; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, then the i+1 mode identification information is used as the at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information mode identification information, ..., the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
32. The method according to claim 31, wherein: The determining, according to the inter-frame prediction mode value, a value of the i-th mode identification information includes: If the inter-frame prediction mode value is less than or equal to i, determining that the value of the i-th mode identification information is a first value; If the inter-frame prediction mode value is greater than i, the value of the i-th mode identification information is determined to be a second value.
33. The method according to claim 31, wherein: The step of encoding the value of the at least one mode identification information and writing the obtained coded bits into a bit stream comprises: If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i, encoding the value of the i-th mode identification information, and writing the obtained encoding bits into the bitstream; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i, the value of the i-th mode identification information is encoded and the obtained coded bits are written into the bitstream; and i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is less than or equal to i.
34. The method of claim 33, wherein: When i is equal to N-1, the method further includes: Determining a value of the N-1th mode identification information according to the inter-frame prediction mode value; The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.
35. The method of claim 34, wherein: The determining, according to the inter-frame prediction mode value, a value of the N-1th mode identification information includes: If the inter-frame prediction mode value is less than or equal to N-1, determining the value of the N-1th mode identification information to be the first value; If the inter-frame prediction mode value is equal to N, the value of the N-1th mode identification information is determined to be the second value.
36. The method of claim 31, wherein: When i is equal to M, the method further includes: If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M, determining the first inter-frame prediction mode residual value of the current node according to the inter-frame prediction mode value and the values of the M+1 mode identification information; Encoding the first inter-frame prediction mode residual value of the current node based on the second encoding mode, and writing the obtained encoding bits into a bitstream; The M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
37. The method of claim 36, wherein: The determining, according to the inter-frame prediction mode value and the values of the M+1 mode identification information, the first inter-frame prediction mode residual value of the current node includes: A subtraction operation is performed on the inter-frame prediction mode value and the values of the M+1 mode identification information to determine the first inter-frame prediction mode residual value of the current node.
38. The method of claim 36, wherein: The determining, according to the inter-frame prediction mode value and the values of the M+1 mode identification information, the first inter-frame prediction mode residual value of the current node includes: A subtraction operation is performed on the inter-frame prediction mode value and (M+1) to determine the first inter-frame prediction mode residual value of the current node.
39. The method of claim 28, wherein: When the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is equal to i, determining the value of at least one mode identification information according to the inter-frame prediction mode value includes: Determining a value of the i-th mode identification information according to the inter-frame prediction mode value; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, then i+1 mode identification information is used as the at least one mode identification information; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, then i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
40. The method of claim 39, wherein: The determining, according to the inter-frame prediction mode value, a value of the i-th mode identification information includes: If the inter-frame prediction mode value is not equal to i, determining the value of the i-th mode identification information to be a first value; If the inter-frame prediction mode value is equal to i, then the value of the i-th mode identification information is determined to be a second value.
41. The method of claim 39, wherein: The step of encoding the value of the at least one mode identification information and writing the obtained coded bits into a bit stream comprises: If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, encoding the value of the i-th mode identification information, and writing the obtained encoding bits into the bitstream; If the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to i, the value of the i-th mode identification information is encoded and the obtained coded bits are written into the bitstream; and i is updated based on i+1, and the step of determining the value of the i-th mode identification information according to the inter-frame prediction mode value is continued until the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
42. The method according to claim 41, wherein: When i is equal to N-1, the method further includes: Determining a value of the N-1th mode identification information according to the inter-frame prediction mode value; The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.
43. The method of claim 42, wherein: The determining, according to the inter-frame prediction mode value, a value of the N-1th mode identification information includes: If the inter-frame prediction mode value is equal to N, determining that the value of the N-1th mode identification information is the first value; If the inter-frame prediction mode value is equal to N-1, the value of the N-1th mode identification information is determined to be the second value.
44. The method of claim 39, wherein: When i is equal to M, the method further includes: If the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is not equal to M, determining the second inter-frame prediction mode residual value of the current node according to the inter-frame prediction mode value and the values of the M+1 mode identification information; Encoding the second inter-frame prediction mode residual value of the current node based on the second encoding mode, and writing the obtained encoding bits into the bitstream; The M+1 mode identification information includes: the 0th mode identification information, the 1st mode identification information, ..., the Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
45. The method of claim 44, wherein: The determining, according to the inter-frame prediction mode value and the values of the M+1 mode identification information, the second inter-frame prediction mode residual value of the current node includes: Performing a negation operation on the values of the M+1 mode identification information to determine the negated values of the M+1 mode identification information; A subtraction operation is performed on the inter-frame prediction mode value and the negated value of the M+1 mode identification information to determine the second inter-frame prediction mode residual value of the current node.
46. The method of claim 44, wherein: The determining, according to the inter-frame prediction mode value and the values of the M+1 mode identification information, the second inter-frame prediction mode residual value of the current node includes: A second inter-frame prediction mode residual value of the current node is determined by performing a subtraction operation on the inter-frame prediction mode value and (M+1).
47. The method of claim 36 or 44, wherein: The second coding mode includes: an Exponential Columbus coding mode.
48. The method according to any one of claims 28 to 47, wherein: The determining the inter-frame prediction mode value of the current node includes: Determine an inter-frame candidate node set; wherein the inter-frame candidate node set includes at least one candidate node; A selected node is determined from the inter-frame candidate node set, and an inter-frame prediction mode value of the current node is determined according to an index position of the selected node in the inter-frame candidate node set.
49. The method of claim 48, wherein: The step of determining the selected node from the inter-frame candidate node set comprises: Performing cost calculation on at least one candidate node in the inter-frame candidate node set based on a rate-distortion cost method to determine a cost value of each of the at least one candidate node; A minimum cost value is determined from the cost values of the at least one candidate node, and the candidate node corresponding to the minimum cost value is used as the selected node.
50. The method of claim 48, wherein: The step of determining the inter-frame candidate node set includes: Determine a previously encoded node of the current node; Determine a first candidate node in a first reference frame whose geometric parameters satisfy a first condition with those of the previous encoded node, and determine at least one second candidate node in the first reference frame based on the first candidate node; Determine a third candidate node whose geometric parameters satisfy a first condition with those of the previous encoded node in a second reference frame, determine at least one fourth candidate node in the second reference frame according to the third candidate node, and set the horizontal azimuth angle of the at least one fourth candidate node to the horizontal azimuth angle of the father node of the current node; The inter-frame candidate node set is determined according to the at least one second candidate node and / or the at least one fourth candidate node.
51. The method of claim 50, wherein: The determining a previously encoded node of the current node comprises: Determining a prediction tree corresponding to a current frame, wherein the current frame includes the current node; Based on the coding order of the prediction tree, a previous coded node of the current node is determined.
52. The method of claim 51, wherein: The first reference frame is a frame before the current frame; The second reference frame is obtained by performing global motion on the previous frame.
53. The method of claim 48, wherein: The method further comprises: Determining a predicted value of the current node according to the selected node; Determining an initial residual value of the current node according to the original value of the current node and the predicted value; The initial residual value is quantized according to a quantization parameter to determine a predicted residual value of the current node.
54. The method of claim 53, wherein: The method further comprises: The prediction residual value of the current node is encoded, and the obtained encoding bits are written into a bit stream.
55. The method of claim 53, wherein: The method further comprises: The quantization parameter is encoded, and the obtained encoded bits are written into a bit stream.
56. A method according to any one of claims 28 to 55, wherein: The method further comprises: Determine a value of the first identification information; If the first identification information indicates that the current node uses the inter-frame prediction mode, the step of determining the inter-frame prediction mode value of the current node is performed.
57. The method of claim 56, wherein: The determining a value of the first identification information includes: If the first identification information indicates that the current node does not use the inter-frame prediction mode, determining that the value of the first identification information is a third value; If the first identification information indicates that the current node uses the inter-frame prediction mode, it is determined that the value of the first identification information is a fourth value.
58. The method of claim 56, wherein: The method further comprises: The value of the first identification information is encoded, and the obtained encoded bits are written into a bit stream.
59. The method according to any one of claims 28 to 55, wherein: The method further comprises: Determine a value of the second identification information; If the second identification information indicates that the current node enables the target inter-frame coding mode, a step of determining a value of at least one mode identification information according to the inter-frame prediction mode value is performed.
60. The method of claim 59, wherein: The determining a value of the second identification information includes: If the second identification information indicates that the current node does not enable the target inter-frame coding mode, determining that the value of the second identification information is a fifth value; If the second identification information indicates that the current node enables the target inter-frame coding mode, it is determined that the value of the second identification information is a sixth value.
61. The method of claim 59, wherein: The method further comprises: The value of the second identification information is encoded, and the obtained encoded bits are written into a bit stream.
62. A code stream, wherein The code stream is generated by bit encoding according to the information to be encoded; wherein the information to be encoded includes at least one of the following: The prediction residual value of the current node, the quantization parameter, the value of at least one mode identification information, the inter-frame prediction mode residual value, the value of the first identification information and the value of the second identification information; Among them, the first identification information is used to indicate whether the current node uses the inter-frame prediction mode, and the second identification information is used to indicate whether the current node enables the target inter-frame encoding / decoding method; the mode identification information at least includes the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents the maximum value of the inter-frame prediction mode.
63. An encoder, comprising a first determining unit and an encoding unit; wherein: The first determining unit is configured to determine an inter-frame prediction mode value of a current node; The first determination unit is further configured to determine a value of at least one mode identification information according to the inter-frame prediction mode value; wherein the mode identification information includes at least i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i; i is an integer greater than or equal to 0 and less than N, and N represents a maximum value of the inter-frame prediction mode; The encoding unit is configured to encode the value of the at least one mode identification information and write the obtained encoding bits into the bit stream.
64. 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 28 to 61 when running the computer program.
65. A decoder, comprising a decoding unit and a second determining unit; wherein: The decoding unit is configured to decode the code stream and determine the value of at least one mode identification information; wherein the mode identification information at least includes the i-th mode identification information, and the i-th mode identification information is used to indicate whether the inter-frame prediction mode value of the current node is greater than or equal to i is an integer greater than or equal to 0 and less than N, where N represents the maximum value of the inter-frame prediction mode; The second determination unit is configured to determine the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information; and determine the prediction value of the current node according to the inter-frame prediction mode value.
66. 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 27 when running the computer program.
67. 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 27 is implemented, or the method according to any one of claims 28 to 61 is implemented.