Encoding method, decoding method, code stream, decoder, encoder, and storage medium
By using neighborhood node information to determine voting values and weight values in the decoder and adopting inter-frame and intra-frame weighted average prediction modes, the problem of low AC coefficient prediction accuracy in the existing technology is solved, and the encoding and decoding performance and stability are improved.
Patent Information
- Application Number
- PCT/CN2024/088691
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-10-23
AI Technical Summary
In a geometric information coding system based on texture mapping, the AC coefficient prediction accuracy of the current node in the existing technology is low, which affects the encoding and decoding performance.
By considering neighboring node information in the decoder, the first mode voting value and the second mode voting value of the current node are determined, and the first coefficient prediction value is determined according to the weight value and the prediction value. The prediction mode of inter-frame and intra-frame weighted average is adopted.
The prediction accuracy of the first coefficient is improved, and the encoding and decoding performance and stability are enhanced.
Smart Images

Figure CN2024088691_23102025_PF_FP_ABST
Abstract
Description
Coding method, code stream, decoder, encoder and storage medium TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of video coding, and particularly relate to a coding method, a code stream, a decoder, an encoder and a storage medium. BACKGROUND
[0002] In a property inter-frame prediction coding framework of a geometric information encoding system based on texture mapping (GES-TM), a region adaptive hierarchical transform (RAHT) property transform coding result is constructed based on geometric information of a current node, that is, node merging is continuously performed at a voxel level until a root node of a whole RAHT transform tree is obtained, so as to complete the whole property transform coding hierarchical structure. Then, according to the RAHT transform structure, the root node is divided to obtain N sub-nodes (N is a positive integer less than or equal to 8) of each node, and the RAHT transform is used to independently orthogonally transform the properties of the N sub-nodes to obtain direct current (DC) coefficients and alternating current (AC) coefficients.
[0003] In related technologies, in the process of predicting an AC coefficient (a first coefficient) of a current node, intra-frame prediction or inter-frame prediction is usually used, which results in low accuracy of predicting the first coefficient, thereby affecting the coding performance.
[0004] SUMMARY
[0005] Embodiments of the present application provide a coding method, a code stream, a decoder, an encoder and a storage medium, which can improve the prediction accuracy of the first coefficient, thereby improving the coding performance.
[0006] The technical solutions of the embodiments of the present application can be implemented as follows:
[0007] In a first aspect, the embodiments of the present application provide a decoding method applied to a decoder, and the method comprises:
[0008] In a case where it is determined that the current node adopts a prediction mode of inter-frame and intra-frame weighted average, a first mode voting value and a second mode voting value of the current node are determined according to reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include a parent node of the current node and a neighbor node of the current node.
[0009] determining the first mode weight value and the second mode weight value of the current node according to the first mode vote value and the second mode vote value of the current node, respectively;
[0010] determining the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
[0011] In a second aspect, an encoding method is provided, which is applied to an encoder, and the method comprises:
[0012] In a case where it is determined that the current node adopts the inter and intra weighted average prediction mode, determining the first mode vote value and the second mode vote value of the current node according to the reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include the parent node of the current node and the neighbor node of the current node.
[0013] determining the first mode weight value and the second mode weight value of the current node according to the first mode vote value and the second mode vote value of the current node, respectively;
[0014] determining the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
[0015] In a third aspect, an encoded bitstream is provided, which is generated by bit encoding to-be-encoded information; wherein the to-be-encoded information comprises at least one of the following:
[0016] the related syntax element information, the first coefficient residual value and the second coefficient value; the related syntax element information is used to indicate whether the current layer in which the current node is located or the current block in which the current node is located adopts the inter and intra weighted average prediction mode based on recursive adaptive hierarchical transform.
[0017] In a fourth aspect, a decoder is provided, which comprises a first determining part, wherein:
[0018] the first determining part is configured to determine, in a case where it is determined that the current node adopts the inter-frame and intra-frame weighted average prediction mode, a first mode voting value and a second mode voting value of the current node according to reconstructed neighboring nodes of the current node, wherein the neighboring nodes at least include a parent node of the current node and a neighbor node of the current node; determine a first mode weight value and a second mode weight value of the current node respectively according to the first mode voting value and the second mode voting value of the current node; and determine a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node.
[0019] In a fifth aspect, an embodiment of the present application provides an encoder, which comprises a second determining part, wherein:
[0020] the second determining part is configured to determine, in a case where it is determined that the current node adopts the inter-frame and intra-frame weighted average prediction mode, a first mode voting value and a second mode voting value of the current node according to reconstructed neighboring nodes of the current node, wherein the neighboring nodes at least include a parent node of the current node and a neighbor node of the current node; determine a first mode weight value and a second mode weight value of the current node respectively according to the first mode voting value and the second mode voting value of the current node; and determine a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node.
[0021] In a sixth aspect, an embodiment of the present application provides a decoder, which comprises a first memory and a first processor, wherein:
[0022] the first memory is configured to store a computer program capable of running on the first processor;
[0023] the first processor is configured to execute the method in the first aspect when the computer program is running.
[0024] In a seventh aspect, an embodiment of the present application provides an encoder, which comprises a second memory and a second processor, wherein:
[0025] the second memory is configured to store a computer program capable of running on the second processor;
[0026] the second processor is configured to execute the method in the second aspect when the computer program is running.
[0027] In an eighth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program. The computer program is executed to implement the method in the first aspect or the second aspect.
[0028] The embodiments of the present application provide a coding method, a code stream, a decoder, an encoder and a storage medium. At the decoding side, the coding method comprises: in the case that it is determined that the current node adopts the inter and intra weighted average prediction mode, determining a first mode voting value and a second mode voting value of the current node according to the reconstructed neighboring nodes of the current node; wherein the neighboring nodes at least include the parent node of the current node and the neighbor node of the current node; determining a first mode weight value and a second mode weight value of the current node according to the first mode voting value and the second mode voting value of the current node; and determining a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node. On the one hand, the prediction mode voting value and the weight value are determined by considering the neighboring node information, which can make the prediction mode more accurately reflect the characteristics and context information of the current node, and improve the prediction accuracy. On the one hand, the mode voting strategy can combine the information of multiple prediction modes, reduce the error caused by a single prediction mode, and improve the stability and accuracy of the prediction. In general, the embodiments of the present application can improve the prediction accuracy of the first coefficient by determining the prediction mode voting value and the weight value by considering the neighboring node information, and determining the first coefficient prediction value according to the weight value and the prediction value, thereby improving the coding performance. BRIEF DESCRIPTION OF DRAWINGS
[0029] FIG. 1A is a schematic diagram of a three-dimensional point cloud image according to an embodiment of the present application;
[0030] FIG. 1B is a partial enlarged view of a three-dimensional point cloud image according to an embodiment of the present application;
[0031] FIG. 2A is a schematic diagram of six viewing angles of a point cloud image according to an embodiment of the present application;
[0032] FIG. 2B is a schematic diagram of a data storage format corresponding to a point cloud image according to an embodiment of the present application;
[0033] FIG. 3 is a schematic diagram of a network architecture of point cloud coding according to an embodiment of the present application;
[0034] FIG. 4A is a schematic diagram of a constituent framework of a G-PCC encoder according to an embodiment of the present application;
[0035] FIG. 4B is a schematic diagram of a constituent framework of a G-PCC decoder according to an embodiment of the present application;
[0036] FIG. 5A is a schematic diagram of a vertex centroid according to an embodiment of the present application;
[0037] FIG. 5B is a schematic diagram of a vertex centroid according to an embodiment of the present application;
[0038] FIG. 6A is a schematic diagram of geometry information reconstruction according to an embodiment of the present application;
[0039] FIG. 6B is a schematic diagram of geometry information reconstruction according to an embodiment of the present application;
[0040] FIG. 6C is a schematic diagram of geometry information reconstruction according to an embodiment of the present application;
[0041] FIG. 7 is a schematic diagram of a decoding method according to an embodiment of the present application;
[0042] FIG. 8 is a schematic diagram of a decoding method according to an embodiment of the present application;
[0043] FIG. 9 is a schematic diagram of determining a first mode voting value and a second mode voting value of a current node according to an embodiment of the present application;
[0044] FIG. 10 is a schematic diagram of determining a first mode voting value and a second mode voting value of a current node according to an embodiment of the present application;
[0045] FIG. 11 is a schematic diagram of a decoding method according to an embodiment of the present application;
[0046] FIG. 12 is a schematic diagram of a decoder according to an embodiment of the present application;
[0047] FIG. 13 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;
[0048] FIG. 14 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;
[0049] FIG. 15 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;
[0050] FIG. 16 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to enable a person skilled in the art to better understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and do not limit the embodiments of the present application.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.
[0053] In the following description, reference is made to the "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" can be the same subset or a different subset of all possible embodiments, and can be combined with each other as long as there is no conflict.
[0054] It should also be noted that the terms "first", "second", "third" etc. used in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first", "second", "third" etc. can be interchanged in a specific order or sequence as long as it is allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0055] Point cloud is a three-dimensional representation of the surface of an object. Point cloud (data) of the surface of an object can be collected by optical radar, laser radar, laser scanner, multi-view camera and other collection devices.
[0056] Point cloud is a set of discrete points that are irregularly distributed in space, expressing the spatial structure and surface properties of a three-dimensional object or scene. Figure 1A shows a three-dimensional point cloud image and Figure 1B shows a local enlarged view of the three-dimensional point cloud image. It can be seen that the point cloud surface is composed of densely distributed points.
[0057] A two-dimensional image has information expressed at each pixel point, and the distribution is regular, so it does not need to record the position information. However, the distribution of points in a point cloud in a three-dimensional space has randomness and irregularity, so the position of each point in the space needs to be recorded to completely express a point cloud. Similar to a two-dimensional image, each position has corresponding attribute information during the acquisition process, which is usually an RGB color value, and the color value reflects the color of the object. For a point cloud, the attribute information corresponding to each point, in addition to color information, also includes a commonly seen reflectance value, which reflects the surface material of the object. Therefore, the point cloud data usually includes the position information of the point and the attribute information of the point. The position information of the point can also be referred to as the geometric information of the point. For example, the geometric information of the point can be the three-dimensional coordinate information (x, y, z) of the point. The attribute information of the point can include color information and / or reflectance and the like. For example, the reflectance can be one-dimensional reflectance information (r); the color information can be information on any color space, or the 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 can be luminance chroma (YCbCr, YUV) information. Wherein, Y represents brightness (Luma), Cb (U) represents blue color difference, and Cr (V) represents red color difference.
[0058] According to the laser measurement principle, the point cloud obtained can include the three-dimensional coordinate information of the point and the reflectance value of the point. For another example, according to the photogrammetry principle, the point cloud obtained can include the three-dimensional coordinate information of the point and the three-dimensional color information of the point. For another example, the point cloud obtained by combining the laser measurement and the photogrammetry principle can include the three-dimensional coordinate information of the point, the reflectance value of the point, and the three-dimensional color information of the point.
[0059] As shown in FIGS. 2A and 2B are a point cloud image and its corresponding data storage format. FIG. 2A provides six viewing angles of the point cloud image, and FIG. 2B is composed of a file header information part and a data part. The header information includes the data format, the data representation type, the total number of points of the point cloud, and the content represented by the point cloud. For example, the point cloud is in a “.ply” format, represented by ASCII code, and has a total of 207242 points, each point having three-dimensional coordinate information (x, y, z) and three-dimensional color information (r, g, b).
[0060] The point cloud can be divided into the following categories according to the acquisition method:
[0061] Static point cloud: the object is static, and the device for acquiring the point cloud is also static;
[0062] Dynamic point cloud: the object is moving, but the device for acquiring the point cloud is static;
[0063] Dynamic acquisition of point cloud: the device acquiring the point cloud is in motion.
[0064] For example, point clouds are classified into two categories according to their use:
[0065] Category one: machine perception point cloud, which can be used in autonomous navigation systems, real-time inspection systems, geographic information systems, visual sorting robots, rescue robots, and the like;
[0066] Category two: human eye perception point cloud, which can be used in digital cultural heritage, free-view broadcast, three-dimensional immersive communication, three-dimensional immersive interaction, and the like point cloud application scenarios.
[0067] Point clouds can flexibly and conveniently express the spatial structure and surface properties of three-dimensional objects or scenes, and can provide strong realism under the premise of ensuring accuracy because point clouds are obtained by directly sampling real objects, and thus are widely applied, including virtual reality games, computer-aided design, geographic information systems, automatic navigation systems, digital cultural heritage, free-view broadcast, three-dimensional immersive remote presentation, three-dimensional reconstruction of biological tissues and organs, and the like.
[0068] Point cloud acquisition mainly includes the following approaches: computer generation, 3D laser scanning, 3D photogrammetry, and the like. A computer 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 acquire millions of point clouds per second; 3D photogrammetry can obtain point clouds of dynamic real-world three-dimensional objects or scenes, and can acquire tens of millions of point clouds per second. These point cloud acquisition technologies reduce the cost and time period of point cloud data acquisition, and improve the accuracy of data, further promoting the practical application of point clouds. Due to the continuous industrialization of point cloud data acquisition methods, it is possible to obtain a large amount of point cloud data. However, with the growth of application demand, the processing of massive 3D point cloud data has encountered a bottleneck in storage space and transmission bandwidth.
[0069] Exemplarily, taking a point cloud video with a frame rate of 30 frames per second (fps) as an example, the number of points of each frame of point cloud is 700,000, each point has coordinate information xyz (float) and color information RGB (uchar), and the data volume of a 10s point cloud video is about 0.7 million x (4 Byte x 3 + 1 Byte x 3) x 30 fps x 10s = 3.15 GB, wherein 1 Byte is 10 bits; while the YUV sampling format is 4:2:0, the frame rate of a 1280x720 two-dimensional video is 24 fps, and the data volume of a 10s video is about 1280x720x12bitx24fpsx10s≈0.33GB, and the data volume of a 10s two-view three-dimensional video is about 0.33x2 = 0.66GB. As can be seen, the data volume of the point cloud video far exceeds that of the two-dimensional video and the three-dimensional video of the same length. Therefore, in order to better realize data management, save server storage space, and reduce transmission flow and transmission time between the server and the client, point cloud compression has become a key problem to promote the development of the point cloud industry.
[0070] That is, since the point cloud is a collection of a large number of points, storing the point cloud not only consumes a large amount of memory, but also is not conducive to transmission, and there is no such large bandwidth to support the transmission of the point cloud directly on the network layer without compression, therefore, the point cloud needs to be compressed.
[0071] At present, the point cloud encoding framework that can compress the point cloud can be a Geometry-based Point Cloud Compression (G-PCC) coding framework or a Video-based Point Cloud Compression (V-PCC) coding framework provided by Moving Picture Experts Group (MPEG), or an AVS-PCC coding framework provided by AVS. The G-PCC coding framework can be used for compression of the first type of static point cloud and the third type of dynamically acquired point cloud, which can be based on Test Model Compression 13 (TMC13), and the V-PCC coding framework can be used for compression of the second type of dynamic point cloud, which can be based on Test Model Compression 2 (TMC2). Therefore, the G-PCC coding framework is also called point cloud codec TMC13, and the V-PCC coding framework is also called point cloud codec TMC2.
[0072] The embodiment of the present application provides a network architecture of a point cloud coding and decoding system comprising a decoding method and an encoding method. FIG. 3 is a schematic diagram of a network architecture of a point cloud coding and decoding system according to the embodiment of the present application. As shown in FIG. 3, the network architecture comprises 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 devices in the implementation process can be various types of devices with a point cloud coding and decoding function, for example, the electronic devices can comprise a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital telephone, a video telephone, a television, a sensing device, a server and the like, and the embodiment of the present application is not limited thereto. The decoder or the encoder in the embodiment of the present application can be the above-mentioned electronic devices.
[0073] The electronic device in the embodiment of the present application has a point cloud coding and decoding function, and generally comprises a point cloud encoder (i.e., an encoder) and a point cloud decoder (i.e., a decoder).
[0074] The related technologies in the present application are described below.
[0075] Related technology 1:
[0076] In the point cloud G-PCC coding and decoding framework, for the point cloud data to be encoded, the point cloud data is first divided into multiple slices through slice division. In each slice, the geometry information of the point cloud and the attribute information corresponding to each point are encoded separately.
[0077] FIG. 4A shows a schematic diagram of a G-PCC encoder. As shown in FIG. 4A, in the geometry encoding process, the geometry information is first converted in coordinates, so that all the point clouds are contained in a bounding box, and then quantized, which mainly plays a role of scaling. Due to the quantization rounding, the geometry information of a part of the point clouds is the same, and then it is determined based on parameters whether to remove the duplicate points. This process of quantization and removal of duplicate points is also called voxelization process. Then, the bounding box is divided by octree or a prediction tree is constructed. In this process, the points in the divided leaf nodes are arithmetically encoded to generate a binary geometry bitstream, or the vertices generated by the division are arithmetically encoded (surface fitting based on the vertices) to generate a binary geometry bitstream. In the attribute encoding process, after the geometry encoding is completed and the geometry information is reconstructed, color conversion is needed to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. Then, the reconstructed geometry information is used to recolor the point cloud, so that the unencoded attribute information corresponds to the reconstructed geometry information. Attribute encoding is mainly for color information. In the color information encoding process, there are mainly two transformation methods, one is distance-based promotion transformation depending on level of detail (LOD) division, and the other is direct region adaptive hierarchal transform (RAHT). Both of these two methods convert the 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, and then arithmetically encode the quantized coefficients to generate a binary attribute bitstream.
[0078] FIG. 4B shows a schematic diagram of a G-PCC decoder. As shown in FIG. 4B, for the obtained binary bitstream, the geometry bitstream and the attribute bitstream in the binary bitstream are first independently decoded. In the decoding of the geometry bitstream, the geometry information of the point cloud is obtained through arithmetic decoding-reconstructing octree / reconstructing prediction tree-reconstructing geometry-coordinate inverse conversion; in the decoding of the attribute bitstream, the attribute information of the point cloud is obtained through arithmetic decoding-inverse quantization-LOD division / RAHT-color inverse conversion, and the point cloud data to be encoded (i.e., the output point cloud) is restored based on the geometry information and the attribute information.
[0079] It should be noted that, as shown in FIG. 4A or FIG. 4B, the geometry encoding and decoding of the current G-PCC can be divided into octree-based geometry encoding and decoding (identified by a dashed line box) and prediction tree-based geometry encoding and decoding (identified by a dotted line box).
[0080] For octree-based geometry encoding (OctGeomEnc), the octree-based geometry encoding includes: first, coordinate conversion is performed on the geometry information, so that the point cloud is all contained in a bounding box. Then quantization is performed, which mainly plays a scaling role. Due to quantization rounding, the geometry information of a part of points is the same. Whether to remove the duplicate points is determined according to the parameters. The quantization and removal of duplicate points are also called the voxelization process. Next, the bounding box is continuously divided into a tree (such as an octree, a quadtree, a binary tree, etc.) in the order of breadth-first traversal, and the occupancy code of each node is encoded. In the related art, a company proposes an implicit geometry division method. First, the bounding box of the point cloud is calculated Assume d x d y d z The bounding box corresponds to a cuboid. In the geometry division, first, a binary tree division is performed based on the x-axis to obtain two child nodes; until the condition d x d y d z is met, a quadtree division is performed based on the x and y axes to obtain four child nodes; when the condition d x d y d z is finally met, an octree division is continuously performed until the leaf node obtained by the division is a 1x1x1 unit cube, and the points in the leaf node are encoded to generate a binary code stream. In the process of binary tree / quadtree / octree division, two parameters K and M are introduced. Parameter K indicates the maximum number of binary tree / quadtree divisions before octree division; parameter M is used to indicate the minimum block length corresponding to the binary tree / quadtree division, which is 2 M . At the same time, K and M must satisfy the condition: assume d max d x d y d z d min d x d y d z Parameter K satisfies: K≥d max d min ; parameter M satisfies: M≥d minThe parameters K and M satisfy the above conditions because, in the current G-PCC, the priority of the partitioning manner in the geometric implicit partitioning process is a binary tree, a quadtree, and an octree. When the node block size does not satisfy the condition of the binary tree / quadtree, the node is always partitioned by the octree until the partitioning is performed to the leaf node minimum unit 1x1x1. The geometric information coding mode based on the octree can effectively encode the geometric information of the point cloud by utilizing the correlation between adjacent points in the space. However, for some relatively flat nodes or nodes with a plane characteristic, the coding efficiency of the point cloud geometric information can be further improved by utilizing the plane coding.
[0081] Related technology 2:
[0082] In the point cloud GESTM encoder framework, the geometric information of the point cloud and the attribute information corresponding to each point are encoded separately. The current GESTM geometric coding can be divided into an octree-based geometric coding and a Trisoup-based geometric coding. The general test sequence includes Cat2-A, Cat2-B, and Cat2-C, which are three types, and the point cloud only contains color attribute information. There is only one general test condition for the inter-frame geometric coding based on Trisoup: lossy geometry and lossy attribute.
[0083] For the triangle face encoding algorithm (Triangle Soup, Trisoup), the following three aspects are described:
[0084] 1. Trisoup-based partitioning
[0085] In some embodiments, for the triangle face set-based geometric information coding, in the trisoup-based geometric information coding framework, geometric partitioning is also performed first, but unlike the binary tree / quadtree / octree-based geometric information coding, the point cloud is not partitioned to the unit cube with an edge length of 1x1x1, but is partitioned to stop partitioning when the block edge length is W. Based on the surface formed by the distribution of the point cloud in each block, at most twelve intersection points (vertices) are generated by the surface and the twelve edges of the block. The vertex coordinates of each block are sequentially encoded to generate a binary code stream. Similarly, the decoding end decodes the binary code stream to obtain at most twelve vertices.
[0086] 2. Vertex centroid offset value
[0087] In some embodiments, after encoding / decoding up to twelve vertices, in order to more accurately restore the shape of the point cloud, the centroid offset value of the vertices of the cube is encoded / decoded. As shown in FIGS. 5A and 5B, first, the centroid C of up to twelve vertices (shown as V1, V2, V3, V4 in the figure) is calculated, and then the centroid offset value of the vertices of the cube is calculated mean The centroid C is calculated using the partial real point cloud point set of the cube at the encoding end, and is the normal vector of the centroid point. Wherein a needs to be encoded and decoded. Thus, the final point cloud triangular patches CV1V2, CV2V3, CV3V4, and CV4V1 can be used to restore the point cloud.
[0088] 3. Point cloud geometry information reconstruction based on Trisoup
[0089] In some embodiments, for point cloud geometry information reconstruction based on Trisoup, when reconstructing the point cloud geometry information at the decoding end, first, the vertex coordinates are decoded to complete the triangular patch reconstruction, and the process is shown in FIGS. 6A, 6B, and 6C. As shown in FIG. 6A, there are three vertices (v1, v2, v3) in the block, and the triangular patch set formed by the three vertices in a certain order is called Triangle Soup, i.e., Trisoup, as shown in FIG. 6B. Then, sampling is performed on the triangular patch set, and the obtained sampling points are used as the reconstructed point cloud in the block, as shown in FIG. 6C.
[0090] Related technology 3:
[0091] In the existing GES-TM attribute inter-frame prediction encoding, a recursive adaptive hierarchical transform (RAHT) attribute transform coding structure is constructed based on the geometry information of the current node to be encoded, that is, the nodes are continuously merged from the voxel level until the root node of the entire RAHT transform tree is obtained, so as to complete the entire attribute transform coding hierarchical structure. According to the RAHT transform structure, each node is divided from the root node to obtain N sub-nodes (N is less than or equal to 8) of each node. The attributes of the N sub-nodes are independently and orthogonally transformed by the RAHT transform to obtain DC and AC coefficients, and the AC coefficients of the N sub-nodes are predicted in the following manner:
[0092] 1) Intra-frame prediction:
[0093] In some embodiments, the intra-frame prediction value is obtained by using the attribute prediction value of the adjacent nodes.
[0094] 2) Inter-frame prediction:
[0095] In some embodiments, a node that is exactly the same as the current node position is found in the cache of the reference frame, which is called a homologous node;
[0096] In some embodiments, the inter-frame prediction node of the current node is valid: that is, the homologous node exists, and the attribute of the prediction node is directly taken as the attribute prediction value of the current node to be encoded / decoded;
[0097] In some embodiments, if the inter-frame prediction node of the current node is invalid: that is, the homologous node does not exist, the attribute prediction value of the intra-frame neighboring node is used as the attribute prediction value of the node to be encoded / decoded.
[0098] 3) No prediction:
[0099] In some embodiments, if there is no inter-frame prediction value and intra-frame prediction value, it is a no prediction mode, that is, no prediction value.
[0100] In some embodiments, the region adaptive hierarchical transform (RAHT) is a Haar wavelet transform that can transform the point cloud attribute information from the spatial domain to the frequency domain, further reducing the correlation between the point cloud attributes. The main idea is to transform the nodes in each layer from the X, Y, Z three dimensions in a bottom-up manner according to the octree structure, and iterate until the root node of the octree. The basic idea of RAHT is to perform wavelet transform based on the hierarchical structure of the octree, associate the attribute information with the octree nodes, recursively transform the attributes of the occupied nodes in the same parent node in a bottom-up manner, transform the nodes in each layer from the X, Y, Z three dimensions, and transform to the root node of the octree. In the process of hierarchical transform, the low pass / low frequency (DC) coefficients obtained after the transformation of the nodes in the same layer are passed to the nodes of the next layer for further transformation, and all high pass / high frequency (AC) coefficients can be encoded by an arithmetic encoder. In the transformation process, the DC coefficients (direct current component) after the transformation of the nodes in the same layer will be passed to the previous layer for further transformation, and the AC coefficients (alternating current component) after the transformation of each layer will be quantized and encoded.
[0101] In some embodiments, in the RAHT coding, the RAHT attribute transform coding result is constructed based on the geometric information of the current node, that is, the node merging is continuously performed at the voxel level until the root node of the entire RAHT transform tree is obtained, so as to complete the entire attribute transform coding hierarchical structure. Then, according to the RAHT transform structure, the root node is divided to obtain N child nodes (N is less than or equal to 8) of each node, and the attributes of the N child nodes are independently and orthogonally transformed by using the RAHT transform to obtain direct current (DC) coefficients and alternating current (AC) coefficients. In this way, in the process of predicting the AC coefficients of the current node, intra prediction or inter prediction is usually used, which results in low accuracy of the predicted first coefficients, thereby affecting the coding performance.
[0102] It should be noted that, in the following, the AC coefficients are also referred to as the first coefficients, and the DC coefficients are also referred to as the second coefficients.
[0103] Based on this, in a first aspect, the embodiments of the present application provide a decoding method. On the one hand, by considering the neighbor node information to determine the prediction mode voting value and the weight value, the prediction mode can more accurately reflect the characteristics and context information of the current node, and the prediction accuracy is improved. On the one hand, the mode voting strategy can combine the information of multiple prediction modes, reduce the error caused by a single prediction mode, and improve the stability and accuracy of the prediction. In general, by considering the neighbor node information to determine the prediction mode voting value and the weight value, and determining the first coefficient prediction value according to the weight value and the prediction value, the prediction accuracy of the first coefficient can be improved, thereby improving the decoding performance.
[0104] In an embodiment of the present application, FIG. 7 is a flowchart of a decoding method provided by an embodiment of the present application. As shown in FIG. 7, the method can include S101 to S103:
[0105] S101, in the case where it is determined that the current node adopts the inter and intra weighted average prediction mode, determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include the father node of the current node and the neighbor node of the current node.
[0106] It should be noted that the decoding method of the embodiments of the present application is applied to a decoder. In addition, the decoding method can specifically refer to an AC coefficient prediction method based on RAHT. In the RAHT prediction mode, this mainly refers to a weight optimization algorithm based on RAHT inter and intra weighted average, to avoid the related problems that the accuracy of predicting the AC coefficients is low in the related art, thereby affecting the coding performance.
[0107] In the embodiments of the present application, the current node is also referred to as a node to be decoded, a node to be detected, a current point, a node to be decoded, a node to be detected, a current node to be decoded, and the like, which are not limited in the embodiments of the present application.
[0108] In the embodiments of the present application, the inter-frame and intra-frame weighted average prediction mode refers to determining the first coefficient prediction value of the current node by using the first coefficient prediction value of the reference node of the reference frame and the current frame of the current node.
[0109] In the embodiments of the present application, the first mode voting value of the current node is also referred to as an inter-frame mode voting value or an inter-frame prediction mode number, and the second mode voting value of the current node is also referred to as an intra-frame mode voting value or an intra-frame prediction mode number. For example, the first mode voting value of the current node can be represented as voteInter, and the second mode voting value of the current node can be represented as voteIntra.
[0110] It should be noted that the first mode voting value and the second mode voting value of the current node are calculated by using the same algorithm at the encoding and decoding end, and do not need to be encoded / decoded in the code stream.
[0111] In the embodiments of the present application, the reconstructed neighbor node of the current node is a node of the current node that has been reconstructed or decoded. For example, the neighbor node of the current node at least includes a parent node of the current node and a neighbor node of the current node. The parent node of the current node refers to a node directly connected to the current node at a higher level in the RAHT structure tree. In other words, the parent node of the current node refers to a direct superior node of the current node, and the current node is a child node of the parent node. The neighbor node of the current node refers to other nodes at the same level (or the same depth) and having the same parent node as the current node. In other words, the neighbor node of the current node refers to other nodes closely related to the current node at the same level, which share the same parent node with the current node.
[0112] It should be noted that the number of the parent node of the current node is 1, and the number of the neighbor node of the current node is one or more.
[0113] In some embodiments of the present application, the neighbor node further includes at least one of a grandparent node of the current node and an uncle node of the current node. The grandparent node of the current node is a parent node of the parent node of the current node. The uncle node of the current node is a sibling node of the parent node of the current node.
[0114] In the embodiments of the present application, the grandparent node of the current node refers to the parent node of the parent node of the current node. In other words, the grandparent node is the upper node of the parent node of the current node, located above the same level as the parent node of the current node. The uncle node of the current node refers to the sibling node of the parent node of the current node, i.e., another child node of the parent node of the parent node of the current node.
[0115] It should be noted that the number of grandparent nodes of the current node is 1, and the number of uncle nodes of the current node is one or more.
[0116] In the embodiments of the present application, the neighborhood nodes of the current node can include the following four cases:
[0117] 1) The neighborhood nodes of the current node include: the parent node of the current node, the neighbor node of the current node;
[0118] 2) The neighborhood nodes of the current node include: the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node;
[0119] 3) The neighborhood nodes of the current node include: the parent node of the current node, the neighbor node of the current node, the uncle node of the current node;
[0120] 4) The neighborhood nodes of the current node include: the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node.
[0121] It can be understood that expanding the neighborhood nodes of the current node to include the grandparent node of the current node and the uncle node of the current node can provide more comprehensive and diverse information, helping to more accurately determine the first coefficient prediction value. The grandparent node and the uncle node have a more distant relevance to the current node, and considering their information can better capture the spatial correlation and motion continuity between frames. By considering the information of more related nodes, errors and biases in the prediction process can be reduced, and the accuracy and stability of the prediction can be improved. Considering the information of multiple neighborhood nodes can enhance the robustness of the prediction model, making it have better adaptability and stability for different scenes and content changes. Therefore, including the grandparent node and the uncle node in the consideration range of the neighborhood nodes can increase the accuracy and stability of the prediction, thereby improving the efficiency and quality of video decoding.
[0122] S102, according to the first mode voting value and the second mode voting value of the current node, respectively determine the first mode weight value and the second mode weight value of the current node.
[0123] In the embodiments of the present application, the first mode weight value and the second mode weight value of the current node represent the relative importance and contribution of the first prediction mode and the second prediction mode respectively. For example, the first prediction mode is an inter prediction mode, and the second prediction mode is an intra prediction mode.
[0124] For example, the first mode weight value and the second mode weight value of the current node are represented as w inter and w intra .
[0125] In the embodiments of the present application, in the case that the first prediction mode is an inter prediction mode and the second prediction mode is an intra prediction mode, the first mode weight value of the current node represents the importance and influence of the inter prediction mode in the case that the inter prediction mode is used in the current node, and a higher first mode weight value means that the inter prediction mode contributes more to the prediction of the current node. The second mode weight value represents the importance and influence of the intra prediction mode in the case that the intra prediction mode is used in the current node, and a higher second mode weight value means that the intra prediction mode contributes more to the prediction of the current node.
[0126] It should be noted that the first mode weight value and the second mode weight value of the current node are decimal values, and the sum of the first mode weight value and the second mode weight value of the current node is 1.
[0127] In the embodiments of the present application, the first mode weight value and the second mode weight value of the current node can be described by formula (1) and formula (2):
[0128] In formula (1) and formula (2), w inter represents the first mode weight value of the current node, w intra represents the second mode weight value of the current node, voteInter represents the first mode voting value of the current node, and voteIntra represents the second mode voting value of the current node.
[0129] S103, determining the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
[0130] In the embodiments of the present application, the first coefficient prediction value of the current node is the AC coefficient prediction value of the current node.
[0131] In the embodiments of the present application, the first mode prediction value is an inter-frame prediction value, and the second mode prediction value is an intra-frame prediction value. Specifically, the first mode prediction value of the current node is determined by the first coefficient prediction value of the homonymic node of the current node, and the second mode prediction value of the current node is determined by the first coefficient prediction value of the adjacent node of the current node.
[0132] For example, for the first mode prediction value of the current node, in the case that there is a valid intra-frame adjacent node of the current node, the intra-frame prediction value (the first mode prediction value) is obtained by using the attribute prediction value of the intra-frame adjacent node. For the second mode prediction value, a node with the same position as the current node is found in the cache of the reference frame, which is called a homonymic node. If the inter-frame prediction node of the current node is valid (i.e., the homonymic node exists), the attribute of the inter-frame prediction node is directly taken as the attribute prediction value (the second mode prediction value) of the current node. If the inter-frame prediction node of the current node is invalid (i.e., the homonymic node does not exist), the attribute prediction value of the intra-frame adjacent node is used as the attribute prediction value (the first mode prediction value) of the current node. If both the intra-frame prediction node and the inter-frame prediction node of the current node are invalid or do not exist, the current node has no attribute prediction value, and in this case, it is a non-prediction mode.
[0133] In the embodiments of the present application, the first coefficient prediction value of the current node can be determined by formula (3):
[0134] In formula (3), Attrinter_predict is the first mode prediction value of the current node, Attrintra_predict is the second mode prediction value of the current node, w inter represents the first mode weight value of the current node, w intra represents the second mode weight value of the current node, and Attraverage_predict is the first coefficient prediction value of the current node.
[0135] In some embodiments of the present application, based on FIG. 7, as shown in FIG. 8, the decoding method further includes S104 to S106:
[0136] S104, parsing a code stream to determine related syntax element information;
[0137] S105, in the case that the related syntax element information indicates that the current layer in which the current node is located or the current block in which the current node is located adopts the prediction mode of the inter-frame and intra-frame weighted average based on the region adaptive hierarchical transformation, judging whether the first mode prediction value and the second mode prediction value of the current node exist;
[0138] S106, if the first mode predictor and the second mode predictor exist at the current node, then it is determined that the inter and intra weighted average prediction mode is used for the current node.
[0139] In the embodiments of the present application, the implementation of S104 to S106 is prior to S101.
[0140] In the embodiments of the present application, the related syntax element information is used to indicate whether the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform is used for the current layer where the current node is located or the current block where the current node is located.
[0141] In the embodiments of the present application, the related syntax element information can be represented as RahtInterPredEligible.
[0142] In the embodiments of the present application, if the value of the related syntax element information is the first value, it is determined that the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform is used for the current layer where the current node is located or the current block where the current node is located; or, if the value of the related syntax element information is the second value, it is determined that the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform is not used for the current layer where the current node is located or the current block where the current node is located.
[0143] It should be noted that, in the embodiments of the present application, the first value is different from the second value, and the first value and the second value can be in the form of parameters or in the form of numbers. Specifically, the related syntax element information can be a parameter written in a profile, or a value of a flag, which is not limited here.
[0144] Exemplarily, for the first value and the second value, the first value can be set as 1, and the second value can be set as 0; or, the first value can be set as 0, and the second value can be set as 1; or, the first value can be set as true, and the second value can be set as false; or, the first value can be set as false, and the second value can be set as true; or, the first value can be set as true, and the second value can be set as false, which is not limited here.
[0145] In the embodiments of the present application, taking the flag written in the code stream as an example, it is assumed that the first value is set as 1 (true) and the second value is set as 0 (false), at this time, if the value of the related syntax element information is 1 (true), it can be determined that the current node is in the current layer or the current block of the current node adopts the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform; if the value of the third syntax identification information is 0 (false), it can be determined that the current node is in the current layer or the current block of the current node does not adopt the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform.
[0146] In the embodiments of the present application, in the case of determining that the current node is in the current layer or the current block of the current node adopts the inter and intra weighted average prediction mode based on the region adaptive hierarchical transform, it is further judged whether the first mode prediction value and the second mode prediction value of the current node exist.
[0147] In the embodiments of the present application, in the process of RAHT prediction, if the first mode prediction value and the second mode prediction value of the current node both exist, the decoding end will perform weighted average on the first mode prediction mode and the second prediction mode, thereby obtaining the first coefficient prediction value of the current node, and this process is called the inter and intra weighted average prediction mode.
[0148] For example, as shown in FIG. 9, taking the neighbor nodes including the father node of the current node and the neighbor node of the current node as an example, the determination of the first mode voting value (voteInter) and the second mode voting value (voteIntra) of the current node is explained.
[0149] As shown in FIG. 9, in the case where the current node has both inter-prediction nodes and intra-prediction nodes, the first mode voting value and the second mode voting value of the current node are calculated, and in the case where the current node has no inter-prediction node and / or no intra-prediction node, the current node does not enable the inter-intra weighted average prediction mode, and at this time, the first prediction mode of the current node is the inter-prediction value or the intra-prediction value. Specifically, for the case where the current node adopts the inter-intra weighted average prediction mode, if the prediction mode of the parent node of the current node is the inter-prediction mode, voteInter is added by k1 (voteInter+=k1); if the prediction mode of the parent node of the current node is the intra-prediction mode, voteIntra is added by k1 (voteIntra+=k1); if the prediction mode of the parent node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k2 (voteInter+=k2, voteIntra+=k2). If the prediction mode of the neighbor node of the current node is the inter-prediction mode, voteInter is added by k3 (voteInter+=k3); if the prediction mode of the neighbor node of the current node is the intra-prediction mode, voteIntra is added by k3 (voteIntra+=k3); if the prediction mode of the neighbor node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k4 (voteInter+=k4, voteIntra+=k4). According to the above judgment logic, the first mode voting value (voteInter) and the second mode voting value (voteIntra) of the current node are determined.
[0150] For example, it is assumed that the initial inter-prediction voting value is 1, the initial intra-prediction voting value is 1, the parent node of the current node includes parent node 1, and the neighbor nodes of the current node include neighbor node 1, neighbor node 2, and neighbor node 3. If the prediction mode of parent node 1 is the inter-prediction mode, the prediction mode of neighbor node 1 is the inter-prediction mode, the prediction mode of neighbor node 2 is the intra-prediction mode, and the prediction mode of neighbor node 3 is the no-prediction mode, the first mode voting value of the current node is voteInter=1+k1+k3+k4, and the second mode voting value of the current node is voteIntra=1+k3+k4. If the prediction mode of parent node 1 is the intra-prediction mode, the prediction mode of neighbor node 1 is the intra-prediction mode, the prediction mode of neighbor node 2 is the intra-prediction mode, and the prediction mode of neighbor node 3 is the no-prediction mode, the first mode voting value of the current node is voteInter=1+k4, and the second mode voting value of the current node is voteIntra=1+k1+k3+k3+k4.
[0151] In some embodiments of the present application, the decoding method further comprises:
[0152] parsing the code stream to determine the second coefficient value and the first coefficient residual value of the current node;
[0153] determining the first coefficient value of the current node according to the first coefficient residual value and the first coefficient prediction value;
[0154] determining the attribute reconstruction value of the current node by inversely transforming the first coefficient value and the second coefficient value according to the recursive adaptive hierarchical transform mode.
[0155] In embodiments of the present application, the second coefficient value is a DC coefficient value.
[0156] In embodiments of the present application, the first coefficient residual value (AC coefficient residual value) and the first coefficient prediction value (AC coefficient prediction value) are added to obtain the first coefficient value (AC coefficient value) of the current node.
[0157] The embodiments of the present application provide a decoding method applied to a decoder, which comprises: in the case of determining that the current node adopts an inter-frame and intra-frame weighted average prediction mode, determining a first mode voting value and a second mode voting value of the current node according to reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include a parent node of the current node and a neighbor node of the current node; determining a first mode weight value and a second mode weight value of the current node according to the first mode voting value and the second mode voting value; and determining a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node. On the one hand, by considering the information of the parent node and the neighbor node of the current node, the characteristics and correlation of the neighbor nodes can be fully utilized to improve the accuracy and reliability of determining the first coefficient prediction value. On the one hand, the mode voting strategy can combine the information of multiple prediction modes to reduce the error caused by a single prediction mode and improve the stability and accuracy of prediction. On the one hand, the weight value determined according to the mode voting value can dynamically adjust the importance of different prediction modes, so that the more reliable prediction mode has a higher weight, thereby improving the accuracy of the overall prediction. Determining the coefficient prediction value of the current node according to the weight value and the prediction value can make the prediction more accurate and stable, which is helpful to improve the efficiency and quality of video decoding.
[0158] In some embodiments, in the case that the neighborhood nodes include at least the father node of the current node and the neighbor node of the current node, the neighborhood nodes of the current node include 4 cases: case 1, father node + neighbor node + grandparent node + uncle node; case 2, father node + neighbor node + grandparent node; case 3, father node + neighbor node + uncle node; and case 4, father node + neighbor node. The determination of the first mode voting value and the second mode voting value of the current node in the above 4 cases is described below.
[0159] 1. Father node + neighbor node + grandparent node + uncle node
[0160] In some embodiments of the present application, the neighborhood nodes further include the grandparent node of the current node and the uncle node of the current node; and the determination of the first mode voting value and the second mode voting value of the current node according to the reconstructed neighborhood nodes of the current node in S101 can include S1011:
[0161] S1011, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of the father node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node, and the prediction mode of the uncle node of the current node.
[0162] In some embodiments, in the case that the neighborhood nodes of the current node include the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node, there are 15 cases for determining the first mode voting value and the second mode voting value of the current node:
[0163] 1. Father node + neighbor node + grandparent node + uncle node
[0164] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, the third voting coefficient, and the fourth voting coefficient.
[0165] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in sequence according to the prediction mode of the father node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node, and the prediction mode of the uncle node of the current node, and in combination with the first voting coefficient corresponding to the father node of the current node, the second voting coefficient corresponding to the neighbor node of the current node, the third voting coefficient corresponding to the grandparent node of the current node, and the fourth voting coefficient corresponding to the uncle node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0166] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value can be values specified by both the encoding and decoding ends, or values set by the encoding end and written into the code stream, in which case the decoding end can obtain the values by parsing the code stream.
[0167] For example, the initial inter-frame voting value is 1, and the initial intra-frame voting value is 1.
[0168] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node, and the determination includes:
[0169] In the case where the prediction mode of the father node of the current node is the inter-frame prediction mode, the first voting coefficient represents the voting value of the inter-frame prediction mode, and the first voting coefficient is the first voting value; or,
[0170] In the case where the prediction mode of the father node of the current node is the intra-frame prediction mode, the first voting coefficient represents the voting value of the intra-frame prediction mode, and the first voting coefficient is the first voting value; or,
[0171] In the case where the prediction mode of the father node of the current node is the no-prediction mode, the first voting coefficient represents the voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the first voting coefficient is the second voting value; wherein the first voting value is greater than the second voting value.
[0172] In the embodiments of the present application, the first voting value is represented as k1, and the second voting value is represented as k2, k1>k2.
[0173] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node, and the determination includes:
[0174] In the case where the prediction mode of the neighbor node of the current node is the inter-frame prediction mode, the second voting coefficient represents the voting value of the inter-frame prediction mode, and the second voting coefficient is the third voting value; or,
[0175] In the case where the prediction mode of the neighbor node of the current node is the intra-frame prediction mode, the second voting coefficient represents the voting value of the intra-frame prediction mode, and the second voting coefficient is the third voting value; or,
[0176] In a case where the prediction mode of the neighbor node of the current node is the no prediction mode, the second voting coefficient represents the voting values of the inter prediction mode and the intra prediction mode, the second voting coefficient is a fourth voting value; the third voting value is greater than the fourth voting value.
[0177] In the embodiments of the present application, the third voting value is represented as k3, and the fourth voting value is represented as k4, k3>k4.
[0178] In some embodiments of the present application, the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node, including:
[0179] In a case where the prediction mode of the grandparent node of the current node is the inter prediction mode, the third voting coefficient represents the voting value of the inter prediction mode, the third voting coefficient is a fifth voting value; or,
[0180] In a case where the prediction mode of the grandparent node of the current node is the intra prediction mode, the third voting coefficient represents the voting value of the intra prediction mode, the third voting coefficient is a fifth voting value; or,
[0181] In a case where the prediction mode of the grandparent node of the current node is the no prediction mode, the third voting coefficient represents the voting values of the inter prediction mode and the intra prediction mode, the third voting coefficient is a sixth voting value; the fifth voting value is greater than the sixth voting value.
[0182] In the embodiments of the present application, the fifth voting value is represented as k5, and the sixth voting value is represented as k6, k5>k6.
[0183] In some embodiments of the present application, the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node, including:
[0184] In a case where the prediction mode of the uncle node of the current node is the inter prediction mode, the fourth voting coefficient represents the voting value of the inter prediction mode, the fourth voting coefficient is a seventh voting value; or,
[0185] In a case where the prediction mode of the uncle node of the current node is the intra prediction mode, the fourth voting coefficient represents the voting value of the intra prediction mode, the fourth voting coefficient is a seventh voting value; or,
[0186] In a case where the prediction mode of the uncle node of the current node is the no prediction mode, the fourth voting coefficient represents the voting values of the inter prediction mode and the intra prediction mode, the fourth voting coefficient is an eighth voting value; the seventh voting value is greater than the eighth voting value.
[0187] In the embodiments of the present application, the seventh voting value is represented as k7, and the eighth voting value is represented as k8, k7>k8.
[0188] For example, as shown in FIG. 10, taking the example that the neighborhood nodes include the father node of the current node and the neighbor node of the current node, the determination of the first mode vote value (voteInter) and the second mode vote value (voteIntra) of the current node is explained.
[0189] As shown in FIG. 10, in the case where the current node exists inter-prediction nodes and intra-prediction nodes, the first mode voting value and the second mode voting value of the current node are calculated, in the case where the current node does not exist inter-prediction nodes and / or intra-prediction nodes, the current node does not start the inter-intra weighted average prediction mode, at this time, the first prediction mode of the current node is the inter-prediction value or the intra-prediction value. Specifically, for the case where the current node adopts the inter-intra weighted average prediction mode, if the prediction mode of the father node of the current node is the inter-prediction mode, voteInter is added by k1 (voteInter+=k1); if the prediction mode of the father node of the current node is the intra-prediction mode, voteIntra is added by k1 (voteIntra+=k1); if the prediction mode of the father node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k2 (voteInter+=k2, voteIntra+=k2). If the prediction mode of the neighbor node of the current node is the inter-prediction mode, voteInter is added by k3 (voteInter+=k3); if the prediction mode of the neighbor node of the current node is the intra-prediction mode, voteIntra is added by k3 (voteIntra+=k3); if the prediction mode of the neighbor node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k4 (voteInter+=k4, voteIntra+=k4). If the prediction mode of the grandparent node of the current node is the inter-prediction mode, voteInter is added by k5 (voteInter+=k5); if the prediction mode of the grandparent node of the current node is the intra-prediction mode, voteIntra is added by k5 (voteIntra+=k5); if the prediction mode of the grandparent node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k6 (voteInter+=k6, voteIntra+=k6). If the prediction mode of the uncle node of the current node is the inter-prediction mode, voteInter is added by k7 (voteInter+=k7); if the prediction mode of the uncle node of the current node is the intra-prediction mode, voteIntra is added by k7 (voteIntra+=k7); if the prediction mode of the uncle node of the current node is the no-prediction mode, both voteInter and voteIntra are added by k8 (voteInter+=k8, voteIntra+=k8). According to the above judgment logic, the first mode voting value (voteInter) and the second mode voting value (voteIntra) of the current node are determined.
[0190] For example, assuming that the initial inter-frame voting value is 1, the initial intra-frame voting value is 1, the father node of the current node includes father node 1, the neighbor node of the current node includes neighbor node 1 and neighbor node 2, the grandparent node of the current node includes grandparent node 1, and the uncle node of the current node includes uncle node 1 and uncle node 2, if the prediction mode of father node 1 is an inter-frame prediction mode, the prediction modes of neighbor node 1 and neighbor node 2 are inter-frame prediction modes, the prediction mode of grandparent node 1 is a no prediction mode, and the prediction modes of uncle node 1 and uncle node 2 are intra-frame prediction modes, the first mode voting value of the current node is voteInter = 1+k1+k3+k3+k6, and the second mode voting value of the current node is voteIntra = 1+k1+k6+k7+k7. If the prediction mode of father node 1 is an intra-frame prediction mode, the prediction modes of neighbor node 1 and neighbor node 2 are inter-frame prediction modes, the prediction mode of grandparent node 1 is a no prediction mode, and the prediction modes of uncle node 1 and uncle node 2 are intra-frame prediction modes, the first mode voting value of the current node is voteInter = k3+k3+k6, and the second mode voting value of the current node is voteIntra = 1+k1+k6+k7+k7.
[0191] It should be noted that, in the embodiments of the present application, the voting coefficients of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node are determined first, and then the inter-frame voting values and the intra-frame voting values corresponding to the voting coefficients are added to the initial inter-frame voting value and the initial intra-frame voting value respectively to determine the first mode voting value and the second mode voting value of the current node. In actual application, the order of determining the voting coefficients of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node is not limited.
[0192] In addition, the inter-frame voting values and the intra-frame voting values corresponding to the voting coefficients of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node can also be added to the initial inter-frame voting value and the initial intra-frame voting value respectively in sequence to determine the first mode voting value and the second mode voting value of the current node. An example is given below to illustrate this method:
[0193] For example, assuming that the initial inter-frame voting value is 1, the initial intra-frame voting value is 1, voteInter = 1, and voteIntra = 1, the father node of the current node includes father node 1, the neighbor node of the current node includes neighbor node 1 and neighbor node 2, the grandparent node of the current node includes grandparent node 1, and the uncle node of the current node includes uncle node 1 and uncle node 2. The process of determining the first mode voting value and the second mode voting value of the current node includes:
[0194] Step 1, traverse the father node of the current node, if the prediction mode of the father node 1 is the inter prediction mode, then the inter voting value of the first voting coefficient is k1. At this time, voteInter = 1 + k1 and voteIntra = 1;
[0195] Step 2, traverse the neighbor node of the current node, if the prediction mode of the neighbor node 1 and the neighbor node 2 is the inter prediction mode, then the inter voting value of the second voting coefficient of the neighbor node 1 and the neighbor node 2 is k3. At this time, voteInter = 1 + k1 + k3 + k3 and voteIntra = 1;
[0196] Step 3, traverse the grandparent node of the current node, if the prediction mode of the grandparent node 1 is the no prediction mode, then the inter voting value and the intra voting value of the third voting coefficient of the grandparent node 1 are k6. At this time, voteInter = 1 + k1 + k3 + k3 + k6 and voteIntra = 1 + k6;
[0197] Step 4, traverse the uncle node of the current node, if the prediction mode of the uncle node 1 and the uncle node 2 is the intra prediction mode, then the intra voting value of the fourth voting coefficient of the uncle node 1 and the uncle node 2 is k8. At this time, voteInter = 1 + k1 + k3 + k3 + k6 and voteIntra = 1 + k6 + k7 + k7.
[0198] Step 5, the voteInter = 1 + k1 + k3 + k3 + k6 and the voteIntra = 1 + k6 + k7 + k7 after the traversal are respectively taken as the first mode voting value and the second voting value of the current node.
[0199] It should be noted that, in the embodiments of the present application, the traversal order of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node is not limited.
[0200] It should be noted that, in the similar embodiments below, the first mode voting value and the second voting value of the current node can be determined in the following two ways:
[0201] Way one, the respective voting coefficients are determined first, the inter voting values corresponding to the respective voting coefficients are added to the initial inter voting value to obtain the first mode voting value of the current node, and the intra voting values corresponding to the respective voting coefficients are added to the initial intra voting value to obtain the second mode voting value of the current node.
[0202] The second mode is that after the current voting coefficient is determined, the current first mode voting value and the current second mode voting value are added to the inter-frame voting value and the intra-frame voting value corresponding to the current voting coefficient respectively to obtain a next first mode voting value and a next second mode voting value, and a next voting coefficient is determined, and the next first mode voting value and the next first mode voting value are added to the inter-frame voting value and the intra-frame voting value corresponding to the next voting coefficient respectively to obtain a next next first mode voting value and a next next second mode voting value, and the process is repeated until the neighboring nodes of the current node are traversed to obtain the first mode voting value and the second mode voting value of the current node.
[0203] Case 2, neighbor node + uncle node + father node joint grandparent node
[0204] In some embodiments of the present application, a second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; a fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; a fifth voting coefficient is determined according to the prediction modes of the father node of the current node and the grandparent node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the second voting coefficient, the fourth voting coefficient and the fifth voting coefficient.
[0205] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively, and the second voting coefficient corresponding to the neighbor node of the current node, the fourth voting coefficient corresponding to the uncle node of the current node, and the fifth voting coefficient corresponding to the father node of the current node and the grandparent node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0206] In some embodiments of the present application, the fifth voting coefficient is determined according to the prediction modes of the father node of the current node and the grandparent node of the current node, comprising:
[0207] In the case that the prediction modes of the father node of the current node and the grandparent node of the current node are both inter-frame prediction modes, the fifth voting coefficient represents the voting value of the inter-frame prediction mode, and the fifth voting coefficient is the ninth voting value; or,
[0208] In the case that the prediction modes of the father node of the current node and the grandparent node of the current node are both intra-frame prediction modes, the fifth voting coefficient represents the voting value of the intra-frame prediction mode, and the fifth voting coefficient is the ninth voting value; or,
[0209] In a case where the prediction modes of the father node of the current node and the grandparent node of the current node are not both the inter prediction mode or the intra prediction mode, the fifth voting coefficient represents the voting values of the inter prediction mode and the intra prediction mode, and the fifth voting coefficient is the tenth voting value; the ninth voting value is greater than the tenth voting value.
[0210] In the embodiments of the present application, the ninth voting value is denoted as k9, and the tenth voting value is denoted as k10, k9>k10.
[0211] For example, if the prediction modes of the father node of the current node and the grandparent node of the current node are both the inter prediction mode, voteInter is added by k9 (voteInter+=k9); if the prediction modes of the father node of the current node and the grandparent node of the current node are both the intra prediction mode, voteIntra is added by k9 (voteIntra+=k9); if the prediction modes of the father node of the current node and the grandparent node of the current node are not both the inter prediction mode and the intra prediction mode, voteInter and voteIntra are both added by k10 (voteInter+=k10, voteIntra+=k10).
[0212] For example, assuming that the initial inter prediction voting value is 1, the initial intra prediction voting value is 1, the prediction mode of the neighbor node 1 is the inter prediction mode, the prediction mode of the uncle node 1 is the intra prediction mode, and the prediction modes of the father node 1 and the grandparent node 1 are both the inter prediction mode, the first mode voting value is voteInter=1+k3+k9, and the second mode voting value is voteIntra=1+k7. Assuming that the prediction mode of the neighbor node 1 is the intra prediction mode, the prediction mode of the uncle node 1 is the no prediction mode, the prediction mode of the father node 1 is the inter prediction mode, and the prediction mode of the grandparent node 1 is the intra prediction mode, the first mode voting value is voteInter=1+1+k8+k10, and the second mode voting value is voteIntra=1+k3+k10.
[0213] Case 3, father node+grandparent node+neighbor node joint uncle node
[0214] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node, the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node, the sixth voting coefficient is determined according to the prediction modes of the neighbor node of the current node and the uncle node of the current node, and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter prediction voting value, the initial intra prediction voting value, the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
[0215] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in sequence according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, in combination with the first voting coefficient corresponding to the father node of the current node, the third voting coefficient corresponding to the grandparent node of the current node, and the sixth voting coefficient corresponding to the neighbor node of the current node and the uncle node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0216] In some embodiments of the present application, the sixth voting coefficient is determined according to the prediction modes of the neighbor node of the current node and the uncle node of the current node, and includes:
[0217] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both inter-frame prediction modes, the sixth voting coefficient represents the voting value of the inter-frame prediction mode, and the sixth voting coefficient is the eleventh voting value; or,
[0218] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both intra-frame prediction modes, the sixth voting coefficient represents the voting value of the intra-frame prediction mode, and the sixth voting coefficient is the eleventh voting value; or,
[0219] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are not both inter-frame prediction modes or intra-frame prediction modes, the sixth voting coefficient represents the voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the sixth voting coefficient is the twelfth voting value; the eleventh voting value is greater than the twelfth voting value.
[0220] In the embodiments of the present application, the eleventh voting value is represented as k11, and the twelfth voting value is represented as k12, k11>k12.
[0221] For example, if the prediction modes of the neighbor node of the current node and the uncle node of the current node are both inter-frame prediction modes, k11 is added to voteInter (voteInter+=k11); if the prediction modes of the neighbor node of the current node and the uncle node of the current node are both intra-frame prediction modes, k11 is added to voteIntra (voteIntra+=k11); if the prediction modes of the neighbor node of the current node and the uncle node of the current node are not both inter-frame prediction modes and intra-frame prediction modes, k12 is added to both voteInter and voteIntra (voteInter+=k12, voteIntra+=k12).
[0222] For example, assuming the initial inter-frame voting value is 1, the initial intra-frame voting value is 1, the prediction mode of the father node 1 is the inter-frame prediction mode, the prediction mode of the grandparent node 1 is the intra-frame prediction mode, and the prediction modes of the neighbor node 1 and the uncle node 1 are both the intra-frame prediction mode, the first mode voting value is voteInter = 1 + k1, and the second mode voting value is voteIntra = 1 + k5 + k11. Assuming the prediction mode of the father node 1 is the intra-frame prediction mode, the prediction mode of the grandparent node 1 is the no prediction mode, the prediction mode of the neighbor node 1 is the inter-frame prediction mode, and the prediction mode of the uncle node 1 is the intra-frame prediction mode, the first mode voting value is voteInter = 1 + k6 + k12, and the second mode voting value is voteIntra = 1 + k1 + k6 + k12.
[0223] Case 4, father node joint grandparent node + neighbor node joint uncle node
[0224] In some embodiments of the present application, a fifth voting coefficient is determined according to the prediction modes of the father node of the current node and the grandparent node of the current node, a sixth voting coefficient is determined according to the prediction modes of the neighbor node of the current node and the uncle node of the current node, and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the fifth voting coefficient, and the sixth voting coefficient.
[0225] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in sequence according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node, in combination with the fifth voting coefficient corresponding to the father node of the current node and the grandparent node of the current node, and the sixth voting coefficient corresponding to the neighbor node of the current node and the uncle node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0226] For example, assuming the initial inter-frame voting value is 1, the initial intra-frame voting value is 1, the prediction modes of the father node 1 and the grandparent node are both the inter-frame prediction mode, the prediction mode of the neighbor node 1 is the inter-frame prediction mode, and the prediction mode of the uncle node 1 is the intra-frame prediction mode, the first mode voting value is voteInter = 1 + k9 + k12, and the second mode voting value is voteIntra = 1 + k12. Assuming the prediction mode of the father node 1 is the no prediction mode, the prediction mode of the grandparent node is the inter-frame prediction mode, and the prediction modes of the neighbor node 1 and the uncle node 1 are both the intra-frame prediction mode, the first mode voting value is voteInter = 1 + k10, and the second mode voting value is voteIntra = 1 + k10 + k11.
[0227] Case 5, father node + neighbor node + grandparent node joint uncle node
[0228] In some embodiments of the present application, a first voting coefficient is determined according to the prediction mode of the father node of the current node; a second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; a seventh voting coefficient is determined according to the prediction modes of the grandparent node of the current node and the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient and the seventh voting coefficient.
[0229] In embodiments of the present application, according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, and in combination with the first voting coefficient corresponding to the father node of the current node, the second voting coefficient corresponding to the neighbor node of the current node, and the seventh voting coefficient corresponding to the grandparent node of the current node and the uncle node of the current node, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn to obtain the first mode voting value and the second mode voting value of the current node.
[0230] In some embodiments of the present application, the seventh voting coefficient is determined according to the prediction modes of the grandparent node of the current node and the uncle node of the current node, comprising:
[0231] In the case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are both inter-frame prediction modes, the seventh voting coefficient represents the voting value of the inter-frame prediction mode, and the seventh voting coefficient is the thirteenth voting value; or,
[0232] In the case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are both intra-frame prediction modes, the seventh voting coefficient represents the voting value of the intra-frame prediction mode, and the seventh voting coefficient is the thirteenth voting value; or,
[0233] In the case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are not both inter-frame prediction modes or intra-frame prediction modes, the seventh voting coefficient represents the voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the seventh voting coefficient is the fourteenth voting value; the thirteenth voting value is greater than the fourteenth voting value.
[0234] In embodiments of the present application, the thirteenth voting value is represented as k13, and the fourteenth voting value is represented as k14, k13>k14.
[0235] For example, if the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node are both inter prediction modes, voteInter is added by k13 (voteInter += k13); if the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node are both intra prediction modes, voteIntra is added by k13 (voteIntra += k13); if the prediction mode of the uncle node of the current node and the prediction mode of the uncle node of the current node are not both inter prediction modes and intra prediction modes, voteInter and voteIntra are both added by k14 (voteInter += k14, voteIntra += k14).
[0236] For example, assuming that the initial inter voting value is 1, the initial intra voting value is 1, the prediction mode of the father node 1 is an inter prediction mode, the prediction mode of the neighbor node 1 is an intra prediction mode, and the prediction modes of the grandparent node and the uncle node are both inter prediction modes, the first mode voting value is voteInter = 1 + k1 + k13, and the second mode voting value is voteIntra = 1 + k1. Assuming that the prediction mode of the father node 1 is a no prediction mode, the prediction mode of the neighbor node 1 is an inter prediction mode, the prediction mode of the grandparent node is an intra prediction mode, and the prediction mode of the uncle node is an inter prediction mode, the first mode voting value is voteInter = 1 + k2 + k3 + k14, and the second mode voting value is voteIntra = 1 + k2 + k14.
[0237] Case 6, grandparent node + uncle node + father node joint neighbor node
[0238] In some embodiments of the present application, a third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; a fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; an eighth voting coefficient is determined according to the prediction modes of the father node of the current node and the neighbor node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter voting value, the initial intra voting value, the third voting coefficient, the fourth voting coefficient, and the eighth voting coefficient.
[0239] In some embodiments of the present application, the initial inter voting value and the initial intra voting value are iteratively updated according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node, and the uncle node of the current node, in combination with the third voting coefficient corresponding to the grandparent node of the current node, the fourth voting coefficient of the uncle node of the current node, and the eighth voting coefficient corresponding to the father node of the current node and the neighbor node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0240] In some embodiments of the present application, the eighth voting coefficient is determined according to the prediction modes of the parent node of the current node and the neighbor node of the current node, including:
[0241] In the case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction mode, and the eighth voting coefficient is the fifteenth voting value; or,
[0242] In the case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both intra prediction modes, the eighth voting coefficient represents a voting value of the intra prediction mode, and the eighth voting coefficient is the fifteenth voting value; or,
[0243] In the case that the prediction modes of the parent node of the current node and the neighbor node of the current node are not both inter prediction modes or intra prediction modes, the eighth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the eighth voting coefficient is the sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0244] In embodiments of the present application, the fifteenth voting value is represented as k15, and the sixteenth voting value is represented as k16, k15>k16.
[0245] Case 7, neighbor node + grandparent node + parent node joint uncle node
[0246] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the ninth voting coefficient is determined according to the prediction modes of the parent node of the current node and the uncle node of the current node; the inter prediction voting values corresponding to the second voting coefficient, the third voting coefficient and the ninth voting coefficient, and the initial inter prediction voting value are accumulated to obtain the first mode voting value of the current node; the intra prediction voting values corresponding to the second voting coefficient, the third voting coefficient and the ninth voting coefficient, and the initial intra prediction voting value are accumulated to obtain the second mode voting value of the current node.
[0247] In embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter prediction voting value, the initial intra prediction voting value, the second voting coefficient, the third voting coefficient and the ninth voting coefficient.
[0248] In the embodiments of the present application, the initial inter-frame vote value and the initial intra-frame vote value are iteratively updated in turn according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, in combination with the second vote coefficient corresponding to the neighbor node of the current node, the third vote coefficient corresponding to the grandparent node of the current node, and the ninth vote coefficient corresponding to the father node of the current node and the uncle node of the current node, to obtain the first mode vote value and the second mode vote value of the current node.
[0249] In some embodiments of the present application, the ninth vote coefficient determined according to the prediction modes of the father node of the current node and the uncle node of the current node includes:
[0250] In the case where the prediction modes of the father node of the current node and the uncle node of the current node are both inter-frame prediction modes, the ninth vote coefficient represents a vote value of the inter-frame prediction mode, and the ninth vote coefficient is the seventeenth vote value; or,
[0251] In the case where the prediction modes of the father node of the current node and the uncle node of the current node are both intra-frame prediction modes, the ninth vote coefficient represents a vote value of the intra-frame prediction mode, and the ninth vote coefficient is the seventeenth vote value; or,
[0252] In the case where the prediction modes of the father node of the current node and the uncle node of the current node are not both inter-frame prediction modes or intra-frame prediction modes, the ninth vote coefficient represents vote values of the inter-frame prediction mode and the intra-frame prediction mode, and the ninth vote coefficient is the eighteenth vote value; wherein the seventeenth vote value is greater than the eighteenth vote value.
[0253] In the embodiments of the present application, the seventeenth vote value is represented as k17, and the eighteenth vote value is represented as k18, k17>k18.
[0254] Case 8, father node + uncle node + neighbor node joint grandparent node
[0255] In some embodiments of the present application, the first vote coefficient is determined according to the prediction mode of the father node of the current node; the fourth vote coefficient is determined according to the prediction mode of the uncle node of the current node; the tenth vote coefficient is determined according to the prediction modes of the neighbor node of the current node and the grandparent node of the current node; the first mode vote value of the current node is obtained by accumulating the inter-frame vote values corresponding to the first vote coefficient, the fourth vote coefficient and the tenth vote coefficient respectively, and the initial inter-frame vote value; and the second mode vote value of the current node is obtained by accumulating the intra-frame vote values corresponding to the first vote coefficient, the fourth vote coefficient and the tenth vote coefficient respectively, and the initial intra-frame vote value.
[0256] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the fourth voting coefficient and the tenth voting coefficient.
[0257] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are obtained by iteratively updating the initial inter-frame voting value and the initial intra-frame voting value according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, and combining the first voting coefficient corresponding to the father node of the current node, the fourth voting coefficient corresponding to the uncle node of the current node, and the tenth voting coefficient corresponding to the neighbor node of the current node and the grandparent node of the current node.
[0258] In some embodiments of the present application, the tenth voting coefficient is determined according to the prediction modes of the neighbor node of the current node and the grandparent node of the current node, and includes:
[0259] In the case that the prediction modes of the neighbor node of the current node and the grandparent node of the current node are both inter-frame prediction modes, the tenth voting coefficient represents the voting value of the inter-frame prediction mode, and the tenth voting coefficient is the nineteenth voting value; or,
[0260] In the case that the prediction modes of the neighbor node of the current node and the grandparent node of the current node are both intra-frame prediction modes, the tenth voting coefficient represents the voting value of the intra-frame prediction mode, and the tenth voting coefficient is the nineteenth voting value; or,
[0261] In the case that the prediction modes of the neighbor node of the current node and the grandparent node of the current node are not both inter-frame prediction modes or intra-frame prediction modes, the tenth voting coefficient represents the voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the tenth voting coefficient is the twentieth voting value; wherein the nineteenth voting value is greater than the twentieth voting value.
[0262] In the embodiments of the present application, the nineteenth voting value is represented as k19, and the twentieth voting value is represented as k20, k19>k20.
[0263] Case 9, father node joint neighbor node + grandparent node joint uncle node
[0264] In some embodiments of the present application, the eighth voting coefficient is determined according to the prediction mode of the father node of the current node and the neighbor node of the current node; the seventh voting coefficient is determined according to the prediction mode of the grandparent node of the current node and the uncle node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the eighth voting coefficient and the seventh voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the eighth voting coefficient and the seventh voting coefficient respectively, and the initial intra-frame voting value.
[0265] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value, the eighth voting coefficient and the seventh voting coefficient.
[0266] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are obtained by iteratively updating the initial inter-frame voting value and the initial intra-frame voting value in sequence according to the prediction mode of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, and combining the seventh voting coefficient corresponding to the father node of the current node and the neighbor node of the current node, and the seventh voting coefficient corresponding to the grandparent node of the current node and the uncle node of the current node.
[0267] Case 10, father node joint uncle node + neighbor node joint grandparent node
[0268] In some embodiments of the present application, the ninth voting coefficient is determined according to the prediction mode of the father node of the current node and the uncle node of the current node; the tenth voting coefficient is determined according to the prediction mode of the neighbor node of the current node and the grandparent node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the ninth voting coefficient and the tenth voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the ninth voting coefficient and the tenth voting coefficient respectively, and the initial intra-frame voting value.
[0269] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value, the ninth voting coefficient and the tenth voting coefficient.
[0270] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, in combination with the ninth voting coefficient corresponding to the father node of the current node and the uncle node of the current node, and the tenth voting coefficient corresponding to the neighbor node of the current node and the grandparent node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0271] Case 11, father node + neighbor node joint grandparent node joint uncle node
[0272] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the eleventh voting coefficient is determined according to the prediction modes of the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the first voting coefficient and the eleventh voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the first voting coefficient and the eleventh voting coefficient respectively, and the initial intra-frame voting value.
[0273] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient and the eleventh voting coefficient.
[0274] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, in combination with the first voting coefficient corresponding to the father node of the current node, and the eleventh voting coefficient corresponding to the neighbor node of the current node and the grandparent node of the current node and the uncle node of the current node, to obtain the first mode voting value and the second mode voting value of the current node.
[0275] In some embodiments of the present application, the eleventh voting coefficient is determined according to the prediction modes of the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, including:
[0276] In the case where the prediction modes of the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are all inter-frame prediction modes, the eleventh voting coefficient represents the voting value of the inter-frame prediction mode, and the eleventh voting coefficient is the twenty-first voting value; or,
[0277] In a case that the prediction modes of the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are not all inter prediction modes or all intra prediction modes, the eleventh voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the eleventh voting coefficient is a twenty-second voting value; and the twenty-first voting value is greater than the twenty-second voting value.
[0278] In a case that the prediction modes of the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are not all inter prediction modes or all intra prediction modes, the eleventh voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the eleventh voting coefficient is a twenty-second voting value; and the twenty-first voting value is greater than the twenty-second voting value.
[0279] In the embodiments of the present application, the twenty-first voting value is represented as k21, and the twenty-second voting value is represented as k22, and k21>k22.
[0280] Case 12, neighbor node + father node joint grandparent node joint uncle node
[0281] In some embodiments of the present application, a second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; a twelfth voting coefficient is determined according to the prediction modes of the father node of the current node, the grandparent node of the current node and the uncle node of the current node; and the first mode voting value of the current node is obtained by accumulating the inter prediction voting value corresponding to the second voting coefficient and the twelfth voting coefficient respectively, and the initial inter prediction voting value; and the second mode voting value of the current node is obtained by accumulating the intra prediction voting value corresponding to the second voting coefficient and the twelfth voting coefficient respectively, and the initial intra prediction voting value.
[0282] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter prediction voting value, the initial intra prediction voting value, the second voting coefficient and the twelfth voting coefficient.
[0283] In the embodiments of the present application, according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively, and in combination with the second voting coefficient corresponding to the neighbor node of the current node and the twelfth voting coefficient corresponding to the father node of the current node and the grandparent node of the current node and the uncle node of the current node, the initial inter prediction voting value and the initial intra prediction voting value are iteratively updated in turn to obtain the first mode voting value and the second mode voting value of the current node.
[0284] In some embodiments of the present application, the twelfth voting coefficient is determined according to the prediction modes of the father node of the current node, the grandparent node of the current node and the uncle node of the current node, and the twelfth voting coefficient includes:
[0285] In a case where the prediction modes of the father node of the current node, the grandparent node of the current node and the uncle node of the current node are all inter prediction modes, the twelfth voting coefficient represents a voting value of the inter prediction mode, and the twelfth voting coefficient is the twenty-third voting value; or,
[0286] In a case where the prediction modes of the father node of the current node, the grandparent node of the current node and the uncle node of the current node are all intra prediction modes, the twelfth voting coefficient represents a voting value of the intra prediction mode, and the twelfth voting coefficient is the twenty-third voting value; or,
[0287] In a case where the prediction modes of the father node of the current node, the grandparent node of the current node and the uncle node of the current node are not all inter prediction modes or all intra prediction modes, the twelfth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the twelfth voting coefficient is the twenty-fourth voting value; wherein the twenty-third voting value is greater than the twenty-fourth voting value.
[0288] In the embodiments of the present application, the twenty-third voting value is represented as k23, and the twenty-fourth voting value is represented as k24, k23>k24.
[0289] Case 13, grandparent node + father node joint neighbor node joint uncle node
[0290] In some embodiments of the present application, a third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; a thirteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node; the inter prediction voting values corresponding to the third voting coefficient and the thirteenth voting coefficient, and the initial inter prediction voting value are added to obtain the first mode voting value of the current node; and the intra prediction voting values corresponding to the third voting coefficient and the thirteenth voting coefficient, and the initial intra prediction voting value are added to obtain the second mode voting value of the current node.
[0291] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the sum of the initial inter prediction voting value, the initial intra prediction voting value, the third voting coefficient and the thirteenth voting coefficient.
[0292] In the embodiments of the present application, according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, the third voting coefficient corresponding to the grandparent node of the current node, and the thirteenth voting coefficient corresponding to the father node of the current node, the neighbor node of the current node and the uncle node of the current node, the initial inter prediction voting value and the initial intra prediction voting value are iteratively updated in turn to obtain the first mode voting value and the second mode voting value of the current node.
[0293] In some embodiments of the present application, the thirteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node, including:
[0294] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node are all inter prediction modes, the thirteenth voting coefficient represents a voting value of the inter prediction mode, and the thirteenth voting coefficient is the twenty-fifth voting value; or,
[0295] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node are all intra prediction modes, the thirteenth voting coefficient represents a voting value of the intra prediction mode, and the thirteenth voting coefficient is the twenty-fifth voting value; or,
[0296] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node are not all inter prediction modes or all intra prediction modes, the thirteenth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the thirteenth voting coefficient is the twenty-sixth voting value; wherein the twenty-fifth voting value is greater than the twenty-sixth voting value.
[0297] In embodiments of the present application, the twenty-fifth voting value is represented as k25, and the twenty-sixth voting value is represented as k26, k25>k26.
[0298] Case 14, Uncle Node + Father Node Joint Neighbor Node Joint Grandfather Node
[0299] In some embodiments of the present application, the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; the fourteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node and the grandfather node of the current node; the inter prediction values corresponding to the fourth voting coefficient and the fourteenth voting coefficient respectively, and the initial inter prediction value are accumulated to obtain the first mode prediction value of the current node; the intra prediction values corresponding to the fourth voting coefficient and the fourteenth voting coefficient respectively, and the initial intra prediction value are accumulated to obtain the second mode prediction value of the current node.
[0300] In embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulation sum of the initial inter prediction value, the initial intra prediction value, the fourth voting coefficient and the fourteenth voting coefficient.
[0301] In the embodiments of the present application, the initial inter-frame vote value and the initial intra-frame vote value are iteratively updated in sequence according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, in combination with the fourth voting coefficient corresponding to the uncle node of the current node, and the fourteenth voting coefficient corresponding to the father node of the current node and the grandparent node of the current node and the neighbor node of the current node, to obtain the first mode vote value and the second mode vote value of the current node.
[0302] In some embodiments of the present application, the fourteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node and the grandparent node of the current node, and includes:
[0303] In the case where the prediction modes of the father node of the current node, the neighbor node of the current node and the grandparent node of the current node are all inter-frame prediction modes, the fourteenth voting coefficient represents the vote value of the inter-frame prediction mode, and the fourteenth voting coefficient is the twenty-seventh vote value; or,
[0304] In the case where the prediction modes of the father node of the current node, the neighbor node of the current node and the grandparent node of the current node are all intra-frame prediction modes, the fourteenth voting coefficient represents the vote value of the intra-frame prediction mode, and the fourteenth voting coefficient is the twenty-seventh vote value; or,
[0305] In the case where the prediction modes of the father node of the current node, the neighbor node of the current node and the grandparent node of the current node are not all inter-frame prediction modes or intra-frame prediction modes, the fourteenth voting coefficient represents the vote values of the inter-frame prediction mode and the intra-frame prediction mode, and the fourteenth voting coefficient is the twenty-eighth vote value; wherein the twenty-seventh vote value is greater than the twenty-eighth vote value.
[0306] In the embodiments of the present application, the twenty-seventh vote value is represented as k27, and the twenty-eighth vote value is represented as k28, k27>k28.
[0307] Case 15, father node joint neighbor node joint grandparent node joint uncle node
[0308] In some embodiments of the present application, the fifteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node; the fifteenth voting coefficient and the initial inter-frame vote value are added to obtain the first mode vote value of the current node; and the fifteenth voting coefficient and the initial intra-frame vote value are added to obtain the second mode vote value of the current node.
[0309] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are determined according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value and the fifteenth voting coefficient.
[0310] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are obtained by iteratively updating the initial inter-frame voting value and the initial intra-frame voting value according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, and combining the fourth voting coefficient corresponding to the uncle node of the current node and the fifteenth voting coefficient corresponding to the father node of the current node, the grandparent node of the current node and the neighbor node of the current node.
[0311] In some embodiments of the present application, the fifteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, including:
[0312] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are all inter-frame prediction modes, the fifteenth voting coefficient represents the voting value of the inter-frame prediction mode, and the fifteenth voting coefficient is the twenty-ninth voting value;
[0313] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are all intra-frame prediction modes, the fifteenth voting coefficient represents the voting value of the intra-frame prediction mode, and the fifteenth voting coefficient is the twenty-ninth voting value;
[0314] In the case that the prediction modes of the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node are not all inter-frame prediction modes or intra-frame prediction modes, the fifteenth voting coefficient represents the voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the fifteenth voting coefficient is the thirtieth voting value; wherein the twenty-ninth voting value is greater than the thirtieth voting value.
[0315] In the embodiments of the present application, the twenty-ninth voting value is represented as k29, and the thirtieth voting value is represented as k30, k29>k30.
[0316] 2, father node + neighbor node + grandparent node
[0317] In some embodiments of the present application, the neighbor nodes further include any one of the grandparent node of the current node and the uncle node of the current node; the implementation of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node in S101 can include S1012:
[0318] S1012, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following nodes: the ancestor node of the current node, the uncle node of the current node, the father node of the current node, and the neighbor node of the current node.
[0319] In some embodiments of the present application, the any one node is the ancestor node of the current node, and the decoding method comprises:
[0320] determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following nodes: the ancestor node of the current node, the father node of the current node, and the neighbor node of the current node.
[0321] In some embodiments, in the case that the neighbor nodes of the current node include the father node of the current node, the neighbor node of the current node, and the ancestor node of the current node, there are the following five cases for determining the first mode voting value and the second mode voting value of the current node:
[0322] Case 1, father node + neighbor node + ancestor node
[0323] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the third voting coefficient is determined according to the prediction mode of the ancestor node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the third voting coefficient.
[0324] In the embodiments of the present application, according to the prediction mode of each of the following nodes: the father node of the current node, the neighbor node of the current node, and the ancestor node of the current node, and in combination with the first voting coefficient corresponding to the father node of the current node, the second voting coefficient corresponding to the neighbor node of the current node, and the third voting coefficient corresponding to the ancestor node of the current node, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn to obtain the first mode voting value and the second mode voting value of the current node.
[0325] Case 2, father node + neighbor node jointly with ancestor node
[0326] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the parent node of the current node; the tenth voting coefficient is determined according to the prediction mode of the neighbor node of the current node and the grandparent node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the first voting coefficient and the tenth voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the first voting coefficient and the tenth voting coefficient respectively, and the initial intra-frame voting value.
[0327] Case 3, neighbor node + parent node joint grandparent node
[0328] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the fifth voting coefficient is determined according to the prediction mode of the parent node of the current node and the grandparent node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the second voting coefficient and the fifth voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the second voting coefficient and the fifth voting coefficient respectively, and the initial intra-frame voting value.
[0329] Case 4, grandparent node + parent node joint neighbor node
[0330] In some embodiments of the present application, the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the eighth voting coefficient is determined according to the prediction mode of the parent node of the current node and the neighbor node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the third voting coefficient and the eighth voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the third voting coefficient and the eighth voting coefficient respectively, and the initial intra-frame voting value.
[0331] Case 5, parent node joint neighbor node joint grandparent node
[0332] In some embodiments of the present application, the fourteenth voting coefficient is determined according to the prediction mode of the parent node of the current node, the neighbor node of the current node and the grandparent node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the fourteenth voting coefficient and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the fourteenth voting coefficient and the initial intra-frame voting value.
[0333] 3, parent node + neighbor node + uncle node
[0334] In some embodiments of the present application, any one of the nodes is a grand-uncle node of the current node, and the decoding method comprises:
[0335] According to the prediction mode of the grand-uncle node of the current node, the father node of the current node, and the neighbor node of the current node, respectively, the first mode voting value and the second mode voting value of the current node are determined.
[0336] In some embodiments, in the case that the neighbor nodes of the current node include the father node of the current node, the neighbor node of the current node, and the grand-uncle node of the current node, the determination of the first mode voting value and the second mode voting value of the current node has the following five cases:
[0337] Case 1, father node + neighbor node + grand-uncle node
[0338] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the fourth voting coefficient is determined according to the prediction mode of the grand-uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the fourth voting coefficient.
[0339] In the embodiments of the present application, according to the prediction mode of the father node of the current node, the neighbor node of the current node, and the grand-uncle node of the current node, respectively, in combination with the first voting coefficient corresponding to the father node of the current node, the second voting coefficient corresponding to the neighbor node of the current node, and the fourth voting coefficient corresponding to the grand-uncle node of the current node, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn to obtain the first mode voting value and the second mode voting value of the current node.
[0340] Case 2, father node + neighbor node jointly with grand-uncle node
[0341] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the sixth voting coefficient is determined according to the prediction mode of the neighbor node of the current node and the grand-uncle node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the first voting coefficient and the sixth voting coefficient, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the first voting coefficient and the sixth voting coefficient, and the initial intra-frame voting value.
[0342] Case 3, neighbor node + father node jointly with grand-uncle node
[0343] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the ninth voting coefficient is determined according to the prediction modes of the father node of the current node and the uncle node of the current node; the inter-frame voting value corresponding to the second voting coefficient and the ninth voting coefficient respectively, and the initial inter-frame voting value are accumulated to obtain the first mode voting value of the current node; and the intra-frame voting value corresponding to the second voting coefficient and the ninth voting coefficient respectively, and the initial intra-frame voting value are accumulated to obtain the second mode voting value of the current node.
[0344] Case 4, Uncle Node + Father Node Joint Neighbor Node
[0345] In some embodiments of the present application, the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; the eighth voting coefficient is determined according to the prediction modes of the father node of the current node and the neighbor node of the current node; the inter-frame voting value corresponding to the fourth voting coefficient and the eighth voting coefficient respectively, and the initial inter-frame voting value are accumulated to obtain the first mode voting value of the current node; and the intra-frame voting value corresponding to the fourth voting coefficient and the eighth voting coefficient respectively, and the initial intra-frame voting value are accumulated to obtain the second mode voting value of the current node.
[0346] Case 5, Father Node Joint Neighbor Node Joint Uncle Node
[0347] In some embodiments of the present application, the thirteenth voting coefficient is determined according to the prediction modes of the father node of the current node, the neighbor node of the current node and the uncle node of the current node; the inter-frame voting value corresponding to the thirteenth voting coefficient and the initial inter-frame voting value are accumulated to obtain the first mode voting value of the current node; and the intra-frame voting value corresponding to the thirteenth voting coefficient and the initial intra-frame voting value are accumulated to obtain the second mode voting value of the current node.
[0348] 4, Father Node + Neighbor Node
[0349] In some embodiments of the present application, the implementation of the first mode voting value and the second mode voting value of the current node in S101 according to the reconstructed neighbor nodes of the current node can include S1014:
[0350] S1014, determine the first mode voting value and the second mode voting value according to the prediction modes of the father node of the current node and the neighbor node of the current node respectively.
[0351] In some embodiments, in the case where the neighbor nodes of the current node include the father node of the current node and the neighbor node of the current node, there are the following two cases for determining the first mode voting value and the second mode voting value of the current node:
[0352] Case 1: father node + neighbor node
[0353] In the embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the first mode voting value of the current node is obtained by accumulating the inter-frame voting value corresponding to the first voting coefficient and the second voting coefficient respectively, and the initial inter-frame voting value; and the second mode voting value of the current node is obtained by accumulating the intra-frame voting value corresponding to the first voting coefficient and the second voting coefficient respectively, and the initial intra-frame voting value.
[0354] Case 2: father node and neighbor node
[0355] In some embodiments of the present application, the eighth voting coefficient is determined according to the prediction modes of the father node of the current node and the neighbor node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the accumulation of the initial inter-frame voting value, the initial intra-frame voting value and the eighth voting coefficient.
[0356] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node are obtained by iteratively updating the initial inter-frame voting value and the initial intra-frame voting value according to the prediction modes of the father node of the current node and the neighbor node of the current node respectively, and the eighth voting coefficients corresponding to the father node of the current node and the neighbor node of the current node.
[0357] In some embodiments of the present application, the first voting value is equal to K times the second voting value;
[0358] The third voting value is equal to K times the fourth voting value;
[0359] The fifth voting value is equal to K times the sixth voting value;
[0360] The seventh voting value is equal to K times the eighth voting value;
[0361] The ninth voting value is equal to K times the tenth voting value;
[0362] The eleventh voting value is equal to K times the twelfth voting value;
[0363] The thirteenth voting value is equal to K times the fourteenth voting value;
[0364] The fifteenth voting value is equal to K times the sixteenth voting value;
[0365] The seventeenth voting value is equal to K times the eighteenth voting value;
[0366] The nineteenth voting value is equal to K times the twentieth voting value;
[0367] The twenty-first vote value is equal to K times the twenty-second vote value;
[0368] The twenty-third vote value is equal to K times the twenty-fourth vote value;
[0369] The twenty-fifth vote value is equal to K times the twenty-sixth vote value;
[0370] The twenty-seventh vote value is equal to K times the twenty-eighth vote value;
[0371] The twenty-ninth vote value is equal to K times the thirtieth vote value; K is a positive integer greater than 1.
[0372] In the embodiments of the present application, k1=K*k2, k3=K*k4, k5=K*k6, k7=K*k8, k9=K*k10, k11=K*k12, k13=K*k14, k15=K*k16, k17=K*k18, k19=K*k20, k21=K*k22, k23=K*k24, k25=K*k26, k27=K*k28, k29=K*k30. Exemplarily, K is any positive integer from 2 to 8.
[0373] Exemplarily, k1=2*k2, k3=2*k4, k5=2*k6, k7=2*k8, k9=2*k10, k11=2*k12, k13=2*k14, k15=2*k16, k17=2*k18, k19=2*k20, k21=2*k22, k23=2*k24, k25=2*k26, k27=2*k28, k29=2*k30.
[0374] Exemplarily, k1=4*k2, k3=4*k4, k5=4*k6, k7=4*k8, k9=4*k10, k11=4*k12, k13=4*k14, k15=4*k16, k17=4*k18, k19=4*k20, k21=4*k22, k23=4*k24, k25=4*k26, k27=4*k28, k29=4*k30.
[0375] In some embodiments of the present application, the first vote value k1 and the fifth vote value k5 are the same or different, and the third vote value k3 and the seventh vote value k7 are the same or different; the first vote value k1 and the fifth vote value k5 are both greater than the third vote value k3 and the seventh vote value k7.
[0376] In some embodiments of the present application, the neighbor nodes include at least two groups of nodes, each of which corresponds to different weight values, as shown in FIG. 11, the implementation of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node in S101 can include S201-S202:
[0377] In S201, the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes are determined according to the prediction mode of each node in the at least two groups of nodes.
[0378] In the embodiments of the present application, the number of the at least two groups of nodes can be one group or multiple groups. Among them, the multiple groups are at least two groups.
[0379] For example, in the case that the neighbor nodes include the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, if the neighbor nodes include two groups of nodes, the first group of nodes can include the father node of the current node and the neighbor node of the current node, and the second group of nodes can include the grandparent node of the current node and the uncle node of the current node. Alternatively, the first group of nodes can include the father node of the current node, and the second group of nodes can include the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node. If the neighbor nodes include three groups of nodes, the first group of nodes can include the father node of the current node, the second group of nodes can include the neighbor node of the current node, and the third group of nodes can include the grandparent node of the current node and the uncle node of the current node. The embodiments of the present application do not make any limitation on this.
[0380] It should be noted that the division of the at least two groups of nodes is according to the node properties of the neighbor nodes, and the nodes with the same property can also be divided into multiple groups, such as dividing the multiple neighbor nodes of the current node into at least two groups, and dividing the multiple uncle nodes of the current node into at least two groups, and the embodiments of the present application do not make any limitation on this.
[0381] In some embodiments of the present application, the at least two groups of nodes include a first group of nodes and a second group of nodes, the first group of nodes includes the father node of the current node and the neighbor node of the current node, the second group of nodes includes the grandparent node of the current node and the uncle node of the current node, and the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes include the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes, and the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes.
[0382] In S201, the implementation of determining the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes according to the prediction mode of each node in the at least two groups of nodes can include:
[0383] determine a first voting coefficient according to the prediction mode of the father node of the current node;
[0384] determine a second voting coefficient according to the prediction mode of the neighbor node of the current node;
[0385] determine a third voting coefficient according to the prediction mode of the grandparent node of the current node;
[0386] determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node;
[0387] accumulate the inter-frame voting value corresponding to the first voting coefficient and the second voting coefficient respectively, and the initial inter-frame voting value, to obtain the inter-frame voting value corresponding to the first group of nodes;
[0388] determine the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient and the second voting coefficient;
[0389] determine the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value, the third voting coefficient and the fourth voting coefficient.
[0390] In the embodiments of the present application, the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn according to the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node, in combination with the first voting coefficient corresponding to the father node of the current node and the second voting coefficient corresponding to the neighbor node of the current node, to obtain the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes; the initial inter-frame voting value and the initial intra-frame voting value are iteratively updated in turn according to the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node, in combination with the third voting coefficient corresponding to the grandparent node of the current node and the fourth voting coefficient corresponding to the uncle node of the current node, to obtain the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes.
[0391] In the embodiments of the present application, the inter-frame voting value corresponding to the first group of nodes can be represented as voteInter1, the intra-frame voting value corresponding to the first group of nodes can be represented as voteIntra1, the inter-frame voting value corresponding to the second group of nodes can be represented as voteInter2, and the intra-frame voting value corresponding to the second group of nodes can be represented as voteIntra2.
[0392] S202, determine the first mode voting value and the second mode voting value of the current node according to the first mode voting value and the second mode voting value corresponding to the at least two groups of nodes respectively, and the weight value corresponding to the at least two groups of nodes respectively.
[0393] In some embodiments of the present application, the first group of nodes corresponds to a first weight value, the second group of nodes corresponds to a second weight value, and the first weight value and the second weight value are positive numbers; the implementation of determining the first mode voting value and the second mode voting value of the current node according to the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes and the weight value corresponding to each of the at least two groups of nodes in S202 can include:
[0394] determining the first mode voting value of the current node according to the inter-frame voting value corresponding to the first group of nodes, the inter-frame voting value corresponding to the second group of nodes, the first weight value and the second weight value;
[0395] determining the second mode voting value of the current node according to the intra-frame voting value corresponding to the first group of nodes, the intra-frame voting value corresponding to the second group of nodes, the first weight value and the second weight value.
[0396] In the embodiments of the present application, the first weight value and the second weight value are any positive numbers.
[0397] In the embodiments of the present application, the first mode voting value and the second mode voting value of the current node can be represented by formula (4) and formula (5): voteInter=(Q1*voteInter1+Q2*voteInter2) / (Q1+Q2) (4) voteInra=(Q1*voteIntra1+Q2*voteIntra2) / (Q1+Q2) (5)
[0398] In formula (4) and formula (5), Q1 represents the first weight value, Q2 represents the second weight value, voteInter1 represents the inter-frame voting value corresponding to the first group of nodes, voteInter2 represents the inter-frame voting value corresponding to the second group of nodes, voteIntra1 represents the intra-frame voting value corresponding to the first group of nodes, voteIntra2 represents the intra-frame voting value corresponding to the second group of nodes, voteInter represents the first mode voting value of the current node, and voteInra represents the second mode voting value of the current node.
[0399] In a second aspect, the embodiments of the present application provide an encoding method. On the one hand, by considering the neighbor node information to determine the prediction mode voting value and the weight value, the prediction mode can more accurately reflect the characteristics and context information of the current node, and the prediction accuracy is improved. On the one hand, the mode voting strategy can combine the information of multiple prediction modes, reduce the error caused by a single prediction mode, and improve the stability and accuracy of the prediction. In general, by considering the neighbor node information to determine the prediction mode voting value and the weight value, and determining the first coefficient prediction value according to the weight value and the prediction value, the prediction accuracy of the first coefficient can be improved, thereby improving the encoding performance.
[0400] In an embodiment of the present application, the encoding method can include S301 to S303:
[0401] S301, in the case of determining that the current node adopts the inter and intra weighted average prediction mode, determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include the parent node of the current node and the neighbor node of the current node.
[0402] It should be noted that the encoding method of the embodiments of the present application is applied to an encoder. In addition, the encoding method can specifically refer to an AC coefficient prediction method based on RAHT. Among them, in the RAHT prediction mode, here mainly refers to a weight optimization algorithm based on RAHT inter-intra weighted average, to avoid the problem that the prediction accuracy of the AC coefficient is low in the related art, thereby affecting the encoding performance.
[0403] In the embodiments of the present application, the current node is also called a node to be encoded, a node to be detected, a current point, a point to be encoded, a point to be detected, a current node to be encoded, etc., which are not limited by the embodiments of the present application.
[0404] In some embodiments of the present application, the neighbor nodes further include at least one of the grandparent node of the current node and the uncle node of the current node; the grandparent node of the current node is the parent node of the current node; and the uncle node of the current node is the brother node of the father node of the current node.
[0405] S302, respectively determining the first mode weight value and the second mode weight value of the current node according to the first mode voting value and the second mode voting value of the current node.
[0406] In the embodiments of the present application, the first mode weight value and the second mode weight value of the current node respectively represent the relative importance and contribution degree of the first prediction mode and the second prediction mode. For example, the first prediction mode is an inter prediction mode, and the second prediction mode is an intra prediction mode.
[0407] S303, determining the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
[0408] In some embodiments of the present application, the encoding method further comprises:
[0409] In the case that the current layer in which the current node is located or the current block in which the current node is located adopts the prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform, it is determined whether the current node has the first mode prediction value and the second mode prediction value.
[0410] In the case that the current node has the first mode prediction value and the second mode prediction value, it is determined that the current node adopts the prediction mode of inter and intra weighted average.
[0411] In some embodiments of the present application, the encoding method further comprises:
[0412] Determining related syntax element information; the related syntax element information is used to indicate whether the current layer in which the current node is located or the current block in which the current node is located adopts the prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform;
[0413] Encoding the related syntax element information, and writing the obtained encoding bits into the code stream.
[0414] In some embodiments of the present application, the encoding method further comprises:
[0415] Determining the first coefficient residual value of the current node according to the first coefficient original value and the first coefficient prediction value of the current node;
[0416] Determining the first coefficient value of the current node according to the first coefficient residual value and the first coefficient prediction value;
[0417] According to the recursive adaptive hierarchical transform mode, performing inverse transform on the first coefficient value and the second coefficient value to determine the attribute reconstruction value of the current node.
[0418] In some embodiments of the present application, the encoding method further comprises:
[0419] Encoding the second coefficient value and the first coefficient residual value of the current node, and writing the obtained encoding bits into the code stream.
[0420] It should be noted that the description of S301 to S303 can refer to the description of S101 to S103 in the foregoing, and will not be repeated here.
[0421] The embodiment of the present application provides a coding method applied to an encoder, the coding method comprising: in the case that it is determined that an inter-frame and intra-frame weighted average prediction mode is adopted by a current node, determining a first mode voting value and a second mode voting value of the current node according to reconstructed neighboring nodes of the current node; wherein the neighboring nodes at least comprise a parent node of the current node and a neighbor node of the current node; determining a first mode weight value and a second mode weight value of the current node respectively according to the first mode voting value and the second mode voting value; and determining a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node. On the one hand, by considering the information of the parent node and the neighbor node of the current node, the characteristics and correlation of the neighboring nodes can be fully utilized, and the accuracy and reliability of determining the first coefficient prediction value are improved. On the one hand, the mode voting strategy can combine the information of multiple prediction modes, reduce the error caused by a single prediction mode, and improve the stability and accuracy of prediction. On the one hand, the weight value determined according to the mode voting value can dynamically adjust the importance of different prediction modes, so that a more reliable prediction mode has a higher weight, thereby improving the accuracy of the overall prediction. Determining the coefficient prediction value of the current node according to the weight value and the prediction value can make the prediction more accurate and stable, and help to improve the efficiency and quality of video coding.
[0422] In some embodiments, in the case that the neighboring nodes at least comprise the parent node of the current node and the neighbor node of the current node, the neighboring nodes of the current node comprise four cases: case 1, the parent node + the neighbor node + the grandparent node + the uncle node; case 2, the parent node + the neighbor node + the grandparent node; case 3, the parent node + the neighbor node + the uncle node; and case 4, the parent node + the neighbor node. The determination manner of the first mode voting value and the second mode voting value of the current node in the above four cases is described below.
[0423] 1, the parent node + the neighbor node + the grandparent node + the uncle node
[0424] In some embodiments of the present application, the neighboring nodes further comprise the grandparent node of the current node and the uncle node of the current node; and the implementation of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighboring nodes of the current node in S301 can comprise S3011:
[0425] S3011, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of the parent node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node.
[0426] In some embodiments, in the case that the neighboring nodes of the current node include the father node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, there are 15 cases for determining the first mode voting value and the second mode voting value of the current node:
[0427] Case 1, father node + neighbor node + grandparent node + uncle node
[0428] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, the third voting coefficient and the fourth voting coefficient.
[0429] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node, comprising:
[0430] In the case that the prediction mode of the father node of the current node is the inter-frame prediction mode, the first voting coefficient represents the voting value of the inter-frame prediction mode, and the first voting coefficient is the first voting value; or,
[0431] In the case that the prediction mode of the father node of the current node is the intra-frame prediction mode, the first voting coefficient represents the voting value of the intra-frame prediction mode, and the first voting coefficient is the first voting value; or,
[0432] In the case that the prediction mode of the father node of the current node is the no prediction mode, the first voting coefficient represents the voting value of the inter-frame prediction mode and the intra-frame prediction mode, and the first voting coefficient is the second voting value; wherein the first voting value is greater than the second voting value.
[0433] In the embodiments of the present application, the first voting value is represented as k1, and the second voting value is represented as k2, k1>k2.
[0434] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node, comprising:
[0435] In the case that the prediction mode of the neighbor node of the current node is the inter-frame prediction mode, the second voting coefficient represents the voting value of the inter-frame prediction mode, and the second voting coefficient is the third voting value; or,
[0436] In a case where the prediction mode of the neighbor node of the current node is the intra prediction mode, the second voting coefficient represents a voting value of the intra prediction mode, and the second voting coefficient is a third voting value; or
[0437] In a case where the prediction mode of the neighbor node of the current node is the no prediction mode, the second voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the second voting coefficient is a fourth voting value; the third voting value is greater than the fourth voting value.
[0438] In the embodiments of the present application, the third voting value is represented as k3, and the fourth voting value is represented as k4, k3>k4.
[0439] In some embodiments of the present application, the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node, including:
[0440] In a case where the prediction mode of the grandparent node of the current node is the inter prediction mode, the third voting coefficient represents a voting value of the inter prediction mode, and the third voting coefficient is a fifth voting value; or
[0441] In a case where the prediction mode of the grandparent node of the current node is the intra prediction mode, the third voting coefficient represents a voting value of the intra prediction mode, and the third voting coefficient is a fifth voting value; or
[0442] In a case where the prediction mode of the grandparent node of the current node is the no prediction mode, the third voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the third voting coefficient is a sixth voting value; the fifth voting value is greater than the sixth voting value.
[0443] In the embodiments of the present application, the fifth voting value is represented as k5, and the sixth voting value is represented as k6, k5>k6.
[0444] In some embodiments of the present application, the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node, including:
[0445] In a case where the prediction mode of the uncle node of the current node is the inter prediction mode, the fourth voting coefficient represents a voting value of the inter prediction mode, and the fourth voting coefficient is a seventh voting value; or
[0446] In a case where the prediction mode of the uncle node of the current node is the intra prediction mode, the fourth voting coefficient represents a voting value of the intra prediction mode, and the fourth voting coefficient is a seventh voting value; or
[0447] In a case where the prediction mode of the uncle node of the current node is the no prediction mode, the fourth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the fourth voting coefficient is an eighth voting value; the seventh voting value is greater than the eighth voting value.
[0448] In the embodiments of the present application, the seventh voting value is represented as k7, and the eighth voting value is represented as k8, k7>k8.
[0449] Case 2, neighbor node + uncle node + father node joint grandparent node
[0450] In some embodiments of the present application, the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; the fifth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the second voting coefficient, the fourth voting coefficient and the fifth voting coefficient.
[0451] In some embodiments of the present application, the fifth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node, including:
[0452] In the case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are both inter-frame prediction modes, the fifth voting coefficient represents the voting value of the inter-frame prediction mode, and the fifth voting coefficient is the ninth voting value; or,
[0453] In the case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are both intra-frame prediction modes, the fifth voting coefficient represents the voting value of the intra-frame prediction mode, and the fifth voting coefficient is the ninth voting value; or,
[0454] In the case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are not both inter-frame prediction modes or intra-frame prediction modes, the fifth voting coefficient represents the voting value of the inter-frame prediction mode and the intra-frame prediction mode, and the fifth voting coefficient is the tenth voting value; the ninth voting value is greater than the tenth voting value.
[0455] In the embodiments of the present application, the ninth voting value is represented as k9, and the tenth voting value is represented as k10, k9>k10.
[0456] Case 3, father node + grandparent node + neighbor node joint uncle node
[0457] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the sixth voting coefficient is determined according to the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
[0458] In some embodiments of the present application, a sixth voting coefficient is determined according to the prediction modes of the neighbor node of the current node and the uncle node of the current node, including:
[0459] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both inter prediction modes, the sixth voting coefficient represents a voting value of the inter prediction mode, and the sixth voting coefficient is an eleventh voting value; or,
[0460] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both intra prediction modes, the sixth voting coefficient represents a voting value of the intra prediction mode, and the sixth voting coefficient is an eleventh voting value; or,
[0461] In the case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are not both inter prediction modes or intra prediction modes, the sixth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the sixth voting coefficient is a twelfth voting value; the eleventh voting value is greater than the twelfth voting value.
[0462] In embodiments of the present application, the eleventh voting value is represented as k11, and the twelfth voting value is represented as k12, k11>k12.
[0463] Case 4, father node joint grandparent node + neighbor node joint uncle node
[0464] In some embodiments of the present application, a fifth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node; a sixth voting coefficient is determined according to the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the sum of the accumulation of the initial inter prediction voting value, the initial intra prediction voting value, the fifth voting coefficient and the sixth voting coefficient.
[0465] Case 5, father node + neighbor node + grandparent node joint uncle node
[0466] In some embodiments of the present application, a first voting coefficient is determined according to the prediction mode of the father node of the current node; a second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; a seventh voting coefficient is determined according to the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the sum of the accumulation of the initial inter prediction voting value, the initial intra prediction voting value, the first voting coefficient, the second voting coefficient and the seventh voting coefficient.
[0467] In some embodiments of the present application, the seventh voting coefficient is determined according to the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node, including:
[0468] In the case that the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node are both inter prediction modes, the seventh voting coefficient represents a voting value of the inter prediction mode, and the seventh voting coefficient is a thirteenth voting value; or,
[0469] In the case that the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node are both intra prediction modes, the seventh voting coefficient represents a voting value of the intra prediction mode, and the seventh voting coefficient is a thirteenth voting value; or,
[0470] In the case that the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node are not both inter prediction modes or intra prediction modes, the seventh voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the seventh voting coefficient is a fourteenth voting value; the thirteenth voting value is greater than the fourteenth voting value.
[0471] In embodiments of the present application, the thirteenth voting value is represented as k13, and the fourteenth voting value is represented as k14, k13>k14.
[0472] Case 6, grandparent node + uncle node + father node joint neighbor node
[0473] In some embodiments of the present application, the third voting coefficient is determined according to the prediction mode of the grandparent node of the current node; the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; the eighth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node; the inter prediction voting values corresponding to the third voting coefficient, the fourth voting coefficient and the eighth voting coefficient, and the initial inter prediction voting value are accumulated to determine the first mode voting value of the current node; and the intra prediction voting values corresponding to the third voting coefficient, the fourth voting coefficient and the eighth voting coefficient, and the initial intra prediction voting value are accumulated to determine the second mode voting value of the current node.
[0474] In some embodiments of the present application, the eighth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node, including:
[0475] In the case that the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction mode, and the eighth voting coefficient is a fifteenth voting value; or,
[0476] In a case where the prediction modes of the father node of the current node and the neighbor node of the current node are not both the inter prediction mode or the intra prediction mode, the eighth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0477] In a case where the prediction modes of the father node of the current node and the neighbor node of the current node are not both the inter prediction mode or the intra prediction mode, the eighth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0478] In the embodiments of the present application, the fifteenth voting value is represented as k15, and the sixteenth voting value is represented as k16, k15>k16.
[0479] Case 7, neighbor node + grandparent node + father node joint uncle node
[0480] Case 8, father node + uncle node + neighbor node joint grandparent node
[0481] Case 9, father node joint neighbor node + grandparent node joint uncle node
[0482] Case 10, father node joint uncle node + neighbor node joint grandparent node
[0483] Case 11, father node + neighbor node joint grandparent node joint uncle node
[0484] Case 12, neighbor node + father node joint grandparent node joint uncle node
[0485] Case 13, grandparent node + father node joint neighbor node joint uncle node
[0486] Case 14, uncle node + father node joint neighbor node joint grandparent node
[0487] Case 15, father node joint neighbor node joint grandparent node joint uncle node
[0488] It should be noted that the description of S3011 above can refer to the description of S1011 in the foregoing, and will not be described here.
[0489] 2, father node + neighbor node + grandparent node
[0490] In some embodiments of the present application, the neighbor node further includes any one of the grandparent node of the current node and the uncle node of the current node; the implementation of S301 of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor node of the current node can include S3012:
[0491] S3012, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following nodes: the ancestor node of the current node, the uncle node of the current node, the father node of the current node, and the neighbor node of the current node.
[0492] In some embodiments of the present application, the ancestor node of the current node is the any one node, and the encoding method comprises:
[0493] According to the prediction mode of each of the following nodes: the ancestor node of the current node, the father node of the current node, and the neighbor node of the current node, determine the first mode voting value and the second mode voting value of the current node.
[0494] In some embodiments, in the case that the neighbor nodes of the current node include the father node of the current node, the neighbor node of the current node and the ancestor node of the current node, there are the following 5 cases for determining the first mode voting value and the second mode voting value of the current node:
[0495] Case 1, father node + neighbor node + ancestor node
[0496] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the third voting coefficient is determined according to the prediction mode of the ancestor node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient and the third voting coefficient.
[0497] Case 2, father node + neighbor node jointly ancestor node
[0498] Case 3, neighbor node + father node jointly ancestor node
[0499] Case 4, ancestor node + father node jointly neighbor node
[0500] Case 5, father node jointly neighbor node jointly ancestor node
[0501] It should be noted that the description of S3012 can refer to the description of S1012 in the foregoing, and will not be repeated here.
[0502] 3, father node + neighbor node + uncle node
[0503] In some embodiments of the present application, the uncle node of the current node is the any one node, and the encoding method comprises:
[0504] The first mode voting value and the second mode voting value of the current node are determined according to the prediction mode of the uncle node of the current node, the prediction mode of the father node of the current node, and the prediction mode of the neighbor node of the current node.
[0505] In some embodiments, in the case that the neighbor nodes of the current node include the father node of the current node, the neighbor node of the current node, and the uncle node of the current node, the determination of the first mode voting value and the second mode voting value of the current node has the following 5 cases:
[0506] Case 1, father node + neighbor node + uncle node
[0507] In some embodiments of the present application, the first voting coefficient is determined according to the prediction mode of the father node of the current node; the second voting coefficient is determined according to the prediction mode of the neighbor node of the current node; the fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node; and the first mode voting value and the second mode voting value of the current node are determined according to the cumulative sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the fourth voting coefficient.
[0508] Case 2, father node + neighbor node jointly with uncle node
[0509] Case 3, neighbor node + father node jointly with uncle node
[0510] Case 4, uncle node + father node jointly with neighbor node
[0511] Case 5, father node jointly with neighbor node jointly with uncle node
[0512] It should be noted that the description of the above steps can refer to the description in the foregoing description, and will not be described here.
[0513] 4, father node + neighbor node
[0514] In some embodiments of the present application, the implementation of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node in S301 can include S3014:
[0515] S3014, determining the first mode voting value and the second mode voting value according to the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node.
[0516] In some embodiments, in the case that the neighbor nodes of the current node include the father node of the current node and the neighbor node of the current node, the determination of the first mode voting value and the second mode voting value of the current node has the following 2 cases:
[0517] Case 1: father node + neighbor node
[0518] Case 2: father node joint neighbor node
[0519] In some embodiments of the present application, an eighth voting coefficient is determined according to the prediction mode of the father node of the current node and the prediction mode of the neighbor node of the current node; a first mode voting value and a second mode voting value of the current node are determined according to the accumulation sum of the initial inter-frame voting value, the initial intra-frame voting value and the eighth voting coefficient.
[0520] It should be noted that the description of S3014 can refer to the description of S1014 in the foregoing, which will not be repeated here.
[0521] In some embodiments of the present application, the first voting value is equal to K times the second voting value;
[0522] The third voting value is equal to K times the fourth voting value;
[0523] The fifth voting value is equal to K times the sixth voting value;
[0524] The seventh voting value is equal to K times the eighth voting value;
[0525] The ninth voting value is equal to K times the tenth voting value;
[0526] The eleventh voting value is equal to K times the twelfth voting value;
[0527] The thirteenth voting value is equal to K times the fourteenth voting value;
[0528] The fifteenth voting value is equal to K times the sixteenth voting value;
[0529] The seventeenth voting value is equal to K times the eighteenth voting value;
[0530] The nineteenth voting value is equal to K times the twentieth voting value;
[0531] The twenty-first voting value is equal to K times the twenty-second voting value;
[0532] The twenty-third voting value is equal to K times the twenty-fourth voting value;
[0533] The twenty-fifth voting value is equal to K times the twenty-sixth voting value;
[0534] The twenty-seventh voting value is equal to K times the twenty-eighth voting value; K is a positive integer greater than 1.
[0535] In the embodiments of the present application, k1=K*k2, k3=K*k4, k5=K*k6, k7=K*k8, k9=K*k10, k11=K*k12, k13=K*k14, k15=K*k16, k17=K*k18, k19=K*k20, k21=K*k22, k23=K*k24, k25=K*k26, k27=K*k28. Exemplarily, K is any positive integer in 2-8.
[0536] In some embodiments of the present application, the first voting value k1 and the fifth voting value k5 are the same or different, and the third voting value k3 and the seventh voting value k7 are the same or different; the first voting value k1 and the fifth voting value k5 are both greater than the third voting value k3 and the seventh voting value k7.
[0537] In some embodiments of the present application, the neighbor nodes include at least two groups of nodes, each of the at least two groups of nodes corresponds to different weight values, and the implementation of determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor nodes of the current node in S301 can include S401-S402:
[0538] S401, determining the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes according to the prediction mode of each node in the at least two groups of nodes.
[0539] In some embodiments of the present application, the at least two groups of nodes include a first group of nodes and a second group of nodes, the first group of nodes includes the father node of the current node and the neighbor node of the current node, the second group of nodes includes the grandparent node of the current node and the uncle node of the current node, and the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes include the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes, and the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes.
[0540] The implementation of determining the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes according to the prediction mode of each node in the at least two groups of nodes in S401 can include:
[0541] determining a first voting coefficient according to the prediction mode of the father node of the current node;
[0542] determining a second voting coefficient according to the prediction mode of the neighbor node of the current node;
[0543] determining a third voting coefficient according to the prediction mode of the grandparent node of the current node;
[0544] determining a fourth voting coefficient according to the prediction mode of the uncle node of the current node;
[0545] The inter-frame voting value corresponding to the first voting coefficient, the inter-frame voting value corresponding to the second voting coefficient, and the initial inter-frame voting value are accumulated to obtain an inter-frame voting value corresponding to the first group of nodes;
[0546] The intra-frame voting value corresponding to the first voting coefficient, the intra-frame voting value corresponding to the second voting coefficient, and the initial intra-frame voting value are accumulated to obtain an intra-frame voting value corresponding to the first group of nodes;
[0547] The inter-frame voting value corresponding to the third voting coefficient, the inter-frame voting value corresponding to the fourth voting coefficient, and the initial inter-frame voting value are accumulated to obtain an inter-frame voting value corresponding to the second group of nodes;
[0548] The intra-frame voting value corresponding to the third voting coefficient, the intra-frame voting value corresponding to the fourth voting coefficient, and the initial intra-frame voting value are accumulated to obtain an intra-frame voting value corresponding to the second group of nodes.
[0549] In the embodiments of the present application, the inter-frame voting value corresponding to the first group of nodes can be represented as voteInter1, the intra-frame voting value corresponding to the first group of nodes can be represented as voteIntra1, the inter-frame voting value corresponding to the second group of nodes can be represented as voteInter2, and the intra-frame voting value corresponding to the second group of nodes can be represented as voteIntra2.
[0550] S402, determining the first mode voting value and the second mode voting value of the current node according to the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes, and the weight value corresponding to each of the at least two groups of nodes.
[0551] In some embodiments of the present application, the first group of nodes corresponds to a first weight value, the second group of nodes corresponds to a second weight value, and the first weight value and the second weight value are positive numbers; the implementation of S202 of determining the first mode voting value and the second mode voting value of the current node according to the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes, and the weight value corresponding to each of the at least two groups of nodes, can include:
[0552] Determining the first mode voting value of the current node according to the inter-frame voting value corresponding to the first group of nodes, the inter-frame voting value corresponding to the second group of nodes, the first weight value, and the second weight value;
[0553] Determining the second mode voting value of the current node according to the intra-frame voting value corresponding to the first group of nodes, the intra-frame voting value corresponding to the second group of nodes, the first weight value, and the second weight value.
[0554] It should be noted that the description of S401 and S402 can refer to the description of S201 and S202 in the foregoing, and will not be repeated here.
[0555] The coding method provided in the present application is described below in a specific embodiment.
[0556] In the embodiment of the present application, in addition to considering the information of the prediction mode of the father node and the neighbor node of the node to be predicted, the information of the prediction mode of the uncle node and the grandparent node is introduced, and the voteInter and voteIntra are calculated by using the prediction mode information of the father node, the prediction mode information of the neighbor node, the prediction mode information of the uncle node, and the prediction mode information of the grandparent node, so as to optimize the inter-intra weighted average prediction. The seven main improvements are in the calculation method of voteInter and voteIntra in the inter-intra prediction weighted average prediction, the prior information of the prediction mode of the uncle node and the grandparent node is introduced, the prediction mode information of all the neighbors of the node to be predicted is fully utilized, the calculation of voteInter (the first mode voting value) and voteIntra (the second mode voting value) is optimized, and finally the performance of the codec is improved.
[0557] Embodiment 1: only grandparent node
[0558] In the embodiment of the present application, first, the voteInter is initialized to 1 (the initial inter voting value) and the voteIntra is initialized to 1 (the initial intra voting value) before the inter-intra prediction weighted average prediction value of the current node is calculated.
[0559] The influence of the prediction mode of the father node on the weight: if the father node of the current node is the inter prediction mode, then voteInter=voteInter+k1, and voteIntra remains unchanged; if the father node of the current node is the intra prediction mode, then voteIntra=voteIntra+k1, and voteInter remains unchanged; and if the father node of the current node is the no prediction mode, then voteInter=voteInter+k2, and voteIntra=voteIntra+k2.
[0560] The influence of the prediction mode of the neighbor node on the weight: if the neighbor node of the current node is the inter prediction mode, then voteInter=voteInter+k3, and voteIntra remains unchanged; if the neighbor node of the current node is the intra prediction mode, then voteIntra=voteIntra+k3, and voteInter remains unchanged; and if the neighbor node of the current node is the no prediction mode, then voteInter=voteInter+k4, and voteIntra=voteIntra+k4.
[0561] Influence of grandparent node prediction mode on weights: if the grandparent node of the current node is inter prediction mode, then voteInter = voteInter + k5, voteIntra unchanged, if the grandparent node of the current node is intra prediction mode, then voteIntra = voteIntra + k5, voteInter unchanged, if the grandparent node of the current node is no prediction mode, then voteInter = voteInter + k6, voteIntra = voteIntra + k6.
[0562] Example 2, only add uncle node
[0563] In the embodiments of the present application, first, voteInter is initialized to 1 and voteIntra is initialized to 1 before the inter-intra prediction weighted average prediction value of the current node is performed.
[0564] Influence of father node prediction mode on weights: if the father node of the current node is inter prediction mode, then voteInter = voteInter + k1, voteIntra unchanged, if the father node of the current node is intra prediction mode, then voteIntra = voteIntra + k1, voteInter unchanged, if the father node of the current node is no prediction mode, then voteInter = voteInter + k2, voteIntra = voteIntra + k2.
[0565] Influence of neighbor node prediction mode on weights: if the neighbor node of the current node is inter prediction mode, then voteInter = voteInter + k3, voteIntra unchanged, if the neighbor node of the current node is intra prediction mode, then voteIntra = voteIntra + k3, voteInter unchanged, if the neighbor node of the current node is no prediction mode, then voteInter = voteInter + k4, voteIntra = voteIntra + k4.
[0566] Influence of uncle node prediction mode on weights: if the uncle node of the current node is inter prediction mode, then voteInter = voteInter + k7, voteIntra unchanged, if the uncle node of the current node is intra prediction mode, then voteIntra = voteIntra + k7, voteInter unchanged, if the uncle node of the current node is no prediction mode, then voteInter = voteInter + k8, voteIntra = voteIntra + k8.
[0567] Example 3, Grandfather and Uncle nodes
[0568] In the embodiments of the present application, first, voteInter is initialized to 1 and voteIntra is initialized to 1 before the inter-intra prediction weighted average prediction value of the current node is performed.
[0569] Influence of the father node prediction mode on the weight: if the father node of the current node is an inter prediction mode, voteInter = voteInter + k1, voteIntra is unchanged, if the father node of the current node is an intra prediction mode, voteIntra = voteIntra + k1, voteInter is unchanged, if the father node of the current node is a no prediction mode, voteInter = voteInter + k2, voteIntra = voteIntra + k2.
[0570] Influence of the neighbor node prediction mode on the weight: if the neighbor node of the current node is an inter prediction mode, voteInter = voteInter + k3, voteIntra is unchanged, if the neighbor node of the current node is an intra prediction mode, voteIntra = voteIntra + k3, voteInter is unchanged, if the neighbor node of the current node is a no prediction mode, voteInter = voteInter + k4, voteIntra = voteIntra + k4.
[0571] Influence of the grandfather node prediction mode on the weight: if the grandfather node of the current node is an inter prediction mode, voteInter = voteInter + k5, voteIntra is unchanged, if the grandfather node of the current node is an intra prediction mode, voteIntra = voteIntra + k5, voteInter is unchanged, if the grandfather node of the current node is a no prediction mode, voteInter = voteInter + k6, voteIntra = voteIntra + k6.
[0572] Influence of the uncle node prediction mode on the weight: if the uncle node of the current node is an inter prediction mode, voteInter = voteInter + k7, voteIntra is unchanged, if the uncle node of the current node is an intra prediction mode, voteIntra = voteIntra + k7, voteInter is unchanged, if the uncle node of the current node is a no prediction mode, voteInter = voteInter + k8, voteIntra = voteIntra + k8.
[0573] Example 4, adding grandparent node jointly with parent node
[0574] In the embodiment of the present application, first, voteInter is initialized to 1 and voteIntra is initialized to 1 before the inter-intra prediction weighted average prediction value of the current node is performed.
[0575] Influence of neighbor node prediction mode on weight: if the neighbor node of the current node is in inter prediction mode, voteInter = voteInter + k3, voteIntra remains unchanged, if the neighbor node of the current node is in intra prediction mode, voteIntra = voteIntra + k3, voteInter remains unchanged, if the neighbor node of the current node is in no prediction mode, voteInter = voteInter + k4, voteIntra = voteIntra + k4.
[0576] Influence of uncle node prediction mode on weight: if the uncle node of the current node is in inter prediction mode, voteInter = voteInter + k7, voteIntra remains unchanged, if the uncle node of the current node is in intra prediction mode, voteIntra = voteIntra + k7, voteInter remains unchanged, if the uncle node of the current node is in no prediction mode, voteInter = voteInter + k8, voteIntra = voteIntra + k8.
[0577] Joint influence of parent node and grandparent node prediction mode on weight: if the parent node and the grandparent node of the current node are both in inter prediction mode, voteInter = voteInter + k9, voteIntra remains unchanged, if the parent node and the grandparent node of the current node are both in intra prediction mode, voteIntra = voteIntra + k9, voteInter remains unchanged, otherwise voteInter = voteInter + k10, voteIntra = voteIntra + k10.
[0578] Example 5, adding uncle node jointly with neighbor node
[0579] In the embodiment of the present application, first, voteInter is initialized to 1 and voteIntra is initialized to 1 before the inter-intra prediction weighted average prediction value of the current node is performed.
[0580] Influence of the prediction mode of the father node on the weights: if the father node of the current node is an inter prediction mode, then voteInter = voteInter + k1, voteIntra is unchanged, if the father node of the current node is an intra prediction mode, then voteIntra = voteIntra + k1, voteInter is unchanged, if the father node of the current node is a no prediction mode, then voteInter = voteInter + k2, voteIntra = voteIntra + k2.
[0581] Influence of the prediction mode of the grand father node on the weights: if the grand father node of the current node is an inter prediction mode, then voteInter = voteInter + k5, voteIntra is unchanged, if the grand father node of the current node is an intra prediction mode, then voteIntra = voteIntra + k5, voteInter is unchanged, if the grand father node of the current node is a no prediction mode, then voteInter = voteInter + k6, voteIntra = voteIntra + k6.
[0582] Joint influence of the prediction modes of the uncle node and the neighbor node on the weights: if the uncle node and the neighbor node of the current node are both inter prediction modes, then voteInter = voteInter + k11, voteIntra is unchanged, if the uncle node and the neighbor node of the current node are both intra prediction modes, then voteIntra = voteIntra + k11, voteInter is unchanged, otherwise voteInter = voteInter + k12, voteIntra = voteIntra + k12.
[0583] Embodiment 6, adding the grand father node, joint father node, and uncle node joint neighbor node
[0584] In the embodiments of the present application, first, voteInter is initialized to 1, and voteIntra is initialized to 1, before the inter-intra prediction weighted average prediction value of the current node is performed.
[0585] Joint influence of the prediction modes of the father node and the grand father node on the weights: if the father node and the grand father node of the current node are both inter prediction modes, then voteInter = voteInter + k9, voteIntra is unchanged, if the father node and the grand father node of the current node are both intra prediction modes, then voteIntra = voteIntra + k9, voteInter is unchanged, otherwise voteInter = voteInter + k10, voteIntra = voteIntra + k10.
[0586] Joint effect of uncle node and neighbor node prediction mode on weight: if both the uncle node and the neighbor node of the current node are inter prediction mode, then voteInter = voteInter + k11, voteIntra remains unchanged, if both the uncle node and the neighbor node of the current node are intra prediction mode, then voteIntra = voteIntra + k11, voteInter remains unchanged, otherwise voteInter = voteInter + k12, voteIntra = voteIntra + k12.
[0587] After Embodiment 1 to Embodiment 6, voteInter and voteIntra are calculated, and the weights of the inter prediction value and the intra prediction value are: and The final inter-intra weighted prediction value of the current node is:
[0588] Embodiment 7, introduce new weights
[0589] In the embodiments of the present application, voteInter1 and voteIntra1 are calculated, and voteInter2 and voteIntra2 are calculated:
[0590] First, initialize voteInter1 to 1, voteIntra1 to 1, initialize voteInter2 to 1, and voteIntra2 to 1 before performing inter-intra prediction weighted average prediction value on the current node;
[0591] Effect of father node prediction mode on weight: if the father node of the current node is inter prediction mode, then voteInter1 = voteInter1 + k1, voteIntra1 remains unchanged, if the father node of the current node is intra prediction mode, then voteIntra1 = voteIntra1 + k1, voteInter1 remains unchanged, if the father node of the current node is no prediction mode, then voteInter1 = voteInter1 + k2, voteIntra1 = voteIntra1 + k2.
[0592] Influence of neighbor node prediction mode on weight: if the neighbor node of the current node is inter prediction mode, then voteInterl = voteInterl + k3, voteIntrl remains unchanged, if the neighbor node of the current node is intra prediction mode, then voteIntrl = voteIntrl + k3, voteInterl remains unchanged, if the neighbor node of the current node is no prediction mode, then voteInterl = voteInterl + k4, voteIntrl = voteIntrl + k4.
[0593] Influence of grandparent node prediction mode on weight: if the grandparent node of the current node is inter prediction mode, then voteInter2 = voteInter2 + k5, voteIntra2 remains unchanged, if the grandparent node of the current node is intra prediction mode, then voteIntra2 = voteIntra2 + k5, voteInter2 remains unchanged, if the grandparent node of the current node is no prediction mode, then voteInter2 = voteInter2 + k6, voteIntra2 = voteIntra2 + k6.
[0594] Influence of uncle node prediction mode on weight: if the uncle node of the current node is inter prediction mode, then voteInter2 = voteInter2 + k7, voteIntra2 remains unchanged, if the uncle node of the current node is intra prediction mode, then voteIntra2 = voteIntra2 + k7, voteInter2 remains unchanged, if the uncle node of the current node is no prediction mode, then voteInter2 = voteInter2 + k8, voteIntra2 = voteIntra2 + k8.
[0595] The first mode voting value of the current node is: voteInter = (Q1*voteInterl + Q2*voteInter2) / (Q1+Q2); the second mode voting value of the current node is: voteIntra = (Q1*voteIntrl + Q2*voteIntra2) / (Q1+Q2). After voteInter and voteIntra are calculated, the weight of inter prediction value and intra prediction value is: and The final inter-intra weighted prediction value of the current node is:
[0596] In the embodiments of the present application, taking the example of the embodiment 3, the test is performed on the latest reference platform GESTM-v5, and the result is shown in Table 1. The average gain is -0.4%, -0.7%, and -0.6% on the average luma, Cb, and Cr, respectively, and the time complexity is not changed compared with the anchor. It can be seen that, after introducing the grandparent node and the uncle node prediction mode, the inter-frame and intra-frame weighted average prediction can be optimized without affecting the time complexity, and the performance of GESTM RAHT is improved.
[0597] Table 1
[0598] In the embodiments of the present application, the GESTM RAHT uses voteInter and voteIntra in the calculation of the weight value of the intra-frame prediction value and the calculation of the inter-frame prediction weight value. However, in the anchor anchor point, the neighbor information used in the calculation of voteInter and voteIntra only includes the father node and the neighbor node, and in the spatial position relationship of the current to-be-encoded node, not only the father node and the neighbor node, but also the uncle node and the grandparent node, and this part of information is ignored. The present application introduces the prior information of the uncle node and the grandparent node prediction mode in the calculation method of voteInter and voteIntra in the weighted average prediction, fully utilizes the prediction mode information of all neighbors of the current to-be-predicted node, optimizes the calculation of voteInter and voteIntra, and finally improves the performance of the codec.
[0599] The preferred embodiments of the present application are described in detail above with reference to the drawings, but the present application is not limited to the specific details in the above-described embodiments. Within the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application, and these simple modifications all belong to the protection scope of the present application. For example, in the above-described specific embodiments, various specific technical features described in the embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, various possible combination manners are not described again in the present application. For another example, various different embodiments of the present application can also be combined in any manner, as long as it does not deviate from the idea of the present application, and it should also be considered as the disclosed content of the present application. For another example, under the premise of no conflict, each embodiment described in the present application and / or the technical features in each embodiment can be combined with any prior art, and the technical solutions obtained after the combination should also fall within the protection scope of the present application.
[0600] It should be understood that, in various method embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0601] In an embodiment of the present application, based on the same inventive concept as the foregoing embodiments, a code stream is provided, which is generated by bit encoding of to-be-encoded information; wherein the to-be-encoded information comprises at least one of the following:
[0602] related syntax element information, a first coefficient residual value and a second coefficient value; the related syntax element information is used to indicate whether a current layer in which the current node is located or a current block in which the current node is located adopts a prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform.
[0603] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 12, a constituent structure schematic diagram of a decoder provided by an embodiment of the present application is shown. As shown in FIG. 12, the decoder 1000 comprises a first determining part 1001 and a decoding part 1002, wherein:
[0604] The first determining part 1001 is configured to, in a case where it is determined that a current node adopts a prediction mode of inter and intra weighted average, determine a first mode voting value and a second mode voting value of the current node according to reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least comprise a parent node of the current node and a neighbor node of the current node; determine a first mode weight value and a second mode weight value of the current node respectively according to the first mode voting value and the second mode voting value of the current node; and determine a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node.
[0605] In some embodiments, the neighbor nodes further comprise at least one of a grandparent node of the current node and an uncle node of the current node; the grandparent node of the current node is a parent node of the parent node of the current node; and the uncle node of the current node is a sibling node of the parent node of the current node.
[0606] In some embodiments, the neighbor nodes further comprise a grandparent node of the current node and an uncle node of the current node; and the first determining part 1001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to prediction modes of the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively.
[0607] In some embodiments, the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighboring node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, the third voting coefficient and the fourth voting coefficient.
[0608] In some embodiments, the first determining part 1001 is further configured to determine a second voting coefficient according to the prediction mode of the neighboring node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; determine a fifth voting coefficient according to the prediction mode of the parent node of the current node and the grandparent node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the second voting coefficient, the fourth voting coefficient and the fifth voting coefficient.
[0609] In some embodiments, the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; determine a sixth voting coefficient according to the prediction mode of the neighboring node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
[0610] In some embodiments, the first determining part 1001 is further configured to determine a fifth voting coefficient according to the prediction mode of the parent node of the current node and the grandparent node of the current node; determine a sixth voting coefficient according to the prediction mode of the neighboring node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the fifth voting coefficient and the sixth voting coefficient.
[0611] In some embodiments, the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a seventh voting coefficient according to the prediction modes of the grandparent node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the seventh voting coefficient.
[0612] In some embodiments, the neighbor node further includes any one of the grandparent node of the current node and the uncle node of the current node; and the first determining part 1001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to the prediction modes of the any one of the grandparent node of the current node and the uncle node of the current node, the parent node of the current node, and the neighbor node of the current node.
[0613] In some embodiments, the any one node is the grandparent node of the current node; and the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the third voting coefficient.
[0614] In some embodiments, the any one node is the uncle node of the current node; and the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the fourth voting coefficient.
[0615] In some embodiments, the first determining part 1001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to the prediction modes of the parent node of the current node and the neighbor node of the current node.
[0616] In some embodiments, the first determining part 1001 is further configured to determine an eighth voting coefficient according to the prediction mode of the parent node of the current node and the neighbor node of the current node; determine the first mode voting value and the second mode voting value of the current node according to the accumulation of the initial inter-frame voting value, the initial intra-frame voting value and the eighth voting coefficient.
[0617] In some embodiments, the neighbor nodes include at least two groups of nodes, each of the at least two groups of nodes corresponds to a different weight value, and the first determining part 1001 is further configured to determine the first mode voting value and the second mode voting value of each of the at least two groups of nodes according to the prediction mode of each node in the at least two groups of nodes; determine the first mode voting value and the second mode voting value of the current node according to the first mode voting value and the second mode voting value of each of the at least two groups of nodes and the weight value corresponding to each of the at least two groups of nodes.
[0618] In some embodiments, the at least two groups of nodes include a first group of nodes and a second group of nodes, the first group of nodes includes the parent node of the current node and the neighbor node of the current node, the second group of nodes includes the grandparent node of the current node and the uncle node of the current node, the first mode voting value and the second mode voting value of each of the at least two groups of nodes include the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes and the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes; and the first determining part 1001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; determine the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes according to the accumulation of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient and the second voting coefficient; and determine the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes according to the accumulation of the initial inter-frame voting value, the initial intra-frame voting value, the third voting coefficient and the fourth voting coefficient.
[0619] In some embodiments, the first group of nodes corresponds to a first weight value, and the second group of nodes corresponds to a second weight value, the first weight value and the second weight value being positive numbers; the first determining part 1001 is further configured to determine a first mode voting value of the current node according to the inter-frame voting values corresponding to the first group of nodes, the inter-frame voting values corresponding to the second group of nodes, the first weight value and the second weight value; and determine a second mode voting value of the current node according to the intra-frame voting values corresponding to the first group of nodes, the intra-frame voting values corresponding to the second group of nodes, the first weight value and the second weight value.
[0620] In some embodiments, the first determining part 1001 is further configured to, in a case where the prediction mode of the parent node of the current node is an inter-frame prediction mode, the first voting coefficient represents a voting value of the inter-frame prediction mode, and the first voting coefficient is a first voting value; or, in a case where the prediction mode of the parent node of the current node is an intra-frame prediction mode, the first voting coefficient represents a voting value of the intra-frame prediction mode, and the first voting coefficient is a first voting value; or, in a case where the prediction mode of the parent node of the current node is a no-prediction mode, the first voting coefficient represents voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the first voting coefficient is a second voting value; wherein the first voting value is greater than the second voting value.
[0621] In some embodiments, the first determining part 1001 is further configured to, in a case where the prediction mode of the neighbor node of the current node is an inter-frame prediction mode, the second voting coefficient represents a voting value of the inter-frame prediction mode, and the second voting coefficient is a third voting value; or, in a case where the prediction mode of the neighbor node of the current node is an intra-frame prediction mode, the second voting coefficient represents a voting value of the intra-frame prediction mode, and the second voting coefficient is a third voting value; or, in a case where the prediction mode of the neighbor node of the current node is a no-prediction mode, the second voting coefficient represents voting values of the inter-frame prediction mode and the intra-frame prediction mode, and the second voting coefficient is a fourth voting value; the third voting value is greater than the fourth voting value.
[0622] In some embodiments, the first determining part 1001 is further configured to, in the case that the prediction mode of the grandparent node of the current node is an inter prediction mode, the third voting coefficient represents a voting value of the inter prediction mode, the third voting coefficient being a fifth voting value; or, in the case that the prediction mode of the grandparent node of the current node is an intra prediction mode, the third voting coefficient represents a voting value of the intra prediction mode, the third voting coefficient being a fifth voting value; or, in the case that the prediction mode of the grandparent node of the current node is no prediction mode, the third voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the third voting coefficient being a sixth voting value; the fifth voting value being greater than the sixth voting value.
[0623] In some embodiments, the first determining part 1001 is further configured to, in the case that the prediction mode of the uncle node of the current node is an inter prediction mode, the fourth voting coefficient represents a voting value of the inter prediction mode, the fourth voting coefficient being a seventh voting value; or, in the case that the prediction mode of the uncle node of the current node is an intra prediction mode, the fourth voting coefficient represents a voting value of the intra prediction mode, the fourth voting coefficient being a seventh voting value; or, in the case that the prediction mode of the uncle node of the current node is no prediction mode, the fourth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the fourth voting coefficient being an eighth voting value; the seventh voting value being greater than the eighth voting value.
[0624] In some embodiments, the first determining part 1001 is further configured to, in the case that the prediction mode of the parent node of the current node and the prediction mode of the grandparent node of the current node are both inter prediction modes, the fifth voting coefficient represents a voting value of the inter prediction mode, the fifth voting coefficient being a ninth voting value; or, in the case that the prediction mode of the parent node of the current node and the prediction mode of the grandparent node of the current node are both intra prediction modes, the fifth voting coefficient represents a voting value of the intra prediction mode, the fifth voting coefficient being a ninth voting value; or, in the case that the prediction mode of the parent node of the current node and the prediction mode of the grandparent node of the current node are not both inter prediction modes or intra prediction modes, the fifth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the fifth voting coefficient being a tenth voting value; the ninth voting value being greater than the tenth voting value.
[0625] In some embodiments, the first determining part 1001 is further configured to, in a case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both inter prediction modes, the sixth voting coefficient represents a voting value of the inter prediction modes, the sixth voting coefficient is an eleventh voting value; or, in a case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are both intra prediction modes, the sixth voting coefficient represents a voting value of the intra prediction modes, the sixth voting coefficient is the eleventh voting value; or, in a case that the prediction modes of the neighbor node of the current node and the uncle node of the current node are not both inter prediction modes or intra prediction modes, the sixth voting coefficient represents voting values of the inter prediction modes and the intra prediction modes, the sixth voting coefficient is a twelfth voting value; the eleventh voting value is greater than the twelfth voting value.
[0626] In some embodiments, the first determining part 1001 is further configured to, in a case that the prediction modes of the grandparent node of the current node and the uncle node of the current node are both inter prediction modes, the seventh voting coefficient represents a voting value of the inter prediction modes, the seventh voting coefficient is a thirteenth voting value; or, in a case that the prediction modes of the grandparent node of the current node and the uncle node of the current node are both intra prediction modes, the seventh voting coefficient represents a voting value of the intra prediction modes, the seventh voting coefficient is the thirteenth voting value; or, in a case that the prediction modes of the grandparent node of the current node and the uncle node of the current node are not both inter prediction modes or intra prediction modes, the seventh voting coefficient represents voting values of the inter prediction modes and the intra prediction modes, the seventh voting coefficient is a fourteenth voting value; the thirteenth voting value is greater than the fourteenth voting value.
[0627] In some embodiments, the first determining part 1001 is further configured to, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction modes, the eighth voting coefficient is a fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both intra prediction modes, the eighth voting coefficient represents a voting value of the intra prediction modes, the eighth voting coefficient is the fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are not both inter prediction modes or intra prediction modes, the eighth voting coefficient represents voting values of the inter prediction modes and the intra prediction modes, the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0628] In some embodiments, the first voting value is equal to K times the second voting value; the third voting value is equal to K times the fourth voting value; the fifth voting value is equal to K times the sixth voting value; the seventh voting value is equal to K times the eighth voting value; the ninth voting value is equal to K times the tenth voting value; the eleventh voting value is equal to K times the twelfth voting value; the thirteenth voting value is equal to K times the fourteenth voting value; the fifteenth voting value is equal to K times the sixteenth voting value; K is a positive integer greater than 1.
[0629] In some embodiments, the first voting value and the fifth voting value are the same or different, and the third voting value and the seventh voting value are the same or different; the first voting value and the fifth voting value are both greater than the third voting value and the seventh voting value.
[0630] In some embodiments, the decoding portion 1002 is configured to parse the code stream to determine the relevant syntax element information.
[0631] In some embodiments, the first determining portion 1001 is further configured to determine whether the current node has the first mode prediction value and the second mode prediction value in the case that the relevant syntax element information indicates that the current layer in which the current node is located or the current block in which the current node is located adopts the prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform; and determine that the current node adopts the prediction mode of inter and intra weighted average in the case that the current node has the first mode prediction value and the second mode prediction value.
[0632] In some embodiments, the decoding portion 1002 is further configured to parse the code stream to determine the second coefficient value and the first coefficient residual value of the current node.
[0633] In some embodiments, the first determining portion 1001 is further configured to determine the first coefficient value of the current node according to the first coefficient residual value and the first coefficient prediction value; and determine the attribute reconstruction value of the current node by inversely transforming the first coefficient value and the second coefficient value according to the recursive adaptive hierarchical transform mode.
[0634] It can be understood that, in the embodiments of the present application, the "portion" can be a partial circuit, a partial processor, a partial program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the constituent portions in the embodiments can be integrated in a processing unit, or can be physically present as individual units, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0635] The integrated unit, if implemented in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium based on such understanding. The technical solutions of the embodiments essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can 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 the embodiments. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0636] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the decoder 1000, the computer readable storage medium stores a computer program, and the computer program is executed by the first processor to implement the method in any one of the foregoing embodiments.
[0637] Based on the composition of the decoder 1000 and the computer readable storage medium, referring to FIG. 13, a specific hardware structure schematic diagram of the decoder 1000 provided by the embodiments of the present application is shown. As shown in FIG. 13, the decoder 1000 can include a first communication interface 1101, a first memory 1102, and a first processor 1103; each component is coupled together through a first bus system 1104. It can be understood that the first bus system 1104 is used to realize the connection communication between the components. The first bus system 1104 includes a data bus, a power bus, a control bus, and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the first bus system 1104 in FIG. 13.
[0638] Among them,
[0639] The first communication interface 1101 is used for receiving and sending signals in the process of transceiving information with other external network elements;
[0640] The first memory 1102 is used for storing a computer program capable of running on the first processor 1103;
[0641] The first processor 1103 is used for executing the following when running the computer program:
[0642] In a case that it is determined that the current node adopts the inter and intra weighted average prediction mode, first mode voting value and second mode voting value of the current node are determined according to reconstructed neighbor nodes of the current node, wherein the neighbor nodes at least include a parent node of the current node and a neighbor node of the current node;
[0643] First mode weight value and second mode weight value of the current node are respectively determined according to the first mode voting value and the second mode voting value of the current node;
[0644] First coefficient prediction value of the current node is determined according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
[0645] It can be understood that the first memory 1102 in the embodiments 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 (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example, but not by way of limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The first memory 1102 of the system and method described in the present application is intended to include but not limited to these and any other suitable types of memory.
[0646] The first processor 1103 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the first processor 1103. The first processor 1103 described above can be a general 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 device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiment of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the first memory 1102, and the first processor 1103 reads the information in the first memory 1102 and combines the hardware to complete the steps of the above method.
[0647] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized 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 executing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.
[0648] Optionally, as another embodiment, the first processor 1103 is further configured to execute the method according to any one of the preceding embodiments when the computer program is run.
[0649] In yet another embodiment of the present application, based on the same inventive concept as the preceding embodiments, referring to FIG. 14, a schematic diagram of a composition structure of an encoder provided by an embodiment of the present application is shown. As shown in FIG. 14, the encoder 2000 can include a second determining part 2001 and an encoding part 2002; wherein,
[0650] The second determining part 2001 is configured to, in a case where it is determined that the current node adopts the inter-frame and intra-frame weighted average prediction mode, determine a first mode voting value and a second mode voting value of the current node according to reconstructed neighboring nodes of the current node; wherein the neighboring nodes at least include a parent node of the current node and a neighbor node of the current node; determine a first mode weight value and a second mode weight value of the current node according to the first mode voting value and the second mode voting value of the current node; and determine a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and a first mode prediction value and a second mode prediction value of the current node.
[0651] In some embodiments, the neighboring nodes further include at least one of a grandparent node of the current node and an uncle node of the current node; the grandparent node of the current node is a parent node of the parent node of the current node; and the uncle node of the current node is a sibling node of the parent node of the current node.
[0652] In some embodiments, the neighboring nodes further include a grandparent node of the current node and an uncle node of the current node; and the second determining part 2001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to the prediction modes of the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node, respectively.
[0653] In some embodiments, the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to an accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, the third voting coefficient and the fourth voting coefficient.
[0654] In some embodiments, the second determining part 2001 is further configured to determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node; determine a fifth voting coefficient according to the prediction mode of the father node of the current node and the grandparent node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the second voting coefficient, the fourth voting coefficient and the fifth voting coefficient.
[0655] In some embodiments, the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the father node of the current node; determine a third voting coefficient according to the prediction mode of the grandparent node of the current node; determine a sixth voting coefficient according to the prediction mode of the neighbor node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
[0656] In some embodiments, the second determining part 2001 is further configured to determine a fifth voting coefficient according to the prediction mode of the father node of the current node and the grandparent node of the current node; determine a sixth voting coefficient according to the prediction mode of the neighbor node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the fifth voting coefficient and the sixth voting coefficient.
[0657] In some embodiments, the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the father node of the current node; determine a second voting coefficient according to the prediction mode of the neighbor node of the current node; determine a seventh voting coefficient according to the prediction mode of the grandparent node of the current node and the uncle node of the current node; and determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient and the seventh voting coefficient.
[0658] In some embodiments, the neighbor node further comprises any one of a grandparent node of the current node and an uncle node of the current node; the second determining part 2001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the any one of the grandparent node of the current node and the uncle node of the current node, the father node of the current node, and the neighbor node of the current node.
[0659] In some embodiments, the any one node is the grandparent node of the current node; the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the father node of the current node, determine a second voting coefficient according to the prediction mode of the neighbor node of the current node, determine a third voting coefficient according to the prediction mode of the grandparent node of the current node, and determine the first mode voting value and the second mode voting value of the current node according to an accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the third voting coefficient.
[0660] In some embodiments, the any one node is the uncle node of the current node; the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the father node of the current node, determine a second voting coefficient according to the prediction mode of the neighbor node of the current node, determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node, and determine the first mode voting value and the second mode voting value of the current node according to an accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the fourth voting coefficient.
[0661] In some embodiments, the second determining part 2001 is further configured to determine the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the father node of the current node and the neighbor node of the current node.
[0662] In some embodiments, the second determining part 2001 is further configured to determine an eighth voting coefficient according to the prediction mode of the father node of the current node and the neighbor node of the current node, and determine the first mode voting value and the second mode voting value of the current node according to an accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, and the eighth voting coefficient.
[0663] In some embodiments, the neighbor nodes include at least two groups of nodes, each of the at least two groups of nodes corresponding to different weight values, and the second determining part 2001 is further configured to determine, according to the prediction modes of the nodes in each of the at least two groups of nodes, first mode voting values and second mode voting values corresponding to the at least two groups of nodes respectively, and determine the first mode voting value and the second mode voting value of the current node according to the first mode voting values and the second mode voting values corresponding to the at least two groups of nodes respectively and the weight values corresponding to the at least two groups of nodes respectively.
[0664] In some embodiments, the at least two groups of nodes include a first group of nodes and a second group of nodes, the first group of nodes includes the parent node of the current node and the neighbor node of the current node, the second group of nodes includes the grandparent node of the current node and the uncle node of the current node, the first mode voting values and the second mode voting values corresponding to the at least two groups of nodes respectively include inter-frame voting values and intra-frame voting values corresponding to the first group of nodes and inter-frame voting values and intra-frame voting values corresponding to the second group of nodes, and the second determining part 2001 is further configured to determine a first voting coefficient according to the prediction mode of the parent node of the current node, determine a second voting coefficient according to the prediction mode of the neighbor node of the current node, determine a third voting coefficient according to the prediction mode of the grandparent node of the current node, determine a fourth voting coefficient according to the prediction mode of the uncle node of the current node, and determine the inter-frame voting values and the intra-frame voting values corresponding to the first group of nodes according to the sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient and the second voting coefficient, and determine the inter-frame voting values and the intra-frame voting values corresponding to the second group of nodes according to the sum of the initial inter-frame voting value, the initial intra-frame voting value, the third voting coefficient and the fourth voting coefficient.
[0665] In some embodiments, the first group of nodes corresponds to a first weight value, the second group of nodes corresponds to a second weight value, the first weight value and the second weight value are positive numbers, and the second determining part 2001 is further configured to determine the first mode voting value of the current node according to the inter-frame voting values corresponding to the first group of nodes, the inter-frame voting values corresponding to the second group of nodes, the first weight value and the second weight value, and determine the second mode voting value of the current node according to the intra-frame voting values corresponding to the first group of nodes, the intra-frame voting values corresponding to the second group of nodes, the first weight value and the second weight value.
[0666] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the parent node of the current node is an inter prediction mode, the first voting coefficient represents a voting value of the inter prediction mode, the first voting coefficient being a first voting value; or, in a case that the prediction mode of the parent node of the current node is an intra prediction mode, the first voting coefficient represents a voting value of the intra prediction mode, the first voting coefficient being the first voting value; or, in a case that the prediction mode of the parent node of the current node is no prediction mode, the first voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the first voting coefficient being a second voting value; wherein the first voting value is greater than the second voting value.
[0667] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the neighbor node of the current node is an inter prediction mode, the second voting coefficient represents a voting value of the inter prediction mode, the second voting coefficient being a third voting value; or, in a case that the prediction mode of the neighbor node of the current node is an intra prediction mode, the second voting coefficient represents a voting value of the intra prediction mode, the second voting coefficient being the third voting value; or, in a case that the prediction mode of the neighbor node of the current node is no prediction mode, the second voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the second voting coefficient being a fourth voting value; the third voting value being greater than the fourth voting value.
[0668] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the grandparent node of the current node is an inter prediction mode, the third voting coefficient represents a voting value of the inter prediction mode, the third voting coefficient being a fifth voting value; or, in a case that the prediction mode of the grandparent node of the current node is an intra prediction mode, the third voting coefficient represents a voting value of the intra prediction mode, the third voting coefficient being the fifth voting value; or, in a case that the prediction mode of the grandparent node of the current node is no prediction mode, the third voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the third voting coefficient being a sixth voting value; the fifth voting value being greater than the sixth voting value.
[0669] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the uncle node of the current node is an inter prediction mode, the fourth voting coefficient represents a voting value of the inter prediction mode, the fourth voting coefficient being a seventh voting value; or, in a case that the prediction mode of the uncle node of the current node is an intra prediction mode, the fourth voting coefficient represents a voting value of the intra prediction mode, the fourth voting coefficient being a seventh voting value; or, in a case that the prediction mode of the uncle node of the current node is a no prediction mode, the fourth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the fourth voting coefficient being an eighth voting value; the seventh voting value is greater than the eighth voting value.
[0670] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are both inter prediction modes, the fifth voting coefficient represents a voting value of the inter prediction mode, the fifth voting coefficient being a ninth voting value; or, in a case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are both intra prediction modes, the fifth voting coefficient represents a voting value of the intra prediction mode, the fifth voting coefficient being a ninth voting value; or, in a case that the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node are not both inter prediction modes or intra prediction modes, the fifth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the fifth voting coefficient being a tenth voting value; the ninth voting value is greater than the tenth voting value.
[0671] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node are both inter prediction modes, the sixth voting coefficient represents a voting value of the inter prediction mode, the sixth voting coefficient being an eleventh voting value; or, in a case that the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node are both intra prediction modes, the sixth voting coefficient represents a voting value of the intra prediction mode, the sixth voting coefficient being an eleventh voting value; or, in a case that the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node are not both inter prediction modes or intra prediction modes, the sixth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, the sixth voting coefficient being a twelfth voting value; the eleventh voting value is greater than the twelfth voting value.
[0672] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction modes, the eighth voting coefficient is a fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both intra prediction modes, the eighth voting coefficient represents a voting value of the intra prediction modes, the eighth voting coefficient is a fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are not both inter prediction modes or intra prediction modes, the eighth voting coefficient represents voting values of the inter prediction modes and the intra prediction modes, the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0673] In some embodiments, the second determining part 2001 is further configured to, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction modes, the eighth voting coefficient is a fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are both intra prediction modes, the eighth voting coefficient represents a voting value of the intra prediction modes, the eighth voting coefficient is a fifteenth voting value; or, in a case that the prediction modes of the parent node of the current node and the neighbor node of the current node are not both inter prediction modes or intra prediction modes, the eighth voting coefficient represents voting values of the inter prediction modes and the intra prediction modes, the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
[0674] In some embodiments, the first voting value is equal to K times of the second voting value; the third voting value is equal to K times of the fourth voting value; the fifth voting value is equal to K times of the sixth voting value; the seventh voting value is equal to K times of the eighth voting value; the ninth voting value is equal to K times of the tenth voting value; the eleventh voting value is equal to K times of the twelfth voting value; the thirteenth voting value is equal to K times of the fourteenth voting value; the fifteenth voting value is equal to K times of the sixteenth voting value; K is a positive integer greater than 1.
[0675] In some embodiments, the first voting value and the fifth voting value are the same or different, and the third voting value and the seventh voting value are the same or different; the first voting value and the fifth voting value are both greater than the third voting value and the seventh voting value.
[0676] In some embodiments, the second determining part 2001 is further configured to determine whether the first mode prediction value and the second mode prediction value exist for the current node in the case that the current layer where the current node is located or the current block where the current node is located adopts the prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform.
[0677] In the case that the first mode prediction value and the second mode prediction value exist for the current node, it is determined that the current node adopts the prediction mode of inter and intra weighted average.
[0678] In some embodiments, the encoding part 2002 is configured to determine related syntax element information, the related syntax element information is used to indicate whether the current layer where the current node is located or the current block where the current node is located adopts the prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform, and the related syntax element information is encoded and written into the bitstream.
[0679] In some embodiments, the second determining part 2001 is further configured to determine the first coefficient residual value of the current node according to the first coefficient original value and the first coefficient prediction value of the current node, determine the first coefficient value of the current node according to the first coefficient residual value and the first coefficient prediction value, and determine the attribute reconstruction value of the current node by inversely transforming the first coefficient value and the second coefficient value according to the recursive adaptive hierarchical transform mode.
[0680] In some embodiments, the encoding part 2002 is further configured to encode the second coefficient value and the first coefficient residual value of the current node, and write the obtained encoding bits into the bitstream.
[0681] It can be understood that, in the present embodiment, the "part" can be a partial circuit, a partial processor, a partial program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the components in the present embodiment can be integrated in a processing unit, or can be physically present in individual units, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0682] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the present embodiment provides a computer readable storage medium applied to the encoder 2000, the computer readable storage medium stores a computer program, and the computer program is executed by a second processor to realize the method of any one of the preceding embodiments.
[0683] Based on the above-mentioned components of the encoder 2000 and the computer readable storage medium, referring to FIG. 15, a specific hardware structure diagram of the encoder 2000 provided by the embodiments of the present application is shown. As shown in FIG. 15, the encoder 2000 can include a second communication interface 2101, a second memory 2102 and a second processor 2103; each component is coupled together through a second bus system 2104. It can be understood that the second bus system 2104 is used to realize the connection communication between the components. The second bus system 2104 includes a data bus, a power supply bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the second bus system 2104 in FIG. 15. Among them,
[0684] The second communication interface 2101 is configured to receive and send signals in the process of transceiving information with other external network elements;
[0685] The second memory 2102 is configured to store a computer program capable of running on the second processor 2103;
[0686] The second processor 2103 is configured to execute the following when running the computer program:
[0687] In the case of determining that the current node adopts the inter-frame and intra-frame weighted average prediction mode, according to the reconstructed neighboring nodes of the current node, the first mode voting value and the second mode voting value of the current node are determined; wherein the neighboring nodes at least include the father node of the current node and the neighbor node of the current node;
[0688] According to the first mode voting value and the second mode voting value of the current node, the first mode weight value and the second mode weight value of the current node are respectively determined;
[0689] According to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node, the first coefficient prediction value of the current node is determined.
[0690] Optionally, as another embodiment, the second processor 2103 is further configured to execute the method of any one of the preceding embodiments when running the computer program.
[0691] It can be understood that the hardware function of the second memory 2102 is similar to that of the first memory 1102, and the hardware function of the second processor 2103 is similar to that of the first processor 1103; here is not described in detail.
[0692] In still another embodiment of the present application, referring to FIG. 16, a schematic diagram of a composition structure of a coding system provided by an embodiment of the present application is shown. As shown in FIG. 16, the coding system 3000 can include a decoder 3001 and an encoder 3002.
[0693] In an embodiment of the present application, the decoder 3001 can be the decoder of any of the foregoing embodiments, and the encoder 3002 can be the encoder of any of the foregoing embodiments.
[0694] It should be noted that in the present application, the terms "comprising", "containing" 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 not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0695] The above-mentioned serial numbers of embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0696] The methods disclosed in several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0697] The features disclosed in several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0698] The features disclosed in several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.
[0699] 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 can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the embodiments of the present application.
Claims
1. A decoding method applied to a decoder, the method comprising: in a case where it is determined that a current node adopts an inter and intra weighted average prediction mode, determining a first mode vote value and a second mode vote value of the current node according to reconstructed neighboring nodes of the current node; wherein the neighboring nodes comprise at least a parent node of the current node and a neighbor node of the current node; determining a first mode weight value and a second mode weight value of the current node respectively according to the first mode vote value and the second mode vote value of the current node; determining a first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node and a first mode prediction value and a second mode prediction value of the current node.
2. The method of claim 1, wherein, the neighboring nodes further comprise at least one of a grandparent node of the current node and an uncle node of the current node; the grandparent node of the current node is a parent node of the parent node of the current node; the uncle node of the current node is a sibling node of the parent node of the current node.
3. The method of claim 1 or 2, wherein, the neighboring nodes further comprise a grandparent node of the current node and an uncle node of the current node; and the determining the first mode vote value and the second mode vote value of the current node according to the reconstructed neighboring nodes of the current node comprises: determining the first mode vote value and the second mode vote value of the current node according to prediction modes of the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively.
4. The method of claim 3, wherein, the determining the first mode vote value and the second mode vote value of the current node according to prediction modes of the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively comprises: determining a first vote coefficient according to the prediction mode of the parent node of the current node; determining a second vote coefficient according to the prediction mode of the neighbor node of the current node; determining a third vote coefficient according to the prediction mode of the grandparent node of the current node; determining a fourth vote coefficient according to the prediction mode of the uncle node of the current node; determining the first mode vote value and the second mode vote value of the current node according to an accumulated sum of an initial inter vote value, an initial intra vote value, the first vote coefficient, the second vote coefficient, the third vote coefficient and the fourth vote coefficient.
5. The method of claim 3, wherein, the determining the first mode vote value and the second mode vote value of the current node according to prediction modes of the parent node of the current node, the neighbor node of the current node, the grandparent node of the current node and the uncle node of the current node respectively comprises: determining a second vote coefficient according to the prediction mode of the neighbor node of the current node; determining a fourth vote coefficient according to the prediction mode of the uncle node of the current node; determining a fifth vote coefficient according to the prediction modes of the parent node of the current node and the grandparent node of the current node; determining the first mode voting value and the second mode voting value of the current node according to an initial inter-frame voting value, an initial intra-frame voting value, a sum of the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
6. The method of claim 3, wherein, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of the father node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node, comprising: determining the first voting coefficient according to the prediction mode of the father node of the current node; determining the third voting coefficient according to the prediction mode of the grandparent node of the current node; determining the sixth voting coefficient according to the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node; determining the first mode voting value and the second mode voting value of the current node according to an initial inter-frame voting value, an initial intra-frame voting value, a sum of the first voting coefficient, the third voting coefficient and the sixth voting coefficient.
7. The method of claim 3, wherein, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of the father node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node, comprising: determining the fifth voting coefficient according to the prediction mode of the father node of the current node and the prediction mode of the grandparent node of the current node; determining the sixth voting coefficient according to the prediction mode of the neighbor node of the current node and the prediction mode of the uncle node of the current node; determining the first mode voting value and the second mode voting value of the current node according to an initial inter-frame voting value, an initial intra-frame voting value, a sum of the fifth voting coefficient and the sixth voting coefficient.
8. The method of claim 3, wherein, determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of the father node of the current node, the prediction mode of the neighbor node of the current node, the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node, comprising: determining the first voting coefficient according to the prediction mode of the father node of the current node; determining the second voting coefficient according to the prediction mode of the neighbor node of the current node; determining the seventh voting coefficient according to the prediction mode of the grandparent node of the current node and the prediction mode of the uncle node of the current node; determining the first mode voting value and the second mode voting value of the current node according to an initial inter-frame voting value, an initial intra-frame voting value, a sum of the first voting coefficient, the second voting coefficient and the seventh voting coefficient.
9. The method of claim 1 or 2, wherein, the neighbor node further comprises any one of the grandparent node of the current node and the uncle node of the current node; and determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor node of the current node, comprising: Determine the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following: any one of the grandparent node of the current node and the uncle node of the current node, the father node of the current node, and the neighbor node of the current node.
10. The method of claim 9, wherein, The any one of the grandparent node of the current node and the uncle node of the current node; the determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following: the father node of the current node, and the neighbor node of the current node, comprises: Determine the first voting coefficient according to the prediction mode of the father node of the current node; Determine the second voting coefficient according to the prediction mode of the neighbor node of the current node; Determine the third voting coefficient according to the prediction mode of the grandparent node of the current node; Determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the third voting coefficient.
11. The method of claim 9, wherein, The any one of the grandparent node of the current node and the uncle node of the current node; the determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following: the father node of the current node, and the neighbor node of the current node, comprises: Determine the first voting coefficient according to the prediction mode of the father node of the current node; Determine the second voting coefficient according to the prediction mode of the neighbor node of the current node; Determine the fourth voting coefficient according to the prediction mode of the uncle node of the current node; Determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the first voting coefficient, the second voting coefficient, and the fourth voting coefficient.
12. The method of claim 1 or 2, wherein, The determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor node of the current node, comprises: Determine the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following: the father node of the current node, and the neighbor node of the current node.
13. The method of claim 12, wherein, The determining the first mode voting value and the second mode voting value of the current node according to the prediction mode of each of the following: the father node of the current node, and the neighbor node of the current node, comprises: Determine the eighth voting coefficient according to the prediction mode of the father node of the current node and the neighbor node of the current node; Determine the first mode voting value and the second mode voting value of the current node according to the accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, and the eighth voting coefficient.
14. The method of claim 1 or 2, wherein, The neighbor node comprises at least two groups of nodes, each of the at least two groups of nodes corresponds to different weight values, and the determining the first mode voting value and the second mode voting value of the current node according to the reconstructed neighbor node of the current node, comprises: determining, according to the prediction mode of each node in the at least two groups of nodes, a first mode voting value and a second mode voting value corresponding to each of the at least two groups of nodes; determining, according to the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes and a weight value corresponding to each of the at least two groups of nodes, a first mode voting value and a second mode voting value of the current node.
15. The method of claim 14, wherein, The at least two groups of nodes include a first group of nodes and a second group of nodes, the first group of nodes includes a parent node of the current node and a neighbor node of the current node, and the second group of nodes includes a grandparent node of the current node and an uncle node of the current node, and the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes include an inter-frame voting value and an intra-frame voting value corresponding to the first group of nodes and an inter-frame voting value and an intra-frame voting value corresponding to the second group of nodes. The determining, according to the prediction mode of each node in the at least two groups of nodes, a first mode voting value and a second mode voting value corresponding to each of the at least two groups of nodes, includes: determining a first voting coefficient according to the prediction mode of the parent node of the current node; determining a second voting coefficient according to the prediction mode of the neighbor node of the current node; determining a third voting coefficient according to the prediction mode of the grandparent node of the current node; determining a fourth voting coefficient according to the prediction mode of the uncle node of the current node; determining the inter-frame voting value and the intra-frame voting value corresponding to the first group of nodes according to an accumulated sum of an initial inter-frame voting value, an initial intra-frame voting value, the first voting coefficient and the second voting coefficient; determining the inter-frame voting value and the intra-frame voting value corresponding to the second group of nodes according to an accumulated sum of the initial inter-frame voting value, the initial intra-frame voting value, the third voting coefficient and the fourth voting coefficient.
16. The method of claim 15, wherein, The first group of nodes corresponds to a first weight value, and the second group of nodes corresponds to a second weight value, and the first weight value and the second weight value are positive numbers. The determining, according to the first mode voting value and the second mode voting value corresponding to each of the at least two groups of nodes and the weight value corresponding to each of the at least two groups of nodes, a first mode voting value and a second mode voting value of the current node, includes: determining the first mode voting value of the current node according to the inter-frame voting value corresponding to the first group of nodes, the inter-frame voting value corresponding to the second group of nodes, the first weight value and the second weight value; determining the second mode voting value of the current node according to the intra-frame voting value corresponding to the first group of nodes, the intra-frame voting value corresponding to the second group of nodes, the first weight value and the second weight value.
17. The method of any one of claims 4, 6, 8, 10, 11, and 15, wherein, The determining, according to the prediction mode of the parent node of the current node, a first voting coefficient, includes: in a case where the prediction mode of the parent node of the current node is an inter-frame prediction mode, the first voting coefficient represents a voting value of the inter-frame prediction mode, and the first voting coefficient is a first voting value; or, in a case where the prediction mode of the parent node of the current node is an intra-frame prediction mode, the first voting coefficient represents a voting value of the intra-frame prediction mode, and the first voting coefficient is a second voting value. In a case where the prediction mode of the parent node of the current node is the intra prediction mode, the first voting coefficient represents a voting value of the intra prediction mode, and the first voting coefficient is a first voting value; or In a case where the prediction mode of the parent node of the current node is the no prediction mode, the first voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the first voting coefficient is a second voting value; wherein the first voting value is greater than the second voting value.
18. The method of any one of claims 4, 5, 8, 10, 11, and 15, wherein, The second voting coefficient is determined according to the prediction mode of the neighbor node of the current node, and the second voting coefficient represents a voting value of the inter prediction mode in a case where the prediction mode of the neighbor node of the current node is the inter prediction mode, and the second voting coefficient is a third voting value; or The second voting coefficient represents a voting value of the intra prediction mode in a case where the prediction mode of the neighbor node of the current node is the intra prediction mode, and the second voting coefficient is a third voting value; or The second voting coefficient represents voting values of the inter prediction mode and the intra prediction mode in a case where the prediction mode of the neighbor node of the current node is the no prediction mode, and the second voting coefficient is a fourth voting value; and the third voting value is greater than the fourth voting value. The third voting coefficient is determined according to the prediction mode of the grandparent node of the current node, and the third voting coefficient represents a voting value of the inter prediction mode in a case where the prediction mode of the grandparent node of the current node is the inter prediction mode, and the third voting coefficient is a fifth voting value; or 19. The method of any one of claims 4, 6, 10, and 15, wherein, The third voting coefficient represents a voting value of the intra prediction mode in a case where the prediction mode of the grandparent node of the current node is the intra prediction mode, and the third voting coefficient is a fifth voting value; or The third voting coefficient represents voting values of the inter prediction mode and the intra prediction mode in a case where the prediction mode of the grandparent node of the current node is the no prediction mode, and the third voting coefficient is a sixth voting value; and the fifth voting value is greater than the sixth voting value. The fourth voting coefficient is determined according to the prediction mode of the uncle node of the current node, and the fourth voting coefficient represents a voting value of the inter prediction mode in a case where the prediction mode of the uncle node of the current node is the inter prediction mode, and the fourth voting coefficient is a seventh voting value; or The fourth voting coefficient represents a voting value of the intra prediction mode in a case where the prediction mode of the uncle node of the current node is the intra prediction mode, and the fourth voting coefficient is a seventh voting value; or 20. The method of any one of claims 4, 5, 11, and 15, wherein, The fourth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode in a case where the prediction mode of the uncle node of the current node is the no prediction mode, and the fourth voting coefficient is an eighth voting value; and the seventh voting value is greater than the eighth voting value. The fifth voting coefficient is determined according to the prediction mode of the parent node of the current node and the prediction mode of the grandparent node of the current node, and the fifth voting coefficient represents a voting value of the inter prediction mode in a case where the prediction mode of the parent node of the current node is the inter prediction mode and the prediction mode of the grandparent node of the current node is the inter prediction mode, and the fifth voting coefficient is a ninth voting value; or 21. The method of claim 5 or 7, wherein, In a case where the prediction modes of the parent node of the current node and the grandparent node of the current node are both inter prediction modes, the fifth voting coefficient represents a voting value of the inter prediction mode, and the fifth voting coefficient is a ninth voting value; or In a case where the prediction modes of the parent node of the current node and the grandparent node of the current node are both intra prediction modes, the fifth voting coefficient represents a voting value of the intra prediction mode, and the fifth voting coefficient is a ninth voting value; or In a case where the prediction modes of the parent node of the current node and the grandparent node of the current node are not both inter prediction modes or intra prediction modes, the fifth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the fifth voting coefficient is a tenth voting value; the ninth voting value is greater than the tenth voting value. The determination of the sixth voting coefficient according to the prediction modes of the neighbor node of the current node and the uncle node of the current node comprises:
22. The method of claim 6 or 7, wherein, In a case where the prediction modes of the neighbor node of the current node and the uncle node of the current node are both inter prediction modes, the sixth voting coefficient represents a voting value of the inter prediction mode, and the sixth voting coefficient is an eleventh voting value; or In a case where the prediction modes of the neighbor node of the current node and the uncle node of the current node are both intra prediction modes, the sixth voting coefficient represents a voting value of the intra prediction mode, and the sixth voting coefficient is an eleventh voting value; or In a case where the prediction modes of the neighbor node of the current node and the uncle node of the current node are not both inter prediction modes or intra prediction modes, the sixth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the sixth voting coefficient is a twelfth voting value; the eleventh voting value is greater than the twelfth voting value. The determination of the seventh voting coefficient according to the prediction modes of the grandparent node of the current node and the uncle node of the current node comprises:
23. The method of claim 8, wherein, In a case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are both inter prediction modes, the seventh voting coefficient represents a voting value of the inter prediction mode, and the seventh voting coefficient is a thirteenth voting value; or In a case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are both intra prediction modes, the seventh voting coefficient represents a voting value of the intra prediction mode, and the seventh voting coefficient is a thirteenth voting value; or In a case where the prediction modes of the grandparent node of the current node and the uncle node of the current node are not both inter prediction modes or intra prediction modes, the seventh voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the seventh voting coefficient is a fourteenth voting value; the thirteenth voting value is greater than the fourteenth voting value. The determination of the eighth voting coefficient according to the prediction modes of the parent node of the current node and the neighbor node of the current node comprises:
24. The method of claim 13, wherein, In a case where the prediction mode of the parent node of the current node and the neighbor node of the current node are both inter prediction modes, the eighth voting coefficient represents a voting value of the inter prediction mode, and the eighth voting coefficient is a fifteenth voting value; or, In a case where the prediction mode of the parent node of the current node and the neighbor node of the current node are both intra prediction modes, the eighth voting coefficient represents a voting value of the intra prediction mode, and the eighth voting coefficient is a fifteenth voting value; or, In a case where the prediction mode of the parent node of the current node and the neighbor node of the current node are not both inter prediction modes or intra prediction modes, the eighth voting coefficient represents voting values of the inter prediction mode and the intra prediction mode, and the eighth voting coefficient is a sixteenth voting value; the fifteenth voting value is greater than the sixteenth voting value.
25. The method of any one of claims 17-24, wherein, the first voting value is equal to K times the second voting value; the third voting value is equal to K times the fourth voting value; the fifth voting value is equal to K times the sixth voting value; the seventh voting value is equal to K times the eighth voting value; the ninth voting value is equal to K times the tenth voting value; the eleventh voting value is equal to K times the twelfth voting value; the thirteenth voting value is equal to K times the fourteenth voting value; the fifteenth voting value is equal to K times the sixteenth voting value; K is a positive integer greater than 1.
26. The method of any one of claims 17 to 25, wherein, the first voting value and the fifth voting value are the same or different, and the third voting value and the seventh voting value are the same or different; the first voting value and the fifth voting value are both greater than the third voting value and the seventh voting value.
27. The method of any one of claims 1 to 26, wherein, The method further comprises: parsing a bitstream to determine relevant syntax element information; in a case where the relevant syntax element information indicates that a current layer in which the current node is located or a current block in which the current node is located adopts a prediction mode of inter and intra weighted average based on recursive adaptive hierarchical transform, determining whether the current node has the first mode prediction value and the second mode prediction value; in a case where the current node has the first mode prediction value and the second mode prediction value, determining that the current node adopts the prediction mode of inter and intra weighted average.
28. The method of claim 27, wherein, The method further comprises: parsing a bitstream to determine a second coefficient value and a first coefficient residual value of the current node; determining a first coefficient value of the current node according to the first coefficient residual value and the first coefficient prediction value; performing inverse transformation on the first coefficient value and the second coefficient value according to a recursive adaptive hierarchical transform mode to determine an attribute reconstruction value of the current node.
29. An encoding method applied to an encoder, the method comprising: in a case where it is determined that a current node adopts a prediction mode of inter and intra weighted average, determining a first mode voting value and a second mode voting value of the current node according to reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include a parent node of the current node and a neighbor node of the current node. determine the first mode weight value and the second mode weight value of the current node according to the first mode vote value and the second mode vote value of the current node, respectively; determine the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
30. A code stream, the code stream being generated by bit-encoding according to information to be encoded; wherein, The to-be-encoded information includes at least one of the following: The related syntax element information, the first coefficient residual value and the second coefficient value; the related syntax element information is used to indicate whether the current layer in which the current node is located or the current block in which the current node is located adopts the prediction mode of the inter and intra weighted average prediction based on the recursive adaptive hierarchical transform.
31. A decoder, comprising a first determining part, wherein: The first determining part is configured to, in a case where it is determined that the current node adopts the prediction mode of the inter and intra weighted average prediction, determine the first mode vote value and the second mode vote value of the current node according to the reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include the parent node of the current node and the neighbor node of the current node; determine the first mode weight value and the second mode weight value of the current node according to the first mode vote value and the second mode vote value of the current node, respectively; and determine the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
32. An encoder, comprising a second determining part, wherein: The second determining part is configured to, in a case where it is determined that the current node adopts the prediction mode of the inter and intra weighted average prediction, determine the first mode vote value and the second mode vote value of the current node according to the reconstructed neighbor nodes of the current node; wherein the neighbor nodes at least include the parent node of the current node and the neighbor node of the current node; determine the first mode weight value and the second mode weight value of the current node according to the first mode vote value and the second mode vote value of the current node, respectively; and determine the first coefficient prediction value of the current node according to the first mode weight value and the second mode weight value of the current node, and the first mode prediction value and the second mode prediction value of the current node.
33. A decoder, comprising a first memory and a first processor, wherein: The first memory is configured to store a computer program capable of running on the first processor; The first processor is configured to, when running the computer program, execute the method according to any one of claims 1 to 28.
34. An encoder, comprising a second memory and a second processor, wherein: The second memory is configured to store a computer program capable of running on the second processor; The second processor is configured to, when running the computer program, execute the method according to claim 29.
35. A computer readable storage medium, wherein, The computer readable storage medium stores a computer program which, when executed, implements the method of any one of claims 1 to 28, or the method of claim 29.
Citation Information
Patent Citations
Intra-frame prediction method, encoder, decoder and storage medium
CN114868389A
Inter prediction coding and decoding for geometry point cloud compression
CN116711313A
Weighted prediction method for multi-hypothesis encoding and apparatus
US20210297688A1
Model-based prediction for geometry point cloud compression
US20220215596A1
Inter prediction coding with radius interpolation for predictive geometry-based point cloud compression
WO2023059987A1