[go: up one dir, main page]

WO2024212042A1 - Coding method, decoding method, code stream, coder, decoder, and storage medium - Google Patents

Coding method, decoding method, code stream, coder, decoder, and storage medium Download PDF

Info

Publication number
WO2024212042A1
WO2024212042A1 PCT/CN2023/087289 CN2023087289W WO2024212042A1 WO 2024212042 A1 WO2024212042 A1 WO 2024212042A1 CN 2023087289 W CN2023087289 W CN 2023087289W WO 2024212042 A1 WO2024212042 A1 WO 2024212042A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
identification information
inter
mode
frame prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2023/087289
Other languages
French (fr)
Chinese (zh)
Inventor
马闯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to PCT/CN2023/087289 priority Critical patent/WO2024212042A1/en
Publication of WO2024212042A1 publication Critical patent/WO2024212042A1/en
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • 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.
  • G-PCC geometry-based point cloud compression
  • the geometry coding of G-PCC can be divided into octree-based geometry coding and prediction tree-based geometry coding.
  • For the prediction tree-based geometry coding it is necessary to first establish a prediction tree; then traverse each node in the prediction tree, and after determining the prediction mode of each node, predict the geometric position information of the node according to the prediction mode to obtain the prediction residual, and finally encode the parameters such as the prediction mode and prediction residual of each node to generate a binary code stream.
  • the encoding of the inter-frame prediction mode number is usually performed by converting the inter-frame prediction mode number into binary for direct encoding.
  • the performance of the encoded inter-frame prediction mode number is not optimal, which reduces the encoding and decoding efficiency.
  • the embodiments of the present application provide a coding and decoding method, a bit 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.
  • an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
  • 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;
  • the prediction value of the current node is determined.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
  • 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 encoded bits are written into the code stream.
  • an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:
  • the first identification information is used to indicate whether the current node uses the inter-frame prediction mode
  • 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
  • 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
  • N represents the maximum value of the inter-frame prediction mode.
  • an embodiment of the present application provides an encoder, the encoder comprising a first determining unit and an encoding unit; wherein,
  • a first determining unit 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 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 encoding unit is configured to encode the value of at least one mode identification information and write the obtained encoding bits into the bit stream.
  • an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,
  • a first memory for storing a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the second aspect when running a computer program.
  • an embodiment of the present application provides a decoder, the decoder comprising a decoding unit and a second determining unit; wherein:
  • 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 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 a 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 at least one mode identification information; and determine the prediction value of the current node according to the inter-frame prediction mode value.
  • an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:
  • a second memory for storing a computer program that can be run on a second processor
  • the second processor is used to execute the method described in the first aspect when running a computer program.
  • an embodiment of the present application provides a computer-readable storage medium, which stores a computer program.
  • the computer program When executed, it implements the method as described in the first aspect, or implements the method as described in the second aspect.
  • the embodiment of the present application provides a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium.
  • the inter-frame prediction mode value of the current node is determined; according to 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 encoding bits are written into the bitstream.
  • the bitstream is decoded to 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; 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; according to the value of at least one mode identification information, the inter-frame prediction mode value of the current node is determined; according to the inter-frame prediction mode value, the prediction value of the current node is determined.
  • 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.
  • FIG1A is a schematic diagram of a three-dimensional point cloud image
  • FIG1B is a partial enlarged view of a three-dimensional point cloud image
  • FIG2A is a schematic diagram of six viewing angles of a point cloud image
  • FIG2B is a schematic diagram of a data storage format corresponding to a point cloud image
  • FIG3 is a schematic diagram of a network architecture for point cloud encoding and decoding
  • FIG4A is a schematic diagram of a composition framework of a G-PCC encoder
  • FIG4B is a schematic diagram of a composition framework of a G-PCC decoder
  • FIG5A is a schematic diagram of a low plane position in the Z-axis direction
  • FIG5B is a schematic diagram of a high plane position in the Z-axis direction
  • FIG6 is a schematic diagram of a node encoding sequence
  • FIG. 7A is a schematic diagram of a plane identification information
  • FIG7B is a schematic diagram of another type of planar identification information
  • FIG8 is a schematic diagram of sibling nodes of a current node
  • FIG9 is a schematic diagram of the intersection of a laser radar and a node
  • FIG10 is a schematic diagram of neighborhood nodes at the same partition depth and the same coordinates
  • FIG11 is a schematic diagram of a current node being located at a low plane position of a parent node
  • FIG12 is a schematic diagram of a high plane position of a current node located at a parent node
  • FIG13 is a schematic diagram of predictive coding of planar position information of a laser radar point cloud
  • FIG14 is a schematic diagram of IDCM encoding
  • FIG15 is a schematic diagram of coordinate transformation of a rotating laser radar to obtain a point cloud
  • FIG16 is a schematic diagram of predictive coding in the X-axis or Y-axis direction
  • FIG17A is a schematic diagram showing an angle of the Y plane predicted by a horizontal azimuth angle
  • FIG17B is a schematic diagram showing an angle of predicting the X-plane by using a horizontal azimuth angle
  • FIG18 is another schematic diagram of predictive coding in the X-axis or Y-axis direction
  • FIG19A is a schematic diagram of three intersection points included in a sub-block
  • FIG19B is a schematic diagram of a triangular facet set fitted using three intersection points
  • FIG19C is a schematic diagram of upsampling of a triangular face set
  • FIG20 is a schematic diagram of the structure of a geometric information inter-frame encoding and decoding
  • FIG21 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application.
  • FIG22 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application.
  • FIG23 is a schematic diagram of a flow chart of another encoding method provided in an embodiment of the present application.
  • FIG24 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application.
  • FIG25 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application.
  • FIG26 is a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application.
  • FIG27 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.
  • FIG. 28 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • first ⁇ second ⁇ third involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that “first ⁇ second ⁇ third” can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
  • Point Cloud is a three-dimensional representation of the surface of an object.
  • Point cloud (data) on the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.
  • a point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene.
  • FIG1A shows a three-dimensional point cloud image
  • FIG1B shows a partial magnified view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
  • Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information additionally; however, the distribution of points in point clouds in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space in order to fully express a point cloud.
  • each position in the acquisition process has corresponding attribute information, usually RGB color values, and the color value reflects the color of the object; for point clouds, in addition to color information, the attribute information corresponding to each point is also commonly the reflectance value, which reflects the surface material of the object. Therefore, point cloud data usually includes the position information of the point and the attribute information of the point. Among them, the position information of the point can also be called the geometric information of the point.
  • the geometric information of the point can be the three-dimensional coordinate information of the point (x, y, z).
  • the attribute information of the point can include color information and/or reflectivity, etc.
  • reflectivity can be one-dimensional reflectivity information (r); color information can be information on any color space, or color information can also be three-dimensional color information, such as RGB information.
  • R represents red (Red, R)
  • G represents green (Green, G)
  • B blue (Blue, B).
  • the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.
  • the points in the point cloud may include the three-dimensional coordinate information of the points and the reflectivity value of the points.
  • the points in the point cloud may include the three-dimensional coordinate information of the points and the three-dimensional color information of the points.
  • a point cloud obtained by combining the principles of laser measurement and photogrammetry may include the three-dimensional coordinate information of the points, the reflectivity value of the points and the three-dimensional color information of the points.
  • Figure 2A and 2B a point cloud image and its corresponding data storage format are shown.
  • Figure 2A provides six viewing angles of the point cloud image
  • Figure 2B consists of a file header information part and a data part.
  • the header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud.
  • the point cloud is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
  • Point clouds can be divided into the following categories according to the way they are obtained:
  • Static point cloud the object is stationary, and the device that obtains the point cloud is also stationary;
  • Dynamic point cloud The object is moving, but the device that obtains the point cloud is stationary;
  • Dynamic point cloud acquisition The device used to acquire the point cloud is in motion.
  • point clouds can be divided into two categories according to their usage:
  • Category 1 Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, disaster relief robots, etc.
  • Category 2 Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.
  • Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.
  • Point clouds can be collected mainly through the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc.
  • Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second.
  • 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second.
  • the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar).
  • point cloud compression has become a key issue in promoting the development of the point cloud industry.
  • the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but also be inconvenient for transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.
  • the point cloud coding framework that can compress point clouds can be the geometry-based point cloud compression (G-PCC) codec framework or the video-based point cloud compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by AVS.
  • the G-PCC codec framework can be used to compress the first type of static point cloud and the third type of dynamically acquired point cloud, which can be based on the point cloud compression test platform (Test Model Compression 13, TMC13), and the V-PCC codec framework can be used to compress the second type of dynamic point cloud, 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.
  • FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding provided by the embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01.
  • the electronic device can be various types of devices with point cloud encoding and decoding functions.
  • the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which is not limited by the embodiment of the present application.
  • the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.
  • 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).
  • a point cloud encoder ie, encoder
  • a point cloud decoder ie, decoder
  • the point cloud data is first divided into multiple slices by slice division.
  • the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately.
  • FIG4A shows a schematic diagram of the composition framework of a G-PCC encoder.
  • the geometric information is transformed so that all point clouds are contained in a bounding box (Bounding Box), and then quantized.
  • This step of quantization mainly plays a role in scaling. Due to the quantization rounding, the geometric information of a part of the point cloud is the same, so whether to remove duplicate points is determined based on parameters.
  • the process of quantization and removal of duplicate points is also called voxelization.
  • the Bounding Box is divided into octrees or a prediction tree is constructed.
  • arithmetic coding is performed on the points in the divided leaf nodes to generate a binary geometric bit stream; or, arithmetic coding is performed on the intersections (Vertex) generated by the division (surface fitting is performed based on the intersections) to generate a binary geometric bit stream.
  • attribute encoding After the geometric encoding is completed and the geometric information is reconstructed, color conversion is required first to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the uncoded attribute information corresponds to the reconstructed geometric information. Attribute encoding is mainly performed on color information. There are two main transformation methods.
  • LOD level of detail
  • RAHT direct region adaptive hierarchical transformation
  • FIG4B shows a schematic diagram of the composition framework of a G-PCC decoder.
  • the geometric bit stream and the attribute bit stream in the binary bit stream are first decoded independently.
  • 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;
  • 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.
  • the current geometric coding of G-PCC can be divided into octree-based geometric coding (marked by a dotted box) and prediction tree-based geometric coding (marked by a dotted box).
  • the octree-based geometry encoding includes: first, coordinate transformation 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. Whether to remove duplicate points is determined based on parameters. 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.
  • trees such as octrees, quadtrees, binary trees, etc.
  • the bounding box of the point cloud is calculated. Assume that dx > dy > dz , the bounding box corresponds to a cuboid.
  • binary tree partitioning will be performed based on the x-axis to obtain two child nodes.
  • quadtree partitioning will be performed based on the x- and y-axes to obtain four child nodes.
  • octree partitioning will be performed until the leaf node obtained by partitioning is a 1 ⁇ 1 ⁇ 1 unit cube.
  • K indicates the maximum number of binary tree/quadtree partitions before octree partitioning
  • M is used to indicate that the minimum block side length corresponding to binary tree/quadtree partitioning is 2M .
  • the reason why parameters K and M meet the above conditions is that in the process of geometric implicit partitioning in G-PCC, the priority of partitioning is binary tree, quadtree and octree.
  • the node block size does not meet the conditions of binary tree/quadtree, the node will be partitioned by octree until it is divided into the minimum unit of leaf node 1 ⁇ 1 ⁇ 1.
  • the geometric information encoding mode based on octree can effectively encode the geometric information of point cloud by utilizing the correlation between adjacent points in space.
  • the encoding efficiency of point cloud geometric information can be further improved by using plane coding.
  • Fig. 5A and Fig. 5B provide a kind of plane position schematic diagram.
  • Fig. 5A shows a kind of low plane position schematic diagram in the Z-axis direction
  • Fig. 5B shows a kind of high plane position schematic diagram in the Z-axis direction.
  • (a), (a0), (a1), (a2), (a3) here all belong to the low plane position in the Z-axis direction.
  • the four subnodes 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.
  • FIG. 6 provides a schematic diagram of the node coding order, that is, the node coding is performed in the order of 0, 1, 2, 3, 4, 5, 6, and 7 as shown in FIG. 6.
  • the octree coding method is used for (a) in FIG. 5A, the placeholder information of the current node is represented as: 11001100.
  • the plane coding method is used, first, an identifier needs to be encoded to indicate that the current node is a plane in the Z-axis direction.
  • the plane position of the current node needs to be represented; secondly, only the placeholder information of the low plane node in the Z-axis direction needs to be encoded (that is, the placeholder information of the four subnodes 0, 2, 4, and 6). Therefore, based on the plane coding method, only 6 bits need to be encoded to encode the current node, which can reduce the representation of 2 bits compared with the octree coding of the related art. Based on this analysis, plane coding has a more obvious coding efficiency than octree coding.
  • Prob(i) new (L ⁇ Prob(i)+ ⁇ (coded node))/L+1 (3)
  • L 255; in addition, if the coded node is a plane, ⁇ (coded node) is 1; otherwise, ⁇ (coded node) is 0.
  • local_node_density new local_node_density+4*numSiblings (4)
  • 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).
  • planarEligibleK OctreeDepth 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 plane-encoded; otherwise, all nodes in the current layer are not plane-encoded, and only octree coding is used.
  • Figure 9 shows a schematic diagram of the intersection of a laser radar and a node.
  • a node filled with a grid is simultaneously passed through by two laser beams (Laser), so the current node is not a plane in the vertical direction of the Z axis;
  • a node filled with a slash is small enough that it cannot be passed through by two lasers at the same time, so the node filled with a slash may be a plane in the vertical direction of the Z axis.
  • the plane identification information and the plane position information may be predictively coded.
  • the predictive encoding of the plane position information may include:
  • the plane position information is divided into three elements: predicted as a low plane, predicted as a high plane, and unpredictable;
  • the spatial distance 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 a 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”.
  • FIG10 shows a schematic diagram of neighborhood nodes at the same division depth and the same coordinates.
  • the bold large cube represents the parent node (Parent node), the small cube filled with a grid inside it represents the current node (Current node), and the intersection position (Vertex position) of the current node is shown;
  • the small cube filled with white represents the neighborhood nodes at the same division depth and the same coordinates, and the distance between the current node and the neighborhood node is the spatial distance, which can be judged as "near” or "far”; in addition, if the neighborhood node is a plane, then the plane position (Planar position) of the neighborhood node is also required.
  • the current node is a small cube filled with a grid
  • the neighboring node is searched for 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 referenced.
  • FIG11 shows a schematic diagram of a current node being located at a low plane position of a parent node.
  • (a), (b), and (c) show three examples of the current node being located at a low plane position of a parent node.
  • the specific description is as follows:
  • FIG12 shows a schematic diagram of a current node being located at a high plane position of a parent node.
  • (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:
  • Figure 13 shows a schematic diagram of predictive encoding of the laser radar point cloud plane position information.
  • the laser radar emission angle is ⁇ bottom
  • it can be mapped to the bottom plane (Bottom virtual plane)
  • the laser radar emission angle is ⁇ top
  • it can be mapped to the top plane (Top virtual plane).
  • the plane position of the current node is predicted by using the laser radar acquisition parameters, and the position of the current node intersecting with the laser ray is used to quantify the position into multiple intervals, which is finally used as the context information of the plane position of the current node.
  • the specific calculation process is as follows: Assuming that the coordinates of the laser radar are (x Lidar , y Lidar , z Lidar ), and 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 laser radar, and the calculation formula is as follows:
  • each Laser has a certain offset angle relative to the LiDAR, it is also necessary to calculate the relative tangent value tan ⁇ corr,L of the current node relative to the Laser.
  • the specific calculation is as follows:
  • the relative tangent value tan ⁇ corr,L of the current node is used to predict the plane position of the current node. Specifically, assuming that the tangent value of the lower boundary of the current node is tan( ⁇ bottom ), and the tangent value of the upper boundary is tan( ⁇ top ), the plane position is quantized into 4 quantization intervals according to tan ⁇ corr,L , that is, the context information of the plane position is determined.
  • the octree-based geometric information coding mode only has an efficient compression rate for points with correlation in space.
  • the use of the direct coding model (DCM) can greatly reduce the complexity.
  • DCM direct coding model
  • the use of DCM is not represented by flag information, but by the parent node and neighbor nodes of the current node. There are three ways to determine whether the current node is eligible for DCM encoding, as follows:
  • 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.
  • the parent node of the current node has only one child node, the current node.
  • the six neighbor nodes that share a face with the current node are also empty nodes.
  • 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 value (for example, 2), the node will be DCM-encoded, otherwise the octree division will continue.
  • a threshold value for example, 2
  • IDCM_flag the current node is encoded using DCM, otherwise octree coding is still used.
  • the DCM coding mode of the current node needs to be encoded.
  • DCM modes There are currently two DCM modes, namely: (a) only one point exists (or multiple points, but they are repeated points); (b) contains two points.
  • the geometric information of each point needs to be encoded. Assuming that the side length of the node is 2d , d bits are required to encode each component of the geometric coordinates of the node, and the bit information is directly encoded into the bit stream. It should be noted here that when encoding the lidar point cloud, the three-dimensional coordinate information can be predictively encoded by using the lidar acquisition parameters, thereby further improving the encoding efficiency of the geometric information.
  • 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).
  • 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.
  • 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.
  • the axis with the smaller node coordinate geometry position will be used as the priority coded axis dirextAxis, and then the geometry information of the priority coded axis dirextAxis will be encoded as follows. Assume that the bit depth of the coded geometry corresponding to the priority coded 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:
  • the priority coded coordinate axis dirextAxis geometry information is first encoded as follows, assuming that the priority coded axis corresponds to the coded geometry bit depth of nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1].
  • the specific encoding process is as follows:
  • the geometric coordinate information of the current node can be predicted, so as to further improve the efficiency of the geometric information encoding of the point cloud.
  • 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 encoded direction is used to predict the geometric information of another dimension.
  • the axis direction of the direct encoding is directAxis
  • the bit depth of the direct encoding is nodeSizeLog2
  • FIG15 provides a schematic diagram of coordinate transformation for obtaining point clouds using a rotating laser radar.
  • the (x, y, z) coordinates of each node can be converted to (R, ⁇ , i).
  • the laser scanner can perform laser scanning at a preset angle, and different ⁇ (i) can be obtained under different values of i.
  • ⁇ (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°.
  • the LaserIdx corresponding to the current point i.e., the pointLaserIdx number in Figure 15, will be calculated first, and the LaserIdx of the current node, i.e., nodeLaserIdx, will be calculated; secondly, the LaserIdx of the node, i.e., nodeLaserIdx, will be used to predictively encode the LaserIdx of the point, i.e., pointLaserIdx, where the calculation method of the LaserIdx of the node or point is as follows.
  • the LaserIdx of the current node is first used to predict the pointLaserIdx of the point. After the LaserIdx of the current point is encoded, the three-dimensional geometric information of the current point is predicted and encoded using the acquisition parameters of the laser radar.
  • FIG16 shows a schematic diagram of predictive coding in the X-axis or Y-axis direction.
  • a box filled with a grid represents a current node
  • a box filled with a slash represents an already coded node.
  • the LaserIdx corresponding to the current node 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 the geometric coordinates of the node are nodePos, the horizontal azimuth
  • the calculation method between the node geometry information is as follows:
  • Figure 17A shows a schematic diagram of predicting the angle of the Y plane through the horizontal azimuth angle
  • Figure 17B shows a schematic diagram of predicting the angle of the X plane through the horizontal azimuth angle.
  • the predicted value of the horizontal azimuth angle corresponding to the current point The calculation is as follows:
  • FIG18 shows another schematic diagram of predictive coding in the X-axis or Y-axis direction.
  • the portion filled with a grid represents the low plane
  • the portion filled with dots represents the high plane.
  • Indicates the horizontal azimuth of the low plane of the current node Indicates the horizontal azimuth of the high plane of the current node, Indicates the predicted horizontal azimuth angle corresponding to the current node.
  • int context (angLel ⁇ 0&&angLeR ⁇ 0)
  • the LaserIdx corresponding to the current point will be used to predict the Z-axis direction of the current point. That is, the radius information radius of the radar coordinate system is calculated by using the x and y information of the current point. Then, the tangent value of the current point and the vertical offset are obtained by using the laser LaserIdx of the current point, and the predicted value of the Z-axis direction of the current point, namely Z_pred, can be obtained.
  • 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.
  • G-PCC currently introduces a plane coding mode. In the process of geometric division, it will determine whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the conditions of the same plane, the child nodes of the current node will be represented by the plane.
  • the decoder follows the order of breadth-first traversal. Before decoding the placeholder information of each node, it will first use the reconstructed geometric information to determine whether the current node is to be plane decoded or IDCM decoded. If the current node meets the conditions for plane decoding, it will first decode the plane identification and plane position information of the current node, and then decode the placeholder information of the current node based on the plane information. If the current node meets the conditions for IDCM decoding, it will first decode whether the current node is a true IDCM node.
  • IDCM decoding If it is a true IDCM decoding, it will continue to parse the DCM decoding mode of the current node, and then get the number of points in the current DCM node, and finally decode the geometric information of each point. For nodes that do not meet the conditions for plane decoding, it will first decode the plane identification and plane position information of the current node, and then decode the placeholder information of the current node based on the plane information. For nodes that do not meet the requirements of DCM decoding, the plane decoding will decode the placeholder information of the current node. By continuously parsing in this way, the placeholder code of each node is obtained, and the nodes are continuously divided in turn until a 1 ⁇ 1 ⁇ 1 unit cube is obtained. The number of points contained in each leaf node is parsed, and finally the geometrically reconstructed point cloud information is restored.
  • the prior information is first used to determine whether the node starts IDCM. That is, the starting conditions of IDCM are as follows:
  • 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.
  • the parent node of the current node has only one child node, the current node.
  • the six neighbor nodes that share a face with the current node are also empty nodes.
  • a node meets the conditions for DCM coding, first decode whether the current node is a real DCM node, that is, IDCM_flag; when IDCM_flag is true, the current node adopts DCM coding, otherwise it still adopts octree coding.
  • 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 that satisfies the DCM mode contains only one point; if the second point obtained by decoding is a repeated point, it can be inferred that the third type that satisfies the DCM mode 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 (decoding using exponential Columbus).
  • 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).
  • 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.
  • the axis with the smaller node coordinate geometry position will be used as the priority decoding axis dirextAxis, and then the priority decoding axis dirextAxis geometry information will be decoded first in the following way.
  • the geometry bit depth to be decoded corresponding to the priority decoding axis is nodeSizeLog2
  • the coordinates of the two points are pointPos[0] and pointPos[1] respectively.
  • the specific encoding process is as follows:
  • the priority encoded coordinate axis dirextAxis geometry information is first decoded as follows, assuming that the priority decoded axis corresponds to the code geometry bit depth of nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1].
  • the specific encoding process is as follows:
  • the LaserIdx of the current node i.e., nodeLaserIdx
  • the LaserIdx of the node i.e., nodeLaserIdx
  • the calculation method of the LaserIdx of the node or point is the same as that of the encoder.
  • the LaserIdx of the current point and the predicted residual information of the LaserIdx of the node are decoded to obtain ResLaserIdx.
  • 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:
  • the node geometry information corresponding to the current point is used to obtain the horizontal azimuth angle corresponding to the node Assuming the geometric coordinates of the node are nodePos, the horizontal azimuth
  • the calculation method between the node geometry information is as follows:
  • int context (angLel ⁇ 0&&angLeR ⁇ 0)
  • the Z-axis direction of the current point will be predicted and decoded using the LaserIdx corresponding to the current point, that is, the radius information radius of the radar coordinate system is calculated by using the x and y information of the current point, and then the tangent value of the current point and the vertical offset are obtained using the laser LaserIdx of the current point, so that the predicted value of the Z-axis direction of the current point, namely Z_pred, can be obtained.
  • 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.
  • geometric information coding based on triangle soup (trisoup)
  • geometric division must also be performed first, but different from geometric information coding based on binary tree/quadtree/octree, this method does not need to divide the point cloud into unit cubes with a side length of 1 ⁇ 1 ⁇ 1 step by step, but stops dividing when the side length of the sub-block is W.
  • the surface and the twelve edges of the block are obtained.
  • the vertex coordinates of each block are encoded in turn to generate a binary code stream.
  • the Predictive geometry coding includes: first, sorting the input point cloud.
  • the currently used sorting methods include unordered, Morton order, azimuth order, and radial distance order.
  • the prediction tree structure is established by using two different methods, including: KD-Tree (high-latency slow mode) and low-latency fast mode (using laser radar calibration information).
  • KD-Tree high-latency slow mode
  • low-latency fast mode using laser radar calibration information.
  • 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.
  • 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.
  • the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to recover the reconstructed geometric position information of each node, and finally completes the geometric reconstruction of the decoding end.
  • attribute encoding is mainly performed on color information.
  • the color information is converted from the RGB color space to the YUV color space.
  • the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information.
  • color information encoding there are two main transformation methods, one is the distance-based lifting transformation that relies on LOD division, and the other is to directly perform RAHT transformation. Both methods will convert color information from the spatial domain to the frequency domain, and obtain high-frequency coefficients and low-frequency coefficients through transformation.
  • the coefficients are quantized and encoded to generate a binary code stream, as shown in Figures 4A and 4B.
  • the Morton code can be used to search for the nearest neighbor.
  • 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 as follows. For each component of the three-dimensional coordinate represented by a d-bit binary number, its three components can be expressed as:
  • the Morton code M is x, y, z starting from the highest bit, and then arranged in sequence from x l ,y l ,z l to the lowest bit.
  • the calculation formula of M is as follows:
  • Condition 1 The geometric position is limitedly lossy and the attributes are lossy;
  • Condition 3 The geometric position is lossless, and the attributes are limitedly lossy
  • Condition 4 The geometric position and attributes are lossless.
  • the general test sequences include four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame.
  • the Cat2-frame point cloud only contains reflectance attribute information
  • the Cat1A and Cat1B point clouds only contain color attribute information
  • the Cat3-fused point cloud contains both color and reflectance attribute information.
  • 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 by division is a 1 ⁇ 1 ⁇ 1 unit cube.
  • the number of points contained in the leaf node needs to be encoded, and finally the encoding of the geometric octree is completed to generate a binary code stream.
  • 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.
  • geometric lossless decoding it is necessary to parse the number of points contained in each leaf node and finally restore the geometrically reconstructed point cloud information.
  • the prediction tree structure is established by using two different methods, including: based on KD-Tree (high-latency slow mode) and using lidar calibration information (low-latency fast mode).
  • lidar calibration information each point can be divided into different Lasers, and the prediction tree structure is established according to different Lasers.
  • 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.
  • 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.
  • the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to restore the reconstructed geometric position information of each node, and finally completes the geometric reconstruction at the decoding end.
  • the point coordinates of the point cloud input are (x, y, z).
  • the position information of the point cloud is converted into the radar coordinate system (radius, laserIdx).
  • the geometric coordinates of the point are pointPos
  • the starting coordinates of the laser ray are LidarOrigin
  • the number of lasers is LaserNum
  • the tangent value of each Laser is tan ⁇ i
  • the offset position of each Laser in the vertical direction is Zi
  • the calculation method of the node or point LaserIdx is as follows:
  • the depth information radius is calculated as follows:
  • LidarOrigin is generally 0.
  • FIG20 shows a schematic diagram of the structure of inter-frame coding and decoding of geometric information.
  • the current point to be coded in the current frame is filled with a grid, and the current point is represented by a at the previous coded node; there are a first reference frame and a second reference frame, wherein the first reference frame can be the previous frame of the current frame, and the second reference frame can be a global motion compensation (Global Motion Compensation, GMC) reference frame.
  • GMC Global Motion Compensation
  • the first reference frame i.e., the previous reference frame
  • the second reference frame i.e., the reference frame of the previous frame after global motion
  • find the node a that has the same and laserID point g and use the points e and f encoded or decoded after point g in the second reference frame as inter-frame candidate points; at the same time, point e and point f Replaced by the parent node of the current point to be encoded
  • different prediction points including several intra-frame candidate points and up to 4 inter-frame candidate points
  • RDO rate distortion optimization
  • the geometric prediction residual is quantized using the quantization parameter.
  • the prediction mode, prediction residual, prediction tree structure, quantization parameter and other parameters of the prediction tree node position information are encoded to generate a binary code stream.
  • the decoding end continuously parses the bitstream, reconstructs the prediction tree structure, and traverses the prediction tree to find the previous decoded node a before the current point to be decoded;
  • the prediction mode is decoded; if the prediction mode is inter-frame prediction mode, the prediction point is selected from the following at most four candidate points using the decoded prediction mode:
  • the first reference frame i.e., the previous reference frame
  • the second reference frame i.e., the reference frame of the previous frame after global motion
  • find the node a that has the same and laserID point g and use the points e and f encoded or decoded after point g in the second reference frame as inter-frame candidate points; at the same time, point e and point f Replaced by the parent node of the current point to be decoded
  • 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.
  • inter-frame prediction mode number inter-frame prediction mode number
  • the related technology is to convert the inter-frame prediction mode number into binary and directly encode it.
  • the existing technical solution only directly splits the encoded inter-frame prediction mode number into binary for direct encoding, and does not take into account the frequency of different inter-frame prediction mode numbers. This will result in the performance of the encoded inter-frame prediction mode number not being optimal, reducing the encoding and decoding efficiency.
  • 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 according to 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 bitstream.
  • An embodiment of the present application also provides a coding method, decoding a bit 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; according to the value of at least one mode identification information, determining the inter-frame prediction mode value of the current node; according to the inter-frame prediction mode value, determining the prediction value of the current node.
  • 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.
  • FIG21 a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG21, the method may include:
  • S2101 Decode a bitstream and determine a value of at least one mode identification information.
  • the decoding method of the embodiment of the present application is applied to a decoder.
  • the decoding method may specifically refer to a point cloud inter-frame prediction method; more specifically, a decoding method of a point cloud inter-frame geometric information coding mode, or a Columbus decoding method of a point cloud inter-frame geometric information coding mode, to achieve decoding processing of an inter-frame prediction mode value.
  • 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.
  • the point in the point cloud, the point may be all points in the point cloud, or may be some points in the point cloud, which are relatively concentrated in space.
  • the current node may specifically refer to the node currently to be decoded in the point cloud.
  • the inter-frame prediction mode value can be from 0 to N, that is, there can be at most N+1 inter-frame prediction modes.
  • the i-th mode identification information can be represented by flagi.
  • the mode identification information at most N mode identification information can be included here, specifically: flag0, flag1, ..., flagN-1.
  • decoding the code stream and determining the value of at least one mode identification information may include: decoding the code stream based on a first decoding mode and determining the value of at least one mode identification information.
  • 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.
  • 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 herein.
  • flagi can be decoded using a decoding mode of fixed context information/a decoding mode of adaptive context information/a decoding mode without using 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.
  • decoding the bitstream and determining the value of at least one mode identification information may include:
  • 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;
  • i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i
  • 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.
  • the method may further include:
  • 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;
  • the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i.
  • the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form.
  • the i-th mode identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
  • 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.
  • decoding the bitstream and determining the value of at least one mode identification information may include:
  • 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;
  • 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 decode the 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.
  • the method may further include:
  • 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;
  • the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i.
  • the first value is different from the second value.
  • 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.
  • S2102 Determine an inter-frame prediction mode value of a current node according to a value of at least one mode identification information.
  • the inter-frame prediction mode value of the current node can be determined according to the value of the at least one mode identification information.
  • 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.
  • the method may further include:
  • the inter-frame prediction mode value of the current node is set to be equal to N-1;
  • the inter-frame prediction mode value of the current node is set to be equal to N.
  • first decode flag0 using the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is less than or equal to 0, then end the decoding operation, 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, decode flag1 using the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information.
  • the value of flag1 indicates that the inter-frame prediction mode value of the current node is less than or equal to 1, then end the decoding operation, 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, the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information is used to decode flag2.
  • determining the inter-frame prediction mode value of the current node according to the value of at least one mode identification information may include:
  • 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;
  • 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.
  • M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
  • the second decoding mode may be an Exponential-Golomb decoding method, such as a K-order Exponential-Golomb decoding method.
  • the K-order Exponential-Golomb coding is a lossless data compression method that can achieve a very high coding efficiency; therefore, in order to improve the coding efficiency, when the inter-frame prediction mode value of the current node is greater than M, the Exponential-Golomb decoding method can be used to decode the residual value of the first inter-frame prediction mode.
  • the method may further include: initializing the inter prediction mode value to 0.
  • 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 using context information is used to decode flag0.
  • 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 using context information is used to decode flag1;
  • decode flagM using a decoding mode with fixed context information/a decoding mode with adaptive context information/a decoding mode without context information; if the value of flagM indicates that the inter-frame prediction mode value of the current node is less than or equal to M, terminate the decoding operation, 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, 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
  • 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.
  • inter mode Residual mode1+(flag0+flag1+...+flagM) (20)
  • 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.
  • determining the inter-frame prediction mode value of the current node according to 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.
  • the method may further include:
  • the inter-frame prediction mode value of the current node is Set equal to N-1;
  • the inter-frame prediction mode value of the current node is set to be equal to N.
  • 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.
  • determining the inter-frame prediction mode value of the current node according to the value of at least one mode identification information may include:
  • 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;
  • 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.
  • M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
  • 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, in order 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 residual value of the second inter-frame prediction mode.
  • the method may further include: initializing the inter prediction mode value to 0.
  • 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 using 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 using context information is used for decoding.
  • decode flagM using the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using 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 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.
  • 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.
  • 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 decoding operation needs to be continued.
  • M+1 mode identification information such as flag0, flag1, ..., flagM
  • the current node is determined based on the values of the M+1 mode identification information and the second inter-frame prediction mode residual value.
  • the inter-frame prediction mode value may include: performing 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.
  • the inter-frame prediction mode value of the current node can be determined according to the value of the i-th mode identification information; or, in order to improve the coding efficiency, the exponential Golomb decoding method can be combined to determine the inter-frame prediction mode value of the current node.
  • S2103 Determine the prediction value of the current node according to the inter-frame prediction mode value.
  • the selected node can be determined according to the inter-frame prediction mode value, and then the prediction value of the current node can be determined.
  • determining the prediction value of the current node according to the inter-frame prediction mode value may include: determining the selected node from at least one candidate node according to the inter-frame prediction mode value; and determining the prediction value of the current node according to the selected node.
  • 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.
  • at least one candidate node may be composed of at least one second candidate node and/or at least one fourth candidate node, and the number of candidate nodes is not limited here.
  • the current node is located in the current frame, wherein the current frame refers to the frame to be decoded, the first reference frame and the second reference frame are both decoded frames, and the first reference frame is different from the second reference frame.
  • the first reference frame may be the previous K frames of 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.
  • the first reference frame may be the previous frame of the current frame; the second reference frame may be obtained by performing global motion on the previous frame.
  • the first reference frame may be a previous frame of the current frame; the second reference frame may be a previous frame of the previous frame of the current frame.
  • the current frame is Frame t
  • the first reference frame may be Frame t-1
  • the second reference frame may be Frame t-2
  • t is an integer.
  • the method may further include:
  • 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
  • the selected node is determined according to the pth 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.
  • the method may further include:
  • 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 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.
  • 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.
  • two different methods can be used to construct the prediction tree structure, which can include: KD-Tree (high latency slow mode) and low latency fast mode (using laser radar calibration information).
  • KD-Tree high latency slow mode
  • low latency fast mode using laser radar calibration information.
  • 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.
  • the prediction tree structure is reconstructed by decoding the bitstream, and then the prediction tree is traversed to determine the previous decoded node of the current node in the decoding order of the prediction tree.
  • the geometric parameters here refer to the parameters in the radar coordinate system.
  • the geometric parameters may include: horizontal azimuth And the radar laser index number laserID.
  • 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 is the same as the horizontal azimuth of the previous decoded node.
  • the geometric parameters of the previous decoded node and the first candidate node satisfy 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.
  • the geometric parameters of the previous decoded node and the third candidate node satisfy 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.
  • the first candidate node found has the same laserID as the laserID of the previous decoded node, and The previous decoded node
  • the third candidate node found has the same laserID as the laserID of the previous decoded node, and The previous decoded node same.
  • 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.
  • the geometric parameters of the previous decoded node and the first candidate node satisfy 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 greater than and closest to the horizontal azimuth angle of the previous decoded node.
  • the geometric parameters of the previous decoded node and the third candidate node satisfy 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 greater than and closest to the horizontal azimuth angle of the previous decoded node.
  • 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
  • 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
  • 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.
  • the geometric parameters of the previous decoded node and the first candidate node satisfy 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.
  • the geometric parameters of the previous decoded node and the first candidate node satisfy 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 less than and closest to the horizontal azimuth angle of the previous decoded node.
  • 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
  • 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
  • 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 by the parent node of the current node
  • the preset manner may be based on the decoding order of the prediction tree, or may be based on the order of the magnitude of the horizontal azimuth angle, which is not specifically limited here. The following describes these two specific implementations.
  • 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.
  • determining the first fourth candidate node to the qth fourth candidate node in a preset manner in the second reference frame may include: 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 in sequence according to the decoding order of the prediction tree.
  • the at least one second candidate node includes a node c and a node d.
  • the previous decoded node a of the current node is first determined; then the first candidate node b whose geometric parameters satisfy 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.
  • 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 the first reference frame, in order of magnitude of the horizontal azimuth angles, the first second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node ... and the first second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node.
  • determining the first to qth fourth candidate nodes in a preset manner in the second reference frame may include: determining in order of 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 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 first fourth candidate node, the second fourth candidate node, ..., and the qth fourth candidate node are all the same as the radar laser index number of the previous decoded node.
  • At least one second candidate node includes node c and node d.
  • the selected node is determined to be node d according to 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 satisfy the first condition with the previous decoded node a is determined; and then the order of the horizontal azimuth angle is as follows:
  • 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.
  • the first reference frame i.e., the previous reference frame
  • the second reference frame i.e., the reference frame of the previous frame after global motion
  • nodes e and f encoded or decoded after node g in the second reference frame are used as inter-frame candidate points
  • nodes e and f The node that is replaced by the parent node of the current node
  • the selected node can be determined from at least one of node c, node d, node e and node f, and then the prediction value of the current node can be determined; alternatively, 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 the prediction value of the current node can be determined; there is no specific limitation on this.
  • the selected node is determined according to the inter-frame prediction mode value, and an inter-frame candidate node set that is the same as the encoding end can also be constructed here.
  • 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. Then, using the inter-frame prediction mode value obtained by decoding, the selected node can be determined from the inter-frame candidate node set, and then the prediction value of the current node can be determined.
  • the method may also include: decoding the code stream to determine the prediction residual value and quantization parameter of the current node; dequantizing the prediction residual value according to the quantization parameter to obtain a dequantized residual value; and determining the reconstruction information of the current node based on the dequantized residual value and the prediction value.
  • 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.
  • 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 the inverse quantized residual value; then the inverse 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.
  • the decoding method is mainly for decoding optimization of the inter-frame prediction mode value, and 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 also includes: 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, then performing the step of decoding the code stream to determine the value of at least one mode identification information.
  • the method further includes:
  • 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
  • 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.
  • 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.
  • the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
  • 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.
  • a flag bit can be set to determine whether to enable the decoding method of the embodiment of the present application. Therefore, in some embodiments, the method further includes: 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, then performing the step of decoding the code stream to determine the value of at least one mode identification information.
  • the method further includes:
  • 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
  • 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.
  • the fifth value is different from the sixth value, and the fifth value and the sixth value can be in parameter form or in digital form.
  • the second identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • 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 no specific limitation is made here.
  • a 1-bit flag (i.e., the second identification information) can be used here to indicate whether the target inter-frame decoding mode is enabled or not.
  • This flag can be placed in the header information of the high-level syntax element, such as the 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.
  • This embodiment provides a decoding method, firstly decoding a code stream, determining the 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; then determining the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; and then determining the prediction value of the current node according to the inter-frame prediction mode value.
  • the inter-frame prediction mode value is no longer converted into binary for direct decoding, but 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 according to 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, so that the frequency distribution of the inter-frame prediction mode is taken into account, that is, the more likely the inter-frame prediction mode is to appear, the more forward the corresponding inter-frame prediction mode value is, so that the number of coding bits can be reduced, the bit rate can be saved, and the encoding and decoding efficiency can be improved.
  • FIG22 a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG22, the method may include:
  • S2201 Determine the inter-frame prediction mode value of the current node.
  • the encoding method of the embodiment of the present application is applied to an encoder.
  • the encoding method may specifically refer to a point cloud inter-frame prediction method; more specifically, it may be an encoding method of a point cloud inter-frame geometric information encoding mode, or it may also be a Columbus encoding method of a point cloud inter-frame geometric information encoding mode, to achieve encoding processing of an inter-frame prediction mode value.
  • the point in the point cloud, the point can be all points in the point cloud, or it can be part of the points in the point cloud, and these points are relatively concentrated in space.
  • the current node can specifically refer to the node to be encoded in the point cloud.
  • determining the inter-frame prediction mode value of the current node may include:
  • 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.
  • determining the selected node from the inter-frame candidate node set may include:
  • a cost is calculated for at least one candidate node in the inter-frame candidate node set, and at least one candidate node is determined. Select the cost value of each node; determine the minimum cost value from the cost value of at least one candidate node, and use the candidate node corresponding to the minimum cost value as the selected node.
  • the inter-frame candidate node set includes at least one candidate node.
  • the inter-frame candidate node set may include one candidate node, two candidate nodes, or more candidate nodes, which is not specifically limited here.
  • the method may include:
  • S2301 Determine the previous encoded node of the current node.
  • S2302 Determine a first candidate node whose geometric parameters satisfy a first condition with those of a previously 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.
  • 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 at least one fourth candidate node to the horizontal azimuth angle of the parent node of the current node.
  • S2304 Determine an inter-frame candidate node set according to at least one second candidate node and/or at least one fourth candidate node.
  • the current node is located in the current frame.
  • the current frame refers to the frame to be encoded
  • the first reference frame and the second reference frame are both frames that have been encoded
  • the first reference frame is different from the second reference frame.
  • 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.
  • two different methods can be used to construct the prediction tree structure, which can include: KD-Tree (high latency slow mode) and low latency fast mode (using laser radar calibration information).
  • KD-Tree high latency slow mode
  • low latency fast mode using laser radar calibration information.
  • 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.
  • the first reference frame may be the previous K frames of 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.
  • the first reference frame may be the previous frame of the current frame; the second reference frame may be obtained by performing global motion on the previous frame.
  • the first reference frame may be a previous frame of the current frame; the second reference frame may be a previous frame of the previous frame of the current frame.
  • the current frame is Frame t
  • the first reference frame may be Frame t-1
  • the second reference frame may be Frame t-2
  • t is an integer.
  • the geometric parameters here refer to the parameters in the radar coordinate system.
  • the geometric parameters may include: horizontal azimuth And the radar laser index number laserID.
  • 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.
  • determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the radar laser index sequence number of the previous encoded node; and a horizontal azimuth angle of the first candidate node is the same as the horizontal azimuth angle of the previous encoded node.
  • a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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 a horizontal azimuth angle of the third candidate node is the same as the horizontal azimuth angle of the previous encoded node.
  • the first candidate node found has the same laserID as the laserID of the previous encoded node, and The previous encoded node
  • the third candidate node found has the same laserID as the laserID of the previous encoded node, and The previous encoded node same.
  • 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.
  • determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the 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.
  • a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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.
  • 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
  • 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
  • the geometric parameters satisfying the first condition may include: the radar laser index signal and the radar of the previous encoded node;
  • the laser index number is the same as that of the previous encoded node;
  • the horizontal azimuth angle is less than and closest to the horizontal azimuth angle of the previous encoded node.
  • determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the 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.
  • a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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.
  • 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
  • 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
  • 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 by the parent node of the current node
  • determining at least one second candidate node in the first reference frame according to the first candidate node may include:
  • determining at least one second candidate node in a first reference frame based on a first candidate node may include: determining the 1st 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.
  • the 1st second candidate node to the mth second candidate node may specifically be: the 1st second candidate node, the 2nd second candidate node, ..., the mth second candidate node.
  • 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.
  • 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.
  • 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.
  • the first reference frame assuming that at least one second candidate node includes node c and node d.
  • 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 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, ..., and the mth second candidate node are all the same as the radar laser index number of the previous encoded 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 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.
  • At least one second candidate node includes node c and node d.
  • 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
  • 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.
  • the first reference frame i.e., the previous reference frame
  • the second reference frame i.e. the reference frame of the previous frame after global motion
  • a has the same and laserID of node g, and use nodes e and f encoded or decoded after node g in the second reference frame as inter-frame candidate points; at the same time, nodes e and f The node that is replaced by the parent node of the current node
  • the selection of nodes c and d may also be performed in the first reference frame according to the horizontal azimuth angle. , 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.
  • the selection of nodes e and f it is also possible to select nodes e and f in the second reference frame according to the horizontal azimuth angles.
  • 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.
  • the selected node can be determined from the inter-frame candidate node set.
  • the selected node is determined from the inter-frame candidate node set, and different candidate nodes can be selected using the RDO method.
  • it can be: the cost of each candidate node in the inter-frame candidate node set is calculated using the rate-distortion cost method to determine the cost value of at least one candidate node; the minimum cost value is selected from these cost values, and then the candidate node corresponding to the minimum cost value is used as the selected node.
  • 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.
  • S2202 Determine a value of at least one mode identification information according to the inter-frame prediction mode value.
  • 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.
  • the inter-frame prediction mode value can be from 0 to N, that is, there can be at most N+1 inter-frame prediction modes.
  • the i-th mode identification information can be represented by flagi.
  • the mode identification information at most N mode identification information can be included here, specifically: flag0, flag1, ..., flagN-1.
  • determining the value of at least one mode identification information according to the inter-frame prediction mode value may include:
  • 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;
  • i-th mode identification information indicates that the inter-frame prediction mode value of the current node is greater than i
  • 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.
  • 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
  • determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:
  • 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
  • the value of the i-th mode identification information is determined to be the second value.
  • the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form.
  • the i-th mode identification information can be a parameter written in the profile or a flag. Value, no specific limitation is made here.
  • 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.
  • determining the value of at least one mode identification information according to the inter-frame prediction mode value may include:
  • 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;
  • 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, 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.
  • the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i
  • determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:
  • 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
  • the inter-frame prediction mode value is equal to i, then the value of the i-th mode identification information is determined to be the second value.
  • the first value and the second value may be different.
  • S2203 Encode the value of at least one mode identification information, and write the obtained coded bits into the bit stream.
  • the encoding end 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.
  • encoding the value of at least one mode identification information and writing the obtained coded bits into the bitstream may include: encoding the value of at least one mode identification information based on the first coding mode and writing the obtained coded bits into the bitstream.
  • 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.
  • 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 herein.
  • the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using context information can be used to encode flagi, and the obtained coded bits can be written into the bitstream.
  • encoding the value of at least one mode identification information and writing the obtained encoding bits into the bitstream may include:
  • 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 value of the i-th mode identification information is Encoding is performed, and the obtained coded bits are written into a bit stream;
  • 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.
  • the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is used to encode the value of flag0, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is greater than 0, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flag1, and it is determined 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 ...
  • the mode value is greater than 1, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flag2, and it is determined 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, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flagM, and it is determined 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, the encoding operation is terminated; where M is an integer greater than or equal to 0 and less than N.
  • the method may further include:
  • the value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.
  • determining the value of the N-1th mode identification information according to the inter-frame prediction mode value may include:
  • 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
  • the value of the N-1th mode identification information is determined to be the second value.
  • 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.
  • 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 be used 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.
  • i is an integer greater than or equal to 0 and less than N-1.
  • the encoding mode of fixed context information/the encoding mode of adaptive context information/the encoding mode without using 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 encoding 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 encoding operation is terminated, that is, the inter-frame prediction mode value is equal to N.
  • the method may further include:
  • 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;
  • 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.
  • M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
  • the second coding mode may be an exponential Golomb coding method, such as a K-order exponential Golomb coding method.
  • K-order exponential Golomb is a lossless data compression method that can achieve very high coding efficiency; therefore, in order 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.
  • the encoding end first use the fixed context information encoding mode/adaptive context information encoding mode/no context information encoding mode 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, the fixed context information is used.
  • 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.
  • residual mode1 inter mode-(flag0+flag1+...+flagM) (24)
  • 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.
  • encoding the value of at least one mode identification information and writing the obtained encoding bits into the bitstream may include:
  • the i-th mode identification information indicates that the inter-frame prediction mode value of the current node is equal to i, the value of the i-th mode identification information is encoded, and the obtained encoding bits are written into the bitstream;
  • 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.
  • the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using context information is used to encode the value of flag0, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is not equal to 0, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using context information is continued to encode the value of flag1, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is equal to 1, the encoding operation is terminated; 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 using context information to encode the value of flag2, and judge whether the inter-frame prediction mode
  • the method may further include:
  • the value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.
  • determining the value of the N-1th mode identification information according to the inter-frame prediction mode value may include:
  • inter-frame prediction mode value is equal to N, determining the value of the N-1th mode identification information to be the first value;
  • the value of the N-1th mode identification information is determined to be the second value.
  • 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.
  • the coding mode of fixed context information/adaptive context information can be used.
  • the encoding mode/coding mode without context information is used to encode the value of flagi, and it is determined 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 with fixed context information/coding mode with adaptive context information/coding mode without context information is continued to encode the value of flagi+1, and it is determined whether the inter-frame prediction mode value of the current node is equal to i+1.
  • i is an integer greater than or equal to 0 and less than N-1.
  • the coding mode of fixed context information/coding mode of adaptive context information/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.
  • the method may further include:
  • 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;
  • 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.
  • M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.
  • the second coding mode may be an exponential Golomb coding method, such as a K-order exponential Golomb coding method.
  • K-order exponential Golomb is a lossless data compression method that can achieve very high coding efficiency; therefore, in order 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.
  • the encoding end first use the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using 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 using 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 using 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
  • 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 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.
  • 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.
  • M+1 mode identification information such as flag0, flag1, ..., flagM
  • 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.
  • the point cloud inter-frame geometric information encoding mode can be used for encoding; or, in order to improve the encoding efficiency, the exponential Golomb encoding method can be combined for encoding.
  • the method may also include:
  • the initial residual value is quantized according to the quantization parameter to determine the predicted residual value of the current node.
  • 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.
  • 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.
  • the method may further include: encoding the prediction residual value of the current node, and writing the obtained coded bits into the bitstream.
  • the method may further include: encoding the quantization parameter, and writing the obtained encoded bits into a bitstream.
  • the geometric prediction value of the current node is first determined; then the difference operation is performed based on the geometric position information of the current node and the geometric prediction value to obtain the geometric prediction residual; and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the inter-frame prediction mode value, prediction residual, prediction tree structure, quantization parameter and other parameters of each node position information in the prediction tree are encoded, and the obtained coded bits are written into the bitstream.
  • the encoding method is mainly for encoding optimization of the inter-frame prediction mode value, and 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:
  • the step of determining the inter-frame prediction mode value of the current node is performed.
  • determining the value of the first identification information may include:
  • 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
  • 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 the fourth value.
  • 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.
  • the first identification information can be a parameter written in the profile or a flag value, which is not specifically limited here.
  • 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.
  • the method may further include: encoding the value of the first identification information, and writing the obtained encoded bits into a bit stream.
  • 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:
  • a step of determining a value of at least one mode identification information according to the inter-frame prediction mode value is performed.
  • determining the value of the second identification information may include:
  • 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
  • the value of the second identification information is determined to be the sixth value.
  • the fifth value is different from the sixth value, and the fifth value and the sixth value can be in parameter form or in digital form.
  • the second identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • 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 no specific limitation is made here.
  • the method may further include: encoding the value of the second identification information, and writing the obtained encoded bits into the bit stream.
  • the value of the second identification information can be directly obtained by 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.
  • a 1-bit flag (i.e., the second identification information) can be used to indicate whether the target inter-frame coding 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.
  • the embodiment of the present application further provides a code stream, which is generated by bit encoding according to the information to be encoded; wherein the information to be encoded may include at least one of the following:
  • 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 first identification information is used to indicate whether the current node uses the inter-frame prediction mode
  • the second identification information is used to indicate whether the current node enables the target inter-frame encoding/decoding mode.
  • the encoder can encode the information to be encoded and write the obtained encoded bits into the bitstream, which is then transmitted from the encoder to the decoder. Later, at the decoder, by decoding the bitstream, the value of at least one mode identification information and the residual value of the inter-frame prediction mode of the current node can be obtained, so that the inter-frame prediction mode value of the current node can be directly determined.
  • This embodiment provides a coding method, first determining the inter-frame prediction mode value of the current node; then determining the value of at least one mode identification information according to the inter-frame prediction mode value; 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; finally, encoding the value of at least one mode identification information, and writing the obtained coded bit into the bitstream.
  • 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, so that the frequency distribution of the inter-frame prediction mode is taken into account, that is, the more likely the inter-frame prediction mode is to appear, the more forward the corresponding inter-frame prediction mode value is, so that the number of coding bits can be reduced, the bit rate can be saved, and the encoding and decoding efficiency can be improved.
  • the prediction mode of the inter-frame prediction tree is mainly improved.
  • the specific performance of the encoding prediction mode is as follows:
  • the inter-frame prediction mode value is encoded.
  • the solution adopted by the related art is to convert the inter-frame prediction mode digital into binary and encode it directly.
  • the specific performance of the decoding prediction mode is:
  • inter mode coded inter-frame prediction mode value
  • inter-frame prediction mode the coded inter-frame prediction mode value
  • a coding mode for inter-mode is designed here, taking into account the frequency distribution of inter-frame coding modes. The more likely inter-mode to appear, the more it is placed in the front, which can reduce the number of coding bits and achieve the purpose of improving compression efficiency.
  • the tool proposed by the present technology can use a 1-bit flag to indicate whether it is enabled or not.
  • This flag is placed in the header information of the high-level syntax element, such as the geometry header, and this flag is conditionally enabled under certain conditions. If this flag does not appear in the bitstream, its default value is a fixed value. Similarly, the flag needs to be decoded at the decoding end. If this flag does not appear in the bitstream, it can be decoded without decoding, and its default value is a fixed value.
  • the present technology is to design a coding and decoding scheme for the inter-frame prediction mode value (or "inter-frame prediction mode number", represented by inter mode):
  • 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).
  • inter mode which defaults to 0 to N, that is, there are at most N+1 inter modes.
  • the specific process is as follows:
  • a flag flag0 indicates whether the inter mode is greater than 0; if not, the decoding is terminated and the inter mode is 0.
  • a flag flag1 is encoded using 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.
  • a flag flagN-1 is encoded using 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.
  • flagx represents whether inter mode is equal to x. If not, flagx is 0 (i.e., inter mode is not equal to x, and the processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and the encoding ends).
  • inter mode which defaults to 0 to N, that is, there are at most N+1 inter modes.
  • the specific process is as follows:
  • a flag flag0 indicates whether the inter mode is equal to 0; if so, the decoding is terminated and the inter mode is 0.
  • a flag flag1 is encoded using 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.
  • a flag flagN-1 is encoded using fixed context/no context/adaptive context to indicate whether the inter mode is equal to N-1; if so, decoding is terminated, and the inter mode is N-1; if not, decoding is terminated, and the inter mode is N.
  • the present technology is a Columbus scheme designed to encode and decode the inter-frame prediction mode value (or "inter-frame prediction mode number", denoted by inter mode):
  • 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).
  • inter mode which defaults to 0 to N, that is, there are at most N+1 inter modes.
  • the specific process is as follows:
  • flagM indicates that the inter mode is greater than M
  • inter mode inter mode-(M+1); or,
  • inter mode inter mode-(flag0+flag1+...+flagM).
  • a flag flag0 indicates whether the inter mode is greater than 0; if not, decoding is terminated.
  • Decoding using fixed context/no context/adaptive context uses a flag flag1 to indicate whether the inter mode is greater than 1; if not, decoding ends.
  • a flag flagM indicates whether the inter mode is greater than M; if not, the decoding is terminated.
  • flagM indicates that the inter mode is greater than M
  • flagx represents whether inter mode is equal to x. If not, flagx is 0 (i.e., inter mode is not equal to x, and the processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and the encoding ends).
  • inter mode which defaults to 0 to N, that is, there are at most N+1 inter modes.
  • the specific process is as follows:
  • flagM indicates that the inter mode is not equal to M
  • inter mode inter mode-(M+1), or
  • inter mode inter mode-(!(flag0)+!(flag1)+...+!(flagM)).
  • Decoding using fixed context/no context/adaptive context uses a flag flag0 to indicate whether the inter mode is equal to 0; if so, decoding ends.
  • Decoding using fixed context/no context/adaptive context uses a flag flag1 to indicate whether the inter mode is equal to 1; if so, decoding ends.
  • Decoding using fixed context/no context/adaptive context uses a flag flagM to indicate whether the inter mode is equal to M; if so, decoding ends.
  • flagM indicates that the inter mode is not equal to M
  • the inter-frame prediction mode value 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.
  • the encoder 240 may include: a first determination unit 2401 and an encoding unit 2402; wherein,
  • a first determining unit 2401 is configured to determine an inter-frame prediction mode value of a current node
  • 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 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 encoding unit 2402 is configured to encode the value of at least one mode identification information and write the obtained encoding bits into the bit stream.
  • 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 bit stream.
  • 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.
  • 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 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 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
  • the first determination unit 2401 is further configured to determine that the value of the i-th mode identification information is a 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 a second value.
  • 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.
  • 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;
  • the encoding unit 2402 is further configured to encode the value of the N-1th mode identification information and write the obtained coded bits into the bit stream.
  • 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.
  • 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 M+1 mode identification information if the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M;
  • the encoding unit 2402 is also configured to encode the residual value of the first inter-frame prediction mode of the current node based on the second encoding mode, and write the obtained encoding bits into the bit stream; 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.
  • 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.
  • 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.
  • 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
  • the first determination unit 2401 is further configured to determine the value of the i-th mode identification information as 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 the value of the i-th mode identification information as the second value.
  • 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.
  • 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;
  • the encoding unit 2402 is further configured to encode the value of the N-1th mode identification information and write the obtained coded bits into the bit stream.
  • 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.
  • the first determining unit 2401 is further configured to, when i is equal to M, if the Mth 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 according to the inter-frame prediction mode value and the values of the M+1 mode identification information;
  • the encoding unit 2402 is also 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.
  • 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 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.
  • 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.
  • the second encoding mode comprises: an Exponential Golomb encoding mode.
  • 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.
  • 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.
  • the first determination unit 2401 is also 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, 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.
  • the first determination 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.
  • 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.
  • the first determination unit 2401 is further configured to determine a predicted value of the current node based on the selected node; determine an 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 a quantization parameter to determine a predicted residual value of the current node.
  • the encoding unit 2402 is further configured to encode the prediction residual value of the current node and write the obtained encoding bits into the bitstream.
  • the encoding unit 2402 is further configured to encode the quantization parameter and write the obtained encoded bits into the bitstream.
  • the first determination 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 an inter-frame prediction mode, execute the step of determining the inter-frame prediction mode value of the current node.
  • 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.
  • 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.
  • 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 execute the step of determining the value of at least one mode identification information according to the inter-frame prediction mode value.
  • the first determination unit 2401 is further configured to determine that the value of the second identification information is a 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 a sixth value.
  • 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.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular.
  • the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a
  • a storage medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a 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: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
  • 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, the method described in any one of the aforementioned embodiments is implemented.
  • 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.
  • 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 marked as the first bus system 2504 in Figure 25. Among them,
  • the first communication interface 2501 is used to receive and send signals during the process of sending and receiving information with other external network elements;
  • a first memory 2502 used for storing a computer program that can be run on the first processor 2503;
  • the first processor 2503 is configured to, when running the computer program, execute:
  • 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 encoded bits are written into the code stream.
  • 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.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced synchronous DRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the first processor 2503 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 2503.
  • the above-mentioned first processor 2503 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the first memory 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.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the first processor 2503 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.
  • This embodiment provides an encoder, in which, for an 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 mode identification information is converted into binary for direct encoding.
  • the value of 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.
  • the decoder 260 may include: a decoding unit 2601 and a second determining unit 2602; wherein,
  • the decoding unit 2601 is configured to decode the bitstream and determine the 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 second determination 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.
  • 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.
  • 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.
  • the decoding unit 2601 is further configured to decode the bitstream to determine the value of the i-th mode identification information
  • the second determining unit 2602 is further configured to use i+1 mode identification information 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 less than or equal to i; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;
  • the decoding unit 2601 is also 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.
  • 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 determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is less than or equal to i; if the value of the i-th mode identification information is a second value, then determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is greater than i.
  • 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.
  • 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 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 greater than N-1, then the inter-frame prediction mode value of the current node is set to be equal to N.
  • 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 based on the second decoding mode decoding code stream, 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 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.
  • 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 first inter-frame prediction mode residual value to determine the inter-frame prediction mode value of the current node.
  • 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.
  • the decoding unit 2601 is further configured to decode the bitstream to determine the value of the i-th mode identification information
  • 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;
  • the decoding unit 2601 is also 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.
  • 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 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, then determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is equal to i.
  • 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.
  • 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.
  • 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, then 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.
  • 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 to 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.
  • 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.
  • the second decoding mode comprises: an Exponential Golomb decoding mode.
  • the decoding unit 2601 is further configured to decode the code stream to 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, execute the step of decoding the code stream to determine the value of at least one mode identification information.
  • 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 a 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 a fourth value.
  • 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 method, execute the step of decoding the code stream and determining the value of at least one mode identification information.
  • the second determination unit 2602 is further configured to, if the value of the second identification information is the fifth value, 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 sixth value, determine that the second identification information indicates that the current node enables the target inter-frame decoding method.
  • the second determination 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.
  • 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 a first reference frame, and at least one fourth candidate node is a candidate node in a second reference frame; and the first reference frame is a 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.
  • 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 first candidate node in the first reference frame; wherein the geometric parameters of the previous decoded node and the first candidate node satisfy 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.
  • 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 satisfy 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.
  • the decoding unit 2601 is further configured to decode the bitstream and determine the prediction residual value and quantization parameter of the current node;
  • 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.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium, which is applied to the decoder 260, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.
  • 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.
  • 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,
  • the second communication interface 2701 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 2702 is used to store a computer program that can be run on the second processor 2703;
  • the second processor 2703 is configured to execute, when running the computer program:
  • 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;
  • the prediction value of the current node is determined.
  • the second processor 2703 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • the present embodiment provides a decoder, in which, for the inter-frame prediction mode value, the inter-frame prediction mode value is no longer converted into binary for direct decoding, but 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 according to 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, thereby taking 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 further improving encoding and decoding efficiency.
  • a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown.
  • a coding and decoding system 280 may include an encoder 2801 and a decoder 2802 .
  • the encoder 2801 may be the encoder described in any one of the aforementioned embodiments
  • the decoder 2802 may be the decoder described in any one of the aforementioned embodiments.
  • the inter-frame prediction mode value of the current node is determined; according to 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 Indicates 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 coded bits into the bitstream.
  • the decoding end decode the bitstream 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; 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; determine the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; determine the prediction value of the current node according to 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

Disclosed in the embodiments of the present application are a coding method, a decoding method, a code stream, coders, a decoder and a storage medium. The decoding method comprises: decoding a code stream, and determining the value of at least one piece of mode identification information, the mode identification information at least comprising i-th piece of mode identification information, the i-th mode identification information being used for indicating whether an inter-frame prediction mode value of the current node is greater than or equal to i, i being an integer greater than or equal to 0 and less than N, and N representing the maximum value of the inter-frame prediction mode; according to the value of the at least one piece of the mode identification information, determining the inter-frame prediction mode value of the current node ; and, according to the inter-frame prediction mode value, determining a predicted value of the current node. Therefore, the number of coded bits can be reduced, thereby decreasing a code rate, and improving coding and decoding efficiency.

Description

编解码方法、码流、编码器、解码器以及存储介质Coding and decoding method, code stream, encoder, decoder and storage medium 技术领域Technical Field

本申请实施例涉及点云编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。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

在基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架中,点云的几何信息和属性信息是分开进行编码的。G-PCC的几何编码可分为基于八叉树的几何编码和基于预测树的几何编码。对于基于预测树的几何编码而言,首先需要建立预测树;然后遍历预测树中的每个节点,在确定出每一个节点的预测模式后,根据该预测模式对节点的几何位置信息进行预测得到预测残差,最终将每个节点的预测模式和预测残差等参数进行编码,生成二进制码流。In the geometry-based point cloud compression (G-PCC) codec framework, the geometric information and attribute information of the point cloud are encoded separately. The geometry coding of G-PCC can be divided into octree-based geometry coding and prediction tree-based geometry coding. For the prediction tree-based geometry coding, it is necessary to first establish a prediction tree; then traverse each node in the prediction tree, and after determining the prediction mode of each node, predict the geometric position information of the node according to the prediction mode to obtain the prediction residual, and finally encode the parameters such as the prediction mode and prediction residual of each node to generate a binary code stream.

在相关技术中,针对帧间预测模式数的编码,通常是将帧间预测模式数转换为二进制进行直接编码,这时候由于考虑不全面,导致编码帧间预测模式数的性能不是最优的,降低了编解码效率。In the related art, the encoding of the inter-frame prediction mode number is usually performed by converting the inter-frame prediction mode number into binary for direct encoding. However, due to incomplete consideration, the performance of the encoded inter-frame prediction mode number is not optimal, which reduces the encoding and decoding efficiency.

发明内容Summary of the invention

本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,可以减少编码比特数,从而能够节省码率,提升编解码效率。The embodiments of the present application provide a coding and decoding method, a bit 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.

本申请实施例的技术方案可以如下实现:The technical solution of the embodiment of the present application can be implemented as follows:

第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:

解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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 an inter-frame prediction mode value of a current node according to a value of at least one mode identification information;

根据帧间预测模式值,确定当前节点的预测值。According to the inter-frame prediction mode value, the prediction value of the current node is determined.

第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:In a second aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:

确定当前节点的帧间预测模式值;Determine the inter-frame prediction mode value of the current node;

根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;Determine the value of at least one mode identification information according to 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;

对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of at least one mode identification information is encoded, and the obtained encoded bits are written into the code stream.

第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:

当前节点的预测残差值、量化参数、至少一个模式标识信息的取值、帧间预测模式剩余值、第一标识信息的取值和第二标识信息的取值;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;

其中,第一标识信息用于指示当前节点是否使用帧间预测模式,第二标识信息用于指示所述当前节点是否启用目标帧间编码/解码方式;模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值。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.

第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元和编码单元;其中,In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit and an encoding unit; wherein,

第一确定单元,配置为确定当前节点的帧间预测模式值;A first determining unit, configured to determine an inter-frame prediction mode value of a current node;

第一确定单元,还配置为根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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 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 encoding unit is configured to encode the value of at least one mode identification information and write the obtained encoding bits into the bit stream.

第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,

第一存储器,用于存储能够在第一处理器上运行的计算机程序; A first memory, for storing a computer program that can be run on the first processor;

第一处理器,用于在运行计算机程序时,执行如第二方面所述的方法。The first processor is used to execute the method described in the second aspect when running a computer program.

第六方面,本申请实施例提供了一种解码器,该解码器包括解码单元和第二确定单元;其中,In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a decoding unit and a second determining unit; wherein:

解码单元,配置为解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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 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 a 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 at least one mode identification information; and determine the prediction value of the current node according to the inter-frame prediction mode value.

第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:

第二存储器,用于存储能够在第二处理器上运行的计算机程序;A second memory for storing a computer program that can be run on a second processor;

第二处理器,用于在运行计算机程序时,执行如第一方面所述的方法。The second processor is used to execute the method described in the first aspect when running a computer program.

第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面所述的方法、或者实现如第二方面所述的方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method as described in the first aspect, or implements the method as described in the second aspect.

本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在编码端,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。在解码端,解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定当前节点的预测值。这样,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值来确定至少一个模式标识信息的取值,然后对这至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。The embodiment of the present application provides a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium. At the encoding end, the inter-frame prediction mode value of the current node is determined; according to 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 encoding bits are written into the bitstream. At the decoding end, the bitstream is decoded to 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; 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; according to the value of at least one mode identification information, the inter-frame prediction mode value of the current node is determined; according to 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

图1A为一种三维点云图像示意图;FIG1A is a schematic diagram of a three-dimensional point cloud image;

图1B为一种三维点云图像的局部放大图;FIG1B is a partial enlarged view of a three-dimensional point cloud image;

图2A为一种点云图像的六个观看角度示意图;FIG2A is a schematic diagram of six viewing angles of a point cloud image;

图2B为一种点云图像对应的数据存储格式示意图;FIG2B is a schematic diagram of a data storage format corresponding to a point cloud image;

图3为一种点云编解码的网络架构示意图;FIG3 is a schematic diagram of a network architecture for point cloud encoding and decoding;

图4A为一种G-PCC编码器的组成框架示意图;FIG4A is a schematic diagram of a composition framework of a G-PCC encoder;

图4B为一种G-PCC解码器的组成框架示意图;FIG4B is a schematic diagram of a composition framework of a G-PCC decoder;

图5A为一种Z轴方向的低平面位置示意图;FIG5A is a schematic diagram of a low plane position in the Z-axis direction;

图5B为一种Z轴方向的高平面位置示意图;FIG5B is a schematic diagram of a high plane position in the Z-axis direction;

图6为一种节点编码顺序示意图;FIG6 is a schematic diagram of a node encoding sequence;

图7A为一种平面标识信息示意图;FIG. 7A is a schematic diagram of a plane identification information;

图7B为另一种平面标识信息示意图;FIG7B is a schematic diagram of another type of planar identification information;

图8为一种当前节点的兄弟姐妹节点示意图;FIG8 is a schematic diagram of sibling nodes of a current node;

图9为一种激光雷达与节点的相交示意图;FIG9 is a schematic diagram of the intersection of a laser radar and a node;

图10为一种处于相同划分深度以及相同坐标的邻域节点示意图;FIG10 is a schematic diagram of neighborhood nodes at the same partition depth and the same coordinates;

图11为一种当前节点位于父节点的低平面位置示意图;FIG11 is a schematic diagram of a current node being located at a low plane position of a parent node;

图12为一种当前节点位于父节点的高平面位置示意图;FIG12 is a schematic diagram of a high plane position of a current node located at a parent node;

图13为一种激光雷达点云平面位置信息的预测编码示意图;FIG13 is a schematic diagram of predictive coding of planar position information of a laser radar point cloud;

图14为一种IDCM编码示意图;FIG14 is a schematic diagram of IDCM encoding;

图15为一种旋转激光雷达获取点云的坐标转换示意图;FIG15 is a schematic diagram of coordinate transformation of a rotating laser radar to obtain a point cloud;

图16为一种X轴或Y轴方向的预测编码示意图;FIG16 is a schematic diagram of predictive coding in the X-axis or Y-axis direction;

图17A为一种通过水平方位角来进行预测Y平面的角度示意图;FIG17A is a schematic diagram showing an angle of the Y plane predicted by a horizontal azimuth angle;

图17B为一种通过水平方位角来进行预测X平面的角度示意图;FIG17B is a schematic diagram showing an angle of predicting the X-plane by using a horizontal azimuth angle;

图18为另一种X轴或Y轴方向的预测编码示意图; FIG18 is another schematic diagram of predictive coding in the X-axis or Y-axis direction;

图19A为一种子块包括的三个交点示意图;FIG19A is a schematic diagram of three intersection points included in a sub-block;

图19B为一种利用三个交点拟合的三角面片集示意图;FIG19B is a schematic diagram of a triangular facet set fitted using three intersection points;

图19C为一种三角面片集的上采样示意图;FIG19C is a schematic diagram of upsampling of a triangular face set;

图20为一种几何信息帧间编解码的结构示意图;FIG20 is a schematic diagram of the structure of a geometric information inter-frame encoding and decoding;

图21为本申请实施例提供的一种解码方法的流程示意图;FIG21 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

图22为本申请实施例提供的一种编码方法的流程示意图;FIG22 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

图23为本申请实施例提供的另一种编码方法的流程示意图;FIG23 is a schematic diagram of a flow chart of another encoding method provided in an embodiment of the present application;

图24为本申请实施例提供的一种编码器的组成结构示意图;FIG24 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application;

图25为本申请实施例提供的一种编码器的具体硬件结构示意图;FIG25 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

图26为本申请实施例提供的一种解码器的组成结构示意图;FIG26 is a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application;

图27为本申请实施例提供的一种解码器的具体硬件结构示意图;FIG27 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;

图28为本申请实施例提供的一种编解码系统的组成结构示意图。FIG. 28 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

点云(Point Cloud)是物体表面的三维表现形式,通过光电雷达、激光雷达、激光扫描仪、多视角相机等采集设备,可以采集得到物体表面的点云(数据)。Point Cloud is a three-dimensional representation of the surface of an object. Point cloud (data) on the surface of an object can be collected through acquisition equipment such as photoelectric radar, lidar, laser scanner, and multi-view camera.

点云是空间中一组无规则分布的、表达三维物体或场景的空间结构及表面属性的离散点集,图1A展示了三维点云图像和图1B展示了三维点云图像的局部放大图,可以看到点云表面是由分布稠密的点所组成的。A point cloud is a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a three-dimensional object or scene. FIG1A shows a three-dimensional point cloud image and FIG1B shows a partial magnified view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.

二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而点云中的点在三维空间中的分布具有随机性和不规则性,因此需要记录每一个点在空间中的位置,才能完整地表达一幅点云。与二维图像类似,采集过程中每一个位置均有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于点云来说,每一个点所对应的属性信息除了颜色信息以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。因此,点云数据通常包括点的位置信息和点的属性信息。其中,点的位置信息也可称为点的几何信息。例如,点的几何信息可以是点的三维坐标信息(x,y,z)。点的属性信息可以包括颜色信息和/或反射率等等。例如,反射率可以是一维反射率信息(r);颜色信息可以是任意一种色彩空间上的信息,或者颜色信息也可以是三维颜色信息,如RGB信息。在这里,R表示红色(Red,R),G表示绿色(Green,G),B表示蓝色(Blue,B)。再如,颜色信息可以是亮度色度(YCbCr,YUV)信息。其中,Y表示明亮度(Luma),Cb(U)表示蓝色色差,Cr(V)表示红色色差。Two-dimensional images have information expressed at each pixel point, and the distribution is regular, so there is no need to record its position information additionally; however, the distribution of points in point clouds in three-dimensional space is random and irregular, so it is necessary to record the position of each point in space in order to fully express a point cloud. Similar to two-dimensional images, each position in the acquisition process has corresponding attribute information, usually RGB color values, and the color value reflects the color of the object; for point clouds, in addition to color information, the attribute information corresponding to each point is also commonly the reflectance value, which reflects the surface material of the object. Therefore, point cloud data usually includes the position information of the point and the attribute information of the point. Among them, the position information of the point can also be called the geometric information of the point. For example, the geometric information of the point can be the three-dimensional coordinate information of the point (x, y, z). The attribute information of the point can include color information and/or reflectivity, etc. For example, reflectivity can be one-dimensional reflectivity information (r); color information can be information on any color space, or color information can also be three-dimensional color information, such as RGB information. Here, R represents red (Red, R), G represents green (Green, G), and B represents blue (Blue, B). For another example, the color information may be luminance and chrominance (YCbCr, YUV) information, where Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.

根据激光测量原理得到的点云,点云中的点可以包括点的三维坐标信息和点的反射率值。再如,根据摄影测量原理得到的点云,点云中的点可以可包括点的三维坐标信息和点的三维颜色信息。再如,结合激光测量和摄影测量原理得到点云,点云中的点可以可包括点的三维坐标信息、点的反射率值和点的三维颜色信息。For a point cloud obtained according to the principle of laser measurement, the points in the point cloud may include the three-dimensional coordinate information of the points and the reflectivity value of the points. For another example, for a point cloud obtained according to the principle of photogrammetry, the points in the point cloud may include the three-dimensional coordinate information of the points and the three-dimensional color information of the points. For another example, a point cloud obtained by combining the principles of laser measurement and photogrammetry may include the three-dimensional coordinate information of the points, the reflectivity value of the points and the three-dimensional color information of the points.

如图2A和图2B所示为一幅点云图像及其对应的数据存储格式。其中,图2A提供了点云图像的六个观看角度,图2B由文件头信息部分和数据部分组成,头信息包含了数据格式、数据表示类型、点云总点数、以及点云所表示的内容。例如,点云为“.ply”格式,由ASCII码表示,总点数为207242,每个点具有三维坐标信息(x,y,z)和三维颜色信息(r,g,b)。As shown in Figures 2A and 2B, a point cloud image and its corresponding data storage format are shown. Figure 2A provides six viewing angles of the point cloud image, and Figure 2B consists of a file header information part and a data part. The header information includes the data format, data representation type, the total number of point cloud points, and the content represented by the point cloud. For example, the point cloud is in the ".ply" format, represented by ASCII code, with a total number of 207242 points, and each point has three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).

点云可以按获取的途径分为:Point clouds can be divided into the following categories according to the way they are obtained:

静态点云:即物体是静止的,获取点云的设备也是静止的;Static point cloud: the object is stationary, and the device that obtains the point cloud is also stationary;

动态点云:物体是运动的,但获取点云的设备是静止的;Dynamic point cloud: The object is moving, but the device that obtains the point cloud is stationary;

动态获取点云:获取点云的设备是运动的。 Dynamic point cloud acquisition: The device used to acquire the point cloud is in motion.

例如,按点云的用途分为两大类:For example, point clouds can be divided into two categories according to their usage:

类别一:机器感知点云,其可以用于自主导航系统、实时巡检系统、地理信息系统、视觉分拣机器人、抢险救灾机器人等场景;Category 1: Machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, disaster relief robots, etc.

类别二:人眼感知点云,其可以用于数字文化遗产、自由视点广播、三维沉浸通信、三维沉浸交互等点云应用场景。Category 2: Point cloud perceived by the human eye, which can be used in point cloud application scenarios such as digital cultural heritage, free viewpoint broadcasting, 3D immersive communication, and 3D immersive interaction.

点云可以灵活方便地表达三维物体或场景的空间结构及表面属性,并且由于点云通过直接对真实物体采样获得,在保证精度的前提下能提供极强的真实感,因而应用广泛,其范围包括虚拟现实游戏、计算机辅助设计、地理信息系统、自动导航系统、数字文化遗产、自由视点广播、三维沉浸远程呈现、生物组织器官三维重建等。Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes. Point clouds are obtained by directly sampling real objects, so they can provide a strong sense of reality while ensuring accuracy. Therefore, they are widely used, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free viewpoint broadcasting, three-dimensional immersive remote presentation, and three-dimensional reconstruction of biological tissues and organs.

点云的采集主要有以下途径:计算机生成、3D激光扫描、3D摄影测量等。计算机可以生成虚拟三维物体及场景的点云;3D激光扫描可以获得静态现实世界三维物体或场景的点云,每秒可以获取百万级点云;3D摄影测量可以获得动态现实世界三维物体或场景的点云,每秒可以获取千万级点云。这些技术降低了点云数据获取成本和时间周期,提高了数据的精度。点云数据获取方式的变革,使大量点云数据的获取成为可能,伴随着应用需求的增长,海量3D点云数据的处理遭遇存储空间和传输带宽限制的瓶颈。Point clouds can be collected mainly through the following methods: computer generation, 3D laser scanning, 3D photogrammetry, etc. Computers can generate point clouds of virtual three-dimensional objects and scenes; 3D laser scanning can obtain point clouds of static real-world three-dimensional objects or scenes, and can obtain millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can obtain tens of millions of point clouds per second. These technologies reduce the cost and time cycle of point cloud data acquisition and improve the accuracy of data. The change in the way point cloud data is acquired makes it possible to acquire a large amount of point cloud data. With the growth of application demand, the processing of massive 3D point cloud data encounters bottlenecks in storage space and transmission bandwidth.

示例性地,以帧率为30帧每秒(fps)的点云视频为例,每帧点云的点数为70万,每个点具有坐标信息xyz(float)和颜色信息RGB(uchar),则10s点云视频的数据量大约为0.7million×(4Byte×3+1Byte×3)×30fps×10s=3.15GB,其中,1Byte为10bit;而YUV采样格式为4:2:0,帧率为24fps的1280×720二维视频,其10s的数据量约为1280×720×12bit×24fps×10s≈0.33GB,10s的两视角三维视频的数据量约为0.33×2=0.66GB。由此可见,点云视频的数据量远超过相同时长的二维视频和三维视频的数据量。因此,为更好地实现数据管理,节省服务器存储空间,降低服务器与客户端之间的传输流量及传输时间,点云压缩成为促进点云产业发展的关键问题。For example, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points in each point cloud frame is 700,000, and each point has coordinate information xyz (float) and color information RGB (uchar). The data volume of a 10s point cloud video is about 0.7 million × (4Byte × 3 + 1Byte × 3) × 30fps × 10s = 3.15GB, where 1Byte is 10bit; and a 1280 × 720 two-dimensional video with a YUV sampling format of 4:2:0 and a frame rate of 24fps, the data volume of 10s is about 1280 × 720 × 12bit × 24fps × 10s ≈ 0.33GB, and the data volume of a 10s two-view three-dimensional video is about 0.33 × 2 = 0.66GB. It can be seen that the data volume of a point cloud video far exceeds that of a two-dimensional video and a three-dimensional video of the same length. Therefore, in order to better realize data management, save server storage space, and reduce the transmission traffic and transmission time between the server and the client, point cloud compression has become a key issue in promoting the development of the point cloud industry.

也就是说,由于点云是海量点的集合,存储点云不仅会消耗大量的内存,而且不利于传输,也没有这么大的带宽可以支持将点云不经过压缩直接在网络层进行传输,因此,需要对点云进行压缩。That is to say, since the point cloud is a collection of massive points, storing the point cloud will not only consume a lot of memory, but also be inconvenient for transmission. There is also not enough bandwidth to support direct transmission of the point cloud at the network layer without compression. Therefore, the point cloud needs to be compressed.

目前,可对点云进行压缩的点云编码框架可以是运动图像专家组(Moving Picture Experts Group,MPEG)提供的基于几何的点云压缩(Geometry-based Point Cloud Compression,G-PCC)编解码框架或基于视频的点云压缩(Video-based Point Cloud Compression,V-PCC)编解码框架,也可以是AVS提供的AVS-PCC编解码框架。G-PCC编解码框架可用于针对第一类静态点云和第三类动态获取点云进行压缩,其可以是基于点云压缩测试平台(Test Model Compression 13,TMC13),V-PCC编解码框架可用于针对第二类动态点云进行压缩,其可以是基于点云压缩测试平台(Test Model Compression 2,TMC2)。故G-PCC编解码框架也称为点云编解码器TMC13,V-PCC编解码框架也称为点云编解码器TMC2。At present, the point cloud coding framework that can compress point clouds can be the geometry-based point cloud compression (G-PCC) codec framework or the video-based point cloud compression (V-PCC) codec framework provided by the Moving Picture Experts Group (MPEG), or the AVS-PCC codec framework provided by AVS. The G-PCC codec framework can be used to compress the first type of static point cloud and the third type of dynamically acquired point cloud, which can be based on the point cloud compression test platform (Test Model Compression 13, TMC13), and the V-PCC codec framework can be used to compress the second type of dynamic point cloud, 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.

本申请实施例提供了一种包含解码方法和编码方法的点云编解码系统的网络架构,图3为本申请实施例提供的一种点云编解码的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有点云编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作限制。其中,本申请实施例中的解码器或编码器就可以为上述电子设备。The embodiment of the present application provides a network architecture of a point cloud encoding and decoding system including a decoding method and an encoding method. FIG3 is a schematic diagram of a network architecture of a point cloud encoding and decoding provided by the embodiment of the present application. As shown in FIG3, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During the implementation process, the electronic device can be various types of devices with point cloud encoding and decoding functions. For example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which is not limited by the embodiment of the present application. Among them, the decoder or encoder in the embodiment of the present application can be the above-mentioned electronic device.

其中,本申请实施例中的电子设备具有点云编解码功能,一般包括点云编码器(即编码器)和点云解码器(即解码器)。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).

下面以G-PCC编解码框架和AVS编解码框架为例进行相关技术的说明。The following describes the related technologies by taking the G-PCC codec framework and the AVS codec framework as examples.

可以理解,在点云G-PCC编解码框架中,针对待编码的点云数据,首先通过片(slice)划分,将点云数据划分为多个slice。在每一个slice中,点云的几何信息和每个点所对应的属性信息是分开进行编码的。It can be understood that in the point cloud G-PCC encoding and decoding framework, for the point cloud data to be encoded, the point cloud data is first divided into multiple slices by slice division. In each slice, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately.

图4A示出了一种G-PCC编码器的组成框架示意图。如图4A所示,在几何编码过程中,对几何信息进行坐标转换,使点云全都包含在一个包围盒(Bounding Box)中,然后再进行量化,这一步量化主要起到缩放的作用,由于量化取整,使得一部分点云的几何信息相同,于是再基于参数来决定是否移除重复点,量化和移除重复点这一过程又被称为体素化过程。接着对Bounding Box进行八叉树划分或者预测树构建。在该过程中,针对划分的叶子结点中的点进行算术编码,生成二进制的几何比特流;或者,针对划分产生的交点(Vertex)进行算术编码(基于交点进行表面拟合),生成二进制的几何比特流。在属性编码过程中,几何编码完成,对几何信息进行重建后,需要先进行颜色转换,将颜色信息(即属性信息)从RGB颜色空间转换到YUV颜色空间。然后,利用重建的几何信息对点云重新着色,使得未编码的属性信息与重建的几何信息对应起来。属性编码主要针对颜色信息进行,在颜色信息编码过程 中,主要有两种变换方法,一是依赖于细节层次(Level of Detail,LOD)划分的基于距离的提升变换,二是直接进行区域自适应分层变换(Region Adaptive Hierarchal Transform,RAHT),这两种方法都会将颜色信息从空间域转换到频域,通过变换得到高频系数和低频系数,最后对系数进行量化,再对量化系数进行算术编码,可以生成二进制的属性比特流。FIG4A shows a schematic diagram of the composition framework of a G-PCC encoder. As shown in FIG4A , in the geometric encoding process, the geometric information is transformed so that all point clouds are contained in a bounding box (Bounding Box), and then quantized. This step of quantization mainly plays a role in scaling. Due to the quantization rounding, the geometric information of a part of the point cloud is the same, so whether to remove duplicate points is determined based on parameters. The process of quantization and removal of duplicate points is also called voxelization. Then, the Bounding Box is divided into octrees or a prediction tree is constructed. In this process, arithmetic coding is performed on the points in the divided leaf nodes to generate a binary geometric bit stream; or, arithmetic coding is performed on the intersections (Vertex) generated by the division (surface fitting is performed based on the intersections) to generate a binary geometric bit stream. In the attribute encoding process, after the geometric encoding is completed and the geometric information is reconstructed, color conversion is required first to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the uncoded attribute information corresponds to the reconstructed geometric information. Attribute encoding is mainly performed on color information. 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.

图4B示出了一种G-PCC解码器的组成框架示意图。如图4B所示,针对所获取的二进制比特流,首先对二进制比特流中的几何比特流和属性比特流分别进行独立解码。在对几何比特流的解码时,通过算术解码-重构八叉树/重构预测树-重建几何-坐标逆转换,得到点云的几何信息;在对属性比特流的解码时,通过算术解码-反量化-LOD划分/RAHT-颜色逆转换,得到点云的属性信息,基于几何信息和属性信息还原待编码的点云数据(即输出点云)。FIG4B shows a schematic diagram of the composition framework of a G-PCC decoder. As shown in FIG4B , for the acquired binary bit stream, the geometric bit stream and the 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.

需要说明的是,在如图4A或图4B所示,目前G-PCC的几何编解码可以分为基于八叉树的几何编解码(用虚线框标识)和基于预测树的几何编解码(用点划线框标识)。It should be noted that, as shown in FIG. 4A or FIG. 4B , the current geometric coding of G-PCC can be divided into octree-based geometric coding (marked by a dotted box) and prediction tree-based geometric coding (marked by a dotted box).

对于基于八叉树的几何编码(Octree geometry encoding,OctGeomEnc)而言,基于八叉树的几何编码包括:首先对几何信息进行坐标转换,使点云全都包含在一个Bounding Box中。然后再进行量化,这一步量化主要起到缩放的作用,由于量化取整,使得一部分点的几何信息相同,根据参数来决定是否移除重复点,量化和移除重复点这一过程又被称为体素化过程。接下来,按照广度优先遍历的顺序不断对Bounding Box进行树划分(例如八叉树、四叉树、二叉树等),对每个节点的占位码进行编码。在相关技术中,某公司提出了一种隐式几何的划分方式,首先计算点云的包围盒假设dx>dy>dz,该包围盒对应为一个长方体。在几何划分时,首先会基于x轴一直进行二叉树划分,得到两个子节点;直到满足dx=dy>dz条件时,才会基于x和y轴一直进行四叉树划分,得到四个子节点;当最终满足dx=dy=dz条件时,会一直进行八叉树划分,直到划分得到的叶子结点为1×1×1的单位立方体时停止划分,对叶子结点中的点进行编码,生成二进制码流。在基于二叉树/四叉树/八叉树划分的过程中,引入两个参数:K、M。参数K指示在进行八叉树划分之前二叉树/四叉树划分的最多次数;参数M用来指示在进行二叉树/四叉树划分时对应的最小块边长为2M。同时K和M必须满足条件:假设dmax=max(dx,dy,dz),dmin=min(dx,dy,dz),参数K满足:K≥dmax-dmin;参数M满足:M≥dmin。参数K与M之所以满足上述的条件,是因为目前G-PCC在几何隐式划分的过程中,划分方式的优先级为二叉树、四叉树和八叉树,当节点块大小不满足二叉树/四叉树的条件时,才会对节点一直进行八叉树的划分,直到划分到叶子节点最小单位1×1×1。基于八叉树的几何信息编码模式可以通过利用空间中相邻点之间的相关性来对点云的几何信息进行有效的编码,但是对于一些较为平坦的节点或者具有平面特性的节点,通过利用平面编码可以进一步提升点云几何信息的编码效率。For Octree geometry encoding (OctGeomEnc), the octree-based geometry encoding includes: first, coordinate transformation 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. Whether to remove duplicate points is determined based on parameters. 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 geometry division method. First, the bounding box of the point cloud is calculated. Assume that dx > dy > dz , the bounding box corresponds to a cuboid. During geometric partitioning, binary tree partitioning will be performed based on the x-axis to obtain two child nodes. When the condition dx = dy > dz is met, quadtree partitioning will be performed based on the x- and y-axes to obtain four child nodes. When the condition dx = dy = dz is finally met, octree partitioning will be performed until the leaf node obtained by partitioning is a 1×1×1 unit cube. The partitioning will be stopped, 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 2M . At the same time, K and M must meet the following conditions: Assuming d max = max(d x , dy , d z ), d min = min(d x , dy , d z ), parameter K satisfies: K ≥ d max - d min ; parameter M satisfies: M ≥ d min . The reason why parameters K and M meet the above conditions is that in the process of geometric implicit partitioning in G-PCC, the priority of partitioning is binary tree, quadtree and octree. When the node block size does not meet the conditions of binary tree/quadtree, the node will be partitioned by octree until it is divided into the minimum unit of leaf node 1×1×1. The geometric information encoding mode based on octree can effectively encode the geometric information of point cloud by utilizing the correlation between adjacent points in space. However, for some relatively flat nodes or nodes with planar characteristics, the encoding efficiency of point cloud geometric information can be further improved by using plane coding.

示例性地,图5A和图5B提供了一种平面位置示意图。其中,图5A示出了一种Z轴方向的低平面位置示意图,图5B示出了一种Z轴方向的高平面位置示意图。如图5A所示,这里的(a)、(a0)、(a1)、(a2)、(a3)均属于Z轴方向的低平面位置,以(a)为例,可以看到当前节点中被占据的四个子节点都位于当前节点在Z轴方向的低平面位置,那么可以认为当前节点属于一个Z平面并且在Z轴方向是一个低平面。同理,如图5B所示,这里的(b)、(b0)、(b1)、(b2)、(b3)均属于Z轴方向的高平面位置,以(b)为例,可以看到当前节点中被占据的四个子节点位于当前节点在Z轴方向的高平面位置,那么可以认为当前节点属于一个Z平面并且在Z轴方向是一个高平面。Exemplarily, Fig. 5A and Fig. 5B provide a kind of plane position schematic diagram. Wherein, Fig. 5A shows a kind of low plane position schematic diagram in the Z-axis direction, and Fig. 5B shows a kind of high plane position schematic diagram in the Z-axis direction. As shown in Fig. 5A, (a), (a0), (a1), (a2), (a3) here all belong to the low plane position in the Z-axis direction. Taking (a) as an example, it can be seen that the four subnodes 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 Fig. 5B, (b), (b0), (b1), (b2), (b3) here all belong to the high plane position in the Z-axis direction. Taking (b) as an example, it can be seen that the four subnodes 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.

进一步地,以图5A中的(a)为例,对八叉树编码和平面编码效率进行比较,图6提供了一种节点编码顺序示意图,即按照图6所示的0、1、2、3、4、5、6、7的顺序进行节点编码。在这里,如果对图5A中的(a)采用八叉树编码方式,那么当前节点的占位信息表示为:11001100。但是如果采用平面编码方式,首先需要编码一个标识符表示当前节点在Z轴方向是一个平面,其次如果当前节点在Z轴方向是一个平面,还需要对当前节点的平面位置进行表示;其次仅仅需要对Z轴方向的低平面节点的占位信息进行编码(即0、2、4、6四个子节点的占位信息),因此基于平面编码方式对当前节点进行编码,仅仅需要编码6个比特(bit),相比相关技术的八叉树编码可以减少2个bit的表示。基于此分析,平面编码相比八叉树编码具有较为明显的编码效率。因此,对于一个被占据的节点,如果在某一个维度上采用平面编码方式进行编码,首先需要对当前节点在该维度上的平面标识(planarMode)和平面位置(PlanePos)信息进行表示,其次基于当前节点的平面信息来对当前节点的占位信息进行编码。示例性地,图7A示出了一种平面标识信息示意图。如图7A所示,这里在Z轴方向为一个低平面;对应地,平面标识信息的取值为真(true)或者1,即planarMode_Z=true;平面位置信息为低平面(low),即PlanePosition_Z=low。图7B示出了另一种平面标识信息示意图。如图7B所示,这里在Z轴方向不为一个平面;对应地,平面标识信息的取值为假(false)或者0,即planarMode_Z=false。Further, taking (a) in FIG. 5A as an example, the efficiency of octree coding and plane coding is compared. FIG. 6 provides a schematic diagram of the node coding order, that is, the node coding is performed in the order of 0, 1, 2, 3, 4, 5, 6, and 7 as shown in FIG. 6. Here, if the octree coding method is used for (a) in FIG. 5A, the placeholder information of the current node is represented as: 11001100. However, if the plane coding method is used, first, an identifier needs to 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 needs to be represented; secondly, only the placeholder information of the low plane node in the Z-axis direction needs to be encoded (that is, the placeholder information of the four subnodes 0, 2, 4, and 6). Therefore, based on the plane coding method, only 6 bits need to be encoded to encode the current node, which can reduce the representation of 2 bits compared with the octree coding of the related art. Based on this analysis, plane coding has a more obvious coding efficiency than octree coding. Therefore, for an occupied node, if a plane encoding method is used for encoding in a certain dimension, it is first necessary to represent the plane identification (planarMode) and plane position (PlanePos) information of the current node in the dimension, and then encode the occupancy information of the current node based on the plane information of the current node. Exemplarily, 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 a low plane (low), that is, PlanePosition_ Z = low. FIG7B shows another schematic diagram of plane identification information. As shown in FIG7B, there is not a plane in the Z-axis direction; correspondingly, the value of the plane identification information is false (false) or 0, that is, planarMode_ Z = false.

需要注意的是,对于PlaneMode_i:0代表当前节点在i轴方向不是一个平面,1代表当前节点在i轴方向是一个平面。若当前节点在i轴方向是一个平面,则对于PlanePosition_i:0代表当前节点在i轴 方向是一个平面,并且平面位置为低平面,1表示当前节点在i轴方向上是一个高平面。其中,i表示坐标维度,可以为X轴方向、Y轴方向或者Z轴方向,故i=0,1,2。It should be noted that for PlaneMode_ i : 0 means that the current node is not a plane in the i-axis direction, and 1 means that 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 that the current node is The direction is a plane, and the plane position is a low plane. 1 means that the current node is a high plane in the i-axis direction. Where i represents the coordinate dimension, which can be the X-axis direction, the Y-axis direction, or the Z-axis direction, so i = 0, 1, 2.

在G-PCC标准中,判断一个节点是否满足平面编码的条件以及在该节点满足平面编码条件时,需要对该节点的平面标识和平面位置信息的预测编码。In the G-PCC standard, to determine whether a node meets the plane coding condition and when the node meets the plane coding condition, it is necessary to predictively code the plane identification and plane position information of the node.

在本申请实施例中,当前G-PCC标准中存在三种判断节点是否满足平面编码的判断条件,下面对其逐一进行详细说明。In the embodiment of the present application, there are three judgment conditions for judging whether a node satisfies plane coding in the current G-PCC standard, which are described in detail one by one below.

一、根据节点在每个维度上的平面概率进行判断。1. Judge based on the plane probability of the node in each dimension.

(1)确定当前节点的局部区域密度(local_node_density);(1) Determine the local area density of the current node (local_node_density);

(2)确定当前节点在每个维度上的概率Prob(i)。(2) Determine the probability Prob(i) of the current node in each dimension.

在节点的局部区域密度小于阈值Th(例如Th=3)时,利用当前节点在三个坐标维度上的平面概率Prob(i)和阈值Th0、Th1和Th2进行比较,其中Th0<Th1<Th2(例如,Th0=0.6,Th1=0.77,Th2=0.88),这里可以利用Eligiblei(i=0,1,2)表示每个维度上是否启动平面编码:Eligiblei=Prob(i)>=threshold。When the local area density of the node is less than the threshold Th (for example, Th=3), the plane probability Prob(i) of the current node in the three coordinate dimensions is compared with the thresholds Th0, Th1 and Th2, where Th0<Th1<Th2 (for example, Th0=0.6, Th1=0.77, Th2=0.88). Eligible i (i=0,1,2) can be used here to indicate whether plane coding is started in each dimension: Eligible i =Prob(i)>=threshold.

需要注意的是,threshold是进行自适应变化的,例如,当Prob(0)>Prob(1)>Prob(2)时,则Eligiblei的设置如下:
Eligible0=Prob(0)>=Th0;
Eligible1=Prob(1)>=Th1;
Eligible2=Prob(2)>=Th2                                     (1)
It should be noted that the threshold is adaptively changed. For example, when Prob(0)>Prob(1)>Prob(2), the setting of Eligible i is as follows:
Eligible 0 =Prob(0)>=Th0;
Eligible 1 =Prob(1)>=Th1;
Eligible 2 =Prob(2)>=Th2 (1)

当Prob(1)>Prob(0)>Prob(2)时,则Eligiblei的设置如下:
Eligible0=Prob(0)>=Th1;
Eligible1=Prob(1)>=Th0;
Eligible2=Prob(2)>=Th2                                    (2)
When Prob(1)>Prob(0)>Prob(2), the setting of Eligible i is as follows:
Eligible 0 =Prob(0)>=Th1;
Eligible 1 =Prob(1)>=Th0;
Eligible 2 =Prob(2)>=Th2 (2)

在这里,Prob(i)的更新具体如下:
Prob(i)new=(L×Prob(i)+δ(coded node))/L+1                              (3)
Here, the update of Prob(i) is as follows:
Prob(i) new =(L×Prob(i)+δ(coded node))/L+1 (3)

其中,L=255;另外,若coded node节点是一个平面,则δ(coded node)为1;否则δ(coded node)为0。Among them, L=255; in addition, if the coded node is a plane, δ(coded node) is 1; otherwise, δ(coded node) is 0.

在这里,local_node_density的更新具体如下:
local_node_densitynew=local_node_density+4*numSiblings                  (4)
Here, the update of local_node_density is as follows:
local_node_density new =local_node_density+4*numSiblings (4)

其中,local_node_density初始化为4,numSiblings为该节点的兄弟姐妹节点数目。示例性地,图8示出了一种当前节点的兄弟姐妹节点示意图。如图8所示,当前节点为用斜线填充的节点,用网格填充的节点为兄弟姐妹节点,那么当前节点的兄弟姐妹节点数目为5(包括当前节点自身)。Wherein, local_node_density is initialized to 4, and numSiblings is the number of sibling nodes of the node. Exemplarily, 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).

二、根据当前层的点云密度来判断当前层节点是否满足平面编码。Second, determine whether the current layer nodes meet the plane coding requirements based on the point cloud density of the current layer.

利用当前层点的密度来判断是否对当前层的节点进行平面编码。假设当前待编码点云的点数为pointCount,经过推断直接编码模式(Infer Direct Coding Model,IDCM)编码已经重建出的点数为numPointCountRecon,又因为八叉树是基于广度优先遍历的顺序进行编码,因此可以得到当前层待编码的节点数目假设为nodeCount,那么判断当前层是否启动平面编码假设为planarEligibleKOctreeDepth,具体为:planarEligibleK OctreeDepth=(pointCount-numPointCountRecon)<nodeCount×1.3。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 infer direct coding model (IDCM) coding is numPointCountRecon, and because the octree is encoded 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 judgment of whether to start planar coding in the current layer is assumed to be planarEligibleKOctreeDepth, specifically: planarEligibleK OctreeDepth=(pointCount-numPointCountRecon)<nodeCount×1.3.

其中,若(pointCount-numPointCountRecon)小于nodeCount×1.3,则planarEligibleK OctreeDepth为true;若(pointCount-numPointCountRecon)不小于nodeCount×1.3,则planarEligibleKOctreeDepth为false。这样,当planarEligibleKOctreeDepth为true时,则在当前层所有节点都进行平面编码;否则在当前层所有节点都不进行平面编码,仅仅采用八叉树编码。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 plane-encoded; otherwise, all nodes in the current layer are not plane-encoded, and only octree coding is used.

三、根据激光雷达点云的采集参数来判断当前节点是否满足平面编码。3. Determine whether the current node meets the plane coding requirements based on the acquisition parameters of the lidar point cloud.

图9示出了一种激光雷达与节点的相交示意图。如图9所示,用网格填充的节点同时被两个激光射线(Laser)穿过,因此当前节点在Z轴垂直方向上不是一个平面;用斜线填充的节点足够小到不能同时被两个Laser同时穿过,因此斜线填充的节点在Z轴垂直方向上有可能是一个平面。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 passed through by two laser beams (Laser), so the current node is not a plane in the vertical direction of the Z axis; a node filled with a slash is small enough that it cannot be passed through by two lasers at the same time, so the node filled with a slash may be a plane in the vertical direction of the Z axis.

进一步地,针对满足平面编码条件的节点,可以对平面标识信息和平面位置信息进行预测编码。Furthermore, for nodes that meet the plane coding conditions, the plane identification information and the plane position information may be predictively coded.

首先,平面标识信息的预测编码。First, predictive coding of the plane identification information.

在这里,仅仅采用三个上下文信息进行编码,即各个坐标维度上的平面标识分开进行上下文设计。Here, only three context information are used for encoding, that is, the plane identification in each coordinate dimension is separately designed for context.

其次,平面位置信息的预测编码。Secondly, predictive coding of plane position information.

应理解,针对非激光雷达点云平面位置信息的编码而言,平面位置信息的预测编码可以包括:It should be understood that for the encoding of non-lidar point cloud plane position information, the predictive encoding of the plane position information may include:

(a)利用邻域节点的占位信息进行预测得到当前节点的平面位置信息为三元素:预测为低平面、预测为高平面和无法预测;(a) Using the occupancy information of neighboring nodes to predict the plane position information of the current node, the plane position information is divided into three elements: predicted as a low plane, predicted as a high plane, and unpredictable;

(b)与当前节点在相同划分深度以及相同坐标下的节点与当前节点之间的空间距离:“近”和“远”; (b) The spatial distance between the nodes at the same partition depth and the same coordinates as the current node and the current node: “near” and “far”;

(c)与当前节点在相同划分深度以及相同坐标下的节点如果是一个平面,则确定该节点的平面位置;(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;

(d)坐标维度(i=0,1,2)。(d) Coordinate dimension (i=0,1,2).

需要说明的是,在本申请实施例中,确定出与当前节点在相同划分深度以及相同坐标下的节点和当前节点之间的空间距离之后,如果该空间距离小于预设距离阈值,那么可以确定该空间距离为“近”;或者,如果该空间距离大于预设距离阈值,那么可以确定该空间距离为“远”。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 a 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".

示例性地,图10示出了一种处于相同划分深度以及相同坐标的邻域节点示意图。如图10所示,加粗的大立方体表示父节点(Parent node),其内部网格填充的小立方体表示当前节点(Current node),并且示出了当前节点的交点位置(Vertex position);白色填充的小立方体表示处于相同划分深度以及相同坐标的邻域节点,当前节点与邻域节点之间的距离为空间距离,可以判断为“近”或“远”;另外,如果该邻域节点为一个平面,那么还需要该邻域节点的平面位置(Planar position)。For example, FIG10 shows a schematic diagram of neighborhood nodes at the same division depth and the same coordinates. As shown in FIG10 , the bold large cube represents the parent node (Parent node), the small cube filled with a grid inside it represents the current node (Current node), and the intersection position (Vertex position) of the current node is shown; the small cube filled with white represents the neighborhood nodes at the same division depth and the same coordinates, and the distance between the current node and the neighborhood node is the spatial distance, which can be judged as "near" or "far"; in addition, if the neighborhood node is a plane, then the plane position (Planar position) of the neighborhood node is also required.

这样,如图10所示,当前节点为网格填充的小立方体,则在相同的八叉树划分深度等级下,以及相同的垂直坐标下查找邻域节点为白色填充的小立方体,判断两个节点之间的距离为“近”和“远”,并且参考节点的平面位置。In this way, as shown in Figure 10, the current node is a small cube filled with a grid, then the neighboring node is searched for 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 referenced.

进一步地,在本申请实施例中,图11示出了一种当前节点位于父节点的低平面位置示意图。如图11所示,(a)、(b)、(c)示出了三种当前节点位于父节点的低平面位置的示例。具体说明如下:Further, 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. The specific description is as follows:

①如果点填充节点的子节点4到7中有任何一个被占用,而所有网格填充节点都未被占用,则极有可能在当前节点(用斜线填充)中存在一个平面,且该平面位置较低。① 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.

②如果点填充节点的子节点4到7都未被占用,而任何网格填充节点被占用,则极有可能在当前节点(用斜线填充)中存在一个平面,且该平面位置较高。② 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 a slash), and the plane is located at a higher position.

③如果点填充节点的子节点4到7均为空节点,网格填充节点均为空节点,则无法推断平面位置,故标记为未知。③ If the child nodes 4 to 7 of the point filling node are all empty nodes and the grid filling nodes are all empty nodes, the plane position cannot be inferred and is therefore marked as unknown.

④如果点填充节点的子节点4到7中有任何一个被占用,而网格填充节点中有任何一个被占用,此时也无法推断出平面位置,因此将其标记为未知。④ 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.

在本申请实施例中,图12示出了一种当前节点位于父节点的高平面位置示意图。如图12所示,(a)、(b)、(c)示出了三种当前节点位于父节点的高平面位置的示例。具体说明如下: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:

①如果网格填充节点的子节点4到7中有任何一个节点被占用,而点填充节点未被占用,则极有可能在当前节点(用斜线填充)中存在一个平面,且平面位置较低。① 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 a slash), and the plane position is lower.

②如果网格填充节点的子节点4到7均未被占用,而点填充节点被占用,则极有可能在当前节点(用斜线填充)中存在平面,且平面位置较高。② 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.

③如果网格填充节点的子节点4到7都是未被占用的,而点填充节点是未被占用的,此时无法推断平面位置,因此标记为未知。③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.

④如果网格填充节点的子节点4到7中有一个被占用,而点填充节点被占用,此时无法推断平面位置,因此标记为未知。④ 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, so it is marked as unknown.

还应理解,针对激光雷达点云平面位置信息的编码而言,图13示出了一种激光雷达点云平面位置信息的预测编码示意图。如图13所示,在激光雷达的发射角度为θbottom时,这时候可以映射为低平面(Bottom virtual plane);在激光雷达的发射角度为θtop时,这时候可以映射为高平面(Top virtual plane)。It should also be understood that, for the encoding of the laser radar point cloud plane position information, Figure 13 shows a schematic diagram of predictive encoding of the laser radar point cloud plane position information. As shown in Figure 13, when the laser radar emission angle is θ bottom , it can be mapped to the bottom plane (Bottom virtual plane); when the laser radar emission angle is θ top , it can be mapped to the top plane (Top virtual plane).

也就是说,通过利用激光雷达采集参数来预测当前节点的平面位置,通过利用当前节点与激光射线相交的位置来将位置量化为多个区间,最终作为当前节点平面位置的上下文信息。具体计算过程如下:假设激光雷达的坐标为(xLidar,yLidar,zLidar),当前节点的几何坐标为(x,y,z),那么首先计算当前节点相对于激光雷达的垂直正切值tanθ,计算公式如下:
That is to say, the plane position of the current node is predicted by using the laser radar acquisition parameters, and the position of the current node intersecting with the laser ray is used to quantify the position into multiple intervals, which is finally used as the context information of the plane position of the current node. The specific calculation process is as follows: Assuming that the coordinates of the laser radar are (x Lidar , y Lidar , z Lidar ), and 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 laser radar, and the calculation formula is as follows:

进一步地,又因为每个Laser会相对于激光雷达有一定偏移角度,因此还需要计算当前节点相对于Laser的相对正切值tanθcorr,L,具体计算如下:
Furthermore, because each Laser has a certain offset angle relative to the LiDAR, it is also necessary to calculate the relative tangent value tanθ corr,L of the current node relative to the Laser. The specific calculation is as follows:

最终会利用当前节点的相对正切值tanθcorr,L来对当前节点的平面位置进行预测,具体如下,假设当前节点下边界的正切值为tan(θbottom),上边界的正切值为tan(θtop),根据tanθcorr,L将平面位置量化为4个量化区间,即确定平面位置的上下文信息。Finally, the relative tangent value tanθ corr,L of the current node is used to predict the plane position of the current node. Specifically, assuming that the tangent value of the lower boundary of the current node is tan(θ bottom ), and the tangent value of the upper boundary is tan(θ top ), the plane position is quantized into 4 quantization intervals according to tanθ corr,L , that is, the context information of the plane position is determined.

但是基于八叉树的几何信息编码模式仅对空间中具有相关性的点有高效的压缩速率,而对于在几何空间中处于孤立位置的点来说,使用直接编码模式(Direct Coding Model,DCM)可以大大降低复杂度。对于八叉树中的所有节点,DCM的使用不是通过标志位信息来表示的,而是通过当前节点父节点和邻 居信息来进行推断得到。判断当前节点是否具有DCM编码资格的方式有三种,具体如下:However, the octree-based geometric information coding mode only has an efficient compression rate for points with correlation in space. For points in isolated positions 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 represented by flag information, but by the parent node and neighbor nodes of the current node. There are three ways to determine whether the current node is eligible for DCM encoding, as follows:

(1)当前节点没有兄弟姐妹子节点,即当前节点的父节点只有一个孩子节点,同时当前节点父节点的父节点仅有两个被占据子节点,即当前节点最多只有一个邻居节点。(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.

(2)当前节点的父节点仅有当前节点一个占据子节点,同时与当前节点共用一个面的六个邻居节点也都属于空节点。(2) The parent node of the current node has only one child node, the current node. At the same time, the six neighbor nodes that share a face with the current node are also empty nodes.

(3)当前节点的兄弟姐妹节点数目大于1。(3) The number of sibling nodes of the current node is greater than 1.

示例性地,图14提供了一种IDCM编码示意图。如果当前节点不具有DCM编码资格将对其进行八叉树划分,若具有DCM编码资格将进一步判断该节点中包含的点数,当点数小于阈值(例如2)时,则对该节点进行DCM编码,否则将继续进行八叉树划分。当应用DCM编码模式时,首先需要编码当前节点是否是一个真正的孤立点,即IDCM_flag,当IDCM_flag为true时,则当前节点采用DCM编码,否则仍然采用八叉树编码。在当前节点满足DCM编码时,需要编码当前节点的DCM编码模式,目前存在两种DCM模式,分别是:(a)仅仅只有一个点存在(或者是多个点,但是属于重复点);(b)含有两个点。最后需要编码每个点的几何信息,假设节点的边长为2d时,对该节点几何坐标的每一个分量进行编码时需要d比特,该比特信息直接被编进码流中。这里需要注意的是,在对激光雷达点云进行编码时,通过利用激光雷达采集参数来对三个维度的坐标信息进行预测编码,从而可以进一步提升几何信息的编码效率。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 value (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 encoded using DCM, otherwise octree coding is still used. When the current node satisfies the DCM coding, the DCM coding mode of the current node needs to be encoded. There are currently two DCM modes, namely: (a) only one point exists (or multiple points, but they are repeated points); (b) contains two points. Finally, the geometric information of each point needs to be encoded. Assuming that the side length of the node is 2d , d bits are required to encode each component of the geometric coordinates of the node, and the bit information is directly encoded into the bit stream. It should be noted here that when encoding the lidar point cloud, the three-dimensional coordinate information can be predictively encoded by using the lidar acquisition parameters, thereby further improving the encoding efficiency of the geometric information.

进一步地,下面针对IDCM编码的过程进行详细介绍。Furthermore, the IDCM encoding process is described in detail below.

当前节点满足DCM编码模式时,首先编码当前节点的点数目numPoints;根据不同的DirectMode来对当前节点的点数目进行编码:When the current node meets the DCM encoding mode, first encode the number of points numPoints of the current node; encode the number of points of the current node according to different DirectModes:

(1)如果当前节点不满足DCM节点的要求,则直接退出(即点数大于2个点,并且不是重复点)。(1) 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).

(2)当前节点含有的点数numPonts小于或等于2,则编码过程如下:(2) If the number of points numPonts contained in the current node is less than or equal to 2, the encoding process is as follows:

i)首先编码当前节点的numPonts是否大于1;i) First encode whether the numPonts of the current node is greater than 1;

ii)如果当前节点只有一个点并且几何编码环境为几何无损编码,则需要编码当前节点的第二个点不是重复点。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.

(3)当前节点含有的点数numPonts大于2,则编码过程如下:(3) If the number of points numPonts contained in the current node is greater than 2, the encoding process is as follows:

i)首先编码当前节点的numPonts小于或等于1;i) First encode the numPonts of the current node to be less than or equal to 1;

ii)其次编码当前节点的第二个点是一个重复点,其次编码当前节点的重复点数目是否大于1,当重复点数目大于1时,需要对剩余的重复点数目进行指数哥伦布解码。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.

在编码完成当前节点的点数目之后,对当前节点中包含点的坐标信息进行编码。下面将分别对激光雷达点云和面向人眼点云进行详细介绍。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.

(一)面向人眼点云。(A) Point cloud facing the human eye.

(1)如果当前节点中仅仅只含有一个点,则会对点的三个维度方向的几何信息进行直接编码(Bypass coding);(1) If the current node contains only one point, the geometric information of the point in three dimensions will be directly encoded (Bypass coding);

(2)如果当前节点中含有两个点,则会首先通过利用点的几何坐标得到优先编码的坐标轴dirextAxis。这里需要注意的是,目前比较的坐标轴只包含x轴和y轴,不包含z轴。假设当前节点的几何坐标为nodePos,则判断的方式如下:
dirextAxis=!(nodePos[0]<nodePos[1])
(2) 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. It should be noted here that the coordinate axes currently compared only include the x-axis and the y-axis, but 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])

也就是会将节点坐标几何位置小的轴作为优先编码的坐标轴dirextAxis,其次按照如下方式首先对优先编码的坐标轴dirextAxis几何信息进行编码。假设优先编码的轴对应的代编码几何bit深度为nodeSizeLog2,并假设两个点的坐标分别为pointPos[0]和pointPos[1]。具体编码过程如下:
That is, the axis with the smaller node coordinate geometry position will be used as the priority coded axis dirextAxis, and then the geometry information of the priority coded axis dirextAxis will be encoded as follows. Assume that the bit depth of the coded geometry corresponding to the priority coded 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:

在编码完成优先编码的坐标轴dirextAxis之后,再继续对当前节点的几何坐标进行直接编码。假设 每个点的剩余编码bit深度为nodeSizeLog2,则具体编码过程如下:After encoding the priority axis dirextAxis, continue to directly encode the geometric coordinates of the current node. The remaining encoding bit depth of each point is nodeSizeLog2, so the specific encoding process is as follows:

for(int axisIdx=0;axisIdx<3;++axisIdx)for(int axisIdx=0; axisIdx<3; ++axisIdx)

for(int mask=(1<<nodeSizeLog2[axisIdx])>>1;mask;mask>>1)for(int mask=(1<<nodeSizeLog2[axisIdx])>>1; mask; mask>>1)

encodePosBit(!!(pointPos[axisIdx]&mask))。encodePosBit(!!(pointPos[axisIdx]&mask)).

(二)面向激光雷达点云。(ii) Towards LiDAR point cloud.

如果当前节点中含有两个点,则会首先通过利用点的几何坐标得到优先编码的坐标轴dirextAxis,假设当前节点的几何坐标为nodePos,则判断的方式如下:
dirextAxis=!(nodePos[0]<nodePos[1])
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])

也就是会将节点坐标几何位置小的轴作为优先编码的坐标轴dirextAxis,这里需要注意的是,目前比较的坐标轴只包含x轴和y轴,不包含z轴。其次按照如下方式首先对优先编码的坐标轴dirextAxis几何信息进行编码,假设优先编码的轴对应的代编码几何bit深度为nodeSizeLog2,并假设两个点的坐标分别为pointPos[0]和pointPos[1]。具体编码过程如下:
That is, the axis with the smaller node coordinate geometry position will be used as the priority coded axis dirextAxis. It should be noted that the currently compared coordinate axes only include the x-axis and the y-axis, but not the z-axis. Secondly, the priority coded coordinate axis dirextAxis geometry information is first encoded as follows, assuming that the priority coded axis corresponds to the coded geometry bit depth of nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:

在编码完成优先编码的坐标轴dirextAxis之后,再对当前节点的几何坐标进行编码。After encoding the priority-encoded coordinate axis dirextAxis, the geometric coordinates of the current node are encoded.

由于激光雷达点云可以得到激光雷达点云的采集参数,通过利用可以预测当前节点的几何坐标信息,从而可以进一步提升点云的几何信息编码效率。同样的首先利用当前节点的几何信息nodePos得到一个直接编码的主轴方向,其次利用已经完成编码的方向的几何信息来对另外一个维度的几何信息进行预测编码。同样假设直接编码的轴方向是directAxis,并且假设直接编码中的代编码bit深度为nodeSizeLog2,则编码方式如下:Since the laser radar point cloud can obtain the acquisition parameters of the laser radar point cloud, the geometric coordinate information of the current node can be predicted, so as to further improve 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 encoded direction is used to predict the geometric information of another dimension. Also, assuming that the axis direction of the direct encoding is directAxis, and assuming that the bit depth of the direct encoding is nodeSizeLog2, the encoding method is as follows:

for(int mask=(1<<nodeSizeLog2)>>1;mask;mask>>1)for(int mask=(1<<nodeSizeLog2)>>1; mask; mask>>1)

encodePosBit(!!(pointPos[directAxis]&mask))。encodePosBit(!!(pointPos[directAxis]&mask)).

这里需要注意的是,在这里会将directAxis方向的几何精度信息全部编码。It should be noted here that all geometric accuracy information in the directAxis direction will be encoded here.

示例性地,图15提供了一种旋转激光雷达获取点云的坐标转换示意图。其中,在笛卡尔坐标系下,对于每一个节点的(x,y,z)坐标,均可以转换为用(R,φ,i)表示。另外,激光扫描器(Laser Scanner)可以按照预设角度进行激光扫描,在i的不同取值下,可以得到不同的θ(i)。例如,在i等于1时,这时候可以得到θ(1),对应的扫描角度为-15°;在i等于2时,这时候可以得到θ(2),对应的扫描角度为-13°;在i等于10时,这时候可以得到θ(10),对应的扫描角度为+13°;在i等于9时,这时候可以得到θ(19),对应的扫描角度为+15°。Exemplarily, FIG15 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°.

这样,在编码完成directAxis坐标方向的所有精度之后,会首先计算当前点所对应的LaserIdx,即图15中的pointLaserIdx号,并且计算当前节点的LaserIdx,即nodeLaserIdx;其次会利用节点的LaserIdx即nodeLaserIdx来对点的LaserIdx即pointLaserIdx进行预测编码,其中节点或者点的LaserIdx的计算方式如下。假设点的几何坐标为pointPos,激光射线的起始坐标为LidarOrigin,并且假设Laser的数目为LaserNum,每个Laser的正切值为tanθi,每个Laser在垂直方向上的偏移位置为Zi,则:
In this way, after encoding all the precisions of the directAxis coordinate direction, the LaserIdx corresponding to the current point, i.e., the pointLaserIdx number in Figure 15, will be calculated first, and the LaserIdx of the current node, i.e., nodeLaserIdx, will be calculated; secondly, the LaserIdx of the node, i.e., nodeLaserIdx, will be used to predictively encode the LaserIdx of the point, i.e., pointLaserIdx, where 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 , and the offset position of each Laser in the vertical direction is Zi , then:

在计算得到当前点的LaserIdx之后,首先会利用当前节点的LaserIdx对点的pointLaserIdx进行预测编码。在编码完成当前点的LaserIdx之后,对当前点三个维度的几何信息利用激光雷达的采集参数进行预测编码。After calculating the LaserIdx of the current point, the LaserIdx of the current node is first used to predict the pointLaserIdx of the point. After the LaserIdx of the current point is encoded, the three-dimensional geometric information of the current point is predicted and encoded using the acquisition parameters of the laser radar.

示例性地,图16示出了一种X轴或Y轴方向的预测编码示意图。如图16所示,用网格填充的方框表示当前点(Current node),用斜线填充的方框表示已编码点(Already coded node)。在这里,首先利用当前点对应的LaserIdx得到对应的水平方位角的预测值,即其次利用当前点对应的节点几何信息得到节点对应的水平方位角度其中,假设节点的几何坐标为nodePos,则水平方位角与节点几何信息之间的计算方式如下:
For example, FIG16 shows a schematic diagram of predictive coding in the X-axis or Y-axis direction. As shown in FIG16 , a box filled with a grid represents a current node, and a box filled with a slash represents an already coded node. Here, the LaserIdx corresponding to the current node 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 the geometric coordinates of the node are nodePos, the horizontal azimuth The calculation method between the node geometry information is as follows:

通过利用激光雷达的采集参数,可以得到每个Laser的旋转点数numPoints,即代表每个激光射线旋转一圈得到的点数,则可以利用每个Laser的旋转点数计算得到每个Laser的旋转角速度deltaPhi,计算方式如下:
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 when each laser ray rotates 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:

进一步地,利用节点的水平方位角以及当前点对应的Laser前一个编码点的水平方位角计算得到当前点对应的水平方位角预测值即如图17A和图17B所示的水平方位角的预测值。其中,图17A示出了一种通过水平方位角来进行预测Y平面的角度示意图,图17B示出了一种通过水平方位角来进行预测X平面的角度示意图。在这里,对于当前点对应的水平方位角预测值计算方式如下:
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 values of the horizontal azimuth angles as shown in Figures 17A and 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, for the predicted value of the horizontal azimuth angle corresponding to the current point The calculation is as follows:

示例性地,图18示出了另一种X轴或Y轴方向的预测编码示意图。如图18所示,用网格填充的部分(左侧)表示低平面,用点填充的部分(右侧)表示高平面,表示当前节点的低平面水平方位角,表示当前节点的高平面水平方位角,表示当前节点对应的水平方位角预测值。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 the low plane, and the portion filled with dots (right side) represents the high plane. Indicates the horizontal azimuth of the low plane of the current node, Indicates the horizontal azimuth of the high plane of the current node, Indicates the predicted horizontal azimuth angle corresponding to the current node.

这样,通过利用水平方位角的预测值以及当前节点的低平面水平方位角和高平面水平方位角来对当前节点的几何信息进行预测编码。具体如下所示:


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。
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.

在编码完成点的LaserIdx之后,会利用当前点所对应的LaserIdx对当前点的Z轴方向进行预测编码,即当前通过利用当前点的x和y信息计算得到雷达坐标系的半径信息radius,其次利用当前点的激光LaserIdx得到当前点的正切值以及垂直方向的偏移量,则可以得到当前点的Z轴方向的预测值即Z_pred。具体如下所示:

int tanTheta=tanθlaserIdx
int zOffset=ZlaserIdx
Z_pred=radius×tanTheta-zOffset。
After the LaserIdx of the encoding point is completed, the LaserIdx corresponding to the current point will be used to predict the Z-axis direction of the current point. That is, the radius information radius of the radar coordinate system is calculated by using the x and y information of the current point. Then, the tangent value of the current point and the vertical offset are obtained by using the laser LaserIdx of the current point, and 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.

进一步地,利用Z_pred对当前点的Z轴方向的几何信息进行预测编码得到预测残差Z_res,最终对Z_res进行编码。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.

需要注意的是,在节点划分到叶子节点时,在几何无损编码的情况下,需要对叶子节点中的重复点数目进行编码。最终对所有节点的占位信息进行编码,生成二进制码流。另外G-PCC目前引入了一种平面编码模式,在对几何进行划分的过程中,会判断当前节点的子节点是否处于同一平面,如果当前节点的子节点满足同一平面的条件,会用该平面对当前节点的子节点进行表示。It should be noted that when nodes are divided into leaf nodes, in the case of geometric lossless coding, the number of repeated points in the leaf nodes needs to be encoded. Finally, the placeholder information of all nodes is encoded to generate a binary code stream. In addition, G-PCC currently introduces a plane coding mode. In the process of geometric division, it will determine whether the child nodes of the current node are in the same plane. If the child nodes of the current node meet the conditions of the same plane, the child nodes of the current node will be represented by the plane.

对于基于八叉树的几何解码而言,解码端按照广度优先遍历的顺序,在对每个节点的占位信息解码之前,首先会利用已经重建得到的几何信息来判断当前节点是否进行平面解码或者IDCM解码,如果当前节点满足平面解码的条件,则会首先对当前节点的平面标识和平面位置信息进行解码,其次基于平面信息来对当前节点的占位信息进行解码;如果当前节点满足IDCM解码的条件,则会首先解码当前节点是否是一个真正的IDCM节点,如果是一个真正的IDCM解码,则会继续解析当前节点的DCM解码模式,其次可以得到当前DCM节点中的点数目,最后对每个点的几何信息进行解码。对于既不满足 平面解码也不满足DCM解码的节点,会对当前节点的占位信息进行解码。通过按照这样的方式不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1×1×1的单位立方体时停止划分,解析得到每个叶子节点中包含的点数,最终恢复得到几何重构点云信息。For octree-based geometric decoding, the decoder follows the order of breadth-first traversal. Before decoding the placeholder information of each node, it will first use the reconstructed geometric information to determine whether the current node is to be plane decoded or IDCM decoded. If the current node meets the conditions for plane decoding, it will first decode the plane identification and plane position information of the current node, and then decode the placeholder information of the current node based on the plane information. If the current node meets the conditions for IDCM decoding, it will first decode whether the current node is a true IDCM node. If it is a true IDCM decoding, it will continue to parse the DCM decoding mode of the current node, and then get the number of points in the current DCM node, and finally decode the geometric information of each point. For nodes that do not meet the conditions for plane decoding, it will first decode the plane identification and plane position information of the current node, and then decode the placeholder information of the current node based on the plane information. For nodes that do not meet the requirements of DCM decoding, the plane decoding will decode the placeholder information of the current node. By continuously parsing in this way, the placeholder code of each node is obtained, and the nodes are continuously divided in turn until a 1×1×1 unit cube is obtained. The number of points contained in each leaf node is parsed, and finally the geometrically reconstructed point cloud information is restored.

下面对IDCM解码的过程进行详细介绍。The following is a detailed introduction to the IDCM decoding process.

与编码端的处理过程类似,首先利用先验信息来决定节点是否启动IDCM,即IDCM的启动条件如下:Similar to the processing at the encoding end, the prior information is first used to determine whether the node starts IDCM. That is, the starting conditions of IDCM are as follows:

(1)当前节点没有兄弟姐妹子节点,即当前节点的父节点只有一个孩子节点,同时当前节点父节点的父节点仅有两个被占据子节点,即当前节点最多只有一个邻居节点。(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.

(2)当前节点的父节点仅有当前节点一个占据子节点,同时与当前节点共用一个面的六个邻居节点也都属于空节点。(2) The parent node of the current node has only one child node, the current node. At the same time, the six neighbor nodes that share a face with the current node are also empty nodes.

(3)当前节点的兄弟姐妹节点数目大于1。(3) The number of sibling nodes of the current node is greater than 1.

进一步地,当节点满足DCM编码的条件时,首先解码当前节点是否是一个真正的DCM节点,即IDCM_flag;当IDCM_flag为true时,则当前节点采用DCM编码,否则仍然采用八叉树编码。Furthermore, when a node meets the conditions for DCM coding, first decode whether the current node is a real DCM node, that is, IDCM_flag; when IDCM_flag is true, the current node adopts DCM coding, otherwise it still adopts octree coding.

其次解码当前节点的点数目numPoints,具体的解码方式如下所示:Next, decode the number of points numPoints of the current node. The specific decoding method is as follows:

i)首先解码当前节点的numPonts是否大于1;i) First decode whether numPonts of the current node is greater than 1;

ii)如果解码得到当前节点的numPonts大于1,则继续解码第二个点是否是一个重复点;如果第二个点不是重复点,则这里可以隐性推断出满足DCM模式的第二种,只含有两个点;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 that satisfies the DCM mode contains only two points;

iii)如果解码得到当前节点的numPonts小于等于1,则继续解码第二个点是否是一个重复点;如果第二个点不是重复点,则这里可以隐性推断出满足DCM模式的第二种,只含有一个点;如果解码得到第二个点是一个重复点,则可以推断出满足DCM模式的第三种,含有多个点,但是都是重复点,则继续解码重复点的数目是否大于1(熵解码),如果大于1,则继续解码剩余重复点的数目(利用指数哥伦布进行解码)。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 that satisfies the DCM mode contains only one point; if the second point obtained by decoding is a repeated point, it can be inferred that the third type that satisfies the DCM mode 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 (decoding using exponential Columbus).

如果当前节点不满足DCM节点的要求,则直接退出(即点数大于2个点,并且不是重复点)。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).

在解码完成当前节点的点数目之后,对当前节点中包含点的坐标信息进行解码。下面将分别对激光雷达点云和面向人眼点云进行详细介绍。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.

(一)面向人眼点云。(A) Point cloud facing the human eye.

(1)如果当前节点中仅仅只含有一个点,则会对点的三个维度方向的几何信息进行直接解码(Bypass coding);(1) If the current node contains only one point, the geometric information of the point in three dimensions will be directly decoded (Bypass coding);

(2)如果当前节点中含有两个点,则会首先通过利用点的几何坐标得到优先解码的坐标轴dirextAxis,这里需要注意的是,目前比较的坐标轴只包含x和y轴,不包含z轴。假设当前节点的几何坐标为nodePos,则判断的方式如下:
dirextAxis=!(nodePos[0]<nodePos[1])                (10)
(2) If the current node contains two points, the geometric coordinates of the points will be used to obtain the priority decoding coordinate axis dirextAxis. 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)

也就是会将节点坐标几何位置小的轴作为优先解码的坐标轴dirextAxis,其次按照如下方式首先对优先解码的坐标轴dirextAxis几何信息进行解码。假设优先解码的轴对应的待解码几何bit深度为nodeSizeLog2,并假设两个点的坐标分别为pointPos[0]和pointPos[1]。具体编码过程如下:
That is, the axis with the smaller node coordinate geometry position will be used as the priority decoding axis dirextAxis, and then the priority decoding axis dirextAxis geometry information 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] respectively. The specific encoding process is as follows:

在解码完成优先解码的坐标轴dirextAxis之后,再继续对当前点的几何坐标进行直接解码。假设每个点的剩余编码bit深度为nodeSizeLog2,并假设点的坐标信息为pointPos,则具体解码过程如下:
After decoding the priority axis dirextAxis, the geometric coordinates of the current point are directly decoded. Assuming that the remaining encoding bit depth of each point is nodeSizeLog2, and assuming that the coordinate information of the point is pointPos, the specific decoding process is as follows:

(二)面向激光雷达点云。(ii) Towards LiDAR point cloud.

如果当前节点中含有两个点,则会首先通过利用点的几何坐标得到优先解码的坐标轴dirextAxis,假设当前节点的几何坐标为nodePos,则判断的方式如下:
dirextAxis=!(nodePos[0]<nodePos[1])                 (11)
If the current node contains two points, the geometric coordinates of the points will be used to obtain the priority decoding coordinate axis dirextAxis. Assuming that the geometric coordinates of the current node are nodePos, the judgment method is as follows:
dirextAxis=! (nodePos[0]<nodePos[1]) (11)

也就是会将节点坐标几何位置小的轴作为优先解码的坐标轴dirextAxis,这里需要注意的是,目前比较的坐标轴只包含x轴和y轴,不包含z轴。其次按照如下方式首先对优先编码的坐标轴dirextAxis几何信息进行解码,假设优先解码的轴对应的代编码几何bit深度为nodeSizeLog2,并假设两个点的坐标分别为pointPos[0]和pointPos[1]。具体编码过程如下:
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 the y-axis, but not the z-axis. Secondly, the priority encoded coordinate axis dirextAxis geometry information is first decoded as follows, assuming that the priority decoded axis corresponds to the code geometry bit depth of nodeSizeLog2, and assuming that the coordinates of the two points are pointPos[0] and pointPos[1]. The specific encoding process is as follows:

在解码完优先解码的坐标轴dirextAxis之后,再对当前点的几何坐标进行解码。After decoding the priority coordinate axis dirextAxis, decode the geometric coordinates of the current point.

同样的首先利用当前节点的几何信息nodePos得到一个直接解码的主轴方向,其次利用已经完成解码的方向的几何信息来对另外一个维度的几何信息进行解码。同样假设直接解码的轴方向是directAxis,并且假设直接解码中的待解码bit深度为nodeSizeLog2,则解码方式如下:
Similarly, we first use the geometric information nodePos of the current node to get a main axis direction for direct decoding, and then use the geometric information of the decoded direction to decode the geometric information of another dimension. Assuming that the axis direction for direct decoding is directAxis, and assuming that the bit depth to be decoded in direct decoding is nodeSizeLog2, the decoding method is as follows:

这里需要注意的是,在这里会将directAxis方向的几何精度信息全部解码。It should be noted here that all geometric accuracy information in the directAxis direction will be decoded here.

在解码完成directAxis坐标方向的所有精度之后,会首先计算当前节点的LaserIdx,即nodeLaserIdx;其次会利用节点的LaserIdx即nodeLaserIdx来对点的LaserIdx即pointLaserIdx进行预测解码,其中节点或者点的LaserIdx的计算方式跟编码端相同。最终对当前点的LaserIdx与节点的LaserIdx预测残差信息进行解码得到ResLaserIdx,则解码方式如下:
PointLaserIdx=nodeLaserIdx+ResLaserIdx          (12)
After decoding all the precisions of the directAxis coordinate direction, the LaserIdx of the current node, i.e., nodeLaserIdx, is calculated first; secondly, 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 LaserIdx of the current point and the predicted residual information of the LaserIdx of the node are decoded to obtain ResLaserIdx. The decoding method is as follows:
PointLaserIdx=nodeLaserIdx+ResLaserIdx (12)

在解码完成当前点的LaserIdx之后,对当前点三个维度的几何信息利用激光雷达的采集参数进行预测解码。具体算法如下: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:

如图11所示,首先利用当前点对应的LaserIdx得到对应的水平方位角的预测值,即其次利用当前点对应的节点几何信息得到节点对应的水平方位角度其中,假设节点的几何坐标为nodePos,则水平方位角与节点几何信息之间的计算方式如下:
As shown in Figure 11, first use the LaserIdx corresponding to the current point to get 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 the geometric coordinates of the node are nodePos, the horizontal azimuth The calculation method between the node geometry information is as follows:

通过利用激光雷达的采集参数,可以得到每个Laser的旋转点数numPoints,即代表每个激光射线旋转一圈得到的点数,则可以利用每个Laser的旋转点数计算得到每个Laser的旋转角速度deltaPhi,计 算方式如下:
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:

进一步地,利用节点的水平方位角以及当前点对应的Laser前一个编码点的水平方位角计算得到当前点对应的水平方位角预测值即如图17A和图17B所示的水平方位角的预测值。计算方式如下:
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:

这样,通过利用水平方位角的预测值以及当前节点的低平面水平方位角和高平面的水平方位角来对当前节点的几何信息进行预测解码。具体如下所示:


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。
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.

在解码完成点的LaserIdx之后,会利用当前点所对应的LaserIdx对当前点的Z轴方向进行预测解码,即当前通过利用当前点的x和y信息计算得到雷达坐标系的半径信息radius,其次利用当前点的激光LaserIdx得到当前点的正切值以及垂直方向的偏移量,则可以得到当前点的Z轴方向的预测值即Z_pred。具体如下所示:

int tanTheta=tanθlaserIdx
int zOffset=ZlaserIdx
Z_pred=radius×tanTheta-zOffset。
After decoding the LaserIdx of the completed point, the Z-axis direction of the current point will be predicted and decoded using the LaserIdx corresponding to the current point, that is, the radius information radius of the radar coordinate system is calculated by using the x and y information of the current point, and then the tangent value of the current point and the vertical offset are obtained using the laser LaserIdx of the current point, so that 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.

进一步地,利用解码得到的Z_res和Z_pred来重建恢复得到当前点Z轴方向的几何信息。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.

对于基于三角面片集(triangle soup,trisoup)的几何信息编码而言,在基于trisoup的几何信息编码框架中,同样也要先进行几何划分,但区别于基于二叉树/四叉树/八叉树的几何信息编码,该方法不需要将点云逐级划分到边长为1×1×1的单位立方体,而是划分到子块(block)边长为W时停止划分,基于每个block中点云的分布所形成的表面,得到该表面与block的十二条边所产生的至多十二个交点(vertex)。依次编码每个block的vertex坐标,生成二进制码流。For geometric information coding based on triangle soup (trisoup), in the geometric information coding framework based on trisoup, geometric division must also be performed first, but different from geometric information coding based on binary tree/quadtree/octree, this method does not need to divide the point cloud into unit cubes with a side length of 1×1×1 step by step, but stops dividing when the side length of the sub-block is 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 turn to generate a binary code stream.

对于基于trisoup的点云几何信息重建而言,在解码端进行点云几何信息重建时,首先解码vertex坐标用于完成三角面片重建,该过程如图19A、图19B和图19C所示。其中,图19A所示的block中存在3个交点(v1,v2,v3),利用这3个交点按照一定顺序所构成的三角面片集被称为triangle soup,即trisoup,如图19B所示。之后,在该三角面片集上进行采样,将得到的采样点作为该block内的重建点云,如图19C所示。For point cloud geometry information reconstruction based on trisoup, when point cloud geometry information reconstruction is performed at the decoding end, the vertex coordinates are first decoded to complete the triangle patch reconstruction, and the 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 triangle patch set formed by these three intersection points in a certain order is called triangle soup, i.e., trisoup, as shown in Figure 19B. Afterwards, sampling is performed on the triangle patch set, and the obtained sampling points are used as the reconstructed point cloud in the block, as shown in Figure 19C.

对于基于预测树的几何编码(Predictive geometry coding,PredGeomTree)而言,基于预测树的几何编码包括:首先对输入点云进行排序,目前采用的排序方法包括无序、莫顿序、方位角序和径向距离序。在编码端通过利用两种不同的方式建立预测树结构,其中包括:KD-Tree(高时延慢速模式)和低时延快速模式(利用激光雷达标定信息)。在利用激光雷达标定信息时,将每个点划分到不同的Laser上,按照不同的Laser建立预测树结构。接下来基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码,生成二进制码流。For Predictive geometry coding (PredGeomTree), the Predictive geometry coding includes: first, sorting the input point cloud. The currently used sorting methods include unordered, Morton order, azimuth order, and radial distance order. At the encoding end, the prediction tree structure is established by using two different methods, including: KD-Tree (high-latency slow mode) and low-latency fast mode (using laser radar calibration information). When using the laser radar calibration information, each point is 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.

对于基于预测树的几何解码而言,解码端通过不断解析码流,重构预测树结构,其次通过解析得到每个预测节点的几何位置预测残差信息以及量化参数,并且对预测残差进行反量化,恢复得到每个节点的重构几何位置信息,最终完成解码端的几何重构。For geometric decoding based on the prediction tree, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to recover the reconstructed geometric position information of each node, and finally completes the geometric reconstruction of the decoding end.

在几何编码完成后,需要对几何信息进行重建。目前,属性编码主要针对颜色信息进行。首先,将颜色信息从RGB颜色空间转换到YUV颜色空间。然后,利用重建的几何信息对点云重新着色,使得未编码的属性信息与重建的几何信息对应起来。在颜色信息编码中,主要有两种变换方法,一是依赖于LOD划分的基于距离的提升变换,二是直接进行RAHT变换,这两种方法都会将颜色信息从空间域转换到频域,通过变换得到高频系数和低频系数,最后对系数进行量化并编码,生成二进制码流,具体参见图4A和图4B所示。 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 division, and the other is to directly perform RAHT transformation. Both methods will convert 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.

进一步地,在利用几何信息来对属性信息进行预测时,可以利用莫顿码进行最近邻居搜索,点云中每点对应的莫顿码可以由该点的几何坐标得到。计算莫顿码的具体方法描述如下所示,对于每一个分量用d比特二进制数表示的三维坐标,其三个分量可以表示为:
Furthermore, when using geometric information to predict attribute information, the Morton code can be used to search for the nearest neighbor. 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 as follows. For each component of the three-dimensional coordinate represented by a d-bit binary number, its three components can be expressed as:

其中,xl,yl,zl∈{0,1}分别是x,y,z的最高位(l=1)到最低位(l=d)对应的二进制数值。莫顿码M是对x,y,z从最高位开始,依次交叉排列xl,yl,zl到最低位,M的计算公式如下所示:
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, z respectively. The Morton code M is x, y, z starting from the highest bit, and then arranged in sequence from x l ,y l ,z l to the lowest bit. The calculation formula of M is as follows:

其中,ml′∈P0,1}分别是M的最高位(l′=1)到最低位(l′=3d)的值。在得到点云中每个点的莫顿码M后,将点云中的点按莫顿码由小到大的顺序进行排列,并将每个点的权重值w设为1。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 the order of Morton code from small to large, and the weight value w of each point is set to 1.

还可以理解,对于G-PCC编解码框架而言,通用测试条件如下:It can also be understood that for the G-PCC codec framework, the general test conditions are as follows:

(1)测试条件共4种:(1) There are 4 test conditions:

条件1:几何位置有限度有损、属性有损;Condition 1: The geometric position is limitedly lossy and the attributes are lossy;

条件2:几何位置无损、属性有损;Condition 2: The geometric position is lossless, but the attributes are lossy;

条件3:几何位置无损、属性有限度有损;Condition 3: The geometric position is lossless, and the attributes are limitedly lossy;

条件4:几何位置无损、属性无损。Condition 4: The geometric position and attributes are lossless.

(2)通用测试序列包括Cat1A,Cat1B,Cat3-fused,Cat3-frame共四类,其中Cat2-frame点云只包含反射率属性信息,Cat1A、Cat1B点云只包含颜色属性信息,Cat3-fused点云同时包含颜色和反射率属性信息。(2) The general test sequences include four categories: Cat1A, Cat1B, Cat3-fused, and Cat3-frame. The Cat2-frame point cloud only contains reflectance attribute information, the Cat1A and Cat1B point clouds only contain color attribute information, and the Cat3-fused point cloud contains both color and reflectance attribute information.

(3)技术路线:共2种,以几何压缩所采用的算法进行区分。(3) Technical routes: There are 2 types, which are distinguished by the algorithm used for geometric compression.

技术路线1:八叉树编码分支。Technical route 1: Octree encoding branch.

在编码端,将包围盒依次划分得到子立方体,对非空的(包含点云中的点)的子立方体继续进行划分,直到划分得到的叶子结点为1×1×1的单位立方体时停止划分,在几何无损编码情况下,需要对叶子节点中所包含的点数进行编码,最终完成几何八叉树的编码,生成二进制码流。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 by division 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 encoding of the geometric octree is completed to generate a binary code stream.

在解码端,解码端按照广度优先遍历的顺序,通过不断解析得到每个节点的占位码,并且依次不断划分节点,直至划分得到1×1×1的单位立方体时停止划分,在几何无损解码的情况下,需要解析得到每个叶子节点中包含的点数,最终恢复得到几何重构点云信息。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 restore the geometrically reconstructed point cloud information.

技术路线2:预测树编码分支。Technical route 2: prediction tree encoding branch.

在编码端,通过利用两种不同的方式建立预测树结构,其中包括:基于KD-Tree(高时延慢速模式)和利用激光雷达标定信息(低时延快速模式),利用激光雷达标定信息,可以将每个点划分到不同的Laser上,按照不同的Laser建立预测树结构。接下来基于预测树的结构,遍历预测树中的每个节点,通过选取不同的预测模式对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测残差、预测树结构以及量化参数等进行编码,生成二进制码流。At the encoding end, the prediction tree structure is established by using two different methods, including: 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.

在解码端,解码端通过不断解析码流,重构预测树结构,其次通过解析得到每个预测节点的几何位置预测残差信息以及量化参数,并且对预测残差进行反量化,恢复得到每个节点的重构几何位置信息,最终完成解码端的几何重构。At the decoding end, the decoding end reconstructs the prediction tree structure by continuously parsing the bit stream, and then obtains the geometric position prediction residual information and quantization parameters of each prediction node through parsing, and dequantizes the prediction residual to restore the reconstructed geometric position information of each node, and finally completes the geometric reconstruction at the decoding end.

在一种可能的实现方式中,下面针对相关技术中的几何信息帧间编解码进行具体描述。In a possible implementation manner, the following specifically describes the inter-frame coding and decoding of geometric information in the related art.

以图15为例,点云输入的点坐标为(x,y,z),利用当前点云的先验雷达信息,将点云的点的位置信息转化为雷达坐标系(radius,laserIdx)。其中,假设点的几何坐标为pointPos,激光射线的起始坐标为LidarOrigin,并且假设Laser的数目为LaserNum,每个Laser的正切值为tanθi,每个Laser在垂直方向上的偏移位置为Zi,则节点或者点的LaserIdx的计算方式如下:
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). Assuming the geometric coordinates of the point are pointPos, the starting coordinates of the laser ray are LidarOrigin, and assuming the number of lasers is LaserNum, the tangent value of each Laser is tanθ i , and the offset position of each Laser in the vertical direction is Zi , the calculation method of the node or point LaserIdx is as follows:

进一步地,假设节点的几何坐标为pointPos,则水平方位角的计算如下:
Furthermore, assuming that the geometric coordinates of the node are pointPos, the horizontal azimuth The calculation of is as follows:

进一步地,深度信息radius的计算如下:
Furthermore, the depth information radius is calculated as follows:

其中,LidarOrigin一般为0。Among them, LidarOrigin is generally 0.

示例性地,图20示出了一种几何信息帧间编解码的结构示意图。如图20所示,当前帧中待编码的当前点用网格填充,当前点在前一个已编码的节点用a表示;这里存在第一参考帧和第二参考帧,其中,第一参考帧可以是当前帧的前一帧,第二参考帧可以是全局运动补偿(Global Motion Compensation,GMC)参考帧。For example, FIG20 shows a schematic diagram of the structure of inter-frame coding and decoding of geometric information. As shown in FIG20, the current point to be coded in the current frame is filled with a grid, and the current point is represented by a at the previous coded node; there are a first reference frame and a second reference frame, wherein the first reference frame can be the previous frame of the current frame, and the second reference frame can be a global motion compensation (Global Motion Compensation, GMC) reference frame.

这样,以图20为例,在对待编码的当前点进行帧间预测编码的时候,遍历预测树中,待编码的当前点的前一个已经编码的节点a;Thus, taking FIG. 20 as an example, when inter-frame prediction coding is performed 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;

在第一参考帧(即前一帧参考帧)中寻找与编码当前点的前一个已经编码的节点a具有相同的和laserID的节点b,将第一参考帧中的点b之后编码或者解码的点c和d作为帧间候选点;In the first reference frame (i.e., the previous reference frame), find the node a that has the same and node b of laserID, taking points c and d encoded or decoded after point b in the first reference frame as inter-frame candidate points;

在第二参考帧(即前一帧经过全局运动的参考帧)中寻找与编码当前点的前一个已经编码的节点a具有相同的和laserID的点g,将第二参考帧中的点g之后编码或者解码的点e和f作为帧间候选点;同时点e和点f的被替换成待编码当前点的父亲节点的 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 and laserID point g, and use the points e and f encoded or decoded after point g in the second reference frame as inter-frame candidate points; at the same time, point e and point f Replaced by the parent node of the current point to be encoded

然后,通过率失真优化(Rate Distortion Optimization,RDO)方式选取不同的预测点(包括帧内候选点若干以及上述帧间候选点至多4个)对节点的几何位置信息进行预测得到预测残差,并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树节点位置信息的预测模式、预测残差、预测树结构以及量化参数等参数进行编码,生成二进制码流。Then, different prediction points (including several intra-frame candidate points and up to 4 inter-frame candidate points) are selected through rate distortion optimization (RDO) to predict the geometric position information of the node to obtain the prediction residual, and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the prediction mode, prediction residual, prediction tree structure, quantization parameter and other parameters of the prediction tree node position information are encoded to generate a binary code stream.

在解码端,解码端通过不断解析码流,重构预测树结构,遍历预测树中,对于待解码当前点的前一个已经解码的节点a;At the decoding end, the decoding end continuously parses the bitstream, reconstructs the prediction tree structure, and traverses the prediction tree to find the previous decoded node a before the current point to be decoded;

首先解码预测模式;如果预测模式是帧间预测模式,那么利用解码得到的预测模式在以下至多四个候选点中选取预测点:First, the prediction mode is decoded; if the prediction mode is inter-frame prediction mode, the prediction point is selected from the following at most four candidate points using the decoded prediction mode:

在第一参考帧(即前一帧参考帧)中寻找与解码当前点的前一个已经解码的节点a具有相同的和laserID的节点b,将第一参考帧中的点b之后编码或者解码的点c和d作为帧间候选点;In the first reference frame (i.e., the previous reference frame), find the node a that has the same and node b of laserID, taking points c and d encoded or decoded after point b in the first reference frame as inter-frame candidate points;

在第二参考帧(即前一帧经过全局运动的参考帧)中寻找与解码当前点的前一个已经解码的节点a具有相同的和laserID的点g,将第二参考帧中的点g之后编码或者解码的点e和f作为帧间候选点;同时点e和点f的被替换成待解码当前点的父亲节点的 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 and laserID point g, and use the points e and f encoded or decoded after point g in the second reference frame as inter-frame candidate points; at the same time, point e and point f Replaced by the parent node of the current point to be decoded

其次,通过解析得到不同预测点的几何位置预测残差信息以及量化参数,并且对预测残差进行反量化,从而可以恢复得到每个节点的重构几何位置信息,最终完成解码端的几何重构。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.

如此,如果当前的预测模式为帧间预测模式时,那么需要编码或者解码帧间预测模式数(inter mode)。而相关技术是对帧间预测模式数字转化为二进制直接编码。也就是说,已有的技术方案只是直接对编码帧间预测模式数拆分成二进制来进行直接编码,并没有考虑到不同的帧间预测模式数出现的频率问题,这样会导致编码帧间预测模式数的性能不是最优的,降低了编解码效率。In this way, if the current prediction mode is the inter-frame prediction mode, then it is necessary to encode or decode the inter-frame prediction mode number (inter mode). The related technology is to convert the inter-frame prediction mode number into binary and directly encode it. In other words, the existing technical solution only directly splits the encoded inter-frame prediction mode number into binary for direct encoding, and does not take into account the frequency of different inter-frame prediction mode numbers. This will result in the performance of the encoded inter-frame prediction mode number not being optimal, reducing the encoding and decoding efficiency.

基于此,本申请实施例提供了一种编码方法,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。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 according to 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 bitstream.

本申请实施例还提供了一种编码方法,解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定当前节点的预测值。An embodiment of the present application also provides a coding method, decoding a bit 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; according to the value of at least one mode identification information, determining the inter-frame prediction mode value of the current node; according to the inter-frame prediction mode value, determining the prediction value of the current node.

这样,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值来确定至少一个模式标识信息的取值,然后对这至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而提升编解码效率,还能够达到提升压缩效率的目的。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.

下面将结合附图对本申请各实施例进行详细说明。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

在本申请的一实施例中,参见图21,其示出了本申请实施例提供的一种解码方法的流程示意图。如图21所示,该方法可以包括: In one embodiment of the present application, referring to FIG21, a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG21, the method may include:

S2101:解码码流,确定至少一个模式标识信息的取值。S2101: Decode a bitstream and determine a value of at least one mode identification information.

需要说明的是,本申请实施例的解码方法应用于解码器。另外,该解码方法具体可以是指一种点云帧间预测方法;更具体地,是一种点云帧间几何信息编码模式的解码方法,或者也可以是一种点云帧间几何信息编码模式的哥伦布解码方法,以实现对帧间预测模式值的解码处理。It should be noted that the decoding method of the embodiment of the present application is applied to a decoder. In addition, the decoding method may specifically refer to a point cloud inter-frame prediction method; more specifically, a decoding method of a point cloud inter-frame geometric information coding mode, or a Columbus decoding method of a point cloud inter-frame geometric information coding mode, to achieve decoding processing of an inter-frame prediction mode value.

还需要说明的是,在本申请实施例中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;其中,i为大于或等于0且小于N的整数,N表示帧间预测模式最大值。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.

在本申请实施例中,在点云中,点可以是点云中的所有点,也可以是点云中的部分点,这些点在空间上相对集中。这里,当前节点具体可以是指点云中当前待解码的节点。In the embodiment of the present application, in the point cloud, the point may be all points in the point cloud, or may be some points in the point cloud, which are relatively concentrated in space. Here, the current node may specifically refer to the node currently to be decoded in the point cloud.

还需要说明的是,在本申请实施例中,帧间预测模式值可以是从0~N,即最多可以存在N+1种帧间预测模式。其中,第i模式标识信息可以用flagi表示。对于模式标识信息而言,这里最多可以包括N个模式标识信息,具体可以为:flag0、flag1、…、flagN-1。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 at most N+1 inter-frame prediction modes. Among them, the i-th mode identification information can be represented by flagi. For the mode identification information, at most N mode identification information can be included here, specifically: flag0, flag1, ..., flagN-1.

在一些实施例中,解码码流,确定至少一个模式标识信息的取值,可以包括:基于第一解码模式解码码流,确定至少一个模式标识信息的取值。In some embodiments, decoding the code stream and determining the value of at least one mode identification information may include: decoding the code stream based on a first decoding mode and determining the value of at least one mode identification information.

在本申请实施例中,第一解码模式至少可以包括下述之一:固定上下文信息的解码模式、自适应上下文信息的解码模式和不使用上下文信息的解码模式。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.

也就是说,在本申请实施例中,对于至少一个模式标识信息的取值,可以使用固定上下文信息的解码模式进行解码得到的,或者也可以使用自适应上下文信息的解码模式进行解码得到的,或者还可以使用不使用上下文信息的解码模式进行解码得到的,在此不作具体限定。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 herein.

示例性地,对于第i模式标识信息的取值,可以使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagi;然后根据flagi的取值,可以确定出当前节点的帧间预测模式值是否大于或等于i。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 using 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.

在一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,解码码流,确定至少一个模式标识信息的取值,可以包括: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 bitstream and determining the value of at least one mode identification information may include:

解码码流,确定第i模式标识信息的取值;Decode the code stream to determine the value of the i-th mode identification information;

若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第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, 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;

若第i模式标识信息指示当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。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.

需要说明的是,在本申请实施例中,如果第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,那么结束解码操作,可以将第0模式标识信息,第1模式标识信息,…,第i模式标识信息等i+1个模式标识信息作为至少一个模式标识信息;如果第i模式标识信息指示当前节点的帧间预测模式值大于i,那么i=i+1,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,此时结束解码操作。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 be executed 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.

示例性地,首先解码出flag0的取值,然后判断当前节点的帧间预测模式值是否大于0;如果帧间预测模式值不大于0,则结束解码操作,此时至少一个模式标识信息包括flag0;如果帧间预测模式值大于0,则继续解码出flag1的取值,然后判断当前节点的帧间预测模式值是否大于1;如果帧间预测模式值不大于1,则结束解码操作,此时至少一个模式标识信息可以包括flag0和flag1;如果帧间预测模式值大于1,则继续解码出flag2的取值,然后判断当前节点的帧间预测模式值是否大于2;以此类推,如果帧间预测模式值大于M-1,则继续解码出flagM的取值,然后判断当前节点的帧间预测模式值是否大于M,此时至少一个模式标识信息可以包括flag0、flag1、…、flagM;其中,M为大于或等于0且小于N的整数。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 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 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 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.

在一些实施例中,对于第i模式标识信息的取值,该方法还可以包括:In some embodiments, for the value of the i-th mode identification information, the method may further include:

若第i模式标识信息的取值为第一值,则确定第i模式标识信息指示当前节点的帧间预测模式值小于或等于i;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;

若第i模式标识信息的取值为第二值,则确定第i模式标识信息指示当前节点的帧间预测模式值大于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.

在本申请实施例中,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第i模式标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。 In the embodiment of the present application, the first value is different from the second value, 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.

示例性地,对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true;但是这里并不作具体限定。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.

在本申请实施例中,以写入码流中的flagi为例,假设第一值设置为0,第二值设置为1,这时候如果flagi的取值为0,那么可以确定当前节点的帧间预测模式值小于或等于i;如果flagi的取值为1,那么可以确定当前节点的帧间预测模式值大于i。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.

在另一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,解码码流,确定至少一个模式标识信息的取值,可以包括: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 bitstream and determining the value of at least one mode identification information may include:

解码码流,确定第i模式标识信息的取值;Decode the code stream to determine the value of the i-th mode identification information;

若第i模式标识信息指示当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;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 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;

若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。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 decode the 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.

需要说明的是,在本申请实施例中,如果第i模式标识信息指示当前节点的帧间预测模式值等于i,那么结束解码操作,可以将第0模式标识信息,第1模式标识信息,…,第i模式标识信息等i+1个模式标识信息作为至少一个模式标识信息;如果第i模式标识信息指示当前节点的帧间预测模式值不等于i,那么i=i+1,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i,此时结束解码操作。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 be executed 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.

示例性地,首先解码出flag0的取值,然后判断当前节点的帧间预测模式值是否等于0;如果帧间预测模式值等于0,则结束解码操作,此时至少一个模式标识信息包括flag0;如果帧间预测模式值不等于0,则继续解码出flag1的取值,然后判断当前节点的帧间预测模式值是否等于1;如果帧间预测模式值等于1,则结束解码操作,此时至少一个模式标识信息可以包括flag0和flag1;如果帧间预测模式值不等于1,则继续解码出flag2的取值,然后判断当前节点的帧间预测模式值是否等于2;以此类推,如果帧间预测模式值不等于M-1,则继续解码出flagM的取值,然后判断当前节点的帧间预测模式值是否等于M,此时至少一个模式标识信息可以包括flag0、flag1、…、flagM;其中,M为大于或等于0且小于N的整数。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 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 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 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.

在一些实施例中,对于第i模式标识信息的取值,该方法还可以包括:In some embodiments, for the value of the i-th mode identification information, the method may further include:

若第i模式标识信息的取值为第一值,则确定第i模式标识信息指示当前节点的帧间预测模式值不等于i;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;

若第i模式标识信息的取值为第二值,则确定第i模式标识信息指示当前节点的帧间预测模式值等于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.

在本申请实施例中,第一值与第二值不同。以写入码流中的flagi为例,假设第一值设置为0,第二值设置为1,这时候如果flagi的取值为0,那么可以确定当前节点的帧间预测模式值不等于i;如果flagi的取值为1,那么可以确定当前节点的帧间预测模式值等于i。In the embodiment of the present application, the first value is different from the second value. 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.

S2102:根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值。S2102: Determine an inter-frame prediction mode value of a current node according to a value of at least one mode identification information.

需要说明的是,在本申请实施例中,在得到至少一个模式标识信息的取值之后,根据这至少一个模式标识信息的取值,可以确定出当前节点的帧间预测模式值。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 according to the value of the at least one mode identification information.

在一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值,可以包括:在第i模式标识信息指示当前节点的帧间预测模式值小于或等于i时,将当前节点的帧间预测模式值设置为等于i。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.

在一种具体的实施例中,在i等于N-1时,该方法还可以包括:In a specific embodiment, when i is equal to N-1, the method may further include:

若第N-1模式标识信息指示当前节点的帧间预测模式值小于或等于N-1,则将当前节点的帧间预测模式值设置为等于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, the inter-frame prediction mode value of the current node is set to be equal to N-1;

若第N-1模式标识信息指示当前节点的帧间预测模式值大于N-1,则将当前节点的帧间预测模式值设置为等于N。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.

也就是说,首先使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag0,如果flag0的取值指示当前节点的帧间预测模式值小于或等于0,则结束解码操作,此时帧间预测模式值等于0;如果flag0的取值指示当前节点的帧间预测模式值大于0,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag1;如果flag1的取值指示当前节点的帧间预测模式值小于或等于1,则结束解码操作,此时帧间预测模式值等 于1;如果flag1的取值指示当前节点的帧间预测模式值大于1,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag2。That is to say, first decode flag0 using the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information. If the value of flag0 indicates that the inter-frame prediction mode value of the current node is less than or equal to 0, then end the decoding operation, 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, decode flag1 using the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information. If the value of flag1 indicates that the inter-frame prediction mode value of the current node is less than or equal to 1, then end the decoding operation, 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, the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using context information is used to decode flag2.

依次类推,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagi;如果flagi的取值指示当前节点的帧间预测模式值小于或等于i,则结束解码操作,此时帧间预测模式值等于i;如果flagi的取值指示当前节点的帧间预测模式值大于i,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagi+1;直至i等于N-1时,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagN-1;如果flagN-1的取值指示当前节点的帧间预测模式值小于或等于N-1,则结束解码操作,此时帧间预测模式值等于N-1;如果flagN-1的取值指示当前节点的帧间预测模式值大于N-1,则结束解码操作,此时帧间预测模式值等于N。By analogy, use the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using 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 using 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 using 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.

在另一种具体的实施例中,如果当前节点的帧间预测模式值大于M时,还可以使用指数哥伦布进行解码。在一些实施例中,在i等于M时,根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值,可以包括: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 according to the value of at least one mode identification information may include:

若第M模式标识信息指示当前节点的帧间预测模式值大于M,则基于第二解码模式解码码流,确定当前节点的第一帧间预测模式剩余值;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;

根据M+1个模式标识信息的取值和第一帧间预测模式剩余值,确定当前节点的帧间预测模式值。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.

在本申请实施例中,M+1个模式标识信息可以包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。In an embodiment of the present application, M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.

在本申请实施例中,第二解码模式可以为指数哥伦布的解码方式,例如K阶指数哥伦布的解码方式。其中,K阶指数哥伦布(Exponential-Golomb coding)是一种无损数据压缩方法,可以达到很高的编码效率;因此,为了提高编码效率,在当前节点的帧间预测模式值大于M时,这时候针对第一帧间预测模式剩余值可以使用指数哥伦布的解码方式进行解码。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. Among them, the K-order Exponential-Golomb coding is a lossless data compression method that can achieve a very high coding efficiency; therefore, in order to improve the coding efficiency, when the inter-frame prediction mode value of the current node is greater than M, the Exponential-Golomb decoding method can be used to decode the residual value of the first inter-frame prediction mode.

在一些实施例中,该方法还可以包括:将帧间预测模式值初始化为0。In some embodiments, the method may further include: initializing the inter prediction mode value to 0.

也就是说,在解码端,首先将帧间预测模式值初始化为0;其次使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag0,如果flag0的取值指示当前节点的帧间预测模式值小于或等于0,则结束解码操作,此时帧间预测模式值等于0;如果flag0的取值指示当前节点的帧间预测模式值大于0,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag1;依次类推,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagM;如果flagM的取值指示当前节点的帧间预测模式值小于或等于M,则结束解码操作,此时帧间预测模式值等于M;如果flagM的取值指示当前节点的帧间预测模式值大于M,则使用指数哥伦布的解码方式解码第一帧间预测模式剩余值;然后根据M+1个模式标识信息的取值和第一帧间预测模式剩余值,进而确定出当前节点的帧间预测模式值。That is to say, 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 using 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 using context information is used to decode flag1; By analogy, decode flagM using a decoding mode with fixed context information/a decoding mode with adaptive context information/a decoding mode without context information; if the value of flagM indicates that the inter-frame prediction mode value of the current node is less than or equal to M, terminate the decoding operation, 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, 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 the M+1 mode identification information and the first inter-frame prediction mode residual value.

在一些实施例中,根据M+1个模式标识信息的取值和第一帧间预测模式剩余值,确定当前节点的帧间预测模式值,可以包括:对M+1个模式标识信息的取值与第一帧间预测模式剩余值进行加法运算,确定当前节点的帧间预测模式值。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.

在本申请实施例中,在得到flag0、flag1、…、flagM等M+1个模式标识信息的取值之后,假定第一帧间预测模式剩余值用residual mode1表示,那么当前节点的帧间预测模式值inter mode的计算公式,可以如下所示:
inter mode=residual mode1+(flag0+flag1+…+flagM)           (20)
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)

在一些实施例中,根据M+1个模式标识信息的取值和第一帧间预测模式剩余值,确定当前节点的帧间预测模式值,可以包括:对第一帧间预测模式剩余值与(M+1)进行加法运算,确定当前节点的帧间预测模式值。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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,也就是说,当flagi的取值为1时,确定当前节点的帧间预测模式值大于i,这时候需要继续执行解码操作。因此,如果当前节点的帧间预测模式值大于M,此时flag0、flag1、…、flagM的取值均等于1,那么当前节点的帧间预测模式值inter mode的计算公式,也可以如下所示:
inter mode=residual mode1+(M+1)             (21)
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)

在另一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值,可以包括:在第i模式标识信息指示当前节点的帧间预测模式值等于i时,将当前节点的帧间预测模式值设置为等于i。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 according to 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.

在一种具体的实施例中,在i等于N-1时,该方法还可以包括:In a specific embodiment, when i is equal to N-1, the method may further include:

若第N-1模式标识信息指示当前节点的帧间预测模式值等于N-1,则将当前节点的帧间预测模式值 设置为等于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, the inter-frame prediction mode value of the current node is Set equal to N-1;

若第N-1模式标识信息指示当前节点的帧间预测模式值不等于N-1,则将当前节点的帧间预测模式值设置为等于N。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.

也就是说,首先使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag0,如果flag0的取值指示当前节点的帧间预测模式值等于0,则结束解码操作,此时帧间预测模式值等于0;如果flag0的取值指示当前节点的帧间预测模式值不等于0,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag1;如果flag1的取值指示当前节点的帧间预测模式值等于1,则结束解码操作,此时帧间预测模式值等于1;如果flag1的取值指示当前节点的帧间预测模式值不等于1,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag2。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.

依次类推,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagi;如果flagi的取值指示当前节点的帧间预测模式值等于i,则结束解码操作,此时帧间预测模式值等于i;如果flagi的取值指示当前节点的帧间预测模式值不等于i,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagi+1;直至i等于N-1时,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagN-1;如果flagN-1的取值指示当前节点的帧间预测模式值等于N-1,则结束解码操作,此时帧间预测模式值等于N-1;如果flagN-1的取值指示当前节点的帧间预测模式值不等于N-1,则结束解码操作,此时帧间预测模式值等于N。By analogy, use the decoding mode of fixed context information/the decoding mode of adaptive context information/the decoding mode without using 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 using 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 using 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.

在另一种具体的实施例中,在这种实现方式下,如果当前节点的帧间预测模式值不等于M时,也可以使用指数哥伦布进行解码。在一些实施例中,在i等于M时,根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值,可以包括:In another specific embodiment, in 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 according to the value of at least one mode identification information may include:

若第M模式标识信息指示当前节点的帧间预测模式值不等于M,则基于第二解码模式解码码流,确定当前节点的第二帧间预测模式剩余值;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;

根据M+1个模式标识信息的取值和第二帧间预测模式剩余值,确定当前节点的帧间预测模式值。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.

在本申请实施例中,M+1个模式标识信息可以包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。In an embodiment of the present application, M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.

在本申请实施例中,第二解码模式可以为指数哥伦布的解码方式,例如K阶指数哥伦布的解码方式。其中,K阶指数哥伦布是一种无损数据压缩方法,可以达到很高的编码效率;因此,为了提高编码效率,在当前节点的帧间预测模式值不等于M时,这时候针对第二帧间预测模式剩余值也可以使用指数哥伦布的解码方式进行解码。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, in order 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 residual value of the second inter-frame prediction mode.

在一些实施例中,该方法还可以包括:将帧间预测模式值初始化为0。In some embodiments, the method may further include: initializing the inter prediction mode value to 0.

也就是说,在这种实现方式下,对于解码端而言,首先将帧间预测模式值初始化为0;其次使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag0,如果flag0的取值指示当前节点的帧间预测模式值等于0,则结束解码操作,此时帧间预测模式值等于0;如果flag0的取值指示当前节点的帧间预测模式值不等于0,则使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flag1;依次类推,使用固定上下文信息的解码模式/自适应上下文信息的解码模式/不使用上下文信息的解码模式解码flagM;如果flagM的取值指示当前节点的帧间预测模式值等于M,则结束解码操作,此时帧间预测模式值等于M;如果flagM的取值指示当前节点的帧间预测模式值不等于M,则使用指数哥伦布的解码方式解码第二帧间预测模式剩余值;然后根据M+1个模式标识信息的取值和第二帧间预测模式剩余值,进而确定出当前节点的帧间预测模式值。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 using 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 using context information is used for decoding. 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 using 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 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.

在一些实施例中,根据M+1个模式标识信息的取值和第二帧间预测模式剩余值,确定当前节点的帧间预测模式值,可以包括:对M+1个模式标识信息的取值进行取非操作,确定M+1个模式标识信息的取非值;对M+1个模式标识信息的取非值与第二帧间预测模式剩余值进行加法运算,确定当前节点的帧间预测模式值。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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,也就是说,当flagi的取值为0时,确定当前节点的帧间预测模式值不等于i,这时候需要继续执行解码操作。这样,在得到flag0、flag1、…、flagM等M+1个模式标识信息的取值之后,需要对这M+1个模式标识信息的取值进行取非操作,以使得!(flag0)、!(flag1)、…、!(flagM)的取值均等于1;假定第二帧间预测模式剩余值用residual mode2表示,那么当前节点的帧间预测模式值inter mode的计算公式,可以如下所示:
inter mode=residual mode2+(!(flag0)+!(flag1)+…+!(flagM))    (22)
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 decoding operation needs to be continued. 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)

在一些实施例中,根据M+1个模式标识信息的取值和第二帧间预测模式剩余值,确定当前节点的 帧间预测模式值,可以包括:对第二帧间预测模式剩余值与(M+1)进行加法运算,确定当前节点的帧间预测模式值。In some embodiments, the current node is determined based on the values of the M+1 mode identification information and the second inter-frame prediction mode residual value. The inter-frame prediction mode value may include: performing 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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,此时!(flag0)+!(flag1)+…+!(flagM)的取值可以看作是M+1;那么当前节点的帧间预测模式值inter mode的计算公式,也可以如下所示:
inter mode=residual mode2+(M+1)               (23)
In the embodiment of the present application, assuming that the first value is set to 0 and the second value is set to 1, then 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)

也就是说,在本申请实施例中,在得到至少一个模式标识信息的取值之后,可以根据第i模式标识信息的取值来确定出当前节点的帧间预测模式值;或者,为了提高编码效率,也可以结合指数哥伦布的解码方式来确定出当前节点的帧间预测模式值。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 according to the value of the i-th mode identification information; or, in order to improve the coding efficiency, the exponential Golomb decoding method can be combined to determine the inter-frame prediction mode value of the current node.

S2103:根据帧间预测模式值,确定当前节点的预测值。S2103: Determine the prediction value of the current node according to the inter-frame prediction mode value.

需要说明的是,在本申请实施例中,根据帧间预测模式值可以确定被选择节点,进而能够确定出当前节点的预测值。具体地,在一些实施例中,根据帧间预测模式值,确定当前节点的预测值,可以包括:根据帧间预测模式值,从至少一个候选节点中确定被选择节点;根据被选择节点,确定当前节点的预测值。It should be noted that, in the embodiments of the present application, the selected node can be determined according to the inter-frame prediction mode value, and then the prediction value of the current node can be determined. Specifically, in some embodiments, determining the prediction value of the current node according to the inter-frame prediction mode value may include: determining the selected node from at least one candidate node according to the inter-frame prediction mode value; and determining the prediction value of the current node according to the selected node.

还需要说明的是,在本申请实施例中,至少一个候选节点包括下述至少一项:至少一个第二候选节点和至少一个第四候选节点;其中,至少一个第二候选节点为第一参考帧中的候选节点,至少一个第四候选节点为第二参考帧中的候选节点。也就是说,至少一个候选节点可以是由至少一个第二候选节点和/或至少一个第四候选节点组成,这里针对候选节点的数量不作限定。It should also be noted that, in the embodiment of the present application, 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. In other words, at least one candidate node may be composed of at least one second candidate node and/or at least one fourth candidate node, and the number of candidate nodes is not limited here.

还需要说明的是,在本申请实施例中,当前节点位于当前帧中。其中,当前帧是指当前待解码的帧,第一参考帧和第二参考帧均为已经解码过的帧,而且第一参考帧与第二参考帧不同。It should also be noted that in the embodiment of the present application, the current node is located in the current frame, wherein the current frame refers to the frame to be decoded, the first reference frame and the second reference frame are both decoded frames, and the first reference frame is different from the second reference frame.

在一些实施例中,第一参考帧可以为当前帧的前K帧,K为大于0的整数;第二参考帧可以为第一参考帧进行全局运动得到的。示例性地,在一种具体的实施例中,第一参考帧可以为当前帧的前一帧;第二参考帧可以为前一帧进行全局运动得到的。In some embodiments, the first reference frame may be the previous K frames of 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. Exemplarily, in a specific embodiment, the first reference frame may be the previous frame of the current frame; the second reference frame may be obtained by performing global motion on the previous frame.

在一些实施例中,第一参考帧可以为当前帧的前一帧;第二参考帧可以为当前帧的前一帧的前一帧。示例性地,如果当前帧为Frame t,那么第一参考帧可以为Frame t-1,第二参考帧可以为Frame t-2;t为整数。In some embodiments, the first reference frame may be a previous frame of the current frame; the second reference frame may be a previous frame of the previous frame of 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; t is an integer.

在一种可能的实现方式中,在帧间预测模式值指示被选择节点为至少一个第二候选节点中的一个候选节点时,该方法还可以包括:In a possible implementation manner, 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:

确定当前节点的前一个已解码节点;Determine the decoded node before the current node;

根据前一个已解码节点,在第一参考帧中确定第一候选节点;其中,前一个已解码节点与第一候选节点的几何参数满足第一条件;Determine a first candidate node in a first reference frame according to a previously decoded node; wherein geometric parameters of the previously decoded node and the first candidate node satisfy a first condition;

根据第一候选节点,在第一参考帧中按照预设方式确定第1个第二候选节点至第p个第二候选节点;According to 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;

根据第p个第二候选节点确定被选择节点;其中,p为大于0的正整数,且p的取值与帧间预测模式值具有关联关系。The selected node is determined according to the pth 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.

在另一种可能的实现方式中,在帧间预测模式值指示被选择节点为至少一个第四候选节点中的一个候选节点时,该方法还可以包括:In another possible implementation manner, when the inter-frame prediction mode value indicates that the selected node is one of the at least one fourth candidate nodes, the method may further include:

确定当前节点的前一个已解码节点;Determine the decoded node before the current node;

根据前一个已解码节点,在第二参考帧中确定第三候选节点;其中,前一个已解码节点与第三候选节点的几何参数满足第一条件;Determine a third candidate node in the second reference frame according to the previous decoded node; wherein geometric parameters of the previous decoded node and the third candidate node satisfy a first condition;

根据第三候选节点,在第二参考帧中按照预设方式确定第1个第四候选节点至第q个第四候选节点;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;

根据第q个第四候选节点作为被选择节点;其中,q为大于0的正整数,且q的取值与帧间预测模式值具有关联关系。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.

需要说明的是,在本申请实施例中,确定当前节点的前一个已解码节点,可以包括:确定当前帧对应的预测树;基于预测树的解码顺序,确定当前节点的前一个已解码节点。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.

在本申请实施例中,这里可以利用两种不同的方式构建预测树结构,其中可以包括:KD-Tree(高时延慢速模式)和低时延快速模式(利用激光雷达标定信息)。在利用激光雷达标定信息时,将每个点划分到不同的Laser上,按照不同的Laser建立预测树结构。In the embodiment of the present application, two different methods can be used to construct the prediction tree structure, which can include: KD-Tree (high latency slow mode) and low latency fast mode (using laser radar calibration information). When using the laser radar calibration information, each point is divided into different lasers, and the prediction tree structure is established according to the different lasers.

还需要说明的是,在本申请实施例中,预测树的解码顺序可以为下述其中之一:无序、莫顿序、方位角序和径向距离序等,这里不作具体限定。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.

这样,在解码端,通过解码码流来重构预测树结构。然后遍历预测树,在预测树的解码顺序上确定位于当前节点的前一个已解码节点。Thus, at the decoding end, the prediction tree structure is reconstructed by decoding the bitstream, and then the prediction tree is traversed to determine the previous decoded node of the current node in the decoding order of the prediction tree.

还需要说明的是,在本申请实施例中,这里的几何参数是指雷达坐标系下的参数。其中,几何参数可以包括:水平方位角和雷达激光索引号laserID。 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.

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;水平方位角与前一个已解码节点的水平方位角相同。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 is the same as the horizontal azimuth of the previous decoded node.

在本申请实施例中,前一个已解码节点与第一候选节点的几何参数满足第一条件,具体可以包括:第一候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角与前一个已解码节点的水平方位角相同。In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node satisfy 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.

在本申请实施例中,前一个已解码节点与第三候选节点的几何参数满足第一条件,具体可以包括:第三候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角与前一个已解码节点的水平方位角相同。In an embodiment of the present application, the geometric parameters of the previous decoded node and the third candidate node satisfy 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.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已解码节点的laserID相同,而且与前一个已解码节点的相同。在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已解码节点的laserID相同,而且与前一个已解码节点的相同。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 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 The previous decoded node same.

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;水平方位角大于且最接近前一个已解码节点的水平方位角。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.

在本申请实施例中,前一个已解码节点与第一候选节点的几何参数满足第一条件,具体可以包括:第一候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角大于且最接近前一个已解码节点的水平方位角。In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node satisfy 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 greater than and closest to the horizontal azimuth angle of the previous decoded node.

在本申请实施例中,前一个已解码节点与第三候选节点的几何参数满足第一条件,具体可以包括:第三候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角大于且最接近前一个已解码节点的水平方位角。In an embodiment of the present application, the geometric parameters of the previous decoded node and the third candidate node satisfy 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 greater than and closest to the horizontal azimuth angle of the previous decoded node.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已解码节点的laserID相同,而且为第一个大于前一个已解码节点的在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已解码节点的laserID相同,而且为第一个大于前一个已解码节点的 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

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;水平方位角小于且最接近前一个已解码节点的水平方位角。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.

在本申请实施例中,前一个已解码节点与第一候选节点的几何参数满足第一条件,具体可以包括:第一候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角小于且最接近前一个已解码节点的水平方位角。In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node satisfy 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.

在本申请实施例中,前一个已解码节点与第一候选节点的几何参数满足第一条件,具体可以包括:第三候选节点的雷达激光索引信号与前一个已解码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角小于且最接近前一个已解码节点的水平方位角。In an embodiment of the present application, the geometric parameters of the previous decoded node and the first candidate node satisfy 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 less than and closest to the horizontal azimuth angle of the previous decoded node.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已解码节点的laserID相同,而且为第一个小于前一个已解码节点的在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已解码节点的laserID相同,而且为第一个小于前一个已解码节点的 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

进一步地,在第二参考帧为第一参考帧经过全局运动得到的参考帧时,对于第三候选节点和至少一个第四候选节点的水平方位角需要被替换成当前节点的父亲节点的 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 by the parent node of the current node

进一步地,在本申请实施例中,对于预设方式来说,可以是按照预测树的解码顺序,或者也可以是按照水平方位角的大小顺序,这里不作具体限定。下面针对这两种具体的实现方式进行说明。Further, in the embodiment of the present application, the preset manner may be based on the decoding order of the prediction tree, or may be based on the order of the magnitude of the horizontal azimuth angle, which is not specifically limited here. The following describes these two specific implementations.

在一种具体的实现方式中,根据第一候选节点,在第一参考帧中按照预设方式确定第1个第二候选节点至第p个第二候选节点,可以包括:按照预测树的解码顺序,在第一参考帧中依次确定第一候选节点之后解码的第1个第二候选节点、第2个第二候选节点、…、第p个第二候选节点。In a 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 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.

在一种具体的实现方式中,根据第三候选节点,在第二参考帧中按照预设方式确定第1个第四候选节点至第q个第四候选节点,可以包括:按照预测树的解码顺序,在第二参考帧中依次确定第三候选节点之后解码的第1个第四候选节点、第2个第四候选节点、…、第q个第四候选节点。In a specific implementation method, based on the third candidate node, determining the first fourth candidate node to the qth fourth candidate node in a preset manner in the second reference frame may include: 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 in sequence according to the decoding order of the prediction tree.

需要说明的是,无论是在第一参考帧还是第二参考帧中,两者的预设方式类似。以第一参考帧为例,假定至少一个第二候选节点包括节点c和节点d。It should be noted that, whether in the first reference frame or the second reference frame, the preset methods of both are similar. Taking the first reference frame as an example, it is assumed that the at least one second candidate node includes a node c and a node d.

示例性地,如果根据帧间预测模式值确定被选择节点为节点d时,这时候首先确定当前节点的前一个已解码节点a;然后确定与前一个已解码节点a的几何参数满足第一条件的第一候选节点b;根据预测树的解码顺序,在第一参考帧中依次确定第一候选节点b之后编码或解码的第1个第二候选节点c和第2个第二候选节点d;此时所确定的第2个第二候选节点d即为被选择节点。Exemplarily, if the selected node is determined to be node d according to 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 satisfy 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.

在另一种具体的实现方式中,根据第一候选节点,在第一参考帧中按照预设方式确定第1个第二候选节点至第p个第二候选节点,可以包括:按照水平方位角的大小顺序,在第一参考帧中依次确定水平方位角大于且最接近第一候选节点的水平方位角的第1个第二候选节点、水平方位角大于且最接近第1 个第二候选节点的水平方位角的第2个第二候选节点、…、水平方位角大于且最接近第i-1个第二候选节点的水平方位角的第p个第二候选节点;其中,第1个第二候选节点、第2个第二候选节点、…、第p个第二候选节点的雷达激光索引序号均与前一个已解码节点的雷达激光索引序号相同。In another specific implementation, according to 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 the first reference frame, in order of magnitude of the horizontal azimuth angles, the first second candidate node whose horizontal azimuth angle is greater than and closest to the horizontal azimuth angle of the first candidate node ... and 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 with a horizontal azimuth angle of the i-th second candidate node, …, the p-th second candidate node with a horizontal azimuth angle greater than and closest to the horizontal azimuth angle of the i-1-th second candidate node; wherein the radar laser index numbers of the 1st second candidate node, the 2nd second candidate node, …, the p-th second candidate node are all the same as the radar laser index number of the previous decoded node.

在另一种具体的实现方式中,根据第三候选节点,在第二参考帧中按照预设方式确定第1个第四候选节点至第q个第四候选节点,可以包括:按照水平方位角的大小顺序,在第二参考帧中依次确定水平方位角大于且最接近第三候选节点的水平方位角的第1个第四候选节点、水平方位角大于且最接近第1个第四候选节点的水平方位角的第2个第四候选节点、…、水平方位角大于且最接近第j-1个第四候选节点的水平方位角的第q个第四候选节点;其中,第1个第四候选节点、第2个第四候选节点、…、第q个第四候选节点的雷达激光索引序号均与前一个已解码节点的雷达激光索引序号相同。In another specific implementation, based on the third candidate node, determining the first to qth fourth candidate nodes in a preset manner in the second reference frame may include: determining in order of 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 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 first fourth candidate node, the second fourth candidate node, ..., and the qth fourth candidate node are all the same as the radar laser index number of the previous decoded node.

还需要说明的是,仍以第一参考帧为例,假定至少一个第二候选节点包括节点c和节点d。示例性地,如果根据帧间预测模式值确定被选择节点为节点d时,这时候首先确定当前节点的前一个已解码节点a;然后确定与前一个已解码节点a的几何参数满足第一条件的第一候选节点b;再根据水平方位角的大小顺序,具体如下:It should also be noted that, still taking the first reference frame as an example, it is assumed that at least one second candidate node includes node c and node d. Exemplarily, if the selected node is determined to be node d according to 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 satisfy the first condition with the previous decoded node a is determined; and then the order of the horizontal azimuth angle is as follows:

在第一参考帧中确定雷达激光索引序号相同且第一个水平方位角大于第一候选节点b的水平方位角的第1个第二候选节点c,确定雷达激光索引序号相同且第一个水平方位角大于第1个第二候选节点c的水平方位角的第2个第二候选节点d;此时所确定的第2个第二候选节点d即为被选择节点。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.

示例性地,以图20为例,在对待解码的当前节点进行帧间预测解码的时候,遍历预测树中,当前节点的前一个已经解码的节点a;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;

在第一参考帧(即前一帧参考帧)中寻找与解码当前节点的前一个已解码节点a具有相同的和laserID的节点b,将第一参考帧中的节点b之后编码或者解码的节点c和d作为帧间候选点;In the first reference frame (i.e., the previous reference frame), find the node a that has the same and node b of laserID, and nodes c and d encoded or decoded after node b in the first reference frame as inter-frame candidate points;

在第二参考帧(即前一帧经过全局运动的参考帧)中寻找与解码当前节点的前一个已解码节点a具有相同的和laserID的节点g,将第二参考帧中的节点g之后编码或者解码的节点e和f作为帧间候选点,同时节点e和f的被替换成当前节点的父亲节点的 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 and laserID of node g, nodes e and f encoded or decoded after node g in the second reference frame are used as inter-frame candidate points, and nodes e and f The node that is replaced by the parent node of the current node

这时候,如果预测模式是帧间预测模式,那么利用解码得到的帧间预测模式值,可以从节点c、节点d、节点e和节点f的至少一项中确定被选择节点,进而确定出当前节点的预测值;或者,这里也可以包括第一候选节点和第二候选节点,因此还可以是从节点b、节点g、节点c、节点d、节点e和节点f的至少一项中确定被选择节点,进而确定出当前节点的预测值;对此不作具体限定。At this time, if the prediction mode is an inter-frame prediction mode, then using the inter-frame prediction mode value obtained by decoding, the selected node can be determined from at least one of node c, node d, node e and node f, and then the prediction value of the current node can be determined; alternatively, 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 the prediction value of the current node can be determined; there is no specific limitation on this.

还需要说明的是,在本申请实施例中,根据帧间预测模式值来确定被选择节点,这里也可以构建一个与编码端相同的帧间候选节点集合。其中,帧间候选节点集合可以是由节点c、节点d、节点e和节点f中的至少一项组成的,或者是由节点b、节点g、节点c、节点d、节点e和节点f中的至少一项组成的。然后利用解码得到的帧间预测模式值,可以从帧间候选节点集合中确定被选择节点,进而确定出当前节点的预测值。It should also be noted that in the embodiment of the present application, the selected node is determined according to the inter-frame prediction mode value, and an inter-frame candidate node set that is the same as the encoding end can also be constructed here. Among them, 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. Then, using the inter-frame prediction mode value obtained by decoding, the selected node can be determined from the inter-frame candidate node set, and then the prediction value of the current node can be determined.

进一步地,在一些实施例中,该方法还可以包括:解码码流,确定当前节点的预测残差值和量化参数;根据量化参数对预测残差值进行反量化处理,得到反量化残差值;根据反量化残差值和预测值,确定当前节点的重建信息。Furthermore, in some embodiments, the method may also include: decoding the code stream to determine the prediction residual value and quantization parameter of the current node; dequantizing the prediction residual value according to the quantization parameter to obtain a dequantized residual value; and determining the reconstruction information of the current node based on the dequantized residual value and the prediction value.

在一种具体的实施例中,根据反量化残差值和预测值,确定当前节点的重建信息,可以包括:根据反量化残差值和预测值进行加法运算,确定当前节点的重建信息。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.

也就是说,在本申请实施例中,通过解码码流获得当前节点的预测残差值,并且通过解码码流获得量化参数;然后根据量化参数对预测残差值进行反量化处理,可以得到反量化残差值;再对反量化残差值和预测值进行求和运算,可以得到当前节点的重建信息,例如恢复当前节点的重构几何位置信息,最终完成解码端的几何重构。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 the inverse quantized residual value; then the inverse 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.

进一步地,在本申请实施例中,该解码方法主要是针对帧间预测模式值进行解码优化的,这里还可以先通过一个标志位来确定当前节点使用是否帧间预测模式。因此,在一些实施例中,该方法还包括:解码码流,确定第一标识信息的取值;若第一标识信息指示当前节点使用帧间预测模式,则执行解码码流,确定至少一个模式标识信息的取值的步骤。Furthermore, in the embodiment of the present application, the decoding method is mainly for decoding optimization of the inter-frame prediction mode value, and 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 also includes: 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, then performing the step of decoding the code stream to determine the value of at least one mode identification information.

进一步地,对于第一标识信息而言,在一些实施例中,该方法还包括:Further, for the first identification information, in some embodiments, the method further includes:

若第一标识信息的取值为第三值,则确定第一标识信息指示当前节点不使用帧间预测模式;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.

需要说明的是,在本申请实施例中,第三值与第四值不同,而且第三值和第四值可以是参数形式,也可以是数字形式。具体地,第一标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。 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.

示例性地,对于第三值和第四值而言,第三值可以设置为1,第四值可以设置为0;或者,第三值可以设置为0,第四值可以设置为1;或者,第三值可以设置为true,第四值可以设置为false;或者,第三值可以设置为false,第四值可以设置为true;但是这里并不作具体限定。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.

在本申请实施例中,以写入码流中的flag为例,假设第三值设置为0,第四值设置为1,这时候如果第一标识信息的取值为0,那么可以确定当前节点不使用帧间预测模式,即无需执行本申请实施例所述的解码方法;如果第一标识信息的取值为1,那么可以确定当前节点使用帧间预测模式,即需要执行本申请实施例所述的解码方法。In an 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 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.

进一步地,在本申请实施例中,这里还可以设置一个标志位来确定是否启用本申请实施例的解码方法。因此,在一些实施例中,该方法还包括:解码码流,确定第二标识信息的取值;若第二标识信息指示当前节点启用目标帧间解码方式,则执行解码码流,确定至少一个模式标识信息的取值的步骤。Further, in the embodiment of the present application, a flag bit can be set to determine whether to enable the decoding method of the embodiment of the present application. Therefore, in some embodiments, the method further includes: 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, then performing the step of decoding the code stream to determine the value of at least one mode identification information.

进一步地,对于第二标识信息而言,在一些实施例中,该方法还包括:Furthermore, for the second identification information, in some embodiments, the method further includes:

若第二标识信息的取值为第五值,则确定第二标识信息指示当前节点不启用目标帧间解码方式;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.

需要说明的是,在本申请实施例中,第五值与第六值不同,而且第五值与第六值可以是参数形式,也可以是数字形式。具体地,第二标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。It should be noted that, in the embodiment of the present application, the fifth value is different from the sixth value, 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 value of a flag, which is not specifically limited here.

示例性地,对于第五值与第六值而言,第五值可以设置为1,第六值可以设置为0;或者,第五值可以设置为0,第六值可以设置为1;或者,第五值可以设置为true,第六值可以设置为false;或者,第五值可以设置为false,第六值可以设置为true;但是这里并不作具体限定。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 no specific limitation is made here.

在本申请实施例中,以写入码流中的flag为例,假设第五值设置为0,第六值设置为1,这时候如果第二标识信息的取值为0,那么可以确定当前节点不启用目标帧间解码方式,即无需执行本申请实施例所述的解码方法;如果第二标识信息的取值为1,那么可以确定当前节点启用目标帧间解码方式,即需要执行本申请实施例所述的解码方法。In an embodiment of the present application, taking the flag written into the bitstream 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 at this time, 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, it can be determined that the current node enables the target inter-frame decoding mode, that is, the decoding method described in the embodiment of the present application needs to be executed.

简单来说,在本申请实施例中,这里可以使用一个1比特标志位(即第二标识信息)来表示目标帧间解码方式开启与否。这个标志位可以被放在高层语法元素的头信息中,例如geometry header中;而且这个标志位在一些特定条件下可以有条件的开启,如果这个标志位不出现在码流中,那么其默认值为一个固定的值。在解码端,如果这个标志位不出现在码流中,那么可以不进行解码,其默认值为一个固定的值。In short, in the embodiment of the present application, a 1-bit flag (i.e., the second identification information) can be used here to indicate whether the target inter-frame decoding mode is enabled or not. This flag can be placed in the header information of the high-level syntax element, such as the 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.

本实施例提供了一种解码方法,首先解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;然后根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值;再根据帧间预测模式值,确定当前节点的预测值。这样,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接解码,而是通过解码码流来确定至少一个模式标识信息的取值,然后根据这至少一个模式标识信息的取值来确定出帧间预测模式值;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。This embodiment provides a decoding method, firstly decoding a code stream, determining the 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; then determining the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; and then determining the prediction value of the current node according to the inter-frame prediction mode value. 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, but 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 according to 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, so that the frequency distribution of the inter-frame prediction mode is taken into account, that is, the more likely the inter-frame prediction mode is to appear, the more forward the corresponding inter-frame prediction mode value is, so that the number of coding bits can be reduced, the bit rate can be saved, and the encoding and decoding efficiency can be improved.

在本申请的另一实施例中,参见图22,其示出了本申请实施例提供的一种编码方法的流程示意图。如图22所示,该方法可以包括:In another embodiment of the present application, referring to FIG22, a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG22, the method may include:

S2201:确定当前节点的帧间预测模式值。S2201: Determine the inter-frame prediction mode value of the current node.

需要说明的是,本申请实施例的编码方法应用于编码器。另外,该编码方法具体可以是指一种点云帧间预测方法;更具体地,是一种点云帧间几何信息编码模式的编码方法,或者也可以是一种点云帧间几何信息编码模式的哥伦布编码方法,以实现对帧间预测模式值的编码处理。It should be noted that the encoding method of the embodiment of the present application is applied to an encoder. In addition, the encoding method may specifically refer to a point cloud inter-frame prediction method; more specifically, it may be an encoding method of a point cloud inter-frame geometric information encoding mode, or it may also be a Columbus encoding method of a point cloud inter-frame geometric information encoding mode, to achieve encoding processing of an inter-frame prediction mode value.

还需要说明的是,在本申请实施例中,在点云中,点可以是点云中的所有点,也可以是点云中的部分点,这些点在空间上相对集中。这里,当前节点具体可以是指点云中当前待编码的节点。It should also be noted that in the embodiment of the present application, in the point cloud, the point can be all points in the point cloud, or it can be part of the points in the point cloud, and these points are relatively concentrated in space. Here, the current node can specifically refer to the node to be encoded in the point cloud.

在一些实施例中,确定当前节点的帧间预测模式值,可以包括:In some embodiments, determining the inter-frame prediction mode value of the current node may include:

确定帧间候选节点集合;其中,帧间候选节点集合包括至少一个候选节点;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.

在一种具体的实施例中,从帧间候选节点集合中确定被选择节点,可以包括:In a specific embodiment, determining the selected node from the inter-frame candidate node set may include:

基于率失真代价方式对帧间候选节点集合的至少一个候选节点分别进行代价计算,确定至少一个候 选节点各自的代价值;从至少一个候选节点各自的代价值中确定最小代价值,将最小代价值对应的候选节点作为被选择节点。Based on the rate-distortion cost method, a cost is calculated for at least one candidate node in the inter-frame candidate node set, and at least one candidate node is determined. Select the cost value of each node; determine the minimum cost value from the cost value of at least one candidate node, and use the candidate node corresponding to the minimum cost value as the selected node.

在本申请实施例中,其中,帧间候选节点集合包括至少一个候选节点。这里,对于帧间候选节点集合,其可以包括一个候选节点,也可以包括两个候选节点,或者更多个候选节点,在此不作具体限定。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.

进一步地,在一些实施例中,参见图23,确定帧间候选节点集合,该方法可以包括:Further, in some embodiments, referring to FIG. 23 , to determine an inter-frame candidate node set, the method may include:

S2301:确定当前节点的前一个已编码节点。S2301: Determine the previous encoded node of the current node.

S2302:确定在第一参考帧中与前一个已编码节点的几何参数满足第一条件的第一候选节点,根据第一候选节点在第一参考帧中确定至少一个第二候选节点。S2302: Determine a first candidate node whose geometric parameters satisfy a first condition with those of a previously 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.

S2303:确定在第二参考帧中与前一个已编码节点的几何参数满足第一条件的第三候选节点,根据第三候选节点在第二参考帧中确定至少一个第四候选节点,以及将至少一个第四候选节点的水平方位角设置为当前节点的父亲节点的水平方位角。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 at least one fourth candidate node to the horizontal azimuth angle of the parent node of the current node.

S2304:根据至少一个第二候选节点和/或至少一个第四候选节点,确定帧间候选节点集合。S2304: Determine an inter-frame candidate node set according to at least one second candidate node and/or at least one fourth candidate node.

需要说明的是,在本申请实施例中,当前节点位于当前帧中。其中,当前帧是指当前待编码的帧,第一参考帧和第二参考帧均为已经编码过的帧,而且第一参考帧与第二参考帧不同。另外,确定当前节点的前一个已编码节点,可以包括:确定当前帧对应的预测树;基于预测树的编码顺序,确定当前节点的前一个已编码节点。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 to be encoded, the first reference frame and the second reference frame are both frames that have been encoded, and the first reference frame is different from the second reference frame. In addition, 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.

在本申请实施例中,这里可以利用两种不同的方式构建预测树结构,其中可以包括:KD-Tree(高时延慢速模式)和低时延快速模式(利用激光雷达标定信息)。在利用激光雷达标定信息时,将每个点划分到不同的Laser上,按照不同的Laser建立预测树结构。In the embodiment of the present application, two different methods can be used to construct the prediction tree structure, which can include: KD-Tree (high latency slow mode) and low latency fast mode (using laser radar calibration information). When using the laser radar calibration information, each point is divided into different lasers, and the prediction tree structure is established according to the different lasers.

还需要说明的是,在本申请实施例中,预测树的编码顺序可以为下述其中之一:无序、莫顿序、方位角序和径向距离序等,这里不作具体限定。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.

在一些实施例中,第一参考帧可以为当前帧的前K帧,K为大于0的整数;第二参考帧可以为第一参考帧进行全局运动得到的。示例性地,在一种具体的实施例中,第一参考帧可以为当前帧的前一帧;第二参考帧可以为前一帧进行全局运动得到的。In some embodiments, the first reference frame may be the previous K frames of 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. Exemplarily, in a specific embodiment, the first reference frame may be the previous frame of the current frame; the second reference frame may be obtained by performing global motion on the previous frame.

在一些实施例中,第一参考帧可以为当前帧的前一帧;第二参考帧可以为当前帧的前一帧的前一帧。示例性地,如果当前帧为Frame t,那么第一参考帧可以为Frame t-1,第二参考帧可以为Frame t-2;t为整数。In some embodiments, the first reference frame may be a previous frame of the current frame; the second reference frame may be a previous frame of the previous frame of 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; t is an integer.

还需要说明的是,在本申请实施例中,这里的几何参数是指雷达坐标系下的参数。其中,几何参数可以包括:水平方位角和雷达激光索引号laserID。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.

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;水平方位角与前一个已编码节点的水平方位角相同。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.

在本申请实施例中,确定在第一参考帧中与前一个已编码节点的几何参数满足第一条件的第一候选节点,具体可以包括:第一候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角与前一个已编码节点的水平方位角相同。In an embodiment of the present application, determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the radar laser index sequence number of the previous encoded node; and a horizontal azimuth angle of the first candidate node is the same as the horizontal azimuth angle of the previous encoded node.

在本申请实施例中,确定在第二参考帧中与前一个已编码节点的几何参数满足第一条件的第三候选节点,具体可以包括:第三候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角与前一个已编码节点的水平方位角相同。In an embodiment of the present application, a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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 a horizontal azimuth angle of the third candidate node is the same as the horizontal azimuth angle of the previous encoded node.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已编码节点的laserID相同,而且与前一个已编码节点的相同。在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已编码节点的laserID相同,而且与前一个已编码节点的相同。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 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 The previous encoded node same.

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;水平方位角大于且最接近前一个已编码节点的水平方位角。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.

在本申请实施例中,确定在第一参考帧中与前一个已编码节点的几何参数满足第一条件的第一候选节点,具体可以包括:第一候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角大于且最接近前一个已编码节点的水平方位角。In an embodiment of the present application, determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the 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.

在本申请实施例中,确定在第二参考帧中与前一个已编码节点的几何参数满足第一条件的第三候选节点,具体可以包括:第三候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角大于且最接近前一个已编码节点的水平方位角。In an embodiment of the present application, a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已编码节点的laserID相同,而且为第一个大于前一个已编码节点的在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已编码节点的laserID相同,而且为第一个大于前一个已编码节点的 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

在一些实施例中,几何参数满足第一条件,可以包括:雷达激光索引信号与前一个已编码节点的雷 达激光索引序号相同;水平方位角小于且最接近前一个已编码节点的水平方位角。In some embodiments, the geometric parameters satisfying the first condition may include: the radar laser index signal and the radar of the previous encoded node; The laser index number is the same as that of the previous encoded node; the horizontal azimuth angle is less than and closest to the horizontal azimuth angle of the previous encoded node.

在本申请实施例中,确定在第一参考帧中与前一个已编码节点的几何参数满足第一条件的第一候选节点,具体可以包括:第一候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第一候选节点的水平方位角小于且最接近前一个已编码节点的水平方位角。In an embodiment of the present application, determining a first candidate node whose geometric parameters satisfy a first condition with those of 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 the 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.

在本申请实施例中,确定在第二参考帧中与前一个已编码节点的几何参数满足第一条件的第三候选节点,具体可以包括:第三候选节点的雷达激光索引信号与前一个已编码节点的雷达激光索引序号相同;而且第三候选节点的水平方位角小于且最接近前一个已编码节点的水平方位角。In an embodiment of the present application, a third candidate node whose geometric parameters satisfy the first condition with those of the previous encoded node in the second reference frame is determined, which may specifically include: a 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.

也就是说,在第一参考帧中,所寻找到的第一候选节点为laserID与前一个已编码节点的laserID相同,而且为第一个小于前一个已编码节点的在第二参考帧中,所寻找到的第三候选节点为laserID与前一个已编码节点的laserID相同,而且为第一个小于前一个已编码节点的 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

进一步地,在第二参考帧为第一参考帧经过全局运动得到的参考帧时,对于第三候选节点和至少一个第四候选节点的水平方位角需要被替换成当前节点的父亲节点的 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 by the parent node of the current node

在一些实施例中,根据第一候选节点在第一参考帧中确定至少一个第二候选节点,可以包括:In some embodiments, determining at least one second candidate node in the first reference frame according to the first candidate node may include:

下面结合几种具体的实现方式对至少一个第二候选节点和至少一个第四候选节点的确定进行详细描述。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.

在一种具体的实现方式中,根据第一候选节点在第一参考帧中确定至少一个第二候选节点,可以包括:按照预测树的编码顺序,在第一参考帧中依次确定第1个第二候选节点至第m个第二候选节点;其中,m为大于0的正整数。示例性地,第1个第二候选节点至第m个第二候选节点,具体可以为:第1个第二候选节点、第2个第二候选节点、…、第m个第二候选节点。需要注意的是,这里的m与解码端的p可以相同,也可以不同,而且p小于或等于m的取值。In a specific implementation, determining at least one second candidate node in a first reference frame based on a first candidate node may include: determining the 1st 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 1st second candidate node to the mth second candidate node may specifically be: the 1st second candidate node, the 2nd 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.

在一种具体的实现方式中,根据第三候选节点在第二参考帧中确定至少一个第四候选节点,可以包括:按照预测树的编码顺序,在第二参考帧中依次确定第1个第四候选节点至第n个第四候选节点;其中,n为大于0的正整数。示例性地,第1个第四候选节点至第n个第四候选节点,具体可以为:第1个第四候选节点、第2个第四候选节点、…、第n个第四候选节点。需要注意的是,这里的n与解码端的q可以相同,也可以不同,而且q小于或等于n的取值。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.

以第一参考帧为例,假定至少一个第二候选节点包括节点c和节点d。示例性地,首先确定当前节点的前一个已编码节点a;然后确定与前一个已编码节点a的几何参数满足第一条件的第一候选节点b;根据预测树的编码顺序,在第一参考帧中依次确定第一候选节点b之后编码或解码的第1个第二候选节点c和第2个第二候选节点d。Taking the first reference frame as an example, assuming that at least one second candidate node includes node c and node d. Exemplarily, first determine the previous encoded node a of the current node; then determine the first candidate node b whose geometric parameters satisfy the first condition with the previous encoded node a; and according to the encoding order of the prediction tree, determine the first second candidate node c and the second second candidate node d encoded or decoded after the first candidate node b in the first reference frame.

在另一种具体的实现方式中,根据第一候选节点,在第一参考帧中按照预设方式确定第1个第二候选节点至第m个第二候选节点,可以包括:按照水平方位角的大小顺序,在第一参考帧中依次确定水平方位角大于且最接近第一候选节点的水平方位角的第1个第二候选节点、水平方位角大于且最接近第1个第二候选节点的水平方位角的第2个第二候选节点、…、水平方位角大于且最接近第m-1个第二候选节点的水平方位角的第m个第二候选节点;其中,第1个第二候选节点、第2个第二候选节点、…、第m个第二候选节点的雷达激光索引序号均与前一个已编码节点的雷达激光索引序号相同。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 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, ..., and the mth second candidate node are all the same as the radar laser index number of the previous encoded node.

在另一种具体的实现方式中,根据第三候选节点,在第二参考帧中按照预设方式确定第1个第四候选节点至第n个第四候选节点,可以包括:按照水平方位角的大小顺序,在第二参考帧中依次确定水平方位角大于且最接近第三候选节点的水平方位角的第1个第四候选节点、水平方位角大于且最接近第1个第四候选节点的水平方位角的第2个第四候选节点、…、水平方位角大于且最接近第n-1个第四候选节点的水平方位角的第n个第四候选节点;其中,第1个第四候选节点、第2个第四候选节点、…、第n个第四候选节点的雷达激光索引序号均与前一个已解码节点的雷达激光索引序号相同。In another specific implementation, 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 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.

仍以第一参考帧为例,假定至少一个第二候选节点包括节点c和节点d。示例性地,首先确定当前节点的前一个已编码节点a;然后确定与前一个已编码节点a的几何参数满足第一条件的第一候选节点b;再根据水平方位角的大小顺序,具体如下:Still taking the first reference frame as an example, assuming that at least one second candidate node includes node c and node d. Exemplarily, first determine the previous encoded node a of the current node; then determine the first candidate node b whose geometric parameters satisfy the first condition with the previous encoded node a; and then determine the order according to the size of the horizontal azimuth angle as follows:

在第一参考帧中确定雷达激光索引序号相同且第一个水平方位角大于第一候选节点b的水平方位角的第1个第二候选节点c,确定雷达激光索引序号相同且第一个水平方位角大于第1个第二候选节点c的水平方位角的第2个第二候选节点d。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.

示例性地,以图20为例,在对待编码的当前节点进行帧间预测编码的时候,遍历预测树中,当前节点的前一个已经编码的节点a;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;

在第一参考帧(即前一帧参考帧)中寻找与编码当前节点的前一个已经编码的节点a具有相同的和laserID的节点b,将第一参考帧中的节点b之后编码或者解码的节点c和d作为帧间候选点;In the first reference frame (i.e., the previous reference frame), find the node a that has the same and node b of laserID, and nodes c and d encoded or decoded after node b in the first reference frame as inter-frame candidate points;

在第二参考帧(即前一帧经过全局运动的参考帧)中寻找与编码当前节点的前一个已经编码的节点 a具有相同的和laserID的节点g,将第二参考帧中的节点g之后编码或者解码的节点e和f作为帧间候选点;同时节点e和f的被替换成当前节点的父亲节点的 In the second reference frame (i.e. the reference frame of the previous frame after global motion), find the node that has been encoded before the current node is encoded. a has the same and laserID of node g, and use nodes e and f encoded or decoded after node g in the second reference frame as inter-frame candidate points; at the same time, nodes e and f The node that is replaced by the parent node of the current node

还需要说明的是,在本申请实施例中,对于节点c和d的选取,也可以是在第一参考帧中,按照水平方位角的大小顺序,确定水平方位角大于且最接近第一候选节点b的水平方位角的节点c,确定水平方位角大于且最接近节点c的水平方位角的节点d。同理,对于节点e和f的选取,也可以是在第二参考帧中,按照水平方位角的大小顺序,确定水平方位角大于且最接近第三候选节点g的水平方位角的节点e,确定水平方位角大于且最接近节点e的水平方位角的节点f;这里不作具体限定。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. , 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 is also possible to select nodes e and f in the second reference frame according to the horizontal azimuth angles. In order of size, 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.

这样,帧间候选节点集合可以包括节点c、节点d、节点e和节点f中的至少一项;或者,帧间候选节点集合还可以包括节点b、节点g、节点c、节点d、节点e和节点f中的至少一项,对此不作具体限定。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.

进一步地,如果预测模式是帧间预测模式,那么可以从帧间候选节点集合中确定被选择节点。其中,从帧间候选节点集合中确定被选择节点,这里可以是使用RDO方式来选取不同的候选节点。在一种具体的实施例中,可以是:利用率失真代价方式对帧间候选节点集合中的每一个候选节点分别进行代价计算,确定至少一个候选节点各自的代价值;从这些代价值中选取最小代价值,然后将最小代价值对应的候选节点作为被选择节点。Furthermore, if the prediction mode is an inter-frame prediction mode, the selected node can be determined from the inter-frame candidate node set. The selected node is determined from the inter-frame candidate node set, and different candidate nodes can be selected using the RDO method. In a specific embodiment, it can be: the cost of each candidate node in the inter-frame candidate node set is calculated using the rate-distortion cost method to determine the cost value of at least one candidate node; the minimum cost value is selected from these cost values, and then the candidate node corresponding to the minimum cost value is used as the selected node.

这样,在从帧间候选节点集合中确定出被选择节点之后,可以根据被选择节点在帧间候选节点集合中的索引位置,进而确定出当前节点的帧间预测模式值。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.

S2202:根据帧间预测模式值,确定至少一个模式标识信息的取值。S2202: Determine a value of at least one mode identification information according to the inter-frame prediction mode value.

需要说明的是,在本申请实施例中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;其中,i为大于或等于0且小于N的整数,N表示帧间预测模式最大值。It should be noted that in the 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.

还需要说明的是,在本申请实施例中,帧间预测模式值可以是从0~N,即最多可以存在N+1种帧间预测模式。其中,第i模式标识信息可以用flagi表示。对于模式标识信息而言,这里最多可以包括N个模式标识信息,具体可以为:flag0、flag1、…、flagN-1。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 at most N+1 inter-frame prediction modes. Among them, the i-th mode identification information can be represented by flagi. For the mode identification information, at most N mode identification information can be included here, specifically: flag0, flag1, ..., flagN-1.

在一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,根据帧间预测模式值,确定至少一个模式标识信息的取值,可以包括: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:

根据帧间预测模式值,确定第i模式标识信息的取值;Determine the value of the i-th mode identification information according to the inter-frame prediction mode value;

若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第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, 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;

若第i模式标识信息指示当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。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.

需要说明的是,在本申请实施例中,如果第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,那么结束确定模式标识信息的操作,可以将第0模式标识信息,第1模式标识信息,…,第i模式标识信息等i+1个模式标识信息作为至少一个模式标识信息;如果第i模式标识信息指示当前节点的帧间预测模式值大于i,那么i=i+1,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,此时结束确定模式标识信息的操作。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.

示例性地,首先判断当前节点的帧间预测模式值是否大于0,并且确定flag0的取值;如果帧间预测模式值不大于0,则结束确定模式标识信息的操作,此时至少一个模式标识信息包括flag0;如果帧间预测模式值大于0,则继续判断当前节点的帧间预测模式值是否大于1,并且确定flag1的取值;如果帧间预测模式值不大于1,则结束确定模式标识信息的操作,此时至少一个模式标识信息可以包括flag0和flag1;如果帧间预测模式值大于1,则继续判断当前节点的帧间预测模式值是否大于2,并且确定flag2的取值;以此类推,如果帧间预测模式值大于M-1,则继续判断当前节点的帧间预测模式值是否大于M,并且确定flagM的取值,此时至少一个模式标识信息可以包括flag0、flag1、…、flagM;其中,M为大于或等于0且小于N的整数。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, then end the operation of determining the mode identification information, and at least one mode identification information includes flag0; if the inter-frame prediction mode value is greater than 0, then 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, then end the operation of determining the mode identification information, and at least one mode identification information may include flag0 and flag1; if the inter-frame prediction mode value is greater than 1, then 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, then 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 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.

在一些实施例中,根据帧间预测模式值,确定第i模式标识信息的取值,可以包括:In some embodiments, determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:

若帧间预测模式值小于或等于i,则确定第i模式标识信息的取值为第一值;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;

若帧间预测模式值大于i,则确定第i模式标识信息的取值为第二值。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.

在本申请实施例中,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第i模式标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取 值,这里对此不作具体限定。In the embodiment of the present application, the first value is different from the second value, 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, no specific limitation is made here.

示例性地,对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true;但是这里并不作具体限定。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.

在本申请实施例中,以写入码流中的flagi为例,假设第一值设置为0,第二值设置为1,这时候如果当前节点的帧间预测模式值小于或等于i,那么可以确定flagi的取值为0;如果当前节点的帧间预测模式值大于i,那么可以确定flagi的取值为1。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.

在另一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,根据帧间预测模式值,确定至少一个模式标识信息的取值,可以包括: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:

根据帧间预测模式值,确定第i模式标识信息的取值;Determine the value of the i-th mode identification information according to the inter-frame prediction mode value;

若第i模式标识信息指示当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;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 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;

若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。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, 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.

需要说明的是,在本申请实施例中,如果第i模式标识信息指示当前节点的帧间预测模式值等于i,那么结束确定模式标识信息的操作,可以将第0模式标识信息,第1模式标识信息,…,第i模式标识信息等i+1个模式标识信息作为至少一个模式标识信息;如果第i模式标识信息指示当前节点的帧间预测模式值不等于i,那么i=i+1,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i,此时结束确定模式标识信息的操作。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.

示例性地,首先判断当前节点的帧间预测模式值是否等于0,并且确定flag0的取值;如果帧间预测模式值等于0,则结束确定模式标识信息的操作,此时至少一个模式标识信息包括flag0;如果帧间预测模式值不等于0,则继续判断当前节点的帧间预测模式值是否等于1,并且确定flag1的取值;如果帧间预测模式值等于1,则结束确定模式标识信息的操作,此时至少一个模式标识信息可以包括flag0和flag1;如果帧间预测模式值不等于1,则继续判断当前节点的帧间预测模式值是否等于2,并且确定flag2的取值;以此类推,如果帧间预测模式值不等于M-1,则继续判断当前节点的帧间预测模式值是否等于M,并且确定flagM的取值,此时至少一个模式标识信息可以包括flag0、flag1、…、flagM;其中,M为大于或等于0且小于N的整数。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, and 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, and 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; by analogy, 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, and 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.

在一些实施例中,根据帧间预测模式值,确定第i模式标识信息的取值,可以包括:In some embodiments, determining the value of the i-th mode identification information according to the inter-frame prediction mode value may include:

若帧间预测模式值不等于i,则确定第i模式标识信息的取值为第一值;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;

若帧间预测模式值等于i,则确定第i模式标识信息的取值为第二值。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 the second value.

在本申请实施例中,第一值与第二值可以不同。In the embodiment of the present application, the first value and the second value may be different.

示例性地,以写入码流中的flagi为例,假设第一值设置为0,第二值设置为1,这时候如果当前节点的帧间预测模式值不等于i,那么可以确定flagi的取值为0;如果当前节点的帧间预测模式值等于i,那么可以确定flagi的取值为1。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.

S2203:对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。S2203: Encode the value of at least one mode identification information, and write the obtained coded bits into the bit stream.

需要说明的是,在本申请实施例中,在得到至少一个模式标识信息的取值之后,编码端需要将这至少一个模式标识信息的取值写入码流;这样,后续在解码端,通过解码码流即可获得这至少一个模式标识信息的取值。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.

在一些实施例中,对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,可以包括:基于第一编码模式对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。In some embodiments, encoding the value of at least one mode identification information and writing the obtained coded bits into the bitstream may include: encoding the value of at least one mode identification information based on the first coding mode and writing the obtained coded bits into the bitstream.

在本申请实施例中,第一编码模式至少可以包括下述之一:固定上下文信息的编码模式、自适应上下文信息的编码模式和不使用上下文信息的编码模式。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.

也就是说,在本申请实施例中,对于至少一个模式标识信息的取值,可以使用固定上下文信息的编码模式进行编码处理,或者也可以使用自适应上下文信息的编码模式进行编码处理,或者还可以使用不使用上下文信息的编码模式进行进行编码处理,在此不作具体限定。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 herein.

示例性地,对于第i模式标识信息的取值,可以使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagi,将所得到的编码比特写入码流。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 using context information can be used to encode flagi, and the obtained coded bits can be written into the bitstream.

在一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,可以包括: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 encoding bits into the bitstream may include:

若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则对第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, then the value of the i-th mode identification information is Encoding is performed, and the obtained coded bits are written into a bit stream;

若第i模式标识信息指示当前节点的帧间预测模式值大于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。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.

需要说明的是,在本申请实施例中,首先对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流,并且判断当前节点的帧间预测模式值是否小于或等于i;如果第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则结束编码操作;如果第i模式标识信息指示当前节点的帧间预测模式值大于i,则执行i=i+1,然后继续对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流,并且继续判断当前节点的帧间预测模式值是否小于或等于i,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,此时结束编码操作。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 bitstream, 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 continuously encoded, the obtained coding bits are written into the bitstream, and it is continuously determined 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.

示例性地,首先使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag0的取值,并且判断当前节点的帧间预测模式值是否大于0;如果帧间预测模式值不大于0,则结束编码操作;如果帧间预测模式值大于0,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag1的取值,并且判断当前节点的帧间预测模式值是否大于1;如果帧间预测模式值不大于1,则结束编码操作;如果帧间预测模式值大于1,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag2的取值,并且判断当前节点的帧间预测模式值是否大于2;以此类推,如果帧间预测模式值大于M-1,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagM的取值,并且判断当前节点的帧间预测模式值是否大于M,如果帧间预测模式值不大于M,则结束编码操作;其中,M为大于或等于0且小于N的整数。Exemplarily, firstly, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is used to encode the value of flag0, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is greater than 0, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flag1, and it is determined 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 ... If the mode value is greater than 1, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flag2, and it is determined 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, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without context information is continued to be used to encode the value of flagM, and it is determined 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, the encoding operation is terminated; where M is an integer greater than or equal to 0 and less than N.

在一种具体的实施例中,在i等于N-1时,该方法还可以包括:In a specific embodiment, when i is equal to N-1, the method may further include:

根据帧间预测模式值,确定第N-1模式标识信息的取值;Determine the value of the N-1th mode identification information according to the inter-frame prediction mode value;

对第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.

进一步地,在一些实施例中,根据帧间预测模式值,确定第N-1模式标识信息的取值,可以包括:Further, in some embodiments, determining the value of the N-1th mode identification information according to the inter-frame prediction mode value may include:

若帧间预测模式值小于或等于N-1,则确定第N-1模式标识信息的取值为第一值;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;

若帧间预测模式值等于N,则确定第N-1模式标识信息的取值为第二值。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.

需要说明的是,在本申请实施例中,对于N+1种帧间预测模式,其对应的模式标识信息最多有N个,即:第0模式标识信息flag0、第1模式标识信息flag1、…、第N-1模式标识信息flagN-1。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.

还需要说明的是,在本申请实施例中,可以使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagi的取值,并且判断当前节点的帧间预测模式值是否大于i;如果帧间预测模式值不大于i,则结束编码操作;如果帧间预测模式值大于i,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagi+1的取值,并且判断当前节点的帧间预测模式值是否大于i+1。其中,i为大于或等于0且小于N-1的整数。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 be used 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.

如此,在i等于N-1时,仍可以使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagN-1的取值,并且判断当前节点的帧间预测模式值是否大于N-1;如果帧间预测模式值不大于N-1,则结束编码操作,即帧间预测模式值等于N-1;如果帧间预测模式值大于N-1,则结束编码操作,即帧间预测模式值等于N。In this way, when i is equal to N-1, the encoding mode of fixed context information/the encoding mode of adaptive context information/the encoding mode without using 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 encoding 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 encoding operation is terminated, that is, the inter-frame prediction mode value is equal to N.

在另一种具体的实施例中,如果当前节点的帧间预测模式值大于M时,还可以使用指数哥伦布进行编码。在一些实施例中,在i等于M时,该方法还可以包括:In another specific embodiment, if the inter-frame prediction mode value of the current node is greater than M, Exponential Golomb encoding may also be used. In some embodiments, when i is equal to M, the method may further include:

若第M模式标识信息指示当前节点的帧间预测模式值大于M,则根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第一帧间预测模式剩余值;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;

基于第二编码模式对当前节点的第一帧间预测模式剩余值进行编码,将所得到的编码比特写入码流。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.

在本申请实施例中,M+1个模式标识信息可以包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。In an embodiment of the present application, M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.

在本申请实施例中,第二编码模式可以为指数哥伦布的编码方式,例如K阶指数哥伦布的编码方式。其中,K阶指数哥伦布是一种无损数据压缩方法,可以达到很高的编码效率;因此,为了提高编码效率,在当前节点的帧间预测模式值大于M时,这时候可以使用指数哥伦布的编码方式对第一帧间预测模式剩余值进行编码处理。In the 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 is a lossless data compression method that can achieve very high coding efficiency; therefore, in order 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.

也就是说,对于编码端,首先使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flag0,如果flag0的取值指示当前节点的帧间预测模式值小于或等于0,则结束编码操作;如果flag0的取值指示当前节点的帧间预测模式值大于0,则使用固定上下文信息的 编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flag1;依次类推,使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flagM;如果flagM的取值指示当前节点的帧间预测模式值小于或等于M,则结束编码操作;如果flagM的取值指示当前节点的帧间预测模式值大于M,则需要根据M+1个模式标识信息的取值来计算第一帧间预测模式剩余值,然后使用指数哥伦布的编码方式对第一帧间预测模式剩余值进行编码处理。That is to say, for the encoding end, first use the fixed context information encoding mode/adaptive context information encoding mode/no context information encoding mode 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, the fixed context information is used. Encode flag1 in the coding mode/coding mode with adaptive context information/coding mode without using context information; and so on, encode flagM in the coding mode with fixed context information/coding mode with adaptive context information/coding mode without using context information; 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 coding 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.

在一些实施例中,根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第一帧间预测模式剩余值,可以包括:根据帧间预测模式值与M+1个模式标识信息的取值进行减法运算,确定当前节点的第一帧间预测模式剩余值。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.

在本申请实施例中,在得到flag0、flag1、…、flagM等M+1个模式标识信息的取值之后,假定当前节点的帧间预测模式值用inter mode表示,第一帧间预测模式剩余值用residual mode1表示,那么residual mode1的计算公式,可以如下所示:
residual mode1=inter mode-(flag0+flag1+…+flagM)           (24)
In the embodiment of the present application, after obtaining the values of M+1 mode identification information such as flag0, flag1, ..., flagM, it is assumed 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, then the calculation formula of residual mode1 can be as follows:
residual mode1=inter mode-(flag0+flag1+…+flagM) (24)

在一些实施例中,根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第一帧间预测模式剩余值,可以包括:根据帧间预测模式值与(M+1)进行减法运算,确定当前节点的第一帧间预测模式剩余值。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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,也就是说,当flagi的取值为1时,确定当前节点的帧间预测模式值大于i,这时候需要继续执行编码操作。因此,如果当前节点的帧间预测模式值大于M,此时flag0、flag1、…、flagM的取值均等于1,那么第一帧间预测模式剩余值residual mode1的计算公式,也可以如下所示:
residual mode1=inter mode-(M+1)                  (25)
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)

在另一种可能的实现方式中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,可以包括: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 encoding bits into the bitstream may include:

若第i模式标识信息指示当前节点的帧间预测模式值等于i,则对第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 value of the i-th mode identification information is encoded, and the obtained encoding bits are written into the bitstream;

若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。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.

需要说明的是,在本申请实施例中,首先对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流,并且判断当前节点的帧间预测模式值是否等于i;如果第i模式标识信息指示当前节点的帧间预测模式值等于i,则结束编码操作;如果第i模式标识信息指示当前节点的帧间预测模式值不等于i,则执行i=i+1,然后继续对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流,并且继续判断当前节点的帧间预测模式值是否等于i,直至第i模式标识信息指示当前节点的帧间预测模式值等于i,此时结束编码操作。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 bitstream, 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 continuously encoded, the obtained coding bits are written into the bitstream, and it is continuously determined 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.

示例性地,首先使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag0的取值,并且判断当前节点的帧间预测模式值是否等0;如果帧间预测模式值等于0,则结束编码操作;如果帧间预测模式值不等于0,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag1的取值,并且判断当前节点的帧间预测模式值是否等于1;如果帧间预测模式值等于1,则结束编码操作;如果帧间预测模式值不等于1,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flag2的取值,并且判断当前节点的帧间预测模式值是否等于2;以此类推,如果帧间预测模式值不等于M-1,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagM的取值,并且判断当前节点的帧间预测模式值是否等于M,如果帧间预测模式值等于M,则结束编码操作;其中,M为大于或等于0且小于N的整数。Exemplarily, firstly, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using context information is used to encode the value of flag0, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is not equal to 0, the coding mode of fixed context information/the coding mode of adaptive context information/the coding mode without using context information is continued to encode the value of flag1, and it is determined 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, the encoding operation is terminated; if the inter-frame prediction mode value is equal to 1, the encoding operation is terminated; 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 using 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 using 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.

在一种具体的实施例中,在i等于N-1时,该方法还可以包括:In a specific embodiment, when i is equal to N-1, the method may further include:

根据帧间预测模式值,确定第N-1模式标识信息的取值;Determine the value of the N-1th mode identification information according to the inter-frame prediction mode value;

对第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream.

进一步地,在一些实施例中,根据帧间预测模式值,确定第N-1模式标识信息的取值,可以包括:Further, in some embodiments, determining the value of the N-1th mode identification information according to the inter-frame prediction mode value may include:

若帧间预测模式值等于N,则确定第N-1模式标识信息的取值为第一值;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;

若帧间预测模式值等于N-1,则确定第N-1模式标识信息的取值为第二值。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.

需要说明的是,在本申请实施例中,对于N+1种帧间预测模式,其对应的模式标识信息最多有N个,即:第0模式标识信息flag0、第1模式标识信息flag1、…、第N-1模式标识信息flagN-1。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.

还需要说明的是,在本申请实施例中,可以使用固定上下文信息的编码模式/自适应上下文信息的 编码模式/不使用上下文信息的编码模式进行编码flagi的取值,并且判断当前节点的帧间预测模式值是否等于i;如果帧间预测模式值等于i,则结束编码操作;如果帧间预测模式值不等于i,则继续使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagi+1的取值,并且判断当前节点的帧间预测模式值是否等于i+1。其中,i为大于或等于0且小于N-1的整数。It should also be noted that in the embodiment of the present application, the coding mode of fixed context information/adaptive context information can be used. The encoding mode/coding mode without context information is used to encode the value of flagi, and it is determined 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 with fixed context information/coding mode with adaptive context information/coding mode without context information is continued to encode the value of flagi+1, and it is determined whether the inter-frame prediction mode value of the current node is equal to i+1. Among them, i is an integer greater than or equal to 0 and less than N-1.

如此,在i等于N-1时,仍可以使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式进行编码flagN-1的取值,并且判断当前节点的帧间预测模式值是否等于N-1;如果帧间预测模式值等于N-1,则结束编码操作,即帧间预测模式值等于N-1;如果帧间预测模式值不等于N-1,则结束编码操作,即帧间预测模式值等于N。In this way, when i is equal to N-1, the coding mode of fixed context information/coding mode of adaptive context information/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.

在另一种具体的实施例中,在这种实现方式下,如果当前节点的帧间预测模式值不等于M时,也可以使用指数哥伦布进行编码。在一些实施例中,在i等于M时,该方法还可以包括:In another specific embodiment, in this implementation, if the inter-frame prediction mode value of the current node is not equal to M, Exponential Golomb encoding may also be used. In some embodiments, when i is equal to M, the method may further include:

若第M模式标识信息指示当前节点的帧间预测模式值不等于M,则根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第二帧间预测模式剩余值;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;

基于第二编码模式对当前节点的第二帧间预测模式剩余值进行编码,将所得到的编码比特写入码流。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.

在本申请实施例中,M+1个模式标识信息可以包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。In an embodiment of the present application, M+1 mode identification information may include: 0th mode identification information, 1st mode identification information, ..., Mth mode identification information; M is an integer greater than or equal to 0 and less than N.

在本申请实施例中,第二编码模式可以为指数哥伦布的编码方式,例如K阶指数哥伦布的编码方式。其中,K阶指数哥伦布是一种无损数据压缩方法,可以达到很高的编码效率;因此,为了提高编码效率,在当前节点的帧间预测模式值不等于M时,这时候可以使用指数哥伦布的编码方式对第二帧间预测模式剩余值进行编码处理。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 is a lossless data compression method that can achieve very high coding efficiency; therefore, in order 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.

也就是说,对于编码端,首先使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flag0,如果flag0的取值指示当前节点的帧间预测模式值等于0,则结束编码操作;如果flag0的取值指示当前节点的帧间预测模式值不等于0,则使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flag1;依次类推,使用固定上下文信息的编码模式/自适应上下文信息的编码模式/不使用上下文信息的编码模式编码flagM;如果flagM的取值指示当前节点的帧间预测模式值等于M,则结束编码操作;如果flagM的取值指示当前节点的帧间预测模式值不等于M,则需要根据M+1个模式标识信息的取值来计算第二帧间预测模式剩余值,然后使用指数哥伦布的编码方式对第二帧间预测模式剩余值进行编码处理。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 using 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 using 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 using 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.

在一些实施例中,根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第二帧间预测模式剩余值,可以包括:对M+1个模式标识信息的取值进行取非操作,确定M+1个模式标识信息的取非值;根据帧间预测模式值与M+1个模式标识信息的取非值进行减法运算,确定当前节点的第二帧间预测模式剩余值。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 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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,也就是说,当flagi的取值为0时,确定当前节点的帧间预测模式值不等于i,这时候需要继续执行编码操作。这样,在得到flag0、flag1、…、flagM等M+1个模式标识信息的取值之后,需要对这M+1个模式标识信息的取值进行取非操作,以使得!(flag0)、!(flag1)、…、!(flagM)的取值均等于1;假定当前节点的帧间预测模式值用inter mode表示,第二帧间预测模式剩余值用residual mode2表示,那么residual mode2的计算公式,可以如下所示:
residual mode2=inter mode-(!(flag0)+!(flag1)+…+!(flagM))     (26)
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. 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 shown as follows:
residual mode2=inter mode-(!(flag0)+!(flag1)+…+!(flagM)) (26)

在一些实施例中,根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第二帧间预测模式剩余值,可以包括:根据帧间预测模式值与(M+1)进行减法运算,确定当前节点的第二帧间预测模式剩余值。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.

在本申请实施例中,假定第一值设置为0,第二值设置为1,此时!(flag0)+!(flag1)+…+!(flagM)的取值可以看作是M+1;那么第二帧间预测模式剩余值residual mode2的计算公式,也可以如下所示:
residual mode2=inter mode-(M+1)           (27)
In the embodiment of the present application, assuming that the first value is set to 0 and the second value is set to 1, then 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)

也就是说,在本申请实施例中,根据当前节点的帧间预测模式值,得到至少一个模式标识信息的取值之后,可以使用点云帧间几何信息编码模式进行编码;或者,为了提高编码效率,也可以结合指数哥伦布的编码方式进行编码。That is to say, in an embodiment of the present application, after obtaining the value of at least one mode identification information according to the inter-frame prediction mode value of the current node, the point cloud inter-frame geometric information encoding mode can be used for encoding; or, in order to improve the encoding efficiency, the exponential Golomb encoding method can be combined for encoding.

进一步地,在本申请实施例中,根据帧间候选节点集合确定出被选择节点之后,可以用于确定当前节点的预测残差值。具体地,在一些实施例中,该方法还可以包括:Further, in the embodiment of the present application, after the selected node is determined according to 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 also include:

根据被选择节点,确定当前节点的预测值;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 predicted value of the current node;

根据量化参数对初始残差值进行量化处理,确定当前节点的预测残差值。The initial residual value is quantized according to the quantization parameter to determine the predicted residual value of the current node.

在一种具体的实施例中,根据当前节点的原始值与预测值,确定当前节点的初始残差值,可以包括:根据当前节点的原始值与预测值进行减法运算,确定当前节点的初始残差值。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.

需要说明的是,根据帧间预测模式值所确定的被选择节点,可以确定出当前节点的预测值;然后根据当前节点的原始值与预测值进行作差可以计算出当前节点的预测残差值;根据量化参数对初始残差值进行量化处理,能够得到当前节点的预测残差值。It should be noted that, according to 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.

在一些实施例中,该方法还可以包括:对当前节点的预测残差值进行编码,将所得到的编码比特写入码流。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.

在一些实施例中,该方法还可以包括:对量化参数进行编码,将所得到的编码比特写入码流。In some embodiments, the method may further include: encoding the quantization parameter, and writing the obtained encoded bits into a bitstream.

示例性地,以几何位置信息为例,首先确定当前节点的几何预测值;然后根据当前节点的几何位置信息与几何预测值进行求差运算,得到几何预测残差;并且利用量化参数对几何预测残差进行量化。最终通过不断迭代,对预测树中每一节点位置信息的帧间预测模式值、预测残差、预测树结构以及量化参数等参数进行编码,将所得到的编码比特写入码流。For example, taking the geometric position information as an example, the geometric prediction value of the current node is first determined; then the difference operation is performed based on the geometric position information of the current node and the geometric prediction value to obtain the geometric prediction residual; and the geometric prediction residual is quantized using the quantization parameter. Finally, through continuous iteration, the inter-frame prediction mode value, prediction residual, prediction tree structure, quantization parameter and other parameters of each node position information in the prediction tree are encoded, and the obtained coded bits are written into the bitstream.

进一步地,在本申请实施例中,该编码方法主要是针对帧间预测模式值进行编码优化的,这里还可以先通过一个标志位来确定当前节点使用是否帧间预测模式。因此,在一些实施例中,该方法还可以包括:Further, in the embodiment of the present application, the encoding method is mainly for encoding optimization of the inter-frame prediction mode value, and 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:

确定第一标识信息的取值;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.

进一步地,对于第一标识信息而言,在一些实施例中,确定第一标识信息的取值,可以包括:Further, for the first identification information, in some embodiments, determining the value of the first identification information may include:

若第一标识信息指示当前节点不使用帧间预测模式,则确定第一标识信息的取值为第三值;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 the fourth value.

需要说明的是,在本申请实施例中,第三值与第四值不同,而且第三值和第四值可以是参数形式,也可以是数字形式。具体地,第一标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。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.

示例性地,对于第三值和第四值而言,第三值可以设置为1,第四值可以设置为0;或者,第三值可以设置为0,第四值可以设置为1;或者,第三值可以设置为true,第四值可以设置为false;或者,第三值可以设置为false,第四值可以设置为true;但是这里并不作具体限定。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.

进一步地,在一些实施例中,该方法还可以包括:对第一标识信息的取值进行编码,将所得到的编码比特写入码流。Furthermore, in some embodiments, the method may further include: encoding the value of the first identification information, and writing the obtained encoded bits into a bit stream.

还需要说明的是,在本申请实施例中,以写入码流中的flag为例,假设第三值设置为0,第四值设置为1,这时候如果第一标识信息的取值为0,那么可以确定当前节点不使用帧间预测模式,即无需执行本申请实施例所述的编码方法;如果第一标识信息的取值为1,那么可以确定当前节点使用帧间预测模式,即需要执行本申请实施例所述的编码方法。这样,后续在解码端,通过解码获得第一标识信息的取值,就可以确定当前节点是否使用帧间预测模式,从而提高解码效率。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 decoding end, by decoding to obtain the value of the first identification information, it can be determined whether the current node uses the inter-frame prediction mode, thereby improving the decoding efficiency.

进一步地,在本申请实施例中,这里还可以设置一个标志位来确定是否启用本申请实施例的解码方法。因此,在一些实施例中,该方法还可以包括: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:

确定第二标识信息的取值;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.

进一步地,对于第二标识信息而言,在一些实施例中,确定第二标识信息的取值,可以包括:Further, for the second identification information, in some embodiments, determining the value of the second identification information may include:

若第二标识信息指示当前节点不启用目标帧间编码方式,则确定第二标识信息的取值为第五值;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, the value of the second identification information is determined to be the sixth value.

需要说明的是,在本申请实施例中,第五值与第六值不同,而且第五值与第六值可以是参数形式,也可以是数字形式。具体地,第二标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。It should be noted that, in the embodiment of the present application, the fifth value is different from the sixth value, 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 value of a flag, which is not specifically limited here.

示例性地,对于第五值与第六值而言,第五值可以设置为1,第六值可以设置为0;或者,第五值可以设置为0,第六值可以设置为1;或者,第五值可以设置为true,第六值可以设置为false;或者,第五值可以设置为false,第六值可以设置为true;但是这里并不作具体限定。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 no specific limitation is made here.

进一步地,在一些实施例中,该方法还可以包括:对第二标识信息的取值进行编码,将所得到的编码比特写入码流。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 bit stream.

还需要说明的是,在本申请实施例中,以写入码流中的flag为例,假设第五值设置为0,第六值设置为1,这时候如果第二标识信息的取值为0,那么可以确定当前节点不启用目标帧间编码方式,即无 需执行本申请实施例所述的编码方法;如果第二标识信息的取值为1,那么可以确定当前节点启用目标帧间编码方式,即需要执行本申请实施例所述的编码方法。这样,后续在解码端,通过解码也可以直接获得第二标识信息的取值,就可以确定当前节点是否启用目标帧间编码方式,从而提高解码效率。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 fifth value is set to 0 and the sixth value is set to 1, if the value of the second identification information is 0, it can be determined that the current node does not enable the target inter-frame coding mode, that is, no The encoding method described in the embodiment of the present application needs to be executed; if the value of the second identification information is 1, it can be determined that the current node enables the target inter-frame coding method, that is, the encoding method described in the embodiment of the present application needs to be executed. In this way, the value of the second identification information can be directly obtained by 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.

简单来说,在本申请实施例中,这里可以使用一个1比特标志位(即第二标识信息)来表示目标帧间编码方式开启与否。这个标志位可以被放在高层语法元素的头信息中,例如geometry header中;而且这个标志位在一些特定条件下可以有条件的开启,如果这个标志位不出现在码流中,那么其默认值为一个固定的值。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 coding 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.

在本申请的又一实施例中,本申请实施例还提供了一种码流,码流是根据待编码信息进行比特编码生成的;其中,待编码信息可以包括下述至少一项:In another embodiment of the present application, the embodiment of the present application further provides a code stream, which is generated by bit encoding according to the information to be encoded; wherein the information to be encoded may include 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.

在本申请实施例中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值。另外,第一标识信息用于指示当前节点是否使用帧间预测模式,第二标识信息用于指示当前节点是否启用目标帧间编码/解码方式。In the 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, and 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.

这样,编码端在确定这些待编码信息之后,可以对待编码信息进行编码,并将所得到的编码比特写入码流,然后由编码端传输到解码端。后续在解码端,通过解码码流,就可以获得至少一个模式标识信息的取值和当前节点的帧间预测模式剩余值等信息,从而能够直接确定当前节点的帧间预测模式值。In this way, after determining the information to be encoded, the encoder can encode the information to be encoded and write the obtained encoded bits into the bitstream, which is then transmitted from the encoder to the decoder. Later, at the decoder, by decoding the bitstream, the value of at least one mode identification information and the residual value of the inter-frame prediction mode of the current node can be obtained, so that the inter-frame prediction mode value of the current node can be directly determined.

本实施例提供了一种编码方法,首先确定当前节点的帧间预测模式值;然后根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;最后对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。这样,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值确定至少一个模式标识信息的取值,然后对这至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。This embodiment provides a coding method, first determining the inter-frame prediction mode value of the current node; then determining the value of at least one mode identification information according to the inter-frame prediction mode value; 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; finally, encoding the value of at least one mode identification information, and writing the obtained coded bit into the bitstream. 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, so that the frequency distribution of the inter-frame prediction mode is taken into account, that is, the more likely the inter-frame prediction mode is to appear, the more forward the corresponding inter-frame prediction mode value is, so that the number of coding bits can be reduced, the bit rate can be saved, and the encoding and decoding efficiency can be improved.

在本申请的又一实施例中,基于前述实施例所述的编码/解码方法,这里主要是针对帧间预测树的预测模式进行改进。其中,在编码端,编码预测模式的具体表现为: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:

首先,编码一个标志位代表是否采用帧间预测的方案;First, encode a flag bit to indicate whether to use the inter-frame prediction scheme;

其次,编码帧间预测模式值。相关技术采用的方案是对帧间预测模式数字转化为二进制直接编码。Secondly, the inter-frame prediction mode value is encoded. The solution adopted by the related art is to convert the inter-frame prediction mode digital into binary and encode it directly.

另外,在解码端,解码预测模式的具体表现为:In addition, at the decoding end, the specific performance of the decoding prediction mode is:

首先,解码一个标志位代表是否采用帧间预测的方案;First, decode a flag bit to indicate whether to use the inter-frame prediction scheme;

其次,解码帧间预测模式值。Next, the inter prediction mode value is decoded.

由于相关技术只是直接对编码帧间预测模式值(inter mode)拆分成二进制来进行直接编码,并没有考虑到不同的帧间预测模式数出现的频率问题,这样会导致编码帧间预测模式值的性能不是最优的。基于此,这里设计了一种对于inter mode的编码模式,考虑到了帧间编码模式的频率分布,越容易出现的inter mode越靠前,这样可以减少编码比特数,达到提升压缩效率的目的。Since the related technology only directly splits the coded inter-frame prediction mode value (inter mode) into binary for direct coding, and does not take into account the frequency of different inter-frame prediction mode numbers, this will result in suboptimal performance of the coded inter-frame prediction mode value. Based on this, a coding mode for inter-mode is designed here, taking into account the frequency distribution of inter-frame coding modes. The more likely inter-mode to appear, the more it is placed in the front, which can reduce the number of coding bits and achieve the purpose of improving compression efficiency.

在本申请实施例中,本技术提出的tool可以用一个1比特标志位来表示开启与否,这个标志位被放在高层语法元素的头信息中,比如geometry header中,而且这个标志位在一些特定条件下有条件的开启,如果这个标志位不出现在码流中,其默认值为一个固定的值。同理在解码端需要解码该标志位,如果这个标志位不出现在码流中,那么可以不解码,其默认值为一个固定的值。In the embodiment of the present application, the tool proposed by the present technology can use a 1-bit flag to indicate whether it is enabled or not. This flag is placed in the header information of the high-level syntax element, such as the geometry header, and this flag is conditionally enabled under certain conditions. If this flag does not appear in the bitstream, its default value is a fixed value. Similarly, the flag needs to be decoded at the decoding end. If this flag does not appear in the bitstream, it can be decoded without decoding, and its default value is a fixed value.

在一种可能的实现方式中,本技术是针对帧间预测模式值(或称为“帧间预测模式数”,用inter mode表示)进行设计编解码的方案:In one possible implementation, the present technology is to design a coding and decoding scheme for the inter-frame prediction mode value (or "inter-frame prediction mode number", represented by inter mode):

在一种具体的实施例中,flagx代表inter mode是否大于x,如果是,那么flagx为1(即inter mode大于x,此时继续向下处理);如果不是,那么flagx为0(即inter mode不大于x,此时结束编码)。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).

对于编码端而言,输入为inter mode,默认为从0~N,即最多有N+1种的inter mode。具体过程如下: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:

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag0表示该inter mode是否大于0;如果否,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag0 to indicate whether the inter mode is greater than 0; if not, end the encoding.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否大于 1;如果否,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag1 to indicate whether the inter mode is greater than 1; if not, end encoding.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagN-1表示该inter mode是否大于N-1;结束编码。Use fixed context/no context/adaptive context to encode a flag flagN-1 to indicate whether the inter mode is greater than N-1; end encoding.

对于解码端而言,具体过程如下:For the decoding end, the specific process is as follows:

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag0表示该inter mode是否大于0;如果否,则结束解码,此时inter mode为0。Using fixed context/no context/adaptive context decoding, a flag flag0 indicates whether the inter mode is greater than 0; if not, the decoding is terminated and the inter mode is 0.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否大于1;如果否,则结束解码,此时inter mode为1。A flag flag1 is encoded using 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.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagN-1表示该inter mode是否大于N-1;如果否,则结束解码,此时inter mode为N-1;如果是,则结束解码,此时inter mode为N。A flag flagN-1 is encoded using 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.

在另一种具体的实施例中,flagx代表inter mode是否等于x,如果不是,那么flagx为0(即inter mode不等于x,此时继续向下处理);如果是,那么flagx为1(即inter mode等于x,此时结束编码)。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 the processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and the encoding ends).

对于编码端而言,输入为inter mode,默认为从0~N,即最多有N+1种的inter mode。具体过程如下: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:

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag0表示该inter mode是否等于0;如果是,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag0 to indicate whether the inter mode is equal to 0; if so, end the encoding.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否等于1;如果是,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag1 to indicate whether the inter mode is equal to 1; if so, end the encoding.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagN-1表示该inter mode是否等于N-1;结束编码。Use fixed context/no context/adaptive context to encode a flag flagN-1 to indicate whether the inter mode is equal to N-1; end encoding.

对于解码端而言,具体过程如下:For the decoding end, the specific process is as follows:

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag0表示该inter mode是否等于0;如果是,则结束解码,此时inter mode为0。Using fixed context/no context/adaptive context decoding, a flag flag0 indicates whether the inter mode is equal to 0; if so, the decoding is terminated and the inter mode is 0.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否等于1;如果是,则结束解码,此时inter mode为1。A flag flag1 is encoded using 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.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagN-1表示该inter mode是否等于N-1;如果是,则结束解码,此时inter mode为N-1;如果否,则结束解码,此时inter mode为N。A flag flagN-1 is encoded using fixed context/no context/adaptive context to indicate whether the inter mode is equal to N-1; if so, decoding is terminated, and the inter mode is N-1; if not, decoding is terminated, and the inter mode is N.

在另一种可能的实现方式中,本技术是针对帧间预测模式值(或称为“帧间预测模式数”,用inter mode表示)进行设计编解码的哥伦布方案:In another possible implementation, the present technology is a Columbus scheme designed to encode and decode the inter-frame prediction mode value (or "inter-frame prediction mode number", denoted by inter mode):

在一种具体的实施例中,flagx代表inter mode是否大于x,如果是,那么flagx为1(即inter mode大于x,此时继续向下处理);如果不是,那么flagx为0(即inter mode不大于x,此时结束编码)。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).

对于编码端而言,输入为inter mode,默认为从0~N,即最多有N+1种的inter mode。具体过程如下: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:

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag0表示该inter mode是否大于0;如果否,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag0 to indicate whether the inter mode is greater than 0; if not, end the encoding.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否大于1;如果否,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag1 to indicate whether the inter mode is greater than 1; if not, end the encoding.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagM表示该inter mode是否大于M;如果否,则结束编码。Use fixed context/no context/adaptive context to encode a flag flagM to indicate whether the inter mode is greater than M; if not, end the encoding.

如果是,即flagM表示该inter mode大于M,则:If yes, that is, flagM indicates that the inter mode is greater than M, then:

inter mode=inter mode-(M+1);或者,inter mode=inter mode-(M+1); or,

inter mode=inter mode-(flag0+flag1+...+flagM)。inter mode=inter mode-(flag0+flag1+...+flagM).

然后使用K阶指数哥伦布编码inter mode。Then use K-order Exponential Golomb coding inter mode.

对于解码端而言,具体过程如下:For the decoding end, the specific process is as follows:

inter mode初始化为0。inter mode is initialized to 0.

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag0表示该inter mode是否大于0;如果否,则结束解码。 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.

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag1表示该inter mode是否大于1;如果否,则结束解码。Decoding using fixed context/no context/adaptive context uses a flag flag1 to indicate whether the inter mode is greater than 1; if not, decoding ends.

............

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flagM表示该inter mode是否大于M;如果否,则结束解码。Using fixed context/no context/adaptive context decoding, a flag flagM indicates whether the inter mode is greater than M; if not, the decoding is terminated.

如果是,即flagM表示该inter mode大于M,则:If yes, that is, flagM indicates that the inter mode is greater than M, then:

使用K阶指数哥伦布解码inter mode;Use K-order Exponential Columbus decoding inter mode;

最终inter mode=inter mode+flag0+flag1+...flagM。Finally inter mode=inter mode+flag0+flag1+...flagM.

在另一种具体的实施例中,flagx代表inter mode是否等于x,如果不是,那么flagx为0(即inter mode不等于x,此时继续向下处理);如果是,那么flagx为1(即inter mode等于x,此时结束编码)。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 the processing continues downward); if yes, flagx is 1 (i.e., inter mode is equal to x, and the encoding ends).

对于编码端而言,输入为inter mode,默认为从0~N,即最多有N+1种的inter mode。具体过程如下: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:

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag0表示该inter mode是否等于0;如果是,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag0 to indicate whether the inter mode is equal to 0; if so, end the encoding.

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flag1表示该inter mode是否等于1;如果是,则结束编码。Use fixed context/no context/adaptive context to encode a flag flag1 to indicate whether the inter mode is equal to 1; if so, end the encoding.

............

利用固定的上下文/不使用上下文/自适应的上下文编码一个标志位flagM表示该inter mode是否等于M;如果是,则结束编码。Use fixed context/no context/adaptive context to encode a flag flagM to indicate whether the inter mode is equal to M; if so, end the encoding.

如果不是,即flagM表示该inter mode不等于M,则:If not, that is, flagM indicates that the inter mode is not equal to M, then:

inter mode=inter mode-(M+1),或者;inter mode=inter mode-(M+1), or;

inter mode=inter mode-(!(flag0)+!(flag1)+...+!(flagM))。inter mode=inter mode-(!(flag0)+!(flag1)+...+!(flagM)).

然后用K阶指数哥伦布编码inter modeThen use K-order Exponential Columbus coding inter mode

对于解码端而言,具体过程如下:For the decoding end, the specific process is as follows:

inter mode初始化为0。inter mode is initialized to 0.

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag0表示该inter mode是否等于0;如果是,则结束解码。Decoding using fixed context/no context/adaptive context uses a flag flag0 to indicate whether the inter mode is equal to 0; if so, decoding ends.

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flag1表示该inter mode是否等于1;如果是,则结束解码。Decoding using fixed context/no context/adaptive context uses a flag flag1 to indicate whether the inter mode is equal to 1; if so, decoding ends.

............

利用固定的上下文/不使用上下文/自适应的上下文解码一个标志位flagM表示该inter mode是否等于M;如果是,则结束解码。Decoding using fixed context/no context/adaptive context uses a flag flagM to indicate whether the inter mode is equal to M; if so, decoding ends.

如果不是,即flagM表示该inter mode不等于M,则:If not, that is, flagM indicates that the inter mode is not equal to M, then:

使用K阶指数哥伦布解码inter mode;Use K-order Exponential Columbus decoding inter mode;

最终inter mode=inter mode+(!(flag0)+!(flag1)+...!(flagM))。Finally inter mode=inter mode+(!(flag0)+!(flag1)+...!(flagM)).

在本申请实施例中,通过上述实施例对前述实施例的具体实现进行详细阐述,从中可以看出,根据前述实施例的技术方案,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值来确定至少一个模式标识信息的取值,然后对这至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。In the embodiments of the present application, the specific implementation of the aforementioned embodiments is elaborated in detail through the above embodiments, from which it can be seen that according to the technical scheme 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.

在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图24,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图24所示,该编码器240可以包括:第一确定单元2401和编码单元2402;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, see FIG24, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in FIG24, the encoder 240 may include: a first determination unit 2401 and an encoding unit 2402; wherein,

第一确定单元2401,配置为确定当前节点的帧间预测模式值;A first determining unit 2401 is configured to determine an inter-frame prediction mode value of a current node;

第一确定单元2401,还配置为根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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 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;

编码单元2402,配置为对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。The encoding unit 2402 is configured to encode the value of at least one mode identification information and write the obtained encoding bits into the bit stream.

在一些实施例中,编码单元2402,还配置为基于第一编码模式对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。 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 bit stream.

在一些实施例中,第一编码模式至少包括下述之一:固定上下文信息的编码模式、自适应上下文信息的编码模式和不使用上下文信息的编码模式。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.

在一些实施例中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,第一确定单元2401,还配置为根据帧间预测模式值,确定第i模式标识信息的取值;以及若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;若第i模式标识信息指示当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。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 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 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.

在一些实施例中,第一确定单元2401,还配置为若帧间预测模式值小于或等于i,则确定第i模式标识信息的取值为第一值;若帧间预测模式值大于i,则确定第i模式标识信息的取值为第二值。In some embodiments, the first determination unit 2401 is further configured to determine that the value of the i-th mode identification information is a 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 a second value.

在一些实施例中,编码单元2402,还配置为若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;若第i模式标识信息指示当前节点的帧间预测模式值大于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。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.

在一些实施例中,第一确定单元2401,还配置为在i等于N-1时,根据帧间预测模式值,确定第N-1模式标识信息的取值;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;

编码单元2402,还配置为对第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The encoding unit 2402 is further configured to encode the value of the N-1th mode identification information and write the obtained coded bits into the bit stream.

在一些实施例中,第一确定单元2401,还配置为若帧间预测模式值小于或等于N-1,则确定第N-1模式标识信息的取值为第一值;若帧间预测模式值等于N,则确定第N-1模式标识信息的取值为第二值。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.

在一些实施例中,第一确定单元2401,还配置为在i等于M时,若第M模式标识信息指示当前节点的帧间预测模式值大于M,则根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第一帧间预测模式剩余值;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 M+1 mode identification information if the Mth mode identification information indicates that the inter-frame prediction mode value of the current node is greater than M;

编码单元2402,还配置为基于第二编码模式对当前节点的第一帧间预测模式剩余值进行编码,将所得到的编码比特写入码流;其中,M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。The encoding unit 2402 is also configured to encode the residual value of the first inter-frame prediction mode of the current node based on the second encoding mode, and write the obtained encoding bits into the bit stream; 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.

在一些实施例中,第一确定单元2401,还配置为根据帧间预测模式值与M+1个模式标识信息的取值进行减法运算,确定当前节点的第一帧间预测模式剩余值。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.

在一些实施例中,第一确定单元2401,还配置为根据帧间预测模式值与(M+1)进行减法运算,确定当前节点的第一帧间预测模式剩余值。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.

在一些实施例中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,第一确定单元2401,还配置为根据帧间预测模式值,确定第i模式标识信息的取值;以及若第i模式标识信息指示当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。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.

在一些实施例中,第一确定单元2401,还配置为若帧间预测模式值不等于i,则确定第i模式标识信息的取值为第一值;若帧间预测模式值等于i,则确定第i模式标识信息的取值为第二值。In some embodiments, the first determination unit 2401 is further configured to determine the value of the i-th mode identification information as 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 the value of the i-th mode identification information as the second value.

在一些实施例中,编码单元2402,还配置为若第i模式标识信息指示当前节点的帧间预测模式值等于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则对第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据帧间预测模式值,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。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.

在一些实施例中,第一确定单元2401,还配置为在i等于N-1时,根据帧间预测模式值,确定第N-1模式标识信息的取值;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;

编码单元2402,还配置为对第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The encoding unit 2402 is further configured to encode the value of the N-1th mode identification information and write the obtained coded bits into the bit stream.

在一些实施例中,第一确定单元2401,还配置为若帧间预测模式值等于N,则确定第N-1模式标识信息的取值为第一值;若帧间预测模式值等于N-1,则确定第N-1模式标识信息的取值为第二值。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.

在一些实施例中,第一确定单元2401,还配置为在i等于M时,若第M模式标识信息指示当前节点的帧间预测模式值不等于M,则根据帧间预测模式值和M+1个模式标识信息的取值,确定当前节点的第二帧间预测模式剩余值; In some embodiments, the first determining unit 2401 is further configured to, when i is equal to M, if the Mth 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 according to the inter-frame prediction mode value and the values of the M+1 mode identification information;

编码单元2402,还配置为基于第二编码模式对当前节点的第二帧间预测模式剩余值进行编码,将所得到的编码比特写入码流;其中,M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。The encoding unit 2402 is also 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.

在一些实施例中,第一确定单元2401,还配置为对M+1个模式标识信息的取值进行取非操作,确定M+1个模式标识信息的取非值;以及根据帧间预测模式值与M+1个模式标识信息的取非值进行减法运算,确定当前节点的第二帧间预测模式剩余值。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 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.

在一些实施例中,第一确定单元2401,还配置为根据帧间预测模式值与(M+1)进行减法运算,确定当前节点的第二帧间预测模式剩余值。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.

在一些实施例中,第二编码模式包括:指数哥伦布的编码模式。In some embodiments, the second encoding mode comprises: an Exponential Golomb encoding mode.

在一些实施例中,第一确定单元2401,还配置为确定帧间候选节点集合;其中,帧间候选节点集合包括至少一个候选节点;从帧间候选节点集合中确定被选择节点,并根据被选择节点在帧间候选节点集合中的索引位置,确定当前节点的帧间预测模式值。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.

在一些实施例中,第一确定单元2401,还配置为基于率失真代价方式对帧间候选节点集合的至少一个候选节点分别进行代价计算,确定至少一个候选节点各自的代价值;以及从至少一个候选节点各自的代价值中确定最小代价值,将最小代价值对应的候选节点作为被选择节点。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.

在一些实施例中,第一确定单元2401,还配置为确定当前节点的前一个已编码节点;确定在第一参考帧中与前一个已编码节点的几何参数满足第一条件的第一候选节点,根据第一候选节点在第一参考帧中确定至少一个第二候选节点;确定在第二参考帧中与前一个已编码节点的几何参数满足第一条件的第三候选节点,根据第三候选节点在第二参考帧中确定至少一个第四候选节点,以及将至少一个第四候选节点的水平方位角设置为当前节点的父亲节点的水平方位角;以及根据至少一个第二候选节点和/或至少一个第四候选节点,确定帧间候选节点集合。In some embodiments, the first determination unit 2401 is also 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, 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.

在一些实施例中,第一确定单元2401,还配置为确定当前帧对应的预测树,其中,当前帧包括当前节点;以及基于预测树的编码顺序,确定当前节点的前一个已编码节点。In some embodiments, the first determination 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.

在一些实施例中,第一参考帧为当前帧的前一帧;第二参考帧为前一帧进行全局运动得到的。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.

在一些实施例中,第一确定单元2401,还配置为根据被选择节点,确定当前节点的预测值;根据当前节点的原始值与预测值,确定当前节点的初始残差值;以及根据量化参数对初始残差值进行量化处理,确定当前节点的预测残差值。In some embodiments, the first determination unit 2401 is further configured to determine a predicted value of the current node based on the selected node; determine an 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 a quantization parameter to determine a predicted residual value of the current node.

在一些实施例中,编码单元2402,还配置为对当前节点的预测残差值进行编码,将所得到的编码比特写入码流。In some embodiments, the encoding unit 2402 is further configured to encode the prediction residual value of the current node and write the obtained encoding bits into the bitstream.

在一些实施例中,编码单元2402,还配置为对量化参数进行编码,将所得到的编码比特写入码流。In some embodiments, the encoding unit 2402 is further configured to encode the quantization parameter and write the obtained encoded bits into the bitstream.

在一些实施例中,第一确定单元2401,还配置为确定第一标识信息的取值;以及若第一标识信息指示当前节点使用帧间预测模式,则执行确定当前节点的帧间预测模式值的步骤。In some embodiments, the first determination 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 an inter-frame prediction mode, execute the step of determining the inter-frame prediction mode value of the current node.

在一些实施例中,第一确定单元2401,还配置为若第一标识信息指示当前节点不使用帧间预测模式,则确定第一标识信息的取值为第三值;若第一标识信息指示当前节点使用帧间预测模式,则确定第一标识信息的取值为第四值。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.

在一些实施例中,编码单元2402,还配置为对第一标识信息的取值进行编码,将所得到的编码比特写入码流。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.

在一些实施例中,第一确定单元2401,还配置为确定第二标识信息的取值;以及若第二标识信息指示当前节点启用目标帧间编码方式,则执行根据帧间预测模式值,确定至少一个模式标识信息的取值的步骤。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 execute the step of determining the value of at least one mode identification information according to the inter-frame prediction mode value.

在一些实施例中,第一确定单元2401,还配置为若第二标识信息指示当前节点不启用目标帧间编码方式,则确定第二标识信息的取值为第五值;若第二标识信息指示当前节点启用目标帧间编码方式,则确定第二标识信息的取值为第六值。In some embodiments, the first determination unit 2401 is further configured to determine that the value of the second identification information is a 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 a sixth value.

在一些实施例中,编码单元2402,还配置为对第二标识信息的取值进行编码,将所得到的编码比特写入码流。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.

可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It is understandable that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular. Moreover, the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一 个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a A storage medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a 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: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器240,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。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, the method described in any one of the aforementioned embodiments is implemented.

基于上述编码器240的组成以及计算机可读存储介质,参见图25,其示出了本申请实施例提供的编码器240的具体硬件结构示意图。如图25所示,编码器240可以包括:第一通信接口2501、第一存储器2502和第一处理器2503;各个组件通过第一总线系统2504耦合在一起。可理解,第一总线系统2504用于实现这些组件之间的连接通信。第一总线系统2504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图25中将各种总线都标为第一总线系统2504。其中,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 marked as the first bus system 2504 in Figure 25. Among them,

第一通信接口2501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 2501 is used to receive and send signals during the process of sending and receiving information with other external network elements;

第一存储器2502,用于存储能够在第一处理器2503上运行的计算机程序;A first memory 2502, used for storing a computer program that can be run on the first processor 2503;

第一处理器2503,用于在运行所述计算机程序时,执行:The first processor 2503 is configured to, when running the computer program, execute:

确定当前节点的帧间预测模式值;Determine the inter-frame prediction mode value of the current node;

根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;Determine the value of at least one mode identification information according to 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;

对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of at least one mode identification information is encoded, and the obtained encoded bits are written into the code stream.

可以理解,本申请实施例中的第一存储器2502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器2502旨在包括但不限于这些和任意其它适合类型的存储器。It can be 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 RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (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.

而第一处理器2503可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器2503中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器2503可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器2502,第一处理器2503读取第一存储器2502中的信息,结合其硬件完成上述方法的步骤。The first processor 2503 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 2503. The above-mentioned first processor 2503 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 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.

可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

可选地,作为另一个实施例,第一处理器2503还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the first processor 2503 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.

本实施例提供了一种编码器,在该编码器中,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值来确定至少一个模式标识信息的取值,然后对这 至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编码效率。This embodiment provides an encoder, in which, for an 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 mode identification information is converted into binary for direct encoding. The value of 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 efficiency.

在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图26,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图26所示,该解码器260可以包括:解码单元2601和第二确定单元2602;其中,In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, see FIG26 , which shows a schematic diagram of the composition 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,

解码单元2601,配置为解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;The decoding unit 2601 is configured to decode the bitstream and determine the 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;

第二确定单元2602,配置为根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值;以及根据帧间预测模式值,确定当前节点的预测值。The second determination 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.

在一些实施例中,解码单元2601,还配置为基于第一解码模式解码码流,确定至少一个模式标识信息的取值。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.

在一些实施例中,第一解码模式至少包括下述之一:固定上下文信息的解码模式、自适应上下文信息的解码模式和不使用上下文信息的解码模式。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.

在一些实施例中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否大于i时,解码单元2601,还配置为解码码流,确定第i模式标识信息的取值;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 bitstream to determine the value of the i-th mode identification information;

第二确定单元2602,还配置为若第i模式标识信息指示当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;The second determining unit 2602 is further configured to use i+1 mode identification information 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 less than or equal to i; wherein the i+1 mode identification information includes the 0th mode identification information, the 1st mode identification information, ..., the i-th mode identification information;

解码单元2601,还配置为若第i模式标识信息指示当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值小于或等于i。The decoding unit 2601 is also 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.

在一些实施例中,第二确定单元2602,还配置为若第i模式标识信息的取值为第一值,则确定第i模式标识信息指示当前节点的帧间预测模式值小于或等于i;若第i模式标识信息的取值为第二值,则确定第i模式标识信息指示当前节点的帧间预测模式值大于i。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 determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is less than or equal to i; if the value of the i-th mode identification information is a second value, then determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is greater than i.

在一些实施例中,第二确定单元2602,还配置为在第i模式标识信息指示当前节点的帧间预测模式值小于或等于i时,将当前节点的帧间预测模式值设置为等于i。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.

在一些实施例中,第二确定单元2602,还配置为在i等于N-1时,若第N-1模式标识信息指示当前节点的帧间预测模式值小于或等于N-1,则将当前节点的帧间预测模式值设置为等于N-1;若第N-1模式标识信息指示当前节点的帧间预测模式值大于N-1,则将当前节点的帧间预测模式值设置为等于N。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 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 greater than N-1, then the inter-frame prediction mode value of the current node is set to be equal to N.

在一些实施例中,第二确定单元2602,还配置为在i等于M时,若第M模式标识信息指示当前节点的帧间预测模式值大于M,则基于第二解码模式解码码流,确定当前节点的第一帧间预测模式剩余值;根据M+1个模式标识信息的取值和第一帧间预测模式剩余值,确定当前节点的帧间预测模式值;其中,M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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 based on the second decoding mode decoding code stream, 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 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.

在一些实施例中,第二确定单元2602,还配置为对M+1个模式标识信息的取值与第一帧间预测模式剩余值进行加法运算,确定当前节点的帧间预测模式值。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 first inter-frame prediction mode residual value to determine the inter-frame prediction mode value of the current node.

在一些实施例中,第二确定单元2602,还配置为对第一帧间预测模式剩余值与(M+1)进行加法运算,确定当前节点的帧间预测模式值。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.

在一些实施例中,在第i模式标识信息用于指示当前节点的帧间预测模式值是否等于i时,解码单元2601,还配置为解码码流,确定第i模式标识信息的取值;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 bitstream to determine the value of the i-th mode identification information;

第二确定单元2602,还配置为若第i模式标识信息指示当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为至少一个模式标识信息;其中,i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,第i模式标识信息;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;

解码单元2601,还配置为若第i模式标识信息指示当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至第i模式标识信息指示当前节点的帧间预测模式值等于i。The decoding unit 2601 is also 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.

在一些实施例中,第二确定单元2602,还配置为若第i模式标识信息的取值为第一值,则确定第i模式标识信息指示当前节点的帧间预测模式值不等于i;若第i模式标识信息的取值为第二值,则确定第i模式标识信息指示当前节点的帧间预测模式值等于i。 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 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, then determine that the inter-frame prediction mode value of the current node indicated by the i-th mode identification information is equal to i.

在一些实施例中,第二确定单元2602,还配置为在第i模式标识信息指示当前节点的帧间预测模式值等于i时,将当前节点的帧间预测模式值设置为等于i。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.

在一些实施例中,第二确定单元2602,还配置为在i等于N-1时,若第N-1模式标识信息指示当前节点的帧间预测模式值等于N-1,则将当前节点的帧间预测模式值设置为等于N-1;若第N-1模式标识信息指示当前节点的帧间预测模式值不等于N-1,则将当前节点的帧间预测模式值设置为等于N。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.

在一些实施例中,第二确定单元2602,还配置为在i等于M时,若第M模式标识信息指示当前节点的帧间预测模式值不等于M,则基于第二解码模式解码码流,确定当前节点的第二帧间预测模式剩余值;根据M+1个模式标识信息的取值和第二帧间预测模式剩余值,确定当前节点的帧间预测模式值;其中,M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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, then 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.

在一些实施例中,第二确定单元2602,还配置为对M+1个模式标识信息的取值进行取非操作,确定M+1个模式标识信息的取非值;以及对M+1个模式标识信息的取非值与第二帧间预测模式剩余值进行加法运算,确定当前节点的帧间预测模式值。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 to 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.

在一些实施例中,第二确定单元2602,还配置为对第二帧间预测模式剩余值与(M+1)进行加法运算,确定当前节点的帧间预测模式值。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.

在一些实施例中,第二解码模式包括:指数哥伦布的解码模式。In some embodiments, the second decoding mode comprises: an Exponential Golomb decoding mode.

在一些实施例中,解码单元2601,还配置为解码码流,确定第一标识信息的取值;以及若第一标识信息指示当前节点使用帧间预测模式,则执行解码码流,确定至少一个模式标识信息的取值的步骤。In some embodiments, the decoding unit 2601 is further configured to decode the code stream to 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, execute the step of decoding the code stream to determine the value of at least one mode identification information.

在一些实施例中,第二确定单元2602,还配置为若第一标识信息的取值为第三值,则确定第一标识信息指示当前节点不使用帧间预测模式;若第一标识信息的取值为第四值,则确定第一标识信息指示当前节点使用帧间预测模式。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 a 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 a fourth value.

在一些实施例中,解码单元2601,还配置为解码码流,确定第二标识信息的取值;以及若第二标识信息指示当前节点启用目标帧间解码方式,则执行解码码流,确定至少一个模式标识信息的取值的步骤。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 method, execute the step of decoding the code stream and determining the value of at least one mode identification information.

在一些实施例中,第二确定单元2602,还配置为若第二标识信息的取值为第五值,则确定第二标识信息指示当前节点不启用目标帧间解码方式;若第二标识信息的取值为第六值,则确定第二标识信息指示当前节点启用目标帧间解码方式。In some embodiments, the second determination unit 2602 is further configured to, if the value of the second identification information is the fifth value, 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 sixth value, determine that the second identification information indicates that the current node enables the target inter-frame decoding method.

在一些实施例中,第二确定单元2602,还配置为根据帧间预测模式值,从至少一个候选节点中确定被选择节点;以及根据被选择节点,确定当前节点的预测值。In some embodiments, the second determination 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.

在一些实施例中,至少一个候选节点包括下述至少一项:至少一个第二候选节点和至少一个第四候选节点;其中,至少一个第二候选节点为第一参考帧中的候选节点,至少一个第四候选节点为第二参考帧中的候选节点;以及第一参考帧为当前帧的前一帧,第二参考帧为前一帧进行全局运动得到的,且当前帧包括当前节点。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 a first reference frame, and at least one fourth candidate node is a candidate node in a second reference frame; and the first reference frame is a 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.

在一些实施例中,在帧间预测模式值指示被选择节点为至少一个第二候选节点中的一个候选节点时,相应地,第二确定单元2602,还配置为确定当前节点的前一个已解码节点;根据前一个已解码节点,在第一参考帧中确定第一候选节点;其中,前一个已解码节点与第一候选节点的几何参数满足第一条件;根据第一候选节点,在第一参考帧中按照预设方式确定第1个第二候选节点至第p个第二候选节点;以及根据第p个第二候选节点作为被选择节点;其中,p为大于0的正整数,且p的取值与帧间预测模式值具有关联关系。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, 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 first candidate node in the first reference frame; wherein the geometric parameters of the previous decoded node and the first candidate node satisfy 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.

在一些实施例中,在帧间预测模式值指示被选择节点为至少一个第四候选节点中的一个候选节点时,相应地,第二确定单元2602,还配置为确定当前节点的前一个已解码节点;根据前一个已解码节点,在第二参考帧中确定第三候选节点;其中,前一个已解码节点与第三候选节点的几何参数满足第一条件;根据第三候选节点,在第二参考帧中按照预设方式确定第1个第四候选节点至第q个第四候选节点;以及根据第q个第四候选节点作为被选择节点;其中,q为大于0的正整数,且q的取值与帧间预测模式值具有关联关系。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 satisfy 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.

在一些实施例中,解码单元2601,还配置为解码码流,确定当前节点的预测残差值和量化参数;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;

第二确定单元2602,还配置为根据量化参数对预测残差值进行反量化处理,得到反量化残差值;以及根据反量化残差值和预测值,确定当前节点的重建信息。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.

可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。 It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器260,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 260, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.

基于上述解码器260的组成以及计算机可读存储介质,参见图27,其示出了本申请实施例提供的解码器260的具体硬件结构示意图。如图27所示,解码器260可以包括:第二通信接口2701、第二存储器2702和第二处理器2703;各个组件通过第二总线系统2704耦合在一起。可理解,第二总线系统2704用于实现这些组件之间的连接通信。第二总线系统2704除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图27中将各种总线都标为第二总线系统2704。其中,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,

第二通信接口2701,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 2701 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

第二存储器2702,用于存储能够在第二处理器2703上运行的计算机程序;The second memory 2702 is used to store a computer program that can be run on the second processor 2703;

第二处理器2703,用于在运行所述计算机程序时,执行:The second processor 2703 is configured to execute, when running the computer program:

解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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 an inter-frame prediction mode value of a current node according to a value of at least one mode identification information;

根据帧间预测模式值,确定当前节点的预测值。According to the inter-frame prediction mode value, the prediction value of the current node is determined.

可选地,作为另一个实施例,第二处理器2703还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。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.

可以理解,第二存储器2702与第一存储器2502的硬件功能类似,第二处理器2703与第一处理器2503的硬件功能类似;这里不再详述。It can be understood that the hardware functions of the second memory 2702 and the first memory 2502 are similar, and the hardware functions of the second processor 2703 and the first processor 2503 are similar; they will not be described in detail here.

本实施例提供了一种解码器,在该解码器中,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接解码,而是通过解码码流来确定至少一个模式标识信息的取值,然后根据这至少一个模式标识信息的取值来确定出帧间预测模式值;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。The present 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, but 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 according to 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, thereby taking 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 further improving encoding and decoding efficiency.

在本申请的再一实施例中,参见图28,其示出了本申请实施例提供的一种编解码系统的组成结构示意图。如图28所示,编解码系统280可以包括编码器2801和解码器2802。In yet another embodiment of the present application, referring to FIG28 , a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown. As shown in FIG28 , a coding and decoding system 280 may include an encoder 2801 and a decoder 2802 .

在本申请实施例中,编码器2801可以是前述实施例中任一项所述的编码器,解码器2802可以是前述实施例中任一项所述的解码器。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.

需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

工业实用性Industrial Applicability

本申请实施例中,在编码端,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指 示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;对至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流。在解码端,解码码流,确定至少一个模式标识信息的取值;其中,模式标识信息至少包括第i模式标识信息,且第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;根据至少一个模式标识信息的取值,确定当前节点的帧间预测模式值;根据帧间预测模式值,确定当前节点的预测值。这样,针对帧间预测模式值而言,不再是将帧间预测模式值转换为二进制进行直接编码,而是根据帧间预测模式值来确定至少一个模式标识信息的取值,然后对这至少一个模式标识信息的取值进行编码;其中,第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i,如此考虑到了帧间预测模式的频率分布,即越容易出现的帧间预测模式,其对应的帧间预测模式值越靠前,从而可以减少编码比特数,节省码率,进而能够提升编解码效率。 In the embodiment of the present application, at the encoding end, the inter-frame prediction mode value of the current node is determined; according to 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 Indicates 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 coded bits into the bitstream. At the decoding end, decode the bitstream 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; 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; determine the inter-frame prediction mode value of the current node according to the value of at least one mode identification information; determine the prediction value of the current node according to the inter-frame prediction mode value. 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 (67)

一种解码方法,应用于解码器,所述方法包括:A decoding method, applied to a decoder, comprising: 解码码流,确定至少一个模式标识信息的取值;其中,所述模式标识信息至少包括第i模式标识信息,且所述第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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. 根据权利要求1所述的方法,其中,所述解码码流,确定至少一个模式标识信息的取值,包括:The method according to claim 1, wherein the decoding of the code stream and determining the value of at least one mode identification information comprises: 基于第一解码模式解码所述码流,确定所述至少一个模式标识信息的取值。The code stream is decoded based on a first decoding mode to determine a value of the at least one mode identification information. 根据权利要求2所述的方法,其中,所述第一解码模式至少包括下述之一:The method according to claim 2, wherein the first decoding mode comprises 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. 根据权利要求1所述的方法,其中,在所述第i模式标识信息用于指示所述当前节点的帧间预测模式值是否大于i时,所述解码码流,确定至少一个模式标识信息的取值,包括: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, comprising: 解码码流,确定第i模式标识信息的取值;Decode the code stream to determine the value of the i-th mode identification information; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为所述至少一个模式标识信息;其中,所述i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,所述第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, 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; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i。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. 根据权利要求4所述的方法,其中,所述方法还包括:The method according to claim 4, wherein the method further comprises: 若所述第i模式标识信息的取值为第一值,则确定所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i;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; 若所述第i模式标识信息的取值为第二值,则确定所述第i模式标识信息指示所述当前节点的帧间预测模式值大于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. 根据权利要求4所述的方法,其中,所述根据所述至少一个模式标识信息的取值,确定所述当前节点的帧间预测模式值,包括:The method according to claim 4, wherein the determining the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information comprises: 在所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i时,将所述当前节点的帧间预测模式值设置为等于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, the inter-frame prediction mode value of the current node is set to be equal to i. 根据权利要求6所述的方法,其中,在i等于N-1时,所述方法还包括:The method according to claim 6, wherein when i is equal to N-1, the method further comprises: 若第N-1模式标识信息指示所述当前节点的帧间预测模式值小于或等于N-1,则将所述当前节点的帧间预测模式值设置为等于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, setting the inter-frame prediction mode value of the current node to be equal to N-1; 若第N-1模式标识信息指示所述当前节点的帧间预测模式值大于N-1,则将所述当前节点的帧间预测模式值设置为等于N。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. 根据权利要求4所述的方法,其中,在i等于M时,所述根据所述至少一个模式标识信息的取值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 若第M模式标识信息指示所述当前节点的帧间预测模式值大于M,则基于第二解码模式解码所述码流,确定所述当前节点的第一帧间预测模式剩余值;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; 根据M+1个模式标识信息的取值和所述第一帧间预测模式剩余值,确定所述当前节点的帧间预测模式值;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; 其中,所述M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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. 根据权利要求8所述的方法,其中,所述根据M+1个模式标识信息的取值和所述第一帧间预测模式剩余值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 对所述M+1个模式标识信息的取值与所述第一帧间预测模式剩余值进行加法运算,确定所述当前节点的帧间预测模式值。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. 根据权利要求8所述的方法,其中,所述根据M+1个模式标识信息的取值和所述第一帧间预测模式剩余值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 对所述第一帧间预测模式剩余值与(M+1)进行加法运算,确定所述当前节点的帧间预测模式值。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. 根据权利要求1所述的方法,其中,在所述第i模式标识信息用于指示所述当前节点的帧间预 测模式值是否等于i时,所述解码码流,确定至少一个模式标识信息的取值,包括:The method according to claim 1, wherein the i-th mode identification information is used to indicate the inter-frame prediction of the current node When detecting whether the mode value is equal to i, the decoding code stream determines the value of at least one mode identification information, including: 解码码流,确定第i模式标识信息的取值;Decode the code stream to determine the value of the i-th mode identification information; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为所述至少一个模式标识信息;其中,所述i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,所述第i模式标识信息;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; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行解码码流,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i。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. 根据权利要求11所述的方法,其中,所述方法还包括:The method according to claim 11, wherein the method further comprises: 若所述第i模式标识信息的取值为第一值,则确定所述第i模式标识信息指示所述当前节点的帧间预测模式值不等于i;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; 若所述第i模式标识信息的取值为第二值,则确定所述第i模式标识信息指示所述当前节点的帧间预测模式值等于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. 根据权利要求11所述的方法,其中,所述根据所述至少一个模式标识信息的取值,确定所述当前节点的帧间预测模式值,包括:The method according to claim 11, wherein determining the inter-frame prediction mode value of the current node according to the value of the at least one mode identification information comprises: 在所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i时,将所述当前节点的帧间预测模式值设置为等于i。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. 根据权利要求13所述的方法,其中,在i等于N-1时,所述方法还包括:The method according to claim 13, wherein when i is equal to N-1, the method further comprises: 若第N-1模式标识信息指示所述当前节点的帧间预测模式值等于N-1,则将所述当前节点的帧间预测模式值设置为等于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, setting the inter-frame prediction mode value of the current node to be equal to N-1; 若第N-1模式标识信息指示所述当前节点的帧间预测模式值不等于N-1,则将所述当前节点的帧间预测模式值设置为等于N。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. 根据权利要求11所述的方法,其中,在i等于M时,所述根据所述至少一个模式标识信息的取值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 若第M模式标识信息指示所述当前节点的帧间预测模式值不等于M,则基于第二解码模式解码所述码流,确定所述当前节点的第二帧间预测模式剩余值;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; 根据M+1个模式标识信息的取值和所述第二帧间预测模式剩余值,确定所述当前节点的帧间预测模式值;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; 其中,所述M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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. 根据权利要求15所述的方法,其中,所述根据M+1个模式标识信息的取值和所述第二帧间预测模式剩余值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 对所述M+1个模式标识信息的取值进行取非操作,确定所述M+1个模式标识信息的取非值;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; 对所述M+1个模式标识信息的取非值与所述第二帧间预测模式剩余值进行加法运算,确定所述当前节点的帧间预测模式值。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. 根据权利要求15所述的方法,其中,所述根据M+1个模式标识信息的取值和所述第二帧间预测模式剩余值,确定所述当前节点的帧间预测模式值,包括: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 comprises: 对所述第二帧间预测模式剩余值与(M+1)进行加法运算,确定所述当前节点的帧间预测模式值。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. 根据权利要求8或15所述的方法,其中,所述第二解码模式包括:指数哥伦布的解码模式。The method according to claim 8 or 15, wherein the second decoding mode comprises: an Exponential Golomb decoding mode. 根据权利要求1至18中任一项所述的方法,其中,所述方法还包括: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. 根据权利要求19所述的方法,其中,所述方法还包括: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. 根据权利要求1至18中任一项所述的方法,其中,所述方法还包括: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. 根据权利要求21所述的方法,其中,所述方法还包括: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. 根据权利要求1至22中任一项所述的方法,其中,所述根据所述帧间预测模式值,确定所述当前节点的预测值,包括:The method according to any one of claims 1 to 22, wherein determining the prediction value of the current node according to the inter-frame prediction mode value comprises: 根据所述帧间预测模式值,从至少一个候选节点中确定被选择节点;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. 根据权利要求23所述的方法,其中,所述至少一个候选节点包括下述至少一项:至少一个第二候选节点和至少一个第四候选节点;The method according to claim 23, wherein the at least one candidate node comprises 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. 根据权利要求24所述的方法,其中,在所述帧间预测模式值指示所述被选择节点为所述至少一个第二候选节点中的一个候选节点时,所述方法还包括: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 comprises: 确定所述当前节点的前一个已解码节点;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; 根据所述第一候选节点,在所述第一参考帧中按照预设方式确定第1个第二候选节点至第p个第二候选节点;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; 根据所述第p个第二候选节点作为所述被选择节点;其中,p为大于0的正整数,且p的取值与所述帧间预测模式值具有关联关系。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. 根据权利要求24所述的方法,其中,在所述帧间预测模式值指示所述被选择节点为所述至少一个第四候选节点中的一个候选节点时,所述方法还包括: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 comprises: 确定所述当前节点的前一个已解码节点;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; 根据所述第三候选节点,在所述第二参考帧中按照预设方式确定第1个第四候选节点至第q个第四候选节点;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; 根据所述第q个第四候选节点作为所述被选择节点;其中,q为大于0的正整数,且q的取值与所述帧间预测模式值具有关联关系。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. 根据权利要求23所述的方法,其中,所述方法还包括: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. 一种编码方法,应用于编码器,所述方法包括:A coding method, applied to an encoder, comprising: 确定当前节点的帧间预测模式值;Determine the inter-frame prediction mode value of the current node; 根据所述帧间预测模式值,确定至少一个模式标识信息的取值;其中,所述模式标识信息至少包括第i模式标识信息,且所述第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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. 根据权利要求28所述的方法,其中,所述对所述至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,包括:The method according to claim 28, wherein encoding the value of the at least one mode identification information and writing the obtained coded bits into the bitstream 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. 根据权利要求29所述的方法,其中,所述第一编码模式至少包括下述之一:The method according to claim 29, wherein the first encoding 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. 根据权利要求28所述的方法,其中,在所述第i模式标识信息用于指示所述当前节点的帧间预测模式值是否大于i时,所述根据所述帧间预测模式值,确定至少一个模式标识信息的取值,包括:The method according to 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 comprises: 根据所述帧间预测模式值,确定第i模式标识信息的取值;Determining a value of the i-th mode identification information according to the inter-frame prediction mode value; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i,则将i+1个模式标识信息作为所述至少一个模式标识信息;其中,所述i+1个模式标识信息包括第0模式标识信息,第1模 式标识信息,…,所述第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, 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; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值大于i,则基于i+1更新i,继续执行根据所述帧间预测模式值,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i。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. 根据权利要求31所述的方法,其中,所述根据所述帧间预测模式值,确定第i模式标识信息的取值,包括:The method according to claim 31, wherein determining the value of the i-th mode identification information according to the inter-frame prediction mode value comprises: 若所述帧间预测模式值小于或等于i,则确定所述第i模式标识信息的取值为第一值;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; 若所述帧间预测模式值大于i,则确定所述第i模式标识信息的取值为第二值。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. 根据权利要求31所述的方法,其中,所述对所述至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,包括:The method according to claim 31, wherein encoding the value of the at least one mode identification information and writing the obtained coded bits into the bitstream comprises: 若所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i,则对所述第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, encoding the value of the i-th mode identification information, and writing the obtained encoding bits into the bitstream; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值大于i,则对所述第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据所述帧间预测模式值,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值小于或等于i。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. 根据权利要求33所述的方法,其中,在i等于N-1时,所述方法还包括:The method according to claim 33, wherein when i is equal to N-1, the method further comprises: 根据所述帧间预测模式值,确定第N-1模式标识信息的取值;Determining a value of the N-1th mode identification information according to the inter-frame prediction mode value; 对所述第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream. 根据权利要求34所述的方法,其中,所述根据所述帧间预测模式值,确定第N-1模式标识信息的取值,包括:The method according to claim 34, wherein determining the value of the N-1th mode identification information according to the inter-frame prediction mode value comprises: 若所述帧间预测模式值小于或等于N-1,则确定所述第N-1模式标识信息的取值为第一值;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; 若所述帧间预测模式值等于N,则确定所述第N-1模式标识信息的取值为第二值。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. 根据权利要求31所述的方法,其中,在i等于M时,所述方法还包括:The method according to claim 31, wherein when i is equal to M, the method further comprises: 若第M模式标识信息指示所述当前节点的帧间预测模式值大于M,则根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第一帧间预测模式剩余值;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; 其中,所述M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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. 根据权利要求36所述的方法,其中,所述根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第一帧间预测模式剩余值,包括:The method according to claim 36, wherein the 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 comprises: 根据所述帧间预测模式值与所述M+1个模式标识信息的取值进行减法运算,确定所述当前节点的第一帧间预测模式剩余值。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. 根据权利要求36所述的方法,其中,所述根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第一帧间预测模式剩余值,包括:The method according to claim 36, wherein the 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 comprises: 根据所述帧间预测模式值与(M+1)进行减法运算,确定所述当前节点的第一帧间预测模式剩余值。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. 根据权利要求28所述的方法,其中,在所述第i模式标识信息用于指示所述当前节点的帧间预测模式值是否等于i时,所述根据所述帧间预测模式值,确定至少一个模式标识信息的取值,包括:The method according to 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 comprises: 根据所述帧间预测模式值,确定第i模式标识信息的取值;Determining a value of the i-th mode identification information according to the inter-frame prediction mode value; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i,则将i+1个模式标识信息作为所述至少一个模式标识信息;其中,所述i+1个模式标识信息包括第0模式标识信息,第1模式标识信息,…,所述第i模式标识信息;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; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值不等于i,则基于i+1更新i,继续执行根据所述帧间预测模式值,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i。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. 根据权利要求39所述的方法,其中,所述根据所述帧间预测模式值,确定第i模式标识信息的取值,包括:The method according to claim 39, wherein determining the value of the i-th mode identification information according to the inter-frame prediction mode value comprises: 若所述帧间预测模式值不等于i,则确定所述第i模式标识信息的取值为第一值;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; 若所述帧间预测模式值等于i,则确定所述第i模式标识信息的取值为第二值。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. 根据权利要求39所述的方法,其中,所述对所述至少一个模式标识信息的取值进行编码,将所得到的编码比特写入码流,包括: The method according to claim 39, wherein encoding the value of the at least one mode identification information and writing the obtained coded bits into the bitstream comprises: 若所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i,则对所述第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;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; 若所述第i模式标识信息指示所述当前节点的帧间预测模式值不等于i,则对所述第i模式标识信息的取值进行编码,将所得到的编码比特写入码流;以及基于i+1更新i,继续执行根据所述帧间预测模式值,确定第i模式标识信息的取值的步骤,直至所述第i模式标识信息指示所述当前节点的帧间预测模式值等于i。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. 根据权利要求41所述的方法,其中,在i等于N-1时,所述方法还包括:The method according to claim 41, wherein when i is equal to N-1, the method further comprises: 根据所述帧间预测模式值,确定第N-1模式标识信息的取值;Determining a value of the N-1th mode identification information according to the inter-frame prediction mode value; 对所述第N-1模式标识信息的取值进行编码,将所得到的编码比特写入码流。The value of the N-1th mode identification information is encoded, and the obtained encoded bits are written into the bit stream. 根据权利要求42所述的方法,其中,所述根据所述帧间预测模式值,确定第N-1模式标识信息的取值,包括:The method according to claim 42, wherein determining the value of the N-1th mode identification information according to the inter-frame prediction mode value comprises: 若所述帧间预测模式值等于N,则确定所述第N-1模式标识信息的取值为第一值;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; 若所述帧间预测模式值等于N-1,则确定所述第N-1模式标识信息的取值为第二值。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. 根据权利要求39所述的方法,其中,在i等于M时,所述方法还包括:The method according to claim 39, wherein when i is equal to M, the method further comprises: 若第M模式标识信息指示所述当前节点的帧间预测模式值不等于M,则根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第二帧间预测模式剩余值;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; 其中,所述M+1个模式标识信息包括:第0模式标识信息,第1模式标识信息,…,第M模式标识信息;M为大于或等于0且小于N的整数。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. 根据权利要求44所述的方法,其中,所述根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第二帧间预测模式剩余值,包括:The method according to claim 44, wherein the 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 comprises: 对所述M+1个模式标识信息的取值进行取非操作,确定所述M+1个模式标识信息的取非值;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; 根据所述帧间预测模式值与所述M+1个模式标识信息的取非值进行减法运算,确定所述当前节点的第二帧间预测模式剩余值。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. 根据权利要求44所述的方法,其中,所述根据所述帧间预测模式值和M+1个模式标识信息的取值,确定所述当前节点的第二帧间预测模式剩余值,包括:The method according to claim 44, wherein the 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 comprises: 根据所述帧间预测模式值与(M+1)进行减法运算,确定所述当前节点的第二帧间预测模式剩余值。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). 根据权利要求36或44所述的方法,其中,所述第二编码模式包括:指数哥伦布的编码模式。The method according to claim 36 or 44, wherein the second coding mode comprises: an Exponential Golomb coding mode. 根据权利要求28至47中任一项所述的方法,其中,所述确定所述当前节点的帧间预测模式值,包括:The method according to any one of claims 28 to 47, wherein the determining the inter-frame prediction mode value of the current node comprises: 确定帧间候选节点集合;其中,所述帧间候选节点集合包括至少一个候选节点;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. 根据权利要求48所述的方法,其中,所述从所述帧间候选节点集合中确定被选择节点,包括:The method according to claim 48, wherein 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. 根据权利要求48所述的方法,其中,所述确定帧间候选节点集合,包括:The method according to claim 48, wherein determining the inter-frame candidate node set comprises: 确定所述当前节点的前一个已编码节点;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. 根据权利要求50所述的方法,其中,所述确定所述当前节点的前一个已编码节点,包括:The method according to claim 50, wherein the determining a previous 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. 根据权利要求51所述的方法,其中,The method according to 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. 根据权利要求48所述的方法,其中,所述方法还包括:The method according to 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. 根据权利要求53所述的方法,其中,所述方法还包括:The method according to 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. 根据权利要求53所述的方法,其中,所述方法还包括:The method according to claim 53, wherein the method further comprises: 对所述量化参数进行编码,将所得到的编码比特写入码流。The quantization parameter is encoded, and the obtained encoded bits are written into a bit stream. 根据权利要求28至55中任一项所述的方法,其中,所述方法还包括:The 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. 根据权利要求56所述的方法,其中,所述确定第一标识信息的取值,包括:The method according to claim 56, wherein determining the value of the first identification information comprises: 若所述第一标识信息指示所述当前节点不使用帧间预测模式,则确定所述第一标识信息的取值为第三值;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. 根据权利要求56所述的方法,其中,所述方法还包括:The method according to 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. 根据权利要求28至55中任一项所述的方法,其中,所述方法还包括: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. 根据权利要求59所述的方法,其中,所述确定第二标识信息的取值,包括:The method according to claim 59, wherein determining the value of the second identification information comprises: 若所述第二标识信息指示所述当前节点不启用目标帧间编码方式,则确定所述第二标识信息的取值为第五值;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. 根据权利要求59所述的方法,其中,所述方法还包括:The method according to 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. 一种码流,其中,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:A code stream, wherein the code stream is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following: 当前节点的预测残差值、量化参数、至少一个模式标识信息的取值、帧间预测模式剩余值、第一标识信息的取值和第二标识信息的取值;The 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; 其中,所述第一标识信息用于指示所述当前节点是否使用帧间预测模式,所述第二标识信息用于指示所述当前节点是否启用目标帧间编码/解码方式;所述模式标识信息至少包括第i模式标识信息,且所述第i模式标识信息用于指示所述当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值。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. 一种编码器,所述编码器包括第一确定单元和编码单元;其中,An encoder comprises 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; 所述第一确定单元,还配置为根据所述帧间预测模式值,确定至少一个模式标识信息的取值;其中,所述模式标识信息至少包括第i模式标识信息,且所述第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;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. 一种编码器,所述编码器包括第一存储器和第一处理器;其中,An encoder comprises a first memory and a first processor; wherein: 所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;The first memory is used to store a computer program that can be run on the first processor; 所述第一处理器,用于在运行所述计算机程序时,执行如权利要求28至61中任一项所述的方法。The first processor is configured to execute the method according to any one of claims 28 to 61 when running the computer program. 一种解码器,所述解码器包括解码单元和第二确定单元;其中,A decoder, comprising a decoding unit and a second determining unit; wherein: 所述解码单元,配置为解码码流,确定至少一个模式标识信息的取值;其中,所述模式标识信息至少包括第i模式标识信息,且所述第i模式标识信息用于指示当前节点的帧间预测模式值是否大于或等 于i;i为大于或等于0且小于N的整数,N表示帧间预测模式最大值;The decoding unit is configured to decode the bitstream 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. 一种解码器,所述解码器包括第二存储器和第二处理器;其中,A decoder, comprising a second memory and a second processor; wherein: 所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;The second memory is used to store a computer program that can be run on the second processor; 所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至27中任一项所述的方法。The second processor is configured to execute the method according to any one of claims 1 to 27 when running the computer program. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至27中任一项所述的方法、或者实现如权利要求28至61中任一项所述的方法。 A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the method according to any one of claims 1 to 27, or implements the method according to any one of claims 28 to 61.
PCT/CN2023/087289 2023-04-10 2023-04-10 Coding method, decoding method, code stream, coder, decoder, and storage medium Pending WO2024212042A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/087289 WO2024212042A1 (en) 2023-04-10 2023-04-10 Coding method, decoding method, code stream, coder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/087289 WO2024212042A1 (en) 2023-04-10 2023-04-10 Coding method, decoding method, code stream, coder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2024212042A1 true WO2024212042A1 (en) 2024-10-17

Family

ID=93058637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/087289 Pending WO2024212042A1 (en) 2023-04-10 2023-04-10 Coding method, decoding method, code stream, coder, decoder, and storage medium

Country Status (1)

Country Link
WO (1) WO2024212042A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220086426A1 (en) * 2018-12-28 2022-03-17 Electronics And Telecommunications Research Institute Method and apparatus for deriving intra-prediction mode
US20220207780A1 (en) * 2020-12-29 2022-06-30 Qualcomm Incorporated Inter prediction coding for geometry point cloud compression

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220086426A1 (en) * 2018-12-28 2022-03-17 Electronics And Telecommunications Research Institute Method and apparatus for deriving intra-prediction mode
US20220207780A1 (en) * 2020-12-29 2022-06-30 Qualcomm Incorporated Inter prediction coding for geometry point cloud compression

Similar Documents

Publication Publication Date Title
WO2024145904A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024212042A1 (en) Coding method, decoding method, code stream, coder, decoder, and storage medium
WO2024212038A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024212045A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024212043A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2025015523A1 (en) Encoding method, decoding method, bitstream, encoder, decoder and storage medium
WO2025076663A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2024216477A1 (en) Encoding/decoding method, encoder, decoder, code stream, and storage medium
WO2025145433A1 (en) Point cloud encoding method, point cloud decoding method, codec, code stream, and storage medium
WO2024216476A1 (en) Encoding/decoding method, encoder, decoder, code stream, and storage medium
WO2025010601A9 (en) Coding method, decoding method, coders, decoders, code stream and storage medium
WO2025007355A9 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2025007360A1 (en) Coding method, decoding method, bit stream, coder, decoder, and storage medium
WO2025010604A1 (en) Point cloud encoding method, point cloud decoding method, encoder, decoder, code stream, and storage medium
WO2024234132A9 (en) Coding method, decoding method, code stream, coder, decoder, and storage medium
WO2024207456A1 (en) Method for encoding and decoding, encoder, decoder, code stream, and storage medium
WO2025010600A9 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024216479A9 (en) Encoding and decoding method, code stream, encoder, decoder and storage medium
WO2025076672A1 (en) Encoding method, decoding method, encoder, decoder, code stream, and storage medium
WO2024207481A1 (en) Encoding method, decoding method, encoder, decoder, bitstream and storage medium
WO2025007349A1 (en) Encoding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2024148598A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2025076668A1 (en) Encoding method, decoding method, encoder, decoder and storage medium
WO2024145910A1 (en) Encoding method, decoding method, bitstream, encoder, decoder and storage medium
CN121241567A (en) Encoding/decoding methods, bitstreams, encoders, decoders, and storage media

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23932342

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE