Mode determining method, communication node, storage medium, and program product

By acquiring motion information of the block to be predicted, determining the reference block template and calculating the template cost, and selecting the optimal BGC correction mode, the problem of inaccurate inter-frame bidirectional prediction is solved, improving the accuracy of video block prediction and coding efficiency.

WO2025251670A1PCT designated stage Publication Date: 2025-12-11ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/076635
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-06
Filing Date
2025-02-10
Publication Date
2025-12-11

AI Technical Summary

Technical Problem

In video coding, the inaccuracy of BGC prediction in inter-frame bidirectional prediction technology leads to inaccurate video block prediction, especially in skip or direct modes, where the BGC syntax elements are not suitable for the characteristics of the current video block when they are obtained from the surrounding blocks or the historical information motion vector list.

Method used

By acquiring the first and second motion information of the block to be predicted, the templates of the first and second reference blocks are determined, the template cost is calculated, and the optimal BGC correction mode is selected to improve prediction accuracy.

Benefits of technology

It improves the accuracy of video block prediction, adapts to the characteristics of different video blocks, and enhances the efficiency and quality of video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025076635_11122025_PF_FP_ABST
    Figure CN2025076635_11122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a mode determining method, a communication node, a storage medium, and a program product. The method comprises: acquiring first motion information and second motion information of a block to be predicted; acquiring a first template of a first reference block on the basis of the first motion information, and acquiring a second template of a second reference block on the basis of the second motion information; determining a template cost on the basis of the first template, the second template, and a third template of the block to be predicted; and on the basis of the template cost, determining a target modification mode of the block to be predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Mode determination method, communication node, storage medium and program product TECHNICAL FIELD

[0001] The present application relates to the technical field of video coding, in particular to a mode determination method, a communication node, a storage medium and a program product. BACKGROUND

[0002] The world today is a multimedia society surrounded by images and videos, such as advertising, medical care, security, entertainment, conference television and other fields, none of which are not related to image and video media content. With the improvement of video quality: from high-definition video to 4K, 8K and other ultra-high-definition video, the increase of screen content, panoramic video and other types of video, and the widespread use of network streaming and real-time communication, the data volume of video transmission or storage has been greatly increased, and the video transmission bandwidth has been put forward with extremely high requirements. Video compression is a technology that removes spatial and temporal redundancy information of the original video as much as possible through various encoding tools, effectively reduces the data volume of the video, and ensures the video quality, also known as video coding, which is one of the most popular research directions in the field of multimedia technology research.

[0003] In the digital audio and video coding standard (Audio Video coding Standard, AVS) and the new generation of versatile video coding standard (Versatile Video Coding, H.266 / VVC), the inter-frame bi-directional prediction technology is used. The inter-frame bi-directional prediction technology includes a bi-directional gradient correction technology (Bi-directional Gradient Correction, BGC). The BGC includes two syntax elements BgcFlag and BgcIdx, which are used to represent whether the BGC is enabled and the gradient correction direction, respectively. In the inter-frame mode, the two syntax elements need to be coded into the code stream and transmitted to the decoding end; in the skip or direct mode, the two syntax elements will be obtained from the surrounding blocks of the video block to be predicted or from the historical information motion vector list, and will not be transmitted in the code stream.

[0004] However, due to the different characteristics of different video blocks, the syntax elements obtained from the surrounding blocks or the historical information motion vector list may not be suitable for the prediction of the video block to be predicted, which reduces the prediction accuracy of the video block in the decoding process. SUMMARY

[0005] The present application provides a mode determination method, a communication node, a storage medium and a program product to solve the problem of inaccurate BGC prediction, and improves the accuracy of video block prediction.

[0006] To achieve the above object, the embodiment of the present application provides a mode determination method, comprising:

[0007] obtaining first motion information and second motion information of the to-be-predicted block;

[0008] obtaining a first template of a first reference block according to the first motion information, and obtaining a second template of a second reference block according to the second motion information;

[0009] determining a template cost according to the first template, the second template, and a third template of the to-be-predicted block;

[0010] determining a target correction mode of the to-be-predicted block according to the template cost.

[0011] To achieve the above object, the embodiment of the present application provides a communication node, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the steps of the mode determination method according to any one of the embodiments of the present application.

[0012] To achieve the above object, the embodiment of the present application provides a storage medium for computer readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the mode determination method according to any one of the embodiments of the present application.

[0013] To achieve the above object, the embodiment of the present application provides a computer program product, comprising a computer program, and the computer program realizes the steps of the mode determination method according to any one of the embodiments of the present application when executed by a processor.

[0014] The mode determination method, the communication node, the storage medium and the program product provided by the embodiment of the present application obtain the first motion information and the second motion information of the to-be-predicted block, obtain the first template of the first reference block according to the first motion information, and obtain the second template of the second reference block according to the second motion information, determine the template cost according to the first template, the second template and the third template of the to-be-predicted block, and determine the target correction mode of the to-be-predicted block according to the template cost. Through the above technical solution, the template cost in different BGC modes is determined according to the template of the picture block needing to be predicted in the decoded frame and the motion information corresponding to the picture block, and then the target correction mode required when the picture block is predicted by bidirectional gradient correction is determined. By utilizing the correlation between the to-be-predicted block and the adjacent reconstructed information, the syntax parameters and the motion information in the correction mode required by the to-be-predicted block are determined through the method, and the accuracy of the image block prediction is improved. BRIEF DESCRIPTION OF DRAWINGS

[0015] FIG. 1 is a schematic diagram of an encoding framework of H.266 / VVC;

[0016] FIG. 2 is a schematic diagram of a decoding framework of H.266 / VVC;

[0017] FIG. 3 is a schematic diagram of a mode determination method provided by an embodiment of the present application;

[0018] FIG. 4 is a schematic diagram of another mode determination method provided by an embodiment of the present application;

[0019] FIG. 5 is a schematic diagram of another mode determination method provided by an embodiment of the present application;

[0020] FIG. 6 is a schematic diagram of another mode determination method provided by an embodiment of the present application;

[0021] FIG. 7 is a schematic diagram of a mode determination apparatus provided by an embodiment of the present application;

[0022] FIG. 8 is a schematic diagram of a communication node provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other as long as there is no conflict.

[0024] The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Moreover, although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.

[0025] FIG. 1 is a schematic diagram of an encoding framework of H.266 / VVC, as shown in FIG. 1, the encoding framework mainly includes modules such as intra prediction, inter prediction, transformation, quantization, loop filtering, and entropy encoding, each module covers multiple new encoding technologies, further improves the encoding gain, but also requires a large amount of memory.

[0026] In various modules of the H.266 / VVC encoding framework, the intra prediction module mainly removes the spatial correlation of the video image, predicts the pixel value of the current block using the pixel information of the adjacent reconstructed blocks that have been encoded, and has a lower compression rate; the inter prediction module mainly removes the temporal correlation of the video image, uses the inter-coded image as the reference image of the current frame to obtain the motion information of each block of the current frame, and can use single and double reference images for prediction. Generally, the compression rate is higher than that of intra prediction encoding. After the video image block passes through the intra / inter prediction module, the predicted value of the current block is obtained. The residual data is obtained by subtracting the original image block from the predicted block. The residual data is transformed, i.e., from the time domain described in the pixel form to the frequency domain, so that the image energy is concentrated in the low frequency region, and the frequency domain correlation of the image, i.e., the correlation of the transform coefficients, can be effectively removed. Generally, the transformed coefficients have a large dynamic range, and the quantization module is needed to reduce the dynamic range to achieve better compression. The entropy encoding module encodes the intra prediction data, motion information, quantized coefficients, and encoding control data into a binary stream, i.e., the code stream of the compressed original video, and then realizes storage or transmission.

[0027] In addition, in order to construct a decoded image buffer for inter prediction as a reference image in the encoding framework, an image reconstruction process is also implemented, mainly including the inverse quantization, inverse transformation and loop filtering modules. The specific process is to perform inverse quantization and inverse transformation on the quantized transform coefficients to obtain residual data, and then add the prediction information to obtain the reconstructed image data. The loop filtering module is used to improve the subjective quality and compression efficiency of the image and reduce the decoding error. The reason is that video encoding is based on block processing, and the reconstructed image usually has phenomena such as blocking effect and ringing effect. This module mainly includes the following filtering techniques: luma mapping and chroma scaling (LMCS), de-blocking filter (DBF), sample adaptive offset (SAO) and adaptive loop filter (ALF). The luma mapping and chroma scaling are used to redistribute the code words in the dynamic range, which can improve the compression efficiency. The de-blocking filter is used to smooth the block boundary, which can effectively reduce and remove the blocking effect. The sample adaptive offset is used to use different compensation values for different types of reconstructed pixels, which can improve the ringing effect caused by the loss of high-frequency information and effectively improve the subjective and objective quality of the reconstructed image. The adaptive loop filter is used to perform Wiener filtering on the reconstructed image pixels, which can effectively reduce the decoding error.

[0028] As shown in FIG. 1, the overall framework process of H.266 / VVC at the encoding end is as follows:

[0029] (1) The input video is first divided into frames, and the video frames (images) obtained by the division are divided into blocks: each frame is divided into multiple coding tree units (CTU), each CTU can be divided into 4 coding units (CU) of the same size by a quadtree, or can be recursively divided into CUs of different sizes by a multiple type tree (MTT), i.e., a binary tree or a ternary tree structure. A CTU contains all color channels, i.e., a CTU is composed of one luminance block (CTB) and two chrominance blocks CTB; a block is the basic unit of video encoding, the maximum size of a luminance block is 128*128, and the minimum size is 4*4, the maximum size of a chrominance block is 64*64, and the minimum size is 2*2; the size of the finally divided block is related to the content of the video image.

[0030] (2) The divided blocks are sent to the intra / inter prediction mode for prediction encoding, wherein the main purpose of intra prediction encoding is to remove the spatial correlation of the image; the main purpose of inter prediction encoding is to remove the temporal correlation of the image.

[0031] (3) Subtracting the prediction block obtained by intra / inter encoding from the original encoding block obtains the residual data of the current block, and the residual data is transformed and quantized to remove the frequency domain correlation, realize the lossy compression of image residual data, and further improve the compression efficiency.

[0032] (4) All encoding parameters and residuals are entropy encoded to form a binary stream for storage or transmission, and the output data of the entropy encoding module is the code stream after the original video compression.

[0033] (5) The reconstructed block residual data can be obtained by inverse quantization and inverse transformation of the quantized transform coefficients, and the reconstructed value of the encoding block is obtained by adding the prediction value obtained by intra / inter encoding, thereby obtaining the reconstructed image.

[0034] (6) The reconstructed image is filtered by a loop filter and stored in an image buffer as a reference image for subsequent inter prediction.

[0035] Fig. 2 is a schematic diagram of the decoding framework of H.266 / VVC, as shown in Fig. 2, the overall framework process of H.266 / VVC at the decoding end is as follows:

[0036] (1) Analyzing the code stream to obtain the prediction mode to obtain the prediction value.

[0037] (2) Inverse transforming and inverse quantizing the residual obtained by analyzing the code stream.

[0038] (3) Adding the prediction value and the inverse quantized and inverse transformed residual to obtain the block reconstruction value, and finally forming the reconstructed image

[0039] (4) The reconstructed image is filtered by a loop filter and stored in an image buffer as a subsequent reference image.

[0040] In the above H.266 / VVC, inter prediction can be achieved by BGC technology, and in BGC, two syntax elements BgcFlag and BgcIdx are included, which are used to represent whether BGC is enabled and the gradient correction direction respectively, and at least three different prediction modes can be obtained by combining the two. However, in the inter mode, the above two syntax elements will be encoded into the code stream and transmitted to the decoding end, which will consume a certain number of code words. In the skip or direct mode, the two syntax elements will be obtained from the surrounding blocks of the required prediction video block or from the historical information motion vector sequence together with other motion information, and the decoding end cannot directly obtain them from the code stream. Because different video blocks have different characteristics, the BgcFlag and BgcIdx obtained from the surrounding blocks or inherited from the historical information motion vector list may not necessarily be suitable for the prediction of the current required prediction video block, that is, the current BGC technology cannot give the most suitable prediction mode for the current required prediction video block in the skip or direct mode.

[0041] To solve the above problem, the present application provides a mode determination method, which only relies on the frame in which the picture block to be predicted is located and the two reference frames related to the picture block to be predicted to determine the required correction mode of the picture block, which is more in line with the characteristics of the required prediction picture block and improves the accuracy of image block prediction. The mode determination method provided by the present application can be applied to the encoding end or decoding end in the communication node to assist the encoding end or decoding end to obtain and determine the BGC syntax element.

[0042] In one exemplary embodiment, FIG. 3 is a flowchart of a mode determination method provided by an embodiment of the present application. The method can be applied to the determination of the mode for image block prediction correction. The method can be executed by a mode determination device, which can be executed by software and / or hardware and integrated in a communication node. The communication node can be a decoding end communication node or an encoding end communication node.

[0043] As shown in FIG. 3, the mode determination method provided by the embodiment of the present application specifically includes the following steps:

[0044] S101, obtaining first motion information and second motion information of a to-be-predicted block.

[0045] In this embodiment, the block to be predicted can be specifically understood as an image block in the decoded video frame that has not yet been reconstructed and needs to be predicted. The first motion information can be specifically understood as motion information indicating the motion relationship between the video frame containing the block to be predicted and the corresponding first reference frame, as well as motion information indicating the motion relationship between the block to be predicted and the corresponding first reference block in the first reference frame. The second motion information can be specifically understood as motion information indicating the motion relationship between the video frame containing the block to be predicted and the corresponding second reference frame, as well as motion information indicating the motion relationship between the block to be predicted and the corresponding second reference block in the second reference frame. Optionally, the first motion information and the second motion information can be understood as two motion vectors, which include the distance between the video frame containing the block to be predicted and the reference frame, and the horizontal and vertical displacements between the block to be predicted and the corresponding reference block in the reference frame. It is understood that the first reference frame and the second reference frame are two video frames, which can be located on opposite sides of the video frame containing the block to be predicted, or simultaneously on the front or back side of the video frame containing the block to be predicted; this embodiment does not impose any limitations on this.

[0046] Specifically, when it is necessary to predict the block to be predicted, based on the motion relationship between the video frame where the block to be predicted is located and other video frames determined by parsing the bitstream, two motion vectors of different reference frames relative to the video frame where the block to be predicted is located can be obtained as the first motion information and the second motion information of the block to be predicted.

[0047] S102. Obtain the first template of the first reference block according to the first motion information, and obtain the second template of the second reference block according to the second motion information.

[0048] In this embodiment, the first reference block can be specifically understood as an image block in the first reference frame that corresponds to the block to be predicted and can be used to predict the block to be predicted. The second reference block can be specifically understood as an image block in the second reference frame that corresponds to the block to be predicted and can be used to predict the block to be predicted. The first template can be specifically understood as a region in the first reference frame located around the first reference block, corresponding to the reconstructed region around the block to be predicted. The second template can be specifically understood as a region in the second reference frame located around the second reference block, corresponding to the reconstructed region around the block to be predicted.

[0049] Specifically, a video frame corresponding to the video frame where the to-be-predicted block is located in the video stream is determined as the first reference frame according to the first motion information, and then a first reference block corresponding to the to-be-predicted block and capable of being used for prediction of the reconstruction of the to-be-predicted block is determined in the first reference frame according to the motion vector contained in the first motion information, and then a region with the same size as the first reference block is determined around the first reference block as a first template of the first reference block according to the region around the to-be-predicted block where the reconstruction has been completed. Similarly, a video frame corresponding to the video frame where the to-be-predicted block is located in the video stream is determined as the second reference frame according to the second motion information, and then a second reference block corresponding to the to-be-predicted block and capable of being used for prediction of the reconstruction of the to-be-predicted block is determined in the second reference frame according to the motion vector contained in the second motion information, and then a region with the same size as the second reference block is determined around the second reference block as a second template of the second reference block according to the region around the to-be-predicted block where the reconstruction has been completed.

[0050] S103, determining a template cost according to the first template, the second template, and a third template of the to-be-predicted block.

[0051] In the embodiment, the third template can be specifically understood as the region around the to-be-predicted block where the reconstruction has been completed. The template cost can be specifically understood as a deviation value between the prediction result and the third template when the third template is predicted by the first template and the second template.

[0052] Specifically, the third template is predicted by the first template and the second template respectively to obtain a one-way prediction result in the direction from the first template to the third template and a one-way prediction result in the direction from the second template to the third template, and the third template can also be predicted by the first template and the second template simultaneously to obtain a bidirectional prediction result. Since different correction modes can be constituted when BgcFlag and BgcIdx take different values in the BGC technology, and more correction modes can be constructed by setting different prediction strengths for a group of fixed BgcFlag and BgcIdx. Therefore, on the basis of the one-way prediction result and the bidirectional prediction result determined above, the deviation value between the prediction result corresponding to different correction modes and the third template can be determined, that is, the template cost when the third template is predicted and corrected by the first template and the second template under different conditions can be determined.

[0053] S104, determining a target correction mode of the to-be-predicted block according to the template cost.

[0054] In the embodiment, the target correction mode can be specifically understood as the correction mode determined from the multiple BGC correction modes and meeting the characteristics of the to-be-predicted block, that is, the combination of the BGC syntax elements meeting the prediction requirement of the to-be-predicted block.

[0055] Specifically, since the template cost can represent the deviation when the third template of the to-be-predicted block is predicted by the first template and the second template under the corresponding BGC correction mode, when the correction mode of the to-be-predicted block is determined, a combination of BGC syntax elements that meets the prediction requirement of the to-be-predicted block can be determined as the target correction mode of the to-be-predicted block according to actual requirements and the template cost corresponding to different correction modes.

[0056] The mode determination method provided by the embodiments of the present application comprises the following steps: obtaining first motion information and second motion information of a to-be-predicted block; obtaining a first template of a first reference block according to the first motion information, and obtaining a second template of a second reference block according to the second motion information; determining a template cost according to the first template, the second template, and a third template of the to-be-predicted block; and determining a target correction mode of the to-be-predicted block according to the template cost. By using the above technical solution, the template cost under different BGC modes is determined according to the template of the picture block that needs to be predicted in the decoded frame and the motion information corresponding to the picture block, and then the target correction mode required when the picture block is predicted by the bi-directional gradient correction is determined. By using the correlation between the to-be-predicted block and the adjacent reconstructed information, the syntax parameters and the motion information in the correction mode required by the to-be-predicted block are determined by using the method, and the accuracy of the prediction of the picture block is improved.

[0057] In an embodiment, the templates of the to-be-predicted block, the first reference block and the second reference block comprise at least one of the following:

[0058] a left adjacent reconstructed region of the corresponding block;

[0059] an upper adjacent reconstructed region of the corresponding block;

[0060] a left upper adjacent reconstructed region of the corresponding block.

[0061] Specifically, in the bitstream decoding process, for a video frame to be reconstructed, the video frame can be divided into a plurality of coding blocks, i.e., a plurality of image blocks, for reconstruction. The to-be-predicted block is an image block in the video frame to be reconstructed that has not been reconstructed. In the surrounding adjacent area of the to-be-predicted block, there can be a plurality of areas composed of reconstructed image blocks. One or more connected superimpositions in the reconstructed areas adjacent to the to-be-predicted block and located on the left side, the upper side, or the left upper side of the to-be-predicted block can be used as the template of the to-be-predicted block, i.e., the third template in the above embodiment. Similarly, the first template can be composed of one or more connected superimpositions in the reconstructed areas adjacent to the first reference block and located on the left side, the upper side, or the left upper side of the first reference block, and the second template can be composed of one or more connected superimpositions in the reconstructed areas adjacent to the second reference block and located on the left side, the upper side, or the left upper side of the second reference block. It can be understood that the first template, the second template, and the third template have a corresponding relationship and are of the same size, i.e., it can be considered that when the third template of the to-be-predicted block is the left adjacent reconstructed area of the to-be-predicted block, the first template should be the left adjacent reconstructed area of the first reference block, and the second template should be the left adjacent reconstructed area of the second reference block.

[0062] In an embodiment, the first motion information and the second motion information are determined in at least one of the following manners:

[0063] by a direct mode;

[0064] by a skip mode;

[0065] by an ultimate motion vector expression (UMVE) mode;

[0066] by an inter mode;

[0067] by an affine direct mode;

[0068] by an affine skip mode;

[0069] by an affine UMVE mode;

[0070] by an affine inter mode;

[0071] by a symmetric motion vector difference (SMVD) mode;

[0072] by a motion information selection index obtained by parsing a bitstream, from a motion information list derived from a direct mode or a skip mode;

[0073] by a motion information selection index obtained by parsing a bitstream, from a motion information list derived from an affine direct mode or an affine skip mode;

[0074] The motion information selection index is obtained by parsing a code stream, and is obtained from a motion information list derived from the UMVE mode or the affine UMVE mode.

[0075] The motion information is obtained by parsing a code stream.

[0076] The motion information list includes at least one of temporal candidate motion information, spatial candidate motion information, and history-based motion vector prediction (HMVP) motion information.

[0077] In the embodiment, the motion information list can be understood as a list including motion vectors corresponding to adjacent image blocks or pixels of the plurality of to-be-predicted blocks. It can be understood that the plurality of motion vectors included in the motion information list are constructed in different ways, and can be one or more of temporal candidate motion information, spatial candidate motion information, and HMVP candidate motion information. The motion information selection index can be understood as a data index obtained by parsing a code stream, and used to indicate the motion information selection condition.

[0078] It can be understood that the direct mode, the skip mode, the UMVE mode, the inter mode, the affine direct mode, the affine skip mode, the affine UMVE mode, and the SMVD mode are all encoding transmission modes of motion information, and can be applied to the motion information acquisition of the BGC technology. The embodiments of the present application will not be explained in detail.

[0079] In one example embodiment, FIG. 4 is a flowchart of another mode determination method provided by the embodiments of the present application. The embodiments of the present application are further optimized on the basis of the above-mentioned optional technical solutions. As shown in FIG. 4, the mode determination method provided by the embodiments of the present application specifically includes the following steps:

[0080] S201, obtaining first motion information and second motion information of a to-be-predicted block.

[0081] S202, obtaining a first template of a first reference block according to the first motion information, and obtaining a second template of a second reference block according to the second motion information.

[0082] S203, for each correction mode in a preset correction mode set, determining bi-prediction correction information corresponding to the correction mode according to the first template and the second template.

[0083] The preset correction mode set at least includes a no-correction mode, a first correction mode, and a second correction mode.

[0084] In the embodiment, the preset correction mode set can be understood as a set of different correction modes formed by different values of BgcFlag, BgcIdx and prediction strength in the BGC technology. The bidirectional prediction correction information can be understood as a correction value obtained by correcting the bidirectional prediction result of the third template by the first template and the second template using the bidirectional prediction gradient and corresponding to the correction mode.

[0085] In the embodiment, the no-correction mode can be the correction mode when BgcFlag is 0 in the BGC technology, i.e., the mode without bidirectional prediction correction of the first template and the second template. The first correction mode and the second correction mode can be the correction mode when BgcFlag is 1 and BgcIdx is 0 or 1 in the BGC technology. For example, the first correction mode can be the forward correction mode when BgcFlag is 1 and BgcIdx is 1 in the BGC technology, and the second correction mode can be the backward correction mode when BgcFlag is 1 and BgcIdx is 0 in the BGC technology.

[0086] Optionally, the correction strength of the correction mode can be one or more fixed values. When the correction strength of the correction mode is one fixed value, i.e., in the case of the same correction strength, the values of BgcIdx of the first correction mode and the second correction mode should be different. When the correction strength is multiple fixed values, in the preset correction mode set, the first correction mode can include multiple first correction strength modes respectively taking each fixed value as the correction strength, and the second correction mode can include multiple second correction strength modes respectively taking each fixed value as the correction strength. For the case of multiple fixed values of the correction strength, the BgcIdx of each first correction mode and second correction mode can take the same value or different values, as long as there is an inconsistent value parameter between the first correction mode and the second correction mode.

[0087] Specifically, for each correction mode in the preset correction mode set, the first template and the second template are processed as the unidirectional prediction result obtained by unidirectional prediction of the third template, to obtain the bidirectional prediction result of the third template by the first template and the second template, and then the bidirectional prediction result is corrected to obtain the bidirectional prediction correction information corresponding to the correction mode.

[0088] In an embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined according to the first template and the second template, comprising:

[0089] The first template and the second template are weighted and averaged to determine the bidirectional prediction information;

[0090] The difference between the first template and the second template is determined as the first prediction gradient information;

[0091] determining the difference between the second template and the first template as second prediction gradient information;

[0092] determining the bidirectional prediction correction information corresponding to the correction mode according to the correction mode, the bidirectional prediction information, the first prediction gradient information and the second prediction gradient information.

[0093] Specifically, the pixel values of each corresponding position pixel point in the first template and the second template are weighted and averaged, and the value in the region obtained after all the pixel points are weighted and averaged is determined as the bidirectional prediction information. The pixel values of each corresponding position pixel point in the first template and the second template are subtracted, and the value in the region obtained after all the pixel points are subtracted is determined as the first prediction gradient information. The pixel values of each corresponding position pixel point in the second template and the first template are subtracted, and the value in the region obtained after all the pixel points are subtracted is determined as the second prediction gradient information. According to the different correction modes, the information to be used to calculate the bidirectional prediction correction information is selected from the bidirectional prediction information, the first prediction gradient information and the second prediction gradient information, and the selected information is combined with the correction strength corresponding to the correction mode to correct the bidirectional prediction gradient, thereby obtaining the bidirectional prediction correction information corresponding to the correction mode.

[0094] In the embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined according to the correction mode, the bidirectional prediction information, the first prediction gradient information and the second prediction gradient information, which can be divided into the following cases:

[0095] 1) In the case of no correction mode, the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode;

[0096] 2) In the case of the first correction mode, the first prediction gradient information is multiplied by the correction strength of the correction mode to determine the first product, and the sum of the first product and the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode;

[0097] 3) In the case of the second correction mode, the second prediction gradient information is multiplied by the correction strength of the correction mode to determine the second product, and the sum of the second product and the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode.

[0098] Specifically, in the case that the correction mode is the no-correction mode, it can be considered that no bi-prediction gradient correction is needed for the bi-prediction information, and the bi-prediction information can be directly determined as the bi-prediction correction information corresponding to the correction mode. In the case that the correction mode is the first correction mode, it can be considered that the bi-prediction gradient correction corresponding to the correction direction of the first correction mode is needed for the bi-prediction information, the first prediction gradient information can be used as the gradient information needed for the bi-prediction gradient correction, the first prediction gradient information is multiplied by the correction strength of the correction mode to obtain a first product, and the sum of the first product and the bi-prediction information is determined as the bi-prediction correction information corresponding to the correction mode. In the case that the correction mode is the second correction mode, it can be considered that the bi-prediction gradient correction corresponding to the correction direction of the second correction mode is needed for the bi-prediction information, the second prediction gradient information can be used as the gradient information needed for the bi-prediction gradient correction, the second prediction gradient information is multiplied by the correction strength of the correction mode to obtain a second product, and the sum of the second product and the bi-prediction information is determined as the bi-prediction correction information corresponding to the correction mode.

[0099] S204, determining a template cost of the correction mode according to the bi-prediction correction information and the third template of the to-be-predicted block.

[0100] Specifically, since the bi-prediction correction information can be used to represent the final prediction result obtained by predicting the third template through the first template and the second template and performing gradient correction, and the third template of the to-be-predicted block can be considered as the real result, that is, the optimal prediction result obtained by predicting through the first template and the second template should be consistent with the third template. Therefore, the prediction effect can be represented by the deviation between the bi-prediction correction information and the third template of the to-be-predicted block, and in the embodiments of the present application, the prediction deviation can be represented by the template cost. Therefore, for each correction mode, the deviation between the bi-prediction correction information corresponding to the correction mode and the third template of the to-be-predicted block can be determined as the template cost of the correction mode.

[0101] In an embodiment, determining a template cost of the correction mode according to the bi-prediction correction information and the third template of the to-be-predicted block comprises:

[0102] Determining a template difference value corresponding to the bi-prediction correction information and the third template of the to-be-predicted block as the template cost of the correction mode.

[0103] The calculation method of the template difference value comprises at least one of the following:

[0104] a sum of absolute difference (SAD);

[0105] a sum of absolute transformed differences (SATD) after Hadamard transformation;

[0106] a sum of squared differences (SSD);

[0107] a mean absolute difference (MAD);

[0108] a mean removed SAD (MRSAD).

[0109] Specifically, the bi-prediction correction information and the pixel points at the corresponding positions in the third template of the to-be-predicted block are subjected to any one of the following processing: absolute error sum, sum of absolute transformed differences (SATD) after Hadamard transformation, sum of squared differences (SSD), mean absolute difference (MAD), and mean removed SAD (MRSAD), to obtain a corresponding template difference value, and the template difference value is determined as the template cost of the corresponding correction mode.

[0110] In an embodiment, determining the template cost of the correction mode according to the bi-prediction correction information and the third template of the to-be-predicted block comprises:

[0111] For the correction mode that is not the inherited correction mode, the template difference value corresponding to the bi-prediction correction information and the third template of the to-be-predicted block is determined as the template cost of the correction mode.

[0112] For the correction mode that is the inherited correction mode, the template difference value corresponding to the bi-prediction correction information and the third template of the to-be-predicted block is determined, and the product of the template difference value and a preset reduction ratio is determined as the template cost of the correction mode.

[0113] The calculation manner of the template difference value comprises at least one of the following: absolute error sum, sum of absolute transformed differences (SATD) after Hadamard transformation, sum of squared differences (SSD), mean absolute difference (MAD), and mean removed SAD (MRSAD).

[0114] In this embodiment, the inherited correction mode can be understood as a correction mode that is inherited from the surrounding blocks of the to-be-predicted block or the history information motion vector list. It can be understood that the inherited correction mode should be one of the preset correction mode set.

[0115] Specifically, for the modification mode in the preset modification mode set which is not the inherited modification mode, the same template cost determination method as the above embodiment can be used for processing, and the obtained template difference value is determined as the template cost of the corresponding modification mode. The inherited modification mode is obtained from the surrounding blocks or the historical information motion vector list of the to-be-predicted block, and the possibility of adapting to the prediction requirement of the to-be-predicted block is higher. At this time, the template cost of the inherited modification mode can be reduced by a preset reduction ratio to increase the possibility of the inherited modification mode being selected as the target modification mode of the to-be-predicted block. The specific operation mode is that, for the modification mode in the preset modification mode set which is the inherited modification mode, after the template difference value is determined by using the same template cost determination method as the above embodiment, the template difference value is multiplied by a preset reduction ratio which is a positive decimal less than one, and the obtained product is taken as the template cost of the inherited modification mode.

[0116] It can be understood that the template difference value calculation methods for the inherited modification mode and the modification mode which is not the inherited modification mode in the embodiment are the same as those in the above embodiment, that is, the pixel points in the third template of the to-be-predicted block and the bidirectional prediction modification information are processed by any one of absolute error sum, Hadamard matrix transformation and then absolute value sum, difference square sum, average absolute difference, and de-averaged absolute error sum, and the obtained value after processing is taken as the template difference value.

[0117] S205, determine the modification mode with the lowest template cost in the preset modification mode set as the target modification mode of the to-be-predicted block.

[0118] Specifically, the process of predicting the third template of the to-be-predicted block by the first template and the second template can be considered as the simulation of predicting the to-be-predicted block by the first reference block and the second reference block, and the template cost can represent the possible deviation in the prediction under different modification modes. In order to make the prediction result of the to-be-predicted block based on the first reference block and the second reference block more accurate, a modification mode with the lowest template cost can be selected from the preset modification mode set as the target modification mode of the to-be-predicted block. Then the syntax elements and the modification strength of the target modification mode can be applied to the first reference block and the second reference block to complete the prediction of the to-be-predicted block.

[0119] S206, sort each modification mode in the preset modification mode set according to the template cost, and determine a modification mode candidate list.

[0120] Specifically, the process of predicting the third template of the to-be-predicted block by the first template and the second template can be considered as a simulation of predicting the to-be-predicted block by the first reference block and the second reference block, and the template cost can be used to represent the possible deviation of the prediction under different correction modes. In order to make the prediction result of the to-be-predicted block based on the first reference block and the second reference block more in line with the requirements, the correction modes in the preset correction mode set can be sorted according to the template costs of the different correction modes to obtain a correction mode candidate list. It can be understood that the sorting can be from large to small or from small to large, and the sorting manner can be set in advance based on an agreement, which is not limited in the embodiments of the present application.

[0121] S207, selecting a target correction mode of the to-be-predicted block from the correction mode candidate list according to the mode selection index obtained by parsing the code stream.

[0122] In the embodiment, the mode selection index can be specifically understood as an index obtained by parsing the code stream and used to indicate the selection of the correction mode in the correction mode candidate list. It can be understood that the setting manner of the mode selection index should match the pre-set sorting manner, and the specific determination manner of the mode selection index is not limited in the embodiments of the present application.

[0123] Specifically, the mode selection index used to indicate the selection of the correction mode can be obtained during the code stream parsing, and one correction mode can be selected from the correction mode candidate list as the target correction mode of the to-be-predicted block based on the obtained mode selection index after the correction mode candidate list is generated.

[0124] It can be understood that S205 and S206-S207 are two different target correction mode determination manners, which can be executed alternatively or in parallel. The parallel execution is taken as an example in the embodiments of the present application.

[0125] The mode determination method provided in the embodiments of the present application predicts the third template of the to-be-predicted block by the first template and the second template to simulate the prediction of the to-be-predicted block by the first reference block and the second reference block, selects the correction mode with the lowest template cost or the correction mode determined according to the requirements from the correction modes that can adapt to the to-be-predicted block as the target correction mode of the to-be-predicted block by using the template cost used to represent the possible deviation of the prediction under different correction modes. The finally determined target correction mode is more in line with the characteristics of the to-be-predicted block, and the accuracy of the prediction for the image block is improved.

[0126] In one example embodiment, FIG. 5 is a flow diagram of another mode determination method provided in the embodiments of the present application. The embodiments of the present application are further optimized on the basis of the above-mentioned optional technical solutions. As shown in FIG. 5, the mode determination method provided in the embodiments of the present application specifically includes the following steps:

[0127] S301, acquire first motion information and second motion information of a to-be-predicted block.

[0128] S302, acquire a first template of a first reference block according to the first motion information, and acquire a second template of a second reference block according to the second motion information.

[0129] S303, determine an inherited correction mode according to the first motion information and the second motion information.

[0130] Specifically, in the non-interframe mode in the BGC technology, the correction mode is usually determined by acquiring the BGC syntax element from the surrounding blocks of the to-be-predicted block or the history information motion vector list, and the correction mode determined by this method may not necessarily meet the characteristic requirements of the to-be-predicted block, but the probability of meeting the characteristic requirements of the to-be-predicted block is higher than that of other correction modes. In order to reduce the data operation amount, a correction mode can be determined from the surrounding block motion characteristics of the to-be-predicted block or the history information motion vector list based on the first motion information and the second motion information as the inherited correction mode of the to-be-predicted block.

[0131] In an embodiment, the inherited correction mode is determined according to the first motion information and the second motion information, comprising:

[0132] acquiring the correction mode corresponding to the first motion information and the second motion information from the bi-directional gradient correction information map of the to-be-predicted block or the bi-directional gradient correction information candidate list of the history-based motion vector prediction (HMVP) as the inherited correction mode.

[0133] Specifically, the bi-directional gradient correction information map or the bi-directional gradient correction information candidate list of the HMVP can be constructed in advance for the to-be-predicted block, and the correction mode in the map or list has a one-to-one correspondence with the motion information, so that after the first motion information and the second motion information related to the to-be-predicted block are acquired, a correction mode can be determined from the bi-directional gradient correction information map or the bi-directional gradient correction information candidate list of the HMVP based on the correspondence between the first motion information and the second motion information and the correction mode as the inherited correction mode of the to-be-predicted block.

[0134] S304, determine at least one adjacent correction mode adjacent to the inherited correction mode from a preset correction mode set.

[0135] Specifically, since the preset correction mode set contains a plurality of correction modes, and the inherited correction mode should be one correction mode in the preset correction mode set, the correction modes adjacent to the inherited correction mode before and after the inherited correction mode can be determined as the adjacent correction modes according to the position of the inherited correction mode in the preset correction mode set.

[0136] For example, assuming that the distribution order of each correction mode included in the preset correction mode set is {forward correction mode, no correction mode, backward correction mode}, when the inherited correction mode is the no correction mode, the adjacent correction modes corresponding to the inherited correction mode are the forward correction mode and the backward correction mode; when the inherited correction mode is the forward correction mode, since there is no adjacent correction mode in front of the inherited correction mode, the adjacent correction mode corresponding to the inherited correction mode is only the no correction mode; similarly, when the inherited correction mode is the backward correction mode, since there is no adjacent correction mode behind the inherited correction mode, the adjacent correction mode corresponding to the inherited correction mode is only the no correction mode.

[0137] According to the above example, since the preset correction mode set at least includes the no correction mode, the first correction mode, and the second correction mode, and the correction strength of the correction mode can be one or more fixed values, when the correction strength is multiple fixed values, the preset correction mode set includes multiple first correction strength modes of the first correction mode respectively taking each fixed value as the correction strength, and multiple second correction strength modes of the second correction mode respectively taking each fixed value as the correction strength. Taking two correction strengths k0 and k1 as an example, the preset correction mode set can be represented as {first k1 correction mode, first k0 correction mode, no correction mode, second k0 correction mode, second k1 correction mode}, and for the preset correction mode set, assuming that the index of the inherited correction mode in the preset correction mode set is i, the indexes of the adjacent correction modes corresponding to the inherited correction mode in the damaged correction mode set should be {i-1, i+1}.

[0138] S305, determine the inherited correction mode and the adjacent correction mode as a new preset correction mode set.

[0139] Specifically, when there are many correction modes in the preset correction mode set, to reduce the number of template costs required for calculation, the inherited correction mode and the adjacent correction mode adjacent to the inherited correction mode can be taken as a new preset correction mode set, so that when the template cost is determined subsequently, only two or three correction modes in the new preset correction mode set need to be calculated, and the determination of the target correction mode of the to-be-predicted block can be completed.

[0140] S306, for each correction mode in the new preset correction mode set, determine the bidirectional prediction correction information corresponding to the correction mode according to the first template and the second template.

[0141] Specifically, for each of the new preset correction modes, the first template and the second template are processed as a unidirectional prediction result of a unidirectional prediction of the third template, to obtain a bidirectional prediction result of the first template and the second template for the third template, and then the bidirectional prediction result is corrected according to the correction mode to obtain bidirectional prediction correction information corresponding to the correction mode.

[0142] In an embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined according to the first template and the second template, including:

[0143] The first template and the second template are weighted and averaged to determine the bidirectional prediction information;

[0144] The difference between the first template and the second template is determined as the first prediction gradient information;

[0145] The difference between the second template and the first template is determined as the second prediction gradient information;

[0146] The bidirectional prediction correction information corresponding to the correction mode is determined according to the correction mode, the bidirectional prediction information, the first prediction gradient information, and the second prediction gradient information.

[0147] In the embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined according to the correction mode, the bidirectional prediction information, the first prediction gradient information, and the second prediction gradient information, which can be divided into the following cases:

[0148] 1) In the case where the correction mode is the no-correction mode, the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode;

[0149] 2) In the case where the correction mode is the first correction mode, the first prediction gradient information is multiplied by the correction strength of the correction mode to determine a first product, and the sum of the first product and the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode;

[0150] 3) In the case where the correction mode is the second correction mode, the second prediction gradient information is multiplied by the correction strength of the correction mode to determine a second product, and the sum of the second product and the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode.

[0151] It can be understood that the determination manner of the bidirectional prediction correction information is consistent with the determination manner in the above embodiment, and the embodiment will not be described in detail.

[0152] S307, determining a template cost of the correction mode according to the bidirectional prediction correction information and the third template of the to-be-predicted block.

[0153] In an embodiment, the template cost of the correction mode is determined according to the bi-prediction correction information and the third template of the block to be predicted, including:

[0154] The template difference value corresponding to the bi-prediction correction information and the third template of the block to be predicted is determined as the template cost of the correction mode.

[0155] In an embodiment, the template cost of the correction mode is determined according to the bi-prediction correction information and the third template of the block to be predicted, including:

[0156] For the correction mode that is not the inherited correction mode, the template difference value corresponding to the bi-prediction correction information and the third template of the block to be predicted is determined as the template cost of the correction mode.

[0157] For the correction mode that is the inherited correction mode, the template difference value corresponding to the bi-prediction correction information and the third template of the block to be predicted is determined, and the product of the template difference value and a preset reduction ratio is determined as the template cost of the correction mode.

[0158] The calculation method of the template difference value includes at least one of the following: absolute error sum, Hadamard matrix transformation and then absolute value sum, difference square sum, average absolute difference, and de-average absolute error sum.

[0159] It can be understood that the above-mentioned manner of determining the template cost of the correction mode corresponding to the bi-prediction correction information based on the bi-prediction correction information and the third template of the block to be predicted is consistent with the determination manner in the above-mentioned embodiments, and the determination manner in the present embodiment will not be described in detail.

[0160] S308, the correction mode with the lowest template cost in the new preset correction mode set is determined as the target correction mode of the block to be predicted.

[0161] Specifically, since the process of predicting the third template of the block to be predicted through the first template and the second template can be considered as the simulation of predicting the block to be predicted through the first reference block and the second reference block, and the possible deviation of the prediction under different correction modes can be characterized by the template cost. In order to make the prediction result of the block to be predicted based on the first reference block and the second reference block more accurate, a correction mode with the lowest template cost in the new preset correction mode set can be selected as the target correction mode of the block to be predicted, and then the syntax elements and the correction strength of the target correction mode can be applied to the first reference block and the second reference block to complete the prediction of the block to be predicted.

[0162] S309, according to the mode selection index obtained by parsing the code stream, the target correction mode of the block to be predicted is selected from the correction mode candidate list.

[0163] Specifically, the process of predicting the third template of the to-be-predicted block by the first template and the second template can be considered as a simulation of predicting the to-be-predicted block by the first reference block and the second reference block, and can characterize the possible deviation of the prediction under different correction modes by the template cost. In order to make the prediction result of the to-be-predicted block based on the first reference block and the second reference block more in line with the needs, each correction mode in the new preset correction mode set can be sorted according to the template cost of different correction modes to obtain a correction mode candidate list.

[0164] S310, selecting a target correction mode of the to-be-predicted block from the correction mode candidate list according to the mode selection index obtained by parsing the code stream.

[0165] Specifically, the mode selection index used to indicate the selection of the correction mode can be obtained during the code stream parsing, and after the correction mode candidate list is generated, a correction mode can be selected from the correction mode candidate list as the target correction mode of the to-be-predicted block based on the obtained mode selection index.

[0166] It can be understood that S308 and S309-S310 are two different target correction mode determination methods, which can be executed alternatively or in parallel. In the embodiment of the present application, the parallel execution is taken as an example.

[0167] The mode determination method provided by the embodiment of the present application reduces the number of correction modes required for template cost calculation by reducing the preset correction mode set containing multiple correction modes in the form of inherited correction mode, reduces the overall operation amount of mode determination in the case of ensuring that the most suitable correction mode for the to-be-predicted block can be retained, and improves the determination efficiency of the target correction mode.

[0168] In one example embodiment, FIG. 6 is a flowchart of another mode determination method provided by the embodiment of the present application. The embodiment of the present application is further optimized on the basis of the above-mentioned optional technical solutions. As shown in FIG. 6, the mode determination method provided by the embodiment of the present application specifically includes the following steps:

[0169] S401, obtaining first motion information and second motion information of a to-be-predicted block.

[0170] S402, obtaining a first template of a first reference block according to the first motion information, and obtaining a second template of a second reference block according to the second motion information.

[0171] S403, determining a first template cost by taking a template difference value between a third template of the to-be-predicted block and the first template.

[0172] The calculation manner of the template difference value comprises at least one of the following: absolute error sum, Hadamard matrix transformation and then absolute value sum, difference square sum, average absolute difference value, and de-average absolute error sum.

[0173] In the embodiment, the first template cost can be specifically understood as a prediction deviation when the third template of the to-be-predicted block is unidirectionally predicted by the first template.

[0174] Specifically, the pixel points at each corresponding position in the first template and the third template of the to-be-predicted block are processed by any one of the following: absolute error sum, Hadamard matrix transformation and then absolute value sum, difference square sum, average absolute difference value, and de-average absolute error sum, and the obtained template difference value is determined as the first template cost corresponding to the first template.

[0175] S404, the template difference value between the third template of the to-be-predicted block and the second template is determined as the second template cost.

[0176] In the embodiment, the second template cost can be specifically understood as a prediction deviation when the third template of the to-be-predicted block is unidirectionally predicted by the second template.

[0177] Specifically, the pixel points at each corresponding position in the second template and the third template of the to-be-predicted block are processed by any one of the following: absolute error sum, Hadamard matrix transformation and then absolute value sum, difference square sum, average absolute difference value, and de-average absolute error sum, and the obtained template difference value is determined as the second template cost corresponding to the second template.

[0178] S405, the target correction mode of the to-be-predicted block is determined according to the first template cost, the second template cost, and a preset template threshold.

[0179] In the embodiment, the preset template threshold can be specifically understood as an experience value for indicating template cost selection which is set in advance according to actual conditions. Optionally, the preset template threshold is a value greater than 1.

[0180] Specifically, after the first template cost and the second template cost are processed based on the preset template threshold, the cost difference between the processed first template cost and the processed second template cost and the unprocessed second template cost and the unprocessed first template cost is determined, and then the target correction mode required by the to-be-predicted block is determined according to actual requirements and the cost differences.

[0181] In an embodiment, the target correction mode of the to-be-predicted block is determined according to the first template cost, the second template cost, and a preset template threshold, comprising:

[0182] In the case of meeting the first condition, the first correction mode is determined as the target correction mode of the to-be-predicted block.

[0183] determine the second correction mode as the target correction mode of the to-be-predicted block in a case where the second condition is met;

[0184] determine the no-correction mode as the target correction mode of the to-be-predicted block in a case where the third condition is met;

[0185] wherein the first condition is that the second template cost is greater than a product of the first template cost and a first preset template threshold;

[0186] wherein the second condition is that the first template cost is greater than a product of the second template cost and a second preset template threshold;

[0187] wherein the third condition is that the second template cost is less than or equal to a product of the first template cost and the first preset template threshold, or the first template cost is less than or equal to a product of the second template cost and the second preset template threshold.

[0188] In the embodiment, the first condition can be specifically understood as a condition used to indicate that the to-be-predicted block is more suitable for the first correction mode. The second condition can be specifically understood as a condition used to indicate that the prediction of the to-be-predicted block is more suitable for the second correction mode. The third condition can be specifically understood as a condition used to indicate that the prediction of the to-be-predicted block is more suitable for the no-correction mode.

[0189] In the embodiment, the preset template threshold includes the first preset template threshold and the second preset template threshold. The first preset template threshold can be specifically understood as an experience value used to indicate the selection of the first template cost, which is set in advance according to actual conditions. The second preset template threshold can be specifically understood as an experience value used to indicate the selection of the second template cost, which is set in advance according to actual conditions.

[0190] Specifically, in a case where the first condition is met, it can be considered that the second template cost is much greater than the first template cost, that is, it can be considered that the prediction accuracy is low when the to-be-predicted block is predicted in a manner of giving more weight to the second reference block corresponding to the second template, and at this time, the first correction mode which gives more weight to the first template cost can be taken as the target correction mode of the to-be-predicted block. In a case where the second condition is met, it can be considered that the first template cost is much greater than the second template cost, that is, it can be considered that the prediction accuracy is low when the to-be-predicted block is predicted in a manner of giving more weight to the first reference block corresponding to the first template, and at this time, the second correction mode which gives more weight to the second template cost can be taken as the target correction mode of the to-be-predicted block. In a case where the third condition is met, it can be considered that the size difference between the first template cost and the second template cost is not obvious, and at this time, the no-correction mode can be taken as the target correction mode of the to-be-predicted block.

[0191] In an embodiment, the determination manner of the first preset template threshold includes at least one of the following:

[0192] determining a preset fixed value as the first preset template threshold;

[0193] In the case that the first correction mode is the inheritance correction mode, a preset fixed value multiplied by a first preset reduction ratio is determined as the first preset template threshold value;

[0194] In the case that the first correction mode is the inheritance correction mode, a difference between the preset fixed value and a first preset reduction fixed value is determined as the first preset template threshold value.

[0195] In the embodiment, the preset fixed value can be specifically understood as a fixed value greater than one determined according to experience in advance. The first preset reduction ratio can be specifically understood as a ratio value preset for reducing the template cost of the inheritance correction mode in the mode selection process according to the demand adaptation degree of the inheritance correction mode to the to-be-predicted block relative to other correction modes. The first preset reduction fixed value can be specifically understood as a fixed value preset for reducing the template cost of the inheritance correction mode in the mode selection process according to the demand adaptation degree of the inheritance correction mode to the to-be-predicted block relative to other correction modes.

[0196] In an embodiment, the determination manner of the second preset template threshold value includes at least one of the following:

[0197] The preset fixed value is determined as the second preset template threshold value;

[0198] In the case that the second correction mode is the inheritance correction mode, a preset fixed value multiplied by a second preset reduction ratio is determined as the second preset template threshold value;

[0199] In the case that the second correction mode is the inheritance correction mode, a difference between the preset fixed value and a second preset reduction fixed value is determined as the second preset template threshold value.

[0200] In the embodiment, the second preset reduction ratio can be specifically understood as a ratio value preset for reducing the template cost of the inheritance correction mode in the mode selection process according to the demand adaptation degree of the inheritance correction mode to the to-be-predicted block relative to other correction modes. The second preset reduction fixed value can be specifically understood as a fixed value preset for reducing the template cost of the inheritance correction mode in the mode selection process according to the demand adaptation degree of the inheritance correction mode to the to-be-predicted block relative to other correction modes.

[0201] Optionally, the first correction mode in the embodiment of the application can be the forward correction mode, and the second correction mode can be the backward correction mode, or the forward correction mode and the backward correction mode with different correction strengths determined according to different cost difference amplitudes, and the embodiment of the application does not limit this.

[0202] In an embodiment, before performing the mode determination method in the above embodiments, a control flag bgc_enable_flag is first read from a sequence header of the acquired video data to represent whether the BGC technique is supported. If bgc_enable_flag is 1, a control flag bgc_tm_enable_flag is further read. If bgc_tm_enable_flag is also 1, the mode determination method in the above embodiments is performed. That is, the mode determination method in the above embodiments is performed only when bgc_enable_flag and bgc_tm_enable_flag are both 1.

[0203] In one example embodiment, FIG. 7 is a structural schematic diagram of a mode determination apparatus provided by an embodiment of the present application. As shown in FIG. 7, the apparatus includes:

[0204] The motion information obtaining module 510 is configured to obtain first motion information and second motion information of the to-be-predicted block.

[0205] The template obtaining module 520 is configured to obtain a first template of a first reference block according to the first motion information, and obtain a second template of a second reference block according to the second motion information.

[0206] The template cost determining module 530 is configured to determine a template cost according to the first template, the second template, and a third template of the to-be-predicted block.

[0207] The target mode determining module 540 is configured to determine a target correction mode of the to-be-predicted block according to the template cost.

[0208] The mode determination apparatus provided by the embodiments of the present application determines the template cost in different BGC modes according to the template of the picture block in the decoded frame that needs to be predicted and the motion information corresponding to the picture block, and further determines the target correction mode required by the picture block when performing the bi-directional gradient correction prediction. By utilizing the correlation between the to-be-predicted block and the neighboring reconstructed information, the syntax parameters and the motion information in the correction mode required by the to-be-predicted block are determined through the method, and the accuracy of the prediction for the picture block is improved.

[0209] In an embodiment, the template of the to-be-predicted block, the first reference block, and the second reference block includes at least one of the following:

[0210] A left neighboring reconstructed region of the corresponding block;

[0211] An upper neighboring reconstructed region of the corresponding block;

[0212] A left upper neighboring reconstructed region of the corresponding block.

[0213] In an embodiment, the first motion information and the second motion information are determined in a manner comprising at least one of:

[0214] by a direct mode;

[0215] by a skip mode;

[0216] by an advanced motion information representation mode;

[0217] by an inter mode;

[0218] by an affine direct mode;

[0219] by an affine skip mode;

[0220] by an affine advanced motion information representation mode;

[0221] by an affine inter mode;

[0222] by a symmetric motion vector difference mode;

[0223] by a motion information selected index obtained by parsing a bitstream, from a motion information list derived from a direct mode or a skip mode;

[0224] by a motion information selected index obtained by parsing a bitstream, from a motion information list derived from an affine direct mode or an affine skip mode;

[0225] by a motion information selected index obtained by parsing a bitstream, from a motion information list derived from an advanced motion information representation mode or an affine advanced motion information representation mode;

[0226] by a motion information obtained by parsing a bitstream.

[0227] In an embodiment, the template cost determination module 530 is specifically configured to:

[0228] for each of a preset set of correction modes, determine, according to the first template and the second template, bi-prediction correction information corresponding to the correction mode;

[0229] determine a template cost of the correction mode according to the bi-prediction correction information and a third template of the block to be predicted.

[0230] In an embodiment, the template cost determination module 530 is specifically configured to:

[0231] determine an inherited correction mode according to the first motion information and the second motion information;

[0232] determine at least one neighboring correction mode adjacent to the inherited correction mode from the preset set of correction modes;

[0233] determining the inherited modification mode and the neighboring modification mode as the new preset modification mode set;

[0234] For each modification mode in the new preset modification mode set, determining, according to the first template and the second template, the bi-prediction modification information corresponding to the modification mode;

[0235] determining the template cost of the modification mode according to the bi-prediction modification information and the third template of the to-be-predicted block.

[0236] In an embodiment, the preset modification mode set at least includes: no modification mode, first modification mode and second modification mode.

[0237] In an embodiment, determining, according to the first template and the second template, the bi-prediction modification information corresponding to the modification mode includes:

[0238] determining the bi-prediction information by weighted average of the first template and the second template;

[0239] determining the first prediction gradient information as the difference between the first template and the second template;

[0240] determining the second prediction gradient information as the difference between the second template and the first template;

[0241] determining the bi-prediction modification information corresponding to the modification mode according to the modification mode, the bi-prediction information, the first prediction gradient information and the second prediction gradient information.

[0242] In an embodiment, determining the bi-prediction modification information corresponding to the modification mode according to the modification mode, the bi-prediction information, the first prediction gradient information and the second prediction gradient information includes:

[0243] in the case of the modification mode being the no modification mode, determining the bi-prediction information as the bi-prediction modification information corresponding to the modification mode;

[0244] in the case of the modification mode being the first modification mode, multiplying the first prediction gradient information by the modification strength of the modification mode to determine a first product, and determining the sum of the first product and the bi-prediction information as the bi-prediction modification information corresponding to the modification mode;

[0245] in the case of the modification mode being the second modification mode, multiplying the second prediction gradient information by the modification strength of the modification mode to determine a second product, and determining the sum of the second product and the bi-prediction information as the bi-prediction modification information corresponding to the modification mode.

[0246] In an embodiment, the modification strength of the modification mode is one or more fixed values.

[0247] Corresponding to the multiple fixed values of the correction strength, in the preset correction mode set, the first correction mode includes multiple first correction strength modes respectively taking the fixed values as the correction strength, and the second correction mode includes multiple second correction strength modes respectively taking the fixed values as the correction strength.

[0248] In an embodiment, the template cost of the correction mode is determined according to the bidirectional prediction correction information and the third template of the to-be-predicted block, including:

[0249] The template difference value corresponding to the bidirectional prediction correction information and the third template of the to-be-predicted block is determined as the template cost of the correction mode.

[0250] The calculation method of the template difference value includes at least one of the following:

[0251] Sum of absolute errors;

[0252] Sum of absolute values after Hadamard matrix transformation;

[0253] Sum of square differences;

[0254] Mean absolute difference;

[0255] Sum of de-averaged absolute errors.

[0256] In an embodiment, the template cost of the correction mode is determined according to the bidirectional prediction correction information and the third template of the to-be-predicted block, including:

[0257] For the correction mode that is not the inherited correction mode, the template difference value corresponding to the bidirectional prediction correction information and the third template of the to-be-predicted block is determined as the template cost of the correction mode.

[0258] For the correction mode that is the inherited correction mode, the template difference value corresponding to the bidirectional prediction correction information and the third template of the to-be-predicted block is determined, and the product of the template difference value and a preset reduction ratio is determined as the template cost of the correction mode.

[0259] In an embodiment, the template cost determination module 530 is specifically configured to:

[0260] The template difference value between the third template of the to-be-predicted block and the first template is determined as the first template cost.

[0261] The template difference value between the third template of the to-be-predicted block and the second template is determined as the second template cost.

[0262] In an embodiment, the target mode determination module 540 is specifically configured to:

[0263] The correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode of the to-be-predicted block.

[0264] In an embodiment, the target mode determination module 540 is specifically configured to:

[0265] sort each of the preset correction modes according to the template costs of each of the templates, to determine a correction mode candidate list;

[0266] select a target correction mode of the to-be-predicted block from the correction mode candidate list according to the mode selection index obtained by parsing the bitstream.

[0267] In an embodiment, the target mode determination module 540 is specifically configured to:

[0268] determine the target correction mode of the to-be-predicted block according to the first template cost, the second template cost, and a preset template threshold.

[0269] In an embodiment, the determination of the target correction mode of the to-be-predicted block according to the first template cost, the second template cost, and the preset template threshold includes:

[0270] in a case where the first condition is met, determine the first correction mode as the target correction mode of the to-be-predicted block;

[0271] in a case where the second condition is met, determine the second correction mode as the target correction mode of the to-be-predicted block;

[0272] in a case where the third condition is met, determine the no-correction mode as the target correction mode of the to-be-predicted block;

[0273] wherein the first condition is that the second template cost is greater than a product of the first template cost and a first preset template threshold;

[0274] wherein the second condition is that the first template cost is greater than a product of the second template cost and a second preset template threshold;

[0275] wherein the third condition is that the second template cost is less than or equal to the product of the first template cost and the first preset template threshold, or the first template cost is less than or equal to the product of the second template cost and the second preset template threshold.

[0276] In an embodiment, the determination of the first preset template threshold includes at least one of the following:

[0277] determine a preset fixed value as the first preset template threshold;

[0278] in a case where the first correction mode is the inheritance correction mode, determine a product of a preset fixed value and a first preset reduction ratio as the first preset template threshold;

[0279] in a case where the first correction mode is the inheritance correction mode, determine a difference between a preset fixed value and a first preset reduction fixed value as the first preset template threshold.

[0280] In an embodiment, the second preset template threshold is determined in the following at least one manner:

[0281] a preset fixed value is determined as the second preset template threshold;

[0282] in a case where the second correction mode is the inheritance correction mode, a product of the preset fixed value and the second preset reduction ratio is determined as the second preset template threshold;

[0283] in a case where the second correction mode is the inheritance correction mode, a difference between the preset fixed value and the second preset reduction fixed value is determined as the second preset template threshold.

[0284] The mode determination apparatus of the embodiment and the mode determination method of the above embodiments belong to the same inventive concept, and the technical details not described in the embodiment can be referred to the above embodiments, and the embodiment has the same beneficial effects as the mode determination method.

[0285] The embodiment of the present application further provides a communication node, and Fig. 8 is a structural schematic diagram of the communication node according to the embodiment of the present application. As shown in Fig. 8, the communication node according to the embodiment of the present application comprises a memory 620, a processor 610 and a computer program stored in the memory and executable on the processor, and the processor 610 implements the mode determination method described above when executing the program.

[0286] The communication node can further comprise a memory 620; the processor 610 in the communication node can be one or more, and Fig. 8 takes one processor 610 as an example; the memory 620 is used for storing one or more programs; the one or more programs are executed by the one or more processors 610, so that the one or more processors 610 implement the mode determination method as described in the embodiment of the present application.

[0287] The communication node further comprises a communication device 630, an input device 640 and an output device 650.

[0288] The processor 610, the memory 620, the communication device 630, the input device 640 and the output device 650 in the communication node can be connected through a bus or other means, and Fig. 8 takes the connection through the bus as an example.

[0289] The input device 640 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the communication node. The output device 650 can include a display device such as a display screen.

[0290] The communication device 630 can include a receiver and a transmitter. The communication device 630 is set to perform information receiving and transmitting communication according to the control of the processor 610.

[0291] The memory 620, as a kind of computer readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules (for example, the motion information acquisition module 510, the template acquisition module 520, the template cost determination module 530 and the target mode determination module 540) corresponding to the mode determination method described in the embodiments of the present application.The memory 620 can include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function;The data storage area can store data created according to the use of the communication node and the like.In addition, the memory 620 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device or other non-volatile solid-state memory device.In some examples, the memory 620 can further include a memory remotely arranged with respect to the processor 610, which can be connected to the communication node through a network.The examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0292] The embodiments of the present application also provide a storage medium, which stores a computer program, and the computer program is executed by a processor to implement the mode determination method described in any of the embodiments of the present application.

[0293] Optionally, the mode determination method comprises: acquiring first motion information and second motion information of the to-be-predicted block;acquiring a first template of a first reference block according to the first motion information, and acquiring a second template of a second reference block according to the second motion information;determining a template cost according to the first template, the second template and a third template of the to-be-predicted block; and determining a target correction mode of the to-be-predicted block according to the template cost.

[0294] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus or device.

[0295] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer readable program code is contained. Such propagated data signal can take a variety of forms, including but not limited to electro-magnetic, optical or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a storage medium and that can communicate, propagate or transport programming for use by or in connection with an instruction execution system, apparatus or device.

[0296] The program code contained on the computer readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire line, optical fiber cable, radio frequency (RF), or any suitable combination thereof.

[0297] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0298] Optionally, the embodiments of the present application further provide a computer program product, comprising a computer program, which, when executed by a processor, implements the mode determination method provided by any of the embodiments of the present application.

[0299] The above merely provides exemplary embodiments of the present application, but should not be used to limit the protective scope of the present application.

[0300] Those skilled in the art will appreciate that the term user terminal encompasses any appropriate type of wireless user equipment, such as a mobile phone, a portable data processing apparatus, a portable web browser, or a vehicle-mounted mobile station.

[0301] Generally, the various embodiments of the present application can be implemented in hardware or special-purpose circuits, software, logic or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software which can be executed by a controller, microprocessor or other computing device, although the present application is not limited thereto.

[0302] Embodiments of the present application can be implemented by a data processor of a mobile device executing computer program instructions, for example in a processor entity, or by hardware, or by a combination of software and hardware. Computer program instructions can be in assemblies, Instruction Set Architecture (ISA), machine, machine-dependent, microcode, firmware, state-setting data, or any combination thereof, and be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages.

[0303] The block diagrams of any logical flow of the present application in the accompanying drawings can represent program steps or can represent interconnected logic circuits, modules, and functions, or can represent a combination of program steps and logic circuits, modules, and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as, but not limited to, a random access memory (RAM), a read-only memory (ROM), an optical storage device, and a system memory that is a combination of a memory device and a storage device. The computer readable media can include a non-transitory storage medium. The data processor can be of any type suitable to the local technical environment and can include, but is not limited to, a general purpose computer, a special purpose computer, a microprocessor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and a processor based on multi-core processor architecture.

[0304] A detailed description of exemplary embodiments of the present application has been provided above with reference to the accompanying drawings. However, various modifications and alterations of the above embodiments will be apparent to those skilled in the art without departing from the scope of the present application. Thus, the proper scope of the present application will be determined by the following claims.

Claims

1. A mode determination method, comprising: obtaining first motion information and second motion information of a block to be predicted; obtaining a first template of a first reference block according to the first motion information, and obtaining a second template of a second reference block according to the second motion information; determining a template cost according to the first template, the second template, and a third template of the block to be predicted; and determining a target refinement mode of the block to be predicted according to the template cost. The templates of the block to be predicted, the first reference block and the second reference block comprise at least one of: a left neighboring reconstructed region of a corresponding block; a top neighboring reconstructed region of a corresponding block; and a top-left neighboring reconstructed region of a corresponding block. The first motion information and the second motion information are determined in at least one of the following ways: by a direct mode; by a skip mode; by an affine direct mode; by an inter mode; by an affine skip mode; by an affine inter mode; by an affine AMVP mode; by a symmetric motion vector difference mode; by a motion information selection index obtained by parsing a bitstream from a motion information list derived from a direct mode or a skip mode; by a motion information selection index obtained by parsing a bitstream from a motion information list derived from an affine direct mode or an affine skip mode; by a motion information selection index obtained by parsing a bitstream from a motion information list derived from an AMVP mode or an affine AMVP mode; and by motion information obtained by parsing a bitstream. The determination of the template cost according to the first template, the second template, and the third template of the block to be predicted comprises: for each refinement mode in a preset refinement mode set, determining bi-prediction refinement information corresponding to the refinement mode according to the first template and the second template; and determining a template cost of the refinement mode according to the bi-prediction refinement information and the third template of the block to be predicted. The determination of the template cost according to the first template, the second template, and the third template of the block to be predicted comprises: determining an inherited refinement mode according to the first motion information and the second motion information; determining at least one neighboring refinement mode adjacent to the inherited refinement mode from the preset refinement mode set; determining the inherited refinement mode and the at least one neighboring refinement mode as a new preset refinement mode set; for each refinement mode in the new preset refinement mode set, determining bi-prediction refinement information corresponding to the refinement mode according to the first template and the second template; and determining a template cost of the refinement mode according to the bi-prediction refinement information and the third template of the block to be predicted.

2. The mode determination method according to claim 1, wherein The preset refinement mode set comprises at least a no-refinement mode, a first refinement mode and a second refinement mode. The determination of the bi-prediction refinement information corresponding to the refinement mode according to the first template and the second template comprises: determining bi-prediction information by weighted averaging the first template and the second template. ​ ​ 3. The mode determination method according to claim 1, wherein ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 4. The mode determination method according to claim 1, wherein ​ ​ ​ 5. The mode determination method according to claim 1, wherein ​ ​ ​ ​ ​ ​ 6. The mode determination method according to claim 4 or 5, wherein ​ 7. The mode determination method of claim 6, wherein, ​ ​ determining a difference between the first template and the second template as first prediction gradient information; determining a difference between the second template and the first template as second prediction gradient information; determining bi-prediction correction information corresponding to the correction mode according to the correction mode, the bi-prediction information, the first prediction gradient information and the second prediction gradient information.

8. The mode determination method according to claim 7, wherein The determining bi-prediction correction information corresponding to the correction mode according to the correction mode, the bi-prediction information, the first prediction gradient information and the second prediction gradient information comprises: in response to the correction mode being a non-correction mode, determining the bi-prediction information as the bi-prediction correction information corresponding to the correction mode; in response to the correction mode being a first correction mode, multiplying the first prediction gradient information by a correction strength of the correction mode to determine a first product, and determining a sum of the first product and the bi-prediction information as the bi-prediction correction information corresponding to the correction mode; in response to the correction mode being a second correction mode, multiplying the second prediction gradient information by a correction strength of the correction mode to determine a second product, and determining a sum of the second product and the bi-prediction information as the bi-prediction correction information corresponding to the correction mode.

9. The mode determination method of claim 8, wherein, the correction strength of the correction mode is at least one fixed value; corresponding to the correction strength being a plurality of fixed values, the first correction mode in the preset correction mode set comprises a plurality of first correction strength modes respectively taking the plurality of fixed values as the correction strength, and the second correction mode in the preset correction mode set comprises a plurality of second correction strength modes respectively taking the plurality of fixed values as the correction strength.

10. The mode determination method according to claim 4 or 5, wherein, The determining a template cost of the correction mode according to the bi-prediction correction information and a third template of the to-be-predicted block comprises: determining a template difference value corresponding to the bi-prediction correction information and the third template of the to-be-predicted block as the template cost of the correction mode; wherein the calculation manner of the template difference value comprises at least one of the following: sum of absolute errors; sum of absolute values after Hadamard matrix transformation; sum of square differences; mean absolute difference; sum of mean absolute errors.

11. The mode determination method of claim 10, wherein, The determining a target correction mode of the to-be-predicted block according to the template cost comprises: determining a correction mode with a lowest template cost in the preset correction mode set as the target correction mode of the to-be-predicted block.

12. The mode determination method of claim 10, wherein, The determining a target correction mode of the to-be-predicted block according to the template cost comprises: sorting a plurality of the correction modes in the preset correction mode set according to a plurality of the template costs to determine a correction mode candidate list; selecting the target correction mode of the to-be-predicted block from the correction mode candidate list according to a mode selection index obtained by parsing a code stream.

13. The mode determination method according to claim 4 or 5, wherein, The determining a template cost of the correction mode according to the bi-prediction correction information and a third template of the to-be-predicted block comprises: for the correction mode that is not the inherited correction mode, determining a template difference value corresponding to the bi-prediction correction information and the third template of the to-be-predicted block as the template cost of the correction mode; For the correction mode which is the inheritance correction mode, a template difference value between the bi-prediction correction information and a third template of the block to be predicted is determined, and a product of the template difference value and a preset reduction ratio is determined as a template cost of the correction mode; The calculation manner of the template difference value comprises at least one of the following: an absolute error sum; a Hadamard matrix transformation and then an absolute value sum; a difference square sum; an average absolute difference value; a de-averaged absolute error sum.

14. The mode determination method of claim 13, wherein, The target correction mode of the block to be predicted is determined according to the template cost, comprising: a correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode of the block to be predicted.

15. The mode determination method of claim 13, wherein, The target correction mode of the block to be predicted is determined according to the template cost, comprising: a plurality of correction modes in the preset correction mode set are sorted according to a plurality of template costs, to determine a correction mode candidate list; a target correction mode of the block to be predicted is selected from the correction mode candidate list according to a mode selection index obtained from a bitstream.

16. The mode determination method of claim 5, wherein, The inheritance correction mode is determined according to the first motion information and the second motion information, comprising: a correction mode corresponding to the first motion information and the second motion information is obtained from a bi-prediction gradient correction information map of the block to be predicted or a bi-prediction gradient correction information candidate list based on a history-based motion vector prediction, as the inheritance correction mode.

17. The mode determination method of claim 1, wherein, The template cost is determined according to the first template, the second template and a third template of the block to be predicted, comprising: a template difference value between the third template of the block to be predicted and the first template is determined as a first template cost; a template difference value between the third template of the block to be predicted and the second template is determined as a second template cost; The calculation manner of the template difference value comprises at least one of the following: an absolute error sum; a Hadamard matrix transformation and then an absolute value sum; a difference square sum; an average absolute difference value; a de-averaged absolute error sum.

18. The mode determination method of claim 17, wherein, The target correction mode of the block to be predicted is determined according to the template cost, comprising: the target correction mode of the block to be predicted is determined according to the first template cost, the second template cost and a preset template threshold.

19. The mode determination method of claim 18, wherein, The target correction mode of the block to be predicted is determined according to the first template cost, the second template cost and a preset template threshold, comprising: a first correction mode is determined as the target correction mode of the block to be predicted in response to a first condition being met; a second correction mode is determined as the target correction mode of the block to be predicted in response to a second condition being met; no correction mode is determined as the target correction mode of the block to be predicted in response to a third condition being met; the first condition is that the second template cost is greater than a product of the first template cost and a first preset template threshold; the second condition is that the first template cost is greater than a product of the second template cost and a second preset template threshold; The third condition is that the second template cost is less than or equal to a product of the first template cost and the first preset template threshold, or the first template cost is less than or equal to a product of the second template cost and the second preset template threshold.

20. The mode determination method of claim 19, wherein, The first preset template threshold is determined in at least one of the following manners: a preset fixed value is determined as the first preset template threshold; in response to the first correction mode being the inherited correction mode, a product of the preset fixed value and a first preset reduction ratio is determined as the first preset template threshold; in response to the first correction mode being the inherited correction mode, a difference between the preset fixed value and a first preset reduction fixed value is determined as the first preset template threshold.

21. The mode determination method of claim 19, wherein, The second preset template threshold is determined in at least one of the following manners: a preset fixed value is determined as the second preset template threshold; in response to the second correction mode being the inherited correction mode, a product of the preset fixed value and a second preset reduction ratio is determined as the second preset template threshold; in response to the second correction mode being the inherited correction mode, a difference between the preset fixed value and a second preset reduction fixed value is determined as the second preset template threshold.

22. A communication node, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, the program being executed by the processor to implement the mode determination method according to any one of claims 1-21.

23. A non-transitory storage medium configured as computer-readable storage, the storage medium storing at least one program, the at least one program being executable by at least one processor to implement the mode determination method according to any one of claims 1-21.

24. A computer program product comprising a computer program, the computer program being executable by a processor to implement the mode determination method according to any one of claims 1-21.

Citation Information

Patent Citations

  • Inter-frame prediction method and related device thereof

    CN112004091A

  • Inter-frame prediction value correction method, encoder and computer readable storage medium

    CN113382248A

  • Systems and methods for BI-directional gradient correction

    US20220038727A1

  • Image prediction method, encoder, decoder and storage medium

    WO2021174396A1