Mode determination method, communication node, storage medium and program product
By acquiring the motion information of the block to be predicted and the template of the reference block, the template cost is determined to determine the target correction mode, which solves the problem of inaccurate bidirectional prediction between frames and improves the accuracy and compression efficiency of video block prediction.
Patent Information
- Application Number
- CN202410731885.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2025-12-09
Smart Images

Figure CN121099031A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video encoding and decoding technology, and in particular to a mode determination method, communication node, storage medium and program product. Background Technology
[0002] Today's world is a multimedia society surrounded by images and videos. For example, ubiquitous advertising, medical care, security, entertainment, and video conferencing all involve image and video media content. With the improvement of video quality—from high-definition video to ultra-high-definition video such as 4K and 8K, the increase in various video types such as screen content and panoramic video, and the widespread application of network streaming media and real-time communication—the amount of data transmitted or stored for video has increased dramatically, placing extremely high demands on video transmission bandwidth. Video compression, also known as video coding, is a technique that uses various encoding tools to remove as much spatial and temporal redundant information as possible from the original video, effectively reducing the amount of video data while maintaining video quality. This is currently one of the most popular research directions in the field of multimedia technology.
[0003] The Audio Video Coding Standard (AVS) and the next-generation Versatile Video Coding (H.266 / VVC) both utilize inter-frame bidirectional prediction technology. This technology includes a bidirectional gradient correction (BGC) technique. BGC contains two syntax elements, BgcFlag and BgcIdx, which indicate whether BGC is enabled and the direction of gradient correction, respectively. In inter-frame mode, these two syntax elements are encoded into the bitstream and transmitted to the decoder. In skip or direct modes, these elements are obtained along with other motion information from surrounding blocks of the video block to be predicted, or from a historical motion vector list, and are not transmitted in the bitstream.
[0004] However, due to the different characteristics of different video blocks, the syntax elements obtained from surrounding blocks or from the historical information motion vector list may not be suitable for predicting the required video block, which reduces the prediction accuracy of the video block during the decoding process. Summary of the Invention
[0005] This application provides a pattern determination method, a communication node, a storage medium, and a program product to solve the problem of inaccurate BGC prediction and improve the accuracy of video block prediction.
[0006] To achieve the above objectives, embodiments of this application provide a pattern determination method, including:
[0007] Obtain the first and second motion information of the block to be predicted;
[0008] The first template of the first reference block is obtained based on the first motion information, and the second template of the second reference block is obtained based on the second motion information;
[0009] Based on the first template, the second template, and the third template of the block to be predicted, determine the template cost;
[0010] The target correction mode for the block to be predicted is determined based on the template cost.
[0011] To achieve the above objectives, embodiments of this application provide a communication node, including: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the mode determination method as described in any of the embodiments of this application.
[0012] To achieve the above objectives, embodiments of this application provide a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the pattern determination method of any embodiment of this application.
[0013] To achieve the above objectives, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, implements the steps of the pattern determination method of any one of the embodiments of this application.
[0014] The mode determination method, communication node, storage medium, and program product provided in this application embodiment obtain first and second motion information of the block to be predicted; obtain a first template of a first reference block based on the first motion information, and obtain a second template of a second reference block based on the second motion information; determine the template cost based on the first template, the second template, and a third template of the block to be predicted; and determine the target correction mode of the block to be predicted based on the template cost. By adopting the above technical solution, the template cost under different BGC modes is determined based on the template of the image block to be predicted in the decoded frame and the motion information corresponding to the image block, thereby determining the target correction mode required for bidirectional gradient correction prediction of the image block. By utilizing the correlation between the block to be predicted and adjacent reconstructed information, the method determines the syntax parameters and motion information in the correction mode required for the block to be predicted, improving the accuracy of image block prediction. Attached Figure Description
[0015] Figure 1 A schematic diagram of the H.266 / VVC encoding framework;
[0016] Figure 2 This is a schematic diagram of the H.266 / VVC decoding framework;
[0017] Figure 3 A schematic flowchart illustrating a pattern determination method provided in an embodiment of this application;
[0018] Figure 4 A flowchart illustrating another pattern determination method provided in an embodiment of this application;
[0019] Figure 5 A flowchart illustrating another pattern determination method provided in an embodiment of this application;
[0020] Figure 6 A flowchart illustrating another pattern determination method provided in an embodiment of this application;
[0021] Figure 7 This is a schematic diagram of the structure of a pattern determination device provided in an embodiment of this application;
[0022] Figure 8 This is a schematic diagram of the structure of a communication node provided in an embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be arbitrarily combined with each other.
[0024] The steps illustrated in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than that presented here.
[0025] Figure 1 A schematic diagram of the H.266 / VVC encoding framework, as shown below. Figure 1 As shown, the coding framework mainly includes modules such as intra-frame prediction, inter-frame prediction, transform, quantization, loop filtering, and entropy coding. Each module covers a variety of new coding techniques, which further improves coding gain, but also requires a large amount of memory.
[0026] In the H.266 / VVC coding framework, the intra-frame prediction module primarily removes spatial correlations in video images, using pixel information from adjacent reconstructed blocks already encoded within the frame to predict the pixel value of the current block, resulting in a relatively low compression ratio. The inter-frame prediction module primarily removes temporal correlations in video images, using already encoded inter-frame images as reference images for the current frame to obtain motion information for each block. It can use unidirectional or bidirectional reference images for prediction, generally achieving a higher compression ratio than intra-frame prediction coding. After passing through the intra-frame / inter-frame prediction modules, the predicted value of the current block is obtained. Subtracting the predicted block from the original image block yields residual data, which is then transformed—from a pixel-based temporal domain to a frequency domain—concentrating image energy in the low-frequency region. This effectively removes frequency domain correlations, resulting in lower correlation in the transform coefficients. Typically, the transformed coefficients have a large dynamic range, requiring a quantization module to reduce this dynamic range for better compression. The entropy coding module encodes the intra-frame prediction data, motion information, quantization coefficients, and coding control data into a binary stream, i.e., the compressed bitstream of the original video, for storage or transmission.
[0027] In addition, in order to build a decoded image buffer in the coding framework and use it as a reference image for inter-frame prediction, an image reconstruction process is also implemented, which mainly includes inverse quantization, inverse transform, and loop filtering modules. Specifically, the quantized transform coefficients are inverse quantized and inverse transformed to obtain residual data, which is then added to 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 decoding errors. This is because video coding is based on block processing, and reconstructed images usually exhibit phenomena such as block artifacts and ringing artifacts. This module mainly includes the following filtering techniques: Luma Mapping Chroma Scaling (LMCS), De-blocking Filter (DBF), Sample Adaptive Offset (SAO), and Adaptive Loop Filter (ALF). Luma Mapping Chroma Scaling redistributes codewords within a dynamic range, improving compression efficiency. De-blocking Filter smooths block boundaries, effectively reducing and eliminating block artifacts. Sample Adaptive Offset uses different compensation values for different categories of reconstructed pixels, mitigating ringing effects caused by high-frequency information loss and improving both the subjective and objective quality of the reconstructed image. Adaptive Loop Filter applies Wiener filtering to the reconstructed image pixels, effectively reducing decoding errors.
[0028] like Figure 1 As shown, the overall framework flow of H.266 / VVC at the encoding end is as follows:
[0029] (1) The input video is first divided into frames, and the resulting video frames (images) are then divided into blocks: the frames are first divided into multiple Coding Tree Units (CTUs). Each CTU can be divided into 4 Coding Units (CUs) of the same size according to a quadtree, or it can be recursively divided into CUs of different sizes according to Multiple Type Trees (MTT), i.e., binary or ternary tree structures. A CTU contains all color channels, that is, a CTU consists of one luma block (Coding Tree Block, CTB) and two chroma blocks (CTBs). The block is the basic unit of video coding. The maximum size of the luma block is 128*128 and the minimum size is 4*4. The maximum size of the chroma block is 64*64 and the minimum size is 2*2. The final size of the blocks is related to the content of the video image.
[0030] (2) The divided blocks are sent to the intra-frame / inter-frame prediction mode for prediction coding. The main purpose of intra-frame prediction coding is to remove the spatial correlation of the image; the main purpose of inter-frame prediction coding is to remove the temporal correlation of the image.
[0031] (3) Subtract the prediction block obtained by intra-frame / inter-frame coding from the original coding block to obtain the residual data of the current block. Transform and quantize the residual data to remove frequency domain correlation, realize lossy compression of image residual data, and further improve compression efficiency.
[0032] (4) All encoding parameters and residuals are entropy encoded to form a binary stream for storage or transmission. The output data of the entropy encoding module is the original video compressed bitstream.
[0033] (5) The residual data of the reconstructed block can be obtained by inverse quantization and inverse transformation of the quantized transform coefficients. Then, the residual data is added to the predicted value obtained by intra-frame / inter-frame coding to obtain the reconstructed value of the coded block, thus obtaining the reconstructed image.
[0034] (6) The reconstructed image is filtered by a loop filter and stored in the image buffer as a reference image for subsequent inter-frame prediction.
[0035] Figure 2 This is a schematic diagram of the H.266 / VVC decoding framework, as shown below. Figure 2 As shown, the overall framework flow of H.266 / VVC at the decoding end is as follows:
[0036] (1) Parse the bitstream to obtain the prediction mode and get the prediction value.
[0037] (2) Perform inverse transformation and inverse quantization on the residual obtained from the code stream parsing.
[0038] (3) The predicted value and the residual after inverse quantization and inverse transformation are added together to obtain the block reconstruction value, and finally the reconstructed image is formed.
[0039] (4) The reconstructed image is filtered by a loop filter and stored in the image buffer as a reference image for the next step.
[0040] In the H.266 / VVC framework described above, inter-frame prediction can be achieved using BGC (Browser Collector) technology. BGC contains two syntax elements, BgcFlag and BgcIdx, which represent whether BGC is enabled and the gradient correction direction, respectively. Combining these two elements yields at least three different prediction modes. However, in inter-frame mode, these two syntax elements are encoded into the bitstream and transmitted to the decoder, consuming a certain number of codewords. In skip or direct modes, these two syntax elements are obtained along with other motion information from the surrounding blocks of the video block to be predicted, or from the historical motion vector sequence; the decoder cannot directly obtain them from the bitstream. Since different video blocks have different characteristics, the BgcFlag and BgcIdx obtained from surrounding blocks or inherited from the historical motion vector list may not be suitable for predicting the current video block. Therefore, it can be considered that the current BGC technology cannot provide the most suitable prediction mode for the current video block in skip or direct modes.
[0041] To address the aforementioned issues, this application provides a mode determination method that relies solely on the frame containing the image block to be predicted within the decoded frame, along with two reference frames related to the image block to be predicted, to determine the required correction mode for the image block. This method better aligns with the characteristics of the image block to be predicted, thereby improving the accuracy of image block prediction. The mode determination method provided in this application can be applied to the encoding or decoding end of a communication node to assist the encoding or decoding end in acquiring and determining BGC syntax elements.
[0042] In one exemplary implementation Figure 3 This is a flowchart illustrating a mode determination method provided in an embodiment of this application. This method can be applied to the determination of modes during image patch prediction correction. The method can be executed by a mode determination device, which can be executed by software and / or hardware and integrated on a communication node. For example, the communication node can be a communication node at the decoding end or a communication node at the encoding end.
[0043] like Figure 3 As shown in the embodiments of this application, the pattern determination method specifically includes the following steps:
[0044] S101. Obtain the first motion information and the second motion information of the block to be predicted.
[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, based on the first motion information, a video frame corresponding to the video frame containing the block to be predicted is determined as the first reference frame. Then, based on the motion vector contained in the first motion information, a first reference block corresponding to the block to be predicted, which can be used to predict the reconstruction of the block to be predicted, is determined in the first reference frame. Then, based on the reconstructed area around the block to be predicted, a region of the same size is determined around the first reference block as the first template of the first reference block. Similarly, based on the second motion information, a video frame corresponding to the video frame containing the block to be predicted is determined as the second reference frame. Then, based on the motion vector contained in the second motion information, a second reference block corresponding to the block to be predicted, which can be used to predict the reconstruction of the block to be predicted, is determined in the second reference frame. Then, based on the reconstructed area around the block to be predicted, a region of the same size is determined around the second reference block as the second template of the second reference block.
[0050] S103. Determine the template cost based on the first template, the second template, and the third template of the block to be predicted.
[0051] In this embodiment, the third template can be specifically understood as the area around the block to be predicted that has already been reconstructed. The template cost can be specifically understood as the deviation between the prediction result and the third template when the prediction is performed using the first and second templates.
[0052] Specifically, the first and second templates are used to predict the third template, yielding unidirectional prediction results from the first template to the third template, and unidirectional prediction results from the second template to the third template. Bidirectional prediction results can also be obtained by simultaneously predicting the third template using the first and second templates. Since different correction modes can be constructed by taking different values for BgcFlag and BgcIdx in BGC technology, and more correction modes can be constructed by setting different prediction intensities for a fixed set of BgcFlag and BgcIdx, the deviation values between the prediction results corresponding to different correction modes and the third template can be determined based on the aforementioned unidirectional and bidirectional prediction results. This allows us to determine the template cost when using the first and second templates to correct the prediction of the third template under different circumstances.
[0053] S104. Determine the target correction mode for the block to be predicted based on the template cost.
[0054] In this embodiment, the target correction mode can be specifically understood as a correction mode that conforms to the characteristics of the block to be predicted, determined from multiple BGC correction modes, or in other words, a combination of BGC syntax elements that meet the prediction requirements of the block to be predicted.
[0055] Specifically, since template cost can be used to represent the deviation when predicting the third template of the block to be predicted using the first and second templates under the corresponding BGC correction mode, when determining the correction mode for the block to be predicted, a combination of BGC syntax elements that meets the prediction requirements of the block to be predicted can be determined as the target correction mode for the block to be predicted based on actual needs and the template cost corresponding to different correction modes.
[0056] The mode determination method provided in this application involves: acquiring first and second motion information of the block to be predicted; acquiring a first template of a first reference block based on the first motion information and a second template of a second reference block based on the second motion information; determining the template cost based on the first template, the second template, and a third template of the block to be predicted; and determining the target correction mode of the block to be predicted based on the template cost. By employing the above technical solution, the template cost under different BGC modes is determined based on the template of the image block to be predicted in the decoded frame and the motion information corresponding to the image block, thereby determining the target correction mode required for bidirectional gradient correction prediction of the image block. By utilizing the correlation between the block to be predicted and adjacent reconstructed information, this method determines the syntax parameters and motion information in the required correction mode of the image block, improving the accuracy of image block prediction.
[0057] In one embodiment, the templates for the block to be predicted, the first reference block, and the second reference block include at least one of the following:
[0058] The corresponding block is adjacent to the reconstruction area on its left.
[0059] The upper side of the corresponding block is adjacent to the reconstruction area;
[0060] The upper left adjacent reconstruction area of the corresponding block.
[0061] Specifically, during the bitstream decoding process, the video frame to be reconstructed can be divided into multiple coded blocks, i.e., multiple image blocks, for reconstruction. The block to be predicted is an image block in the video frame that has not been reconstructed. Multiple regions consisting of reconstructed image blocks can exist in its surrounding neighborhood. One or more connected superimposed reconstruction regions adjacent to the block to be predicted and located to the left, top, or upper left of the block to be predicted can be used as the template for the block to be predicted, i.e., the third template in the above embodiment. Similarly, the first template can be composed of one or more connected superimposed reconstruction regions adjacent to the first reference block and located to the left, top, or upper left of the first reference block, and the second template can be composed of one or more connected superimposed reconstruction regions adjacent to the second reference block and located to the left, top, or upper left of the second reference block. It can be understood that there is a correspondence between the first, second, and third templates; they have the same size. Therefore, when the third template of the block to be predicted is the left adjacent reconstruction region of the block to be predicted, the first template should be the left adjacent reconstruction region of the first reference block, and the second template should be the left adjacent reconstruction region of the second reference block.
[0062] In one embodiment, the method for determining the first motion information and the second motion information includes at least one of the following:
[0063] Obtained via direct mode;
[0064] Obtain by skipping mode;
[0065] Obtained through the Ultimate Motion Vector Expression (UMVE) mode;
[0066] Obtained via inter-frame mode;
[0067] Obtained via affine direct mode;
[0068] Obtained via affine skip mode;
[0069] Obtained via affine UMVE mode;
[0070] Obtained via affine inter-frame mode;
[0071] Obtained through the Symmetric Motion Vector Difference (SMVD) mode;
[0072] The index is selected by parsing the motion information obtained from the bitstream, and is obtained from the motion information list from the direct mode or skip mode.
[0073] The selected index is obtained by parsing the motion information from the bitstream, and is derived from a list of motion information from either affine direct mode or affine skip mode.
[0074] The index is selected by parsing the motion information obtained from the bitstream, and obtained from the motion information list from UMVE mode or affine UMVE mode.
[0075] It is obtained by parsing the motion information in the bitstream.
[0076] The motion information list includes at least one of temporal candidate motion information, spatial candidate motion information, and motion information based on history motion vector prediction (HMVP).
[0077] In this embodiment, the motion information list can be specifically understood as a list consisting of motion vectors corresponding to adjacent image blocks or pixels of multiple blocks to be predicted. It is understood that the multiple motion vectors included in the motion information list can be constructed in different ways, and may 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 specifically understood as a data index obtained from bitstream parsing, used to indicate the motion information selection status.
[0078] It is understood that direct mode, skip mode, UMVE mode, inter-frame mode, affine direct mode, affine skip mode, affine UMVE mode, and SMVD mode are all encoding and transmission methods for motion information, which can be applied to the acquisition of motion information in BGC technology. This application will not explain them in detail in the embodiments.
[0079] In one exemplary implementation Figure 4 This is a flowchart illustrating another pattern determination method provided in an embodiment of this application. The embodiments of this application further optimize the above-mentioned optional technical solutions, such as... Figure 4 As shown, the pattern determination method provided in this application embodiment specifically includes the following steps:
[0080] S201. Obtain the first motion information and the second motion information of the block to be predicted.
[0081] S202. 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.
[0082] S203. For each correction mode in the preset correction mode set, determine the bidirectional prediction correction information corresponding to the correction mode based on the first template and the second template.
[0083] The preset correction mode set includes at least: no correction mode, first correction mode and second correction mode.
[0084] In this embodiment, the preset correction mode set can be specifically understood as a set of different correction modes composed of different values of BgcFlag, BgcIdx, and prediction intensity in the BGC technology. The bidirectional prediction correction information can be specifically understood as the correction value obtained by using the bidirectional prediction gradient to correct the bidirectional prediction results of the first and second templates for the third template according to the correction mode.
[0085] In this embodiment, the no-correction mode can be the correction mode where BgcFlag is 0 in the BGC technology, that is, the mode that does not perform bidirectional prediction correction on the first template and the second template. The first correction mode and the second correction mode can be correction modes where BgcFlag is 1 and BgcIdx is 0 or 1 in the BGC technology. For example, the first correction mode can be a forward correction mode where BgcFlag is 1 and BgcIdx is 1 in the BGC technology; the second correction mode can be a backward correction mode where BgcFlag is 1 and BgcIdx is 0 in the BGC technology center.
[0086] Optionally, the correction intensity of a correction mode can be one or more fixed values. When the correction intensity of a correction mode is a single fixed value, that is, when the correction intensity is the same, the BgcIdx values of the first correction mode and the second correction mode should be different. When the correction intensity has multiple fixed values, in the preset correction mode set, the first correction mode may include multiple first correction intensity modes that use each fixed value as the correction intensity, and the second correction mode may include multiple second correction intensity modes that use each fixed value as the correction intensity. For the case where the correction intensity has multiple fixed values, the BgcIdx values of each first correction mode and the second correction mode can be the same or different, as long as there are inconsistent parameter values in 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 unidirectional prediction results obtained by unidirectional prediction of the third template to obtain bidirectional prediction results of the first template and the second template for the third template. Then, the bidirectional prediction results are corrected according to the correction mode to obtain bidirectional prediction correction information corresponding to the correction mode.
[0088] In one embodiment, determining bidirectional prediction correction information corresponding to the correction mode based on a first template and a second template includes:
[0089] The first and second templates 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] The difference between the second template and the first template is determined as the second prediction gradient information;
[0092] The bidirectional prediction correction information corresponding to the correction mode is determined based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information.
[0093] Specifically, a weighted average is calculated for the pixel values of corresponding pixels in the first and second templates. The value within the region obtained after weighted averaging across all pixels is determined as the bidirectional prediction information. The difference between the pixel values of corresponding pixels in the first and second templates is calculated. The value within the region obtained after subtraction across all pixels is determined as the first prediction gradient information. The difference between the pixel values of corresponding pixels in the second and first templates is calculated. The value within the region obtained after subtraction across all pixels is determined as the second prediction gradient information. Depending on the correction mode, information to be used for calculating the bidirectional prediction correction information is selected from the bidirectional prediction information, the first prediction gradient information, and the second prediction gradient information. The selected information is then combined with the correction intensity corresponding to the correction mode to perform bidirectional prediction gradient correction, resulting in bidirectional prediction correction information corresponding to the correction mode.
[0094] In this embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information. Specifically, it can be divided into the following cases:
[0095] 1) When the correction mode is the no-correction mode, the bidirectional forecast information is determined as the bidirectional forecast correction information corresponding to the correction mode;
[0096] 2) When the correction mode is the first correction mode, the first predicted gradient information is multiplied by the correction intensity 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) When the correction mode is the second correction mode, the second predicted gradient information is multiplied by the correction intensity 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, when the correction mode is the no-correction mode, it can be assumed that there is no need to perform bidirectional prediction gradient correction on the bidirectional prediction information. In this case, the bidirectional prediction information can be directly identified as the bidirectional prediction correction information corresponding to the correction mode. When the correction mode is the first correction mode, it can be assumed that bidirectional prediction gradient correction is required on the bidirectional prediction information corresponding to the correction direction of the first correction mode. In this case, the first prediction gradient information can be used as the gradient information required for bidirectional prediction gradient correction. The first prediction gradient information is multiplied by the correction strength of the correction mode to obtain 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. When the correction mode is the second correction mode, it can be assumed that bidirectional prediction gradient correction is required on the bidirectional prediction information corresponding to the correction direction of the second correction mode. In this case, the second prediction gradient information is used as the gradient information required for bidirectional prediction gradient correction. The second prediction gradient information is multiplied by the correction strength of the correction mode to obtain 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.
[0099] S204. Based on the bidirectional prediction correction information and the third template of the block to be predicted, determine the template cost of the correction mode.
[0100] Specifically, since the bidirectional prediction correction information can be used to represent the final prediction result obtained after predicting the third template using the first and second templates and performing gradient calculation, and the third template of the block to be predicted can be considered as the true result, it can be assumed that the optimal prediction result obtained by predicting using the first and second templates should be consistent with the third template. Therefore, the prediction effect can be represented by the deviation between the bidirectional prediction correction information and the third template of the block to be predicted. In this embodiment, the prediction deviation can be characterized by the template cost to reflect the prediction effect. Therefore, for each correction mode, the deviation between the bidirectional prediction correction information corresponding to that correction mode and the third template of the block to be predicted can be determined as the template cost of that correction mode.
[0101] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0102] The template difference between the bidirectional prediction correction information and the template value corresponding to the third template of the block to be predicted is determined as the template cost of the correction mode.
[0103] The template difference value is calculated using at least one of the following methods:
[0104] Sum of Absolute Difference (SAD);
[0105] The sum of absolute transformed differences (SATD) is performed after the Hadamard matrix transformation.
[0106] Sum of Squared Difference (SSD);
[0107] Mean Absolute Difference (MAD);
[0108] Mean Removed Absolute Error (MRSAD)
[0109] Specifically, the bidirectional prediction correction information and the corresponding pixels in the third template of the block to be predicted are processed by any one of the following: sum of absolute errors, sum of absolute values after Hadamard matrix transformation, sum of squared differences, mean absolute difference, and sum of mean absolute errors, to obtain the corresponding template difference value, and the template difference value is determined as the template cost of the corresponding correction mode.
[0110] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0111] For correction modes that are not inherited correction modes, the template difference value between the bidirectional prediction correction information and the third template corresponding to the block to be predicted is determined as the template cost of the correction mode.
[0112] For the correction mode that is an inheritance correction mode, the bidirectional prediction correction information is determined, and the template difference value between the template difference value and the third template of the block to be predicted is determined as the template cost of the correction mode.
[0113] The template difference value can be calculated in at least one of the following ways: sum of absolute errors; sum of absolute values after Hadamard matrix transformation; sum of squared differences; mean absolute difference; sum of mean absolute errors.
[0114] In this embodiment, the inherited correction mode can be specifically understood as a correction mode inherited from the surrounding blocks or the historical information motion vector list of the block to be predicted. It is understood that the inherited correction mode should be one of the correction modes in a preset set of correction modes.
[0115] Specifically, for correction modes in the preset correction mode set that do not belong to the inherited correction mode, the same template cost determination method as in the above embodiments can be used to process them, and the resulting template difference value is determined as the template cost of the corresponding correction mode. Inherited correction modes, as correction modes inherited from the surrounding blocks or historical information motion vector list of the block to be predicted, are more likely to be adapted to the prediction requirements of the block to be predicted. In this case, the template cost of the inherited correction mode can be reduced by a preset reduction ratio to increase the likelihood that the inherited correction mode will be selected as the target correction mode for the block to be predicted. The specific operation is as follows: for correction modes in the preset correction mode set that belong to the inherited correction mode, after determining the template difference value using the same template cost determination method as in the above embodiments, the template difference value is multiplied by a preset reduction ratio less than one positive decimal, and the resulting product is used as the template cost of the inherited correction mode.
[0116] It is understood that the template difference value calculation method for the correction mode that is the inheritance correction mode and the correction mode that is not the inheritance correction mode in this embodiment is the same as that in the above embodiment. That is, the pixel points at each corresponding position in the third template of the bidirectional prediction correction information and the prediction block are processed by any one of the following: absolute error sum, Hadamard matrix transformation and then absolute value sum, difference sum of squares, mean absolute difference, and average absolute error sum, and the value obtained after processing is used as the template difference value.
[0117] S205. The correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode for the block to be predicted.
[0118] Specifically, the process of predicting the third template of the block to be predicted using the first and second templates can be considered a simulation of predicting the block to be predicted using the first and second reference blocks. The template cost can characterize the potential bias in predictions under different correction modes. To make the prediction results for the block to be predicted based on the first and second reference blocks more accurate, a correction mode with the lowest template cost can be selected from a preset set of correction modes as the target correction mode for the block to be predicted. Then, the syntax elements and correction strength of this target correction mode can be applied to the first and second reference blocks to complete the prediction of the block to be predicted.
[0119] S206. Sort the correction modes in the preset correction mode set according to the cost of each template, and determine the candidate list of correction modes.
[0120] Specifically, the process of predicting the third template of the block to be predicted using the first and second templates can be considered a simulation of predicting the block to be predicted using the first and second reference blocks. The template cost can characterize the potential biases in predictions under different correction modes. To make the prediction results of the block to be predicted based on the first and second reference blocks more aligned with requirements, the correction modes in the preset correction mode set can be sorted according to their template costs to obtain a candidate list of correction modes. It is understood that this sorting can be from largest to smallest or from smallest to largest, and the sorting method can be preset based on an agreement; this embodiment does not impose any limitations on this.
[0121] S207. Select the index based on the pattern obtained from the parsed code stream, and select the target correction pattern for the block to be predicted from the correction pattern candidate list.
[0122] In this embodiment, the mode selection index can be understood as an index obtained from bitstream parsing, used to indicate the mode selection situation in the correction mode candidate list. It is understood that the setting method of this mode selection index should match the pre-set sorting method; however, this embodiment does not limit the specific method for determining the mode selection index.
[0123] Specifically, during bitstream parsing, the mode selection index used to indicate the selection of correction mode can be obtained. After the correction mode candidate list is generated, a correction mode can be selected from the correction mode candidate list based on the obtained mode selection index as the target correction mode for the block to be predicted.
[0124] It is understood that S205 and S206-S207 are two different target correction mode determination methods, which can be executed selectively or in parallel. In this embodiment, parallel execution is taken as an example.
[0125] The pattern determination method provided in this application uses a first template and a second template to predict a third template of the block to be predicted, thereby simulating the prediction of the block by the first reference block and the second reference block. By using the template cost, which characterizes the potential deviations in prediction under different correction modes, the method selects the correction mode with the lowest template cost or the correction mode determined according to requirements from among the various correction modes adaptable to the block to be predicted as the target correction mode for the block to be predicted. This makes the finally determined target correction mode more consistent with the characteristics of the block to be predicted, improving the accuracy of image block prediction.
[0126] In one exemplary implementation Figure 5 This is a flowchart illustrating another pattern determination method provided in an embodiment of this application. The embodiments of this application further optimize the above-mentioned optional technical solutions, such as... Figure 5As shown, the pattern determination method provided in this application embodiment specifically includes the following steps:
[0127] S301. Obtain the first motion information and the second motion information of the block to be predicted.
[0128] S302. 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.
[0129] S303. Determine the inheritance correction mode based on the first motion information and the second motion information.
[0130] Specifically, in the non-inter-frame mode of BGC technology, the correction mode is often determined by obtaining BGC syntax elements from the motion vector list of surrounding blocks or historical information of the block to be predicted. While the correction mode determined in this way may not necessarily meet the characteristic requirements of the block to be predicted, its probability of meeting the characteristic requirements is higher than other correction modes. To reduce the amount of data computation, a correction mode can be determined based on the first motion information and the second motion information from the motion characteristics of the surrounding blocks or the motion vector list of historical information of the block to be predicted as the inherited correction mode of the block to be predicted.
[0131] In one embodiment, determining the inheritance correction mode based on the first motion information and the second motion information includes:
[0132] From the bidirectional gradient correction information map of the block to be predicted, or from the bidirectional gradient correction information candidate list based on history motion vector prediction (HMVP), obtain the correction mode corresponding to the first motion information and the second motion information as the inherited correction mode.
[0133] Specifically, a bidirectional gradient correction information map or a bidirectional gradient correction information candidate list of HMVP can be pre-constructed for the block to be predicted. The correction modes in the map or list have a one-to-one correspondence with the motion information. Therefore, after obtaining the first motion information and the second motion information related to the block to be predicted, a correction mode can be determined as the inherited correction mode of the block to be predicted based on the correspondence between the first motion information, the second motion information and the correction mode, using the bidirectional gradient correction information map or the bidirectional gradient correction information candidate list of HMVP.
[0134] S304. Determine at least one adjacent correction mode that is adjacent to the inherited correction mode from the preset correction mode set.
[0135] Specifically, since the preset correction mode set contains multiple correction modes, and the inherited correction mode should be one of the correction modes in the preset correction mode set, the correction modes that are adjacent to the inherited correction mode can be determined as adjacent correction modes based on the position of the inherited correction mode in the preset correction mode set.
[0136] For example, assuming the preset correction mode set contains correction modes distributed in the order of {forward correction mode, no correction mode, backward correction mode}, then when the inherited correction mode is no correction mode, its corresponding adjacent correction modes are forward correction mode and backward correction mode; while when the inherited correction mode is forward correction mode, since there are no adjacent correction modes in front of it, its corresponding adjacent correction mode is only no correction mode; similarly, when the inherited correction mode is backward correction mode, since there are no adjacent correction modes behind it, its corresponding adjacent correction mode is only no correction mode.
[0137] Following the example above, since the preset correction mode set includes at least: no correction mode, first correction mode, and second correction mode, and the correction intensity of the correction mode can be one or more fixed values, corresponding to multiple fixed correction intensities, the first correction mode in the preset correction mode set includes multiple first correction intensity modes when each fixed value is used as the correction intensity, and the second correction mode includes multiple second correction intensity modes when each fixed value is used as the correction intensity. Taking two correction intensities k0 and k1 as examples, 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}. For this preset correction mode set, assuming the index of the inherited correction mode in the preset correction mode set is i, the index of the adjacent correction mode corresponding to the inherited correction mode in the damaged correction mode set should be {i-1, i+1}.
[0138] S305. The inherited correction mode and the adjacent correction mode are determined as a new set of preset correction modes.
[0139] Specifically, when there are many correction modes in the preset correction mode set, in order to reduce the number of template costs that need to be calculated, the set of inherited correction modes and their adjacent neighboring correction modes can be used as a new preset correction mode set. This way, when determining the template cost later, only two or three correction modes in the new preset correction mode set need to be used to calculate the template cost, and the target correction mode of the block to be predicted can be determined.
[0140] S306. For each correction mode in the new preset correction mode set, determine the bidirectional prediction correction information corresponding to the correction mode based on the first template and the second template.
[0141] Specifically, for each correction mode in the new set of preset correction modes, the first template and the second template are processed as unidirectional prediction results obtained by unidirectional prediction of the third template to obtain bidirectional prediction results of the first template and the second template for the third template. Then, the bidirectional prediction results are corrected according to the correction mode to obtain bidirectional prediction correction information corresponding to the correction mode.
[0142] In one embodiment, determining bidirectional prediction correction information corresponding to the correction mode based on a first template and a second template includes:
[0143] The first and second templates 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 based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information.
[0147] In this embodiment, the bidirectional prediction correction information corresponding to the correction mode is determined based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information. Specifically, it can be divided into the following cases:
[0148] 1) When the correction mode is the no-correction mode, the bidirectional forecast information is determined as the bidirectional forecast correction information corresponding to the correction mode;
[0149] 2) When the correction mode is the first correction mode, the first predicted gradient information is multiplied by the correction intensity 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.
[0150] 3) When the correction mode is the second correction mode, the second predicted gradient information is multiplied by the correction intensity 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.
[0151] It is understood that the determination method of the above bidirectional prediction correction information is the same as the determination method in the above embodiments, and will not be described in detail in this embodiment.
[0152] S307. Based on the bidirectional prediction correction information and the third template of the block to be predicted, determine the template cost of the correction mode.
[0153] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0154] The template difference between the bidirectional prediction correction information and the template value corresponding to the third template of the block to be predicted is determined as the template cost of the correction mode.
[0155] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0156] For correction modes that are not inherited correction modes, the template difference value between the bidirectional prediction correction information and the third template corresponding to the block to be predicted is determined as the template cost of the correction mode.
[0157] For the correction mode that is an inheritance correction mode, the bidirectional prediction correction information is determined, and the template difference value between the template difference value and the third template of the block to be predicted is determined as the template cost of the correction mode.
[0158] The template difference value can be calculated in at least one of the following ways: sum of absolute errors; sum of absolute values after Hadamard matrix transformation; sum of squared differences; mean absolute difference; sum of mean absolute errors.
[0159] It is understood that the method of determining the template cost of the correction mode corresponding to the bidirectional prediction correction information based on the bidirectional prediction correction information and the third template of the block to be predicted is consistent with the determination method in the above embodiment, and will not be described in detail in this embodiment.
[0160] S308. The correction mode with the lowest template cost in the new set of preset correction modes is determined as the target correction mode for the block to be predicted.
[0161] Specifically, the process of predicting the third template of the block to be predicted using the first and second templates can be considered a simulation of predicting the block to be predicted using the first and second reference blocks. The template cost can characterize the potential bias in predictions under different correction modes. To make the prediction results for the block to be predicted based on the first and second reference blocks more accurate, a correction mode with the lowest template cost can be selected from a new set of preset correction modes as the target correction mode for the block to be predicted. Then, the syntax elements and correction strength of this target correction mode can be applied to the first and second reference blocks to complete the prediction of the block to be predicted.
[0162] S309. Select the index based on the pattern obtained from the parsed code stream, and select the target correction pattern for the block to be predicted from the correction pattern candidate list.
[0163] Specifically, the process of predicting the third template of the block to be predicted using the first and second templates can be considered a simulation of predicting the block to be predicted using the first and second reference blocks. The template cost can characterize the potential biases in predictions under different correction modes. To make the prediction results of the block to be predicted based on the first and second reference blocks more aligned with requirements, the correction modes in the new preset correction mode set can be sorted according to their template costs to obtain a candidate list of correction modes.
[0164] S310. Select the index based on the pattern obtained from the parsed code stream, and select the target correction pattern for the block to be predicted from the correction pattern candidate list.
[0165] Specifically, during bitstream parsing, the mode selection index used to indicate the selection of correction mode can be obtained. After the correction mode candidate list is generated, a correction mode can be selected from the correction mode candidate list based on the obtained mode selection index as the target correction mode for the block to be predicted.
[0166] It is understood that S308 and S309-S310 are two different target correction mode determination methods, which can be executed selectively or in parallel. In this embodiment, parallel execution is taken as an example.
[0167] The pattern determination method provided in this application reduces the preset set of correction patterns containing multiple correction patterns by determining the inherited correction pattern, thereby reducing the number of correction patterns that need to be calculated for template cost. While ensuring that the correction pattern most suitable for the block to be predicted can be retained, the overall computational workload of pattern determination is reduced and the efficiency of determining the target correction pattern is improved.
[0168] In one exemplary implementation Figure 6 This is a flowchart illustrating another pattern determination method provided in an embodiment of this application. The embodiments of this application further optimize the above-mentioned optional technical solutions, such as... Figure 6 As shown, the pattern determination method provided in this application embodiment specifically includes the following steps:
[0169] S401. Obtain the first motion information and the second motion information of the block to be predicted.
[0170] S402. 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.
[0171] S403. The template difference value between the third template and the first template of the block to be predicted is determined as the cost of the first template.
[0172] The template difference value can be calculated in at least one of the following ways: sum of absolute errors; sum of absolute values after Hadamard matrix transformation; sum of squared differences; mean absolute difference; sum of mean absolute errors.
[0173] In this embodiment, the first template cost can be specifically understood as the prediction deviation when the third template of the block to be predicted is used for unidirectional prediction using the first template.
[0174] Specifically, the pixels at corresponding positions in the first template and the third template of the block to be predicted are processed by any one of the following: sum of absolute errors, sum of absolute values after Hadamard matrix transformation, sum of squared differences, mean absolute difference, or sum of mean absolute errors. The resulting 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 and the second template of the block to be predicted is determined as the cost of the second template.
[0176] In this embodiment, the second template cost can be specifically understood as the prediction deviation when the third template of the block to be predicted is used for unidirectional prediction using the second template.
[0177] Specifically, the pixels at corresponding positions in the second template and the third template of the block to be predicted are processed by any one of the following: sum of absolute errors, sum of absolute values after Hadamard matrix transformation, sum of squared differences, mean absolute difference, or sum of mean absolute errors. The resulting template difference value is determined as the second template cost corresponding to the second template.
[0178] S405. Determine the target correction mode of the block to be predicted based on the first template cost, the second template cost, and the preset template threshold.
[0179] In this embodiment, the preset template threshold can be understood as an empirical value pre-set according to actual conditions to indicate the selection of template cost. Optionally, the preset template threshold is a value greater than 1.
[0180] Specifically, after processing the first template cost and the second template cost based on the preset template threshold, the cost difference between the processed first template cost and the second template cost and the unprocessed second template cost and the first template cost is determined. Then, the target correction mode required for the block to be predicted is determined according to the actual needs and the cost differences.
[0181] In one embodiment, determining the target correction mode for the block to be predicted based on a first template cost, a second template cost, and a preset template threshold includes:
[0182] If the first condition is met, the first correction mode is determined as the target correction mode for the block to be predicted;
[0183] If the second condition is met, the second correction mode is determined as the target correction mode for the block to be predicted;
[0184] If the third condition is met, the uncorrected mode will be determined as the target correction mode for the block to be predicted;
[0185] The first condition is that the cost of the second template is greater than the product of the cost of the first template and the first preset template threshold.
[0186] The second condition is that the cost of the first template is greater than the product of the cost of the second template and the second preset template threshold.
[0187] The third condition is that the cost of the second template is less than or equal to the product of the cost of the first template and the first preset template threshold, or the cost of the first template is less than or equal to the product of the cost of the second template and the second preset template threshold.
[0188] In this embodiment, the first condition can be specifically understood as a condition indicating that the predicted block is more suitable for the first correction mode. The second condition can be specifically understood as a condition indicating that the prediction of the predicted block is more suitable for the second correction mode. The third adjustment can be specifically understood as a condition indicating that the prediction of the predicted block is more suitable for the no-correction mode.
[0189] In this embodiment, the preset template thresholds include a first preset template threshold and a second preset template threshold. The first preset template threshold can be specifically understood as an empirical value preset according to actual conditions to indicate the selection of the first template cost. The second preset template threshold can be specifically understood as an empirical value preset according to actual conditions to indicate the selection of the second template cost.
[0190] Specifically, under the first condition, the cost of the second template can be considered significantly greater than the cost of the first template. This means that predicting the block to be predicted by focusing on the second reference block corresponding to the second template will result in lower prediction accuracy. In this case, the first correction mode, which places greater emphasis on the cost of the first template, can be used as the target correction mode for the block to be predicted. Under the second condition, the cost of the first template can be considered significantly greater than the cost of the second template. This means that predicting the block to be predicted by focusing on the first reference block corresponding to the first template will result in lower prediction accuracy. In this case, the second correction mode, which places greater emphasis on the cost of the second template, can be used as the target correction mode for the block to be predicted. When the third condition is also met, the difference between the costs of the first and second templates is considered insignificant. In this case, the uncorrected mode can be used as the target correction mode for the block to be predicted.
[0191] In one embodiment, the determination of the first preset template threshold includes at least one of the following:
[0192] The preset fixed value is determined as the first preset template threshold;
[0193] When the first correction mode is the inheritance correction mode, the product of the preset fixed value and the first preset reduction ratio is determined as the first preset template threshold.
[0194] When the first correction mode is the inheritance correction mode, the difference between the preset fixed value and the first preset reduced fixed value is determined as the first preset template threshold.
[0195] In this embodiment, the preset fixed value can be understood as a fixed value greater than one, determined in advance based on experience. The first preset reduction ratio can be understood as a pre-set value based on the degree of adaptation of the inherited correction mode to the demand of the predicted block compared with other correction modes, used to reduce the proportion of template cost of the inherited correction mode in the mode selection process. The first preset reduction fixed value can be understood as a fixed value pre-set based on the degree of adaptation of the inherited correction mode to the demand of the predicted block compared with other correction modes, used to reduce the template cost of the inherited correction mode in the mode selection process.
[0196] In one embodiment, the determination of the second preset template threshold includes at least one of the following:
[0197] The preset fixed value is set as the second preset template threshold;
[0198] When the second correction mode is the inheritance correction mode, the product of the preset fixed value and the second preset reduction ratio is determined as the second preset template threshold.
[0199] When the second correction mode is the inheritance correction mode, the difference between the preset fixed value and the second preset reduced fixed value is determined as the second preset template threshold.
[0200] In this embodiment, the second preset reduction ratio can be understood as a pre-set value based on the degree of adaptation of the inherited correction mode to the demand of the predicted block relative to other correction modes, used to reduce the proportion of template cost of the inherited correction mode in the mode selection process. The second preset reduction fixed value can be understood as a pre-set value based on the degree of adaptation of the inherited correction mode to the demand of the predicted block relative to other correction modes, used to reduce the fixed value of template cost of the inherited correction mode in the mode selection process.
[0201] Optionally, the first correction mode in the embodiments of this application may be a forward correction mode, and the second correction mode may be a backward correction mode. Alternatively, it may be a forward correction mode and a backward correction mode with different correction intensities determined according to different cost difference ranges. The embodiments of this application do not impose any restrictions on this.
[0202] In one embodiment, before executing the mode determination method in the above embodiments, the control flag bgc_enable_flag used to characterize whether BGC technology is supported can be read from the sequence header of the acquired video data. If bgc_enable_flag is 1, the control flag bgc_tm_enable_flag is read further. If bgc_tm_enable_flag is also 1, the mode determination method in the above embodiments can be executed. That is, the mode determination method in the above embodiments can only be executed when both bgc_enable_flag and bgc_tm_enable_flag are 1.
[0203] In one exemplary implementation Figure 7 This is a schematic diagram of a pattern determination device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes:
[0204] The motion information acquisition module 510 is used to acquire the first motion information and the second motion information of the block to be predicted.
[0205] The template acquisition module 520 is used to acquire the first template of the first reference block according to the first motion information, and to acquire the second template of the second reference block according to the second motion information;
[0206] The template cost determination module 530 is used to determine the template cost based on the first template, the second template, and the third template of the block to be predicted;
[0207] The target pattern determination module 540 is used to determine the target correction pattern of the block to be predicted based on the template cost.
[0208] The mode determination apparatus provided in this application determines the template cost under different BGC modes based on the template of the image block to be predicted in the decoded frame and the motion information corresponding to the image block, thereby determining the target correction mode required for bidirectional gradient correction prediction of the image block. By utilizing the correlation between the image block to be predicted and the adjacent reconstructed information, the method determines the syntax parameters and motion information in the correction mode required for the image block to be predicted, thus improving the accuracy of image block prediction.
[0209] In one embodiment, the templates for the block to be predicted, the first reference block, and the second reference block include at least one of the following:
[0210] The corresponding block is adjacent to the reconstruction area on its left.
[0211] The upper side of the corresponding block is adjacent to the reconstruction area;
[0212] The upper left adjacent reconstruction area of the corresponding block.
[0213] In one embodiment, the method for determining the first motion information and the second motion information includes at least one of the following:
[0214] Obtained via direct mode;
[0215] Obtain by skipping mode;
[0216] Acquired through advanced motion information representation models;
[0217] Obtained via inter-frame mode;
[0218] Obtained via affine direct mode;
[0219] Obtained via affine skip mode;
[0220] Acquired through affine high-level motion information expression patterns;
[0221] Obtained via affine inter-frame mode;
[0222] Obtained through symmetrical motion vector difference mode;
[0223] The index is selected by parsing the motion information obtained from the bitstream, and is obtained from the motion information list from the direct mode or skip mode.
[0224] The selected index is obtained by parsing the motion information from the bitstream, and is derived from a list of motion information from either affine direct mode or affine skip mode.
[0225] The selected index of the motion information obtained by parsing the bitstream is obtained from the motion information list derived from the high-level motion information representation mode or the affine high-level motion information representation mode;
[0226] It is obtained by parsing the motion information in the bitstream.
[0227] In one embodiment, the template cost determination module 530 is specifically used for:
[0228] For each correction mode in the preset correction mode set, bidirectional prediction correction information corresponding to the correction mode is determined according to the first template and the second template.
[0229] Based on the bidirectional prediction correction information and the third template of the block to be predicted, the template cost of the correction mode is determined.
[0230] In one embodiment, the template cost determination module 530 is specifically used for:
[0231] The inheritance correction mode is determined based on the first motion information and the second motion information;
[0232] Determine at least one adjacent correction pattern that is adjacent to the inherited correction pattern from the preset correction pattern set;
[0233] The inherited correction mode and the adjacent correction mode are determined as a new set of preset correction modes;
[0234] For each correction mode in the new set of preset correction modes, bidirectional prediction correction information corresponding to the correction mode is determined according to the first template and the second template.
[0235] Based on the bidirectional prediction correction information and the third template of the block to be predicted, the template cost of the correction mode is determined.
[0236] In one embodiment, the preset correction mode set includes at least: no correction mode, first correction mode, and second correction mode.
[0237] In one embodiment, determining bidirectional prediction correction information corresponding to the correction mode based on a first template and a second template includes:
[0238] The first and second templates are weighted and averaged to determine the bidirectional prediction information.
[0239] The difference between the first template and the second template is determined as the first prediction gradient information;
[0240] The difference between the second template and the first template is determined as the second prediction gradient information;
[0241] The bidirectional prediction correction information corresponding to the correction mode is determined based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information.
[0242] In one embodiment, determining the bidirectional prediction correction information corresponding to the correction mode based on the correction mode, bidirectional prediction information, first prediction gradient information, and second prediction gradient information includes:
[0243] When 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.
[0244] When the correction mode is the first correction mode, the first predicted gradient information is multiplied by the correction intensity 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.
[0245] When the correction mode is the second correction mode, the second predicted gradient information is multiplied by the correction intensity 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.
[0246] In one embodiment, the correction strength of the correction mode is one or more fixed values;
[0247] Corresponding to the multiple fixed values of the correction intensity, in the preset correction mode set, the first correction mode includes multiple first correction intensity modes when each fixed value is used as the correction intensity, and the second correction mode includes multiple second correction intensity modes when each fixed value is used as the correction intensity.
[0248] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0249] The template difference between the bidirectional prediction correction information and the template corresponding to the third template of the block to be predicted is determined as the template cost of the correction mode.
[0250] The template difference value is calculated using at least one of the following methods:
[0251] absolute error sum;
[0252] The Hadamard matrix is transformed and then summed by absolute value.
[0253] Sum of squared differences;
[0254] Mean absolute difference;
[0255] Remove the average absolute error.
[0256] In one embodiment, the template cost of the correction mode is determined based on bidirectional prediction correction information and a third template of the block to be predicted, including:
[0257] For correction modes that are not inherited correction modes, the template difference value between the bidirectional prediction correction information and the third template corresponding to the block to be predicted is determined as the template cost of the correction mode.
[0258] For the correction mode that is an inheritance correction mode, the bidirectional prediction correction information is determined, and the template difference value between the template difference value and the third template of the block to be predicted is determined as the template cost of the correction mode.
[0259] In one embodiment, the template cost determination module 530 is specifically used for:
[0260] The template difference between the third template and the first template of the block to be predicted is determined as the cost of the first template.
[0261] The template difference between the third template and the second template of the block to be predicted is determined as the cost of the second template.
[0262] In one embodiment, the target pattern determination module 540 is specifically used for:
[0263] The correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode for the block to be predicted.
[0264] In one embodiment, the target pattern determination module 540 is specifically used for:
[0265] Based on the cost of each template, sort the correction modes in the preset correction mode set to determine the candidate list of correction modes;
[0266] The index is selected based on the pattern obtained from the parsed bitstream, and the target correction pattern for the block to be predicted is selected from the correction pattern candidate list.
[0267] In one embodiment, the target pattern determination module 540 is specifically used for:
[0268] The target correction mode of the block to be predicted is determined based on the first template cost, the second template cost, and the preset template threshold.
[0269] In one embodiment, determining the target correction mode for the block to be predicted based on a first template cost, a second template cost, and a preset template threshold includes:
[0270] If the first condition is met, the first correction mode is determined as the target correction mode for the block to be predicted;
[0271] If the second condition is met, the second correction mode is determined as the target correction mode for the block to be predicted;
[0272] If the third condition is met, the uncorrected mode will be determined as the target correction mode for the block to be predicted;
[0273] The first condition is that the cost of the second template is greater than the product of the cost of the first template and the first preset template threshold.
[0274] The second condition is that the cost of the first template is greater than the product of the cost of the second template and the second preset template threshold.
[0275] The third condition is that the cost of the second template is less than or equal to the product of the cost of the first template and the first preset template threshold, or the cost of the first template is less than or equal to the product of the cost of the second template and the second preset template threshold.
[0276] In one embodiment, the determination of the first preset template threshold includes at least one of the following:
[0277] The preset fixed value is determined as the first preset template threshold;
[0278] When the first correction mode is the inheritance correction mode, the product of the preset fixed value and the first preset reduction ratio is determined as the first preset template threshold.
[0279] When the first correction mode is the inheritance correction mode, the difference between the preset fixed value and the first preset reduced fixed value is determined as the first preset template threshold.
[0280] In one embodiment, the determination of the second preset template threshold includes at least one of the following:
[0281] The preset fixed value is set as the second preset template threshold;
[0282] When the second correction mode is the inheritance correction mode, the product of the preset fixed value and the second preset reduction ratio is determined as the second preset template threshold.
[0283] When the second correction mode is the inheritance correction mode, the difference between the preset fixed value and the second preset reduced fixed value is determined as the second preset template threshold.
[0284] The pattern determination device proposed in this embodiment belongs to the same inventive concept as the pattern determination method proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in any of the above embodiments. Furthermore, this embodiment has the same beneficial effects as the execution pattern determination method.
[0285] This application also provides a communication node. Figure 8 This is a schematic diagram of the structure of a communication node provided in an embodiment of this application, such as... Figure 8 As shown, the communication node provided in this application embodiment includes a memory 620, a processor 610, and a computer program stored in the memory and executable on the processor. When the processor 610 executes the program, it implements the above-described mode determination method.
[0286] The communication node may also include a memory 620; the processor 610 in the communication node may be one or more. Figure 8 Taking a processor 610 as an example; memory 620 is used to store 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 pattern determination method as described in the embodiments of this application.
[0287] The communication node also includes: a communication device 630, an input device 640, and an output device 650.
[0288] The processor 610, memory 620, communication device 630, input device 640, and output device 650 in the communication node can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0289] Input device 640 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the communication node. Output device 650 may include display devices such as a display screen.
[0290] The communication device 630 may include a receiver and a transmitter. The communication device 630 is configured to perform information transmission and reception communication under the control of the processor 610.
[0291] The memory 620, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the pattern determination method described in the embodiments of this application (e.g., motion information acquisition module 510, template acquisition module 520, template cost determination module 530, and target pattern determination module 540). The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the communication node, etc. Furthermore, the memory 620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 620 may further include memory remotely located relative to the processor 610, and these remote memories can be connected to the communication node via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0292] This application also provides a storage medium storing a computer program, which, when executed by a processor, implements any of the pattern determination methods described in this application.
[0293] Optionally, the mode determination method includes: acquiring first motion information and second motion information of the block to be predicted; acquiring a first template of a first reference block based on the first motion information, and acquiring a second template of a second reference block based on the second motion information; determining a template cost based on the first template, the second template, and a third template of the block to be predicted; and determining a target correction mode of the block to be predicted based on the template cost.
[0294] The computer storage medium in this application embodiment can be 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. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0295] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0296] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0297] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0298] Optionally, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the pattern determination method as provided in any embodiment of the present invention.
[0299] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.
[0300] Those skilled in the art will understand that the term user terminal encompasses any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
[0301] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0302] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0303] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on memory. Memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Video Disc (DVD) or Compact Disk (CD), etc.). Computer-readable media may include non-transitory storage media. Data processors may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), and processors based on multi-core processor architectures.
[0304] A detailed description of exemplary embodiments of this application has been provided above through exemplary and non-limiting examples. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, without departing from the scope of this application. Therefore, the proper scope of this application will be determined by the claims.
Claims
1. A method for determining a pattern, characterized in that, include: Obtain the first and second motion information of the block to be predicted; A first template of the first reference block is obtained based on the first motion information, and a second template of the second reference block is obtained based on the second motion information; Based on the first template, the second template, and the third template of the block to be predicted, determine the template cost; The target correction mode of the block to be predicted is determined based on the template cost.
2. The pattern determination method according to claim 1, characterized in that, The templates for the block to be predicted, the first reference block, and the second reference block include at least one of the following: The corresponding block is adjacent to the reconstruction area on its left. The upper side of the corresponding block is adjacent to the reconstruction area; The upper left adjacent reconstruction area of the corresponding block.
3. The pattern determination method according to claim 1, characterized in that, The methods for determining the first motion information and the second motion information include at least one of the following: Obtained via direct mode; Obtain by skipping mode; Acquired through advanced motion information representation models; Obtained via inter-frame mode; Obtained via affine direct mode; Obtained via affine skip mode; Acquired through affine high-level motion information expression patterns; Obtained via affine inter-frame mode; Obtained through symmetrical motion vector difference mode; The index is selected by parsing the motion information obtained from the bitstream, and is obtained from the motion information list from the direct mode or skip mode. The selected index is obtained by parsing the motion information from the bitstream, and is derived from a list of motion information from either affine direct mode or affine skip mode. The selected index of the motion information obtained by parsing the bitstream is obtained from the motion information list derived from the high-level motion information representation mode or the affine high-level motion information representation mode; It is obtained by parsing the motion information in the bitstream.
4. The pattern determination method according to claim 1, characterized in that, The step of determining the template cost based on the first template, the second template, and the third template of the block to be predicted includes: For each correction mode in the preset correction mode set, bidirectional prediction correction information corresponding to the correction mode is determined based on the first template and the second template; Based on the bidirectional prediction correction information and the third template of the block to be predicted, the template cost of the correction mode is determined.
5. The pattern determination method according to claim 1, characterized in that, The step of determining the template cost based on the first template, the second template, and the third template of the block to be predicted includes: The inheritance correction mode is determined based on the first motion information and the second motion information; At least one adjacent correction mode adjacent to the inherited correction mode is determined from a preset correction mode set; The inherited correction mode and the adjacent correction mode are determined as a new preset correction mode set; For each correction mode in the new set of preset correction modes, bidirectional prediction correction information corresponding to the correction mode is determined based on the first template and the second template; Based on the bidirectional prediction correction information and the third template of the block to be predicted, the template cost of the correction mode is determined.
6. The pattern determination method according to claim 4 or 5, characterized in that, The preset correction mode set includes at least: no correction mode, first correction mode and second correction mode.
7. The pattern determination method according to claim 6, characterized in that, The step of determining the bidirectional prediction correction information corresponding to the correction mode based on the first template and the second template includes: The first template and the second template are weighted and averaged to determine bidirectional prediction information; The difference between the first template and the second template is determined as the first prediction gradient information; The difference between the second template and the first template is determined as the second prediction gradient information; The bidirectional prediction correction information corresponding to the correction mode is determined based on the correction mode, the bidirectional prediction information, the first prediction gradient information, and the second prediction gradient information.
8. The pattern determination method according to claim 7, characterized in that, Determining the bidirectional prediction correction information corresponding to the correction mode based on the correction mode, the bidirectional prediction information, the first prediction gradient information, and the second prediction gradient information includes: When the correction mode is no correction mode, the bidirectional prediction information is determined as the bidirectional prediction correction information corresponding to the correction mode; When the correction mode is the first correction mode, the first predicted gradient information is multiplied by the correction intensity 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. When the correction mode is the second correction mode, the second predicted gradient information is multiplied by the correction intensity 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.
9. The pattern determination method according to claim 8, characterized in that, The correction intensity of the correction mode is one or more fixed values; Corresponding to the multiple fixed values of the correction intensity, in the preset correction mode set, the first correction mode includes multiple first correction intensity modes when each of the fixed values is used as the correction intensity, and the second correction mode includes multiple second correction intensity modes when each of the fixed values is used as the correction intensity.
10. The pattern determination method according to claim 4 or 5, characterized in that, The step of determining the template cost of the correction mode based on the bidirectional prediction correction information and the third template of the block to be predicted includes: The template difference value between the bidirectional prediction correction information and the third template corresponding to the block to be predicted is determined as the template cost of the correction mode; The method for calculating the template difference value includes at least one of the following: absolute error sum; The Hadamard matrix is transformed and then summed by absolute value. Sum of squared differences; Mean absolute difference; Remove the average absolute error.
11. The pattern determination method according to claim 10, characterized in that, The step of determining the target correction mode of the block to be predicted based on the template cost includes: The correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode for the block to be predicted.
12. The pattern determination method according to claim 10, characterized in that, The step of determining the target correction mode of the block to be predicted based on the template cost includes: Based on the cost of each template, sort the correction modes in the preset correction mode set to determine the correction mode candidate list; The index is selected based on the pattern obtained from the parsed bitstream, and the target correction pattern for the block to be predicted is selected from the candidate correction pattern list.
13. The pattern determination method according to claim 4 or 5, characterized in that, The step of determining the template cost of the correction mode based on the bidirectional prediction correction information and the third template of the block to be predicted includes: For correction modes that are not inherited correction modes, the template difference value between the bidirectional prediction correction information and the third template corresponding to the block to be predicted is determined as the template cost of the correction mode. For the correction mode that is an inheritance correction mode, the template difference value between the bidirectional prediction correction information and the third template of the block to be predicted is determined, and the product of the template difference value and the preset reduction ratio is determined as the template cost of the correction mode. The method for calculating the template difference value includes at least one of the following: absolute error sum; The Hadamard matrix is transformed and then summed by absolute value. Sum of squared differences; Mean absolute difference; Remove the average absolute error.
14. The pattern determination method according to claim 13, characterized in that, The step of determining the target correction mode of the block to be predicted based on the template cost includes: The correction mode with the lowest template cost in the preset correction mode set is determined as the target correction mode for the block to be predicted.
15. The pattern determination method according to claim 13, characterized in that, The step of determining the target correction mode of the block to be predicted based on the template cost includes: Based on the cost of each template, sort the correction modes in the preset correction mode set to determine the correction mode candidate list; The index is selected based on the pattern obtained from the parsed bitstream, and the target correction pattern for the block to be predicted is selected from the candidate correction pattern list.
16. The pattern determination method according to claim 5, characterized in that, The step of determining the inheritance correction mode based on the first motion information and the second motion information includes: From the bidirectional gradient correction information map of the block to be predicted, or from the bidirectional gradient correction information candidate list based on historical motion vector prediction, obtain the correction mode corresponding to the first motion information and the second motion information as the inherited correction mode.
17. The pattern determination method according to claim 1, characterized in that, The step of determining the template cost based on the first template, the second template, and the third template of the block to be predicted includes: The template difference value between the third template and the first template of the block to be predicted is determined as the first template cost; The template difference between the third template and the second template of the block to be predicted is determined as the cost of the second template. The method for calculating the template difference value includes at least one of the following: absolute error sum; The Hadamard matrix is transformed and then summed by absolute value. Sum of squared differences; Mean absolute difference; Remove the average absolute error.
18. The pattern determination method according to claim 17, characterized in that, The step of determining the target correction mode of the block to be predicted based on the template cost includes: The target correction mode of the block to be predicted is determined based on the first template cost, the second template cost, and the preset template threshold.
19. The pattern determination method according to claim 18, characterized in that, The step of determining the target correction mode of the block to be predicted based on the first template cost, the second template cost, and a preset template threshold includes: If the first condition is met, the first correction mode is determined as the target correction mode for the block to be predicted; If the second condition is met, the second correction mode is determined as the target correction mode for the block to be predicted; If the third condition is met, the uncorrected mode is determined as the target correction mode for the block to be predicted; Wherein, the first condition is that the cost of the second template is greater than the product of the cost of the first template and the first preset template threshold; The second condition is that the cost of the first template is greater than the product of the cost of the second template and the second preset template threshold. The third condition is that the cost of the second template is less than or equal to the product of the cost of the first template and the first preset template threshold, or the cost of the first template is less than or equal to the product of the cost of the second template and the second preset template threshold.
20. The pattern determination method according to claim 19, characterized in that, The method for determining the first preset template threshold includes at least one of the following: The preset fixed value is determined as the first preset template threshold; When the first correction mode is the inheritance correction mode, the product of the preset fixed value and the first preset reduction ratio is determined as the first preset template threshold. When the first correction mode is the inheritance correction mode, the difference between the preset fixed value and the first preset reduction fixed value is determined as the first preset template threshold.
21. The pattern determination method according to claim 19, characterized in that, The method for determining the second preset template threshold includes at least one of the following: The preset fixed value is determined as the second preset template threshold; When the second correction mode is the inheritance correction mode, the product of the preset fixed value and the second preset reduction ratio is determined as the second preset template threshold. When the second correction mode is the inheritance correction mode, the difference between the preset fixed value and the second preset reduction fixed value is determined as the second preset template threshold.
22. A communication node, characterized in that, include: The program includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for establishing communication between the processor and the memory, wherein the program, when executed by the processor, implements the steps of the pattern determination method as described in any one of claims 1-21.
23. A storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the pattern determination method according to any one of claims 1-21.
24. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the pattern determination method according to any one of claims 1-21.