Encoding / Decoding Method, Codec, Bitstream, and Storage Medium

By employing adaptive pixel-level weighting parameters based on type indication and geometric mode parameters, the method addresses the challenge of uniform weight values in video encoding and decoding, improving prediction accuracy and compression efficiency.

JP2025537388APending Publication Date: 2025-11-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025530617
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face challenges in accurately predicting pixel values due to uniform weight values used in units of slices or coding blocks, leading to reduced compression performance and efficiency, especially in scenes with varying illumination.

Method used

Adaptive pixel-level weighting parameters are determined using type indication and geometric mode parameters for improved prediction accuracy, allowing weights to adjust to changes in pixel points.

Benefits of technology

This approach enhances the accuracy of weighted prediction and improves coding efficiency and compression performance by using pixel-level weights that adapt to changes in pixel points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025537388000001_ABST
    Figure 2025537388000001_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose an encoding / decoding method, a codec, a bitstream, and a storage medium, in which the codec determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference prediction value for the current block based on the at least one motion vector information, determines at least one weighting parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter, thereby significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present application relates to an image processing technology field, and more particularly to an encoding / decoding method, a codec, a bitstream, and a storage medium. [Background technology]

[0002] In the field of video encoding and decoding, the encoding and decoding process of a current block can adopt an inter prediction method in addition to an intra prediction method, where the inter prediction can include an inter geometric partitioning mode (GPM) and translational prediction.

[0003] In natural video, factors such as changes in illumination of sequence content do not necessarily have a uniform effect on the whole. Meanwhile, in inter weighted prediction, the weight values ​​used are often determined in units of slices or coding units / coding blocks, which results in low accuracy of inter prediction values ​​and ultimately reduces compression performance. Summary of the Invention

[0004] The embodiments of the present application provide an encoding / decoding method, a codec, a bitstream, and a storage medium that significantly improve the accuracy of weighted prediction and enhance coding efficiency and compression performance.

[0005] The technical solutions of the embodiments of the present application can be realized as follows.

[0006] In a first aspect, an embodiment of the present application provides a decoding method applied to a decoder, the method comprising: decoding the bitstream to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block; determining at least one reference predictor of the current block based on the at least one motion vector information, and determining at least one weight parameter of the current block based on the type indication parameter and / or the geometric mode parameter; determining a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0007] In a second aspect, embodiments of the present application provide an encoding method applied to an encoder, the method comprising: determining at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block; determining at least one reference predictor of the current block based on the at least one motion vector information, and determining at least one weight parameter of the current block based on the type indication parameter and / or the geometric mode parameter; determining a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0008] In a third aspect, an embodiment of the present application provides an encoder, comprising a first determining unit; The first determination unit is configured to determine at least one motion vector information, and a type indication parameter and / or a geometric mode parameter of a current block; determine at least one reference prediction value of the current block based on the at least one motion vector information; determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter; and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0009] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first processor and a first memory storing instructions executable by the first processor, the first processor executing the instructions to implement the method of the second aspect.

[0010] In a fifth aspect, an embodiment of the present application provides a decoder, comprising: a decoding unit; and a second determining unit; the decoding unit is configured to decode a bitstream; The second determination unit is configured to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of a current block, determine at least one reference prediction value of the current block based on the at least one motion vector information, determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0011] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second processor and a second memory storing instructions executable by the second processor, the second processor executing the instructions to implement the method of the first aspect.

[0012] In a seventh aspect, an embodiment of the present application provides a bitstream generated by bit encoding based on encoding target information, where the encoding target information includes at least an inter-prediction mode parameter of a current block, at least one motion vector information of the current block, a type indication parameter and / or a geometric mode parameter.

[0013] In an eighth aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium having a computer program stored thereon, the computer program causing a first processor to perform a method according to the second aspect or causing a second processor to perform a method according to the first aspect. [Effects of the Invention]

[0014] The present embodiment provides an encoding / decoding method, a codec, a bitstream, and a storage medium, in which the codec determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference prediction value for the current block based on the at least one motion vector information, determines at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value for the current block based on the at least one reference prediction value and the at least one weight parameter. As can be seen, in the present embodiment, the encoding / decoding can determine pixel-level weight parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weight parameters. In this way, in the present embodiment, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weight values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance. [Brief explanation of the drawings]

[0015] [Figure 1] FIG. 2 is a schematic diagram of adjacent blocks. [Figure 2] FIG. 2 is an exemplary block diagram of an encoder configuration. [Figure 3] FIG. 2 is an exemplary block diagram of a decoder configuration; [Figure 4]1 is a schematic diagram of a network architecture of an encoding / decoding system according to an embodiment of the present application. [Figure 5] 1 is a schematic diagram of the implementation process of the decoding method; [Figure 6] 1 is a schematic diagram of the gradient mode. [Figure 7] 2 is a schematic diagram of the gradient mode. [Figure 8] 3 is a schematic diagram of the gradient mode. [Figure 9] 4 is a schematic diagram of the gradient mode. [Figure 10] 5 is a schematic diagram of the gradient mode. [Figure 11] 6 is a schematic diagram of the gradient mode. [Figure 12] 7 is a schematic diagram of the gradient mode. [Figure 13] 8 is a schematic diagram of the gradient mode. [Figure 14] 1 is a schematic diagram of a pre-stored matrix. [Figure 15] 2 is a schematic diagram of a pre-stored matrix. [Figure 16] 1 is a schematic diagram of the interpolation process. [Figure 17] 2 is a schematic diagram of the interpolation process. [Figure 18] 3 is a schematic diagram of the interpolation process. [Figure 19] 4 is a schematic diagram of the interpolation process. [Figure 20] 1 is a schematic diagram of the implementation process of the encoding method; [Figure 21] 1 is an exemplary structural diagram of an encoder configuration. [Figure 22] 2 is an exemplary structural diagram of an encoder configuration. [Figure 23] 1 is an exemplary structural diagram of a decoder configuration; [Figure 24] 2 is an exemplary structural diagram of a decoder configuration. DETAILED DESCRIPTION OF THE INVENTION

[0016] The following clearly and completely describes the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are for illustrating the related application, but do not limit the application. In addition, for the convenience of description, only the parts relevant to the present application are shown in the drawings.

[0017] Currently, all common video encoding and decoding standards adopt a block-based hybrid coding framework. Each frame in a video image is divided into square largest coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128, 64x64, etc.). Each LCU or CTU may be further divided into rectangular coding units (CUs) according to a rule, and the coding units may be further divided into smaller prediction units (PUs). Specifically, the hybrid coding framework may include modules such as prediction, transform, quantization, entropy coding, and in-loop filter. Here, the prediction module may include intra prediction and inter prediction, and the inter prediction may include motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels within a frame of a video image, the use of inter-prediction in video coding and decoding technology can eliminate spatial redundancy between adjacent pixels. However, because there is also a strong similarity between adjacent frames in a video image, the use of inter-prediction in video coding and decoding technology can eliminate temporal redundancy between adjacent frames, thereby improving coding and decoding efficiency.

[0018] The basic process of a video codec is as follows: On the encoding side, a frame of image is divided into blocks, intra- or inter-prediction is performed on the current block to generate a predicted block for the current block, the predicted block is subtracted from the original block of the current block to obtain a residual block, transformation and quantization are performed on the residual block to obtain a quantized coefficient matrix, and entropy coding is performed on the quantized coefficient matrix to output the result as a bitstream. On the decoding side, intra- or inter-prediction is performed on the current block to generate a predicted block for the current block, while the bitstream is decoded to obtain a quantized coefficient matrix, inverse quantization and inverse transformation are performed on the quantized coefficient matrix to obtain a residual block, and the predicted block and residual block are added together to obtain a reconstructed block. The reconstructed block forms a reconstructed image, and loop filtering is performed on the reconstructed image on an image-by-image or block-by-block basis to obtain a decoded image. On the encoding side, the same operations as on the decoding side must be performed to obtain a decoded image. The decoded image can be used as a reference frame for inter-prediction of a subsequent frame. If necessary, the encoding side needs to output mode or parameter information, such as block division information, prediction, transform, quantization, entropy coding, and loop filtering, determined in the encoding side to a bitstream. The decoding side determines the same mode or parameter information, such as block division information, prediction, transform, quantization, entropy coding, and loop filtering, as the encoding side through analysis based on analysis and existing information, thereby ensuring that the decoded image obtained in the encoding side is the same as the decoded image obtained in the decoding side. The decoded image obtained in the encoding side is usually also called a reconstructed image. During prediction, the current block can be divided into prediction units, and during transformation, the current block can be divided into transform units, and the division of the prediction units and the transform units may be different.The above is the basic process of a video codec in a block-based hybrid coding framework, and as technology develops, some modules or steps of the framework or process may be optimized. The embodiments of the present application apply to, but are not limited to, the basic process of a video codec in the block-based hybrid coding framework.

[0019] The current block may be a current coding unit (CU) or a current prediction unit (PU), for example.

[0020] The Versatile Video Coding (VVC) standard employs slice-level weighted prediction and bi-prediction with CU-level weights (BCW). When slice-level weighted prediction is employed, all CUs in a slice share the same parameter set and are classified as explicit prediction. When BCW is employed, each CU uses an index to determine its weight and is classified as default weighting.

[0021] In addition, if slice-level weighted prediction or BCW is not used, the calculation of pixel prediction values ​​is also classified as default weighted prediction (when slice-level weighted prediction is not enabled). The default weighted prediction method is relatively simple, does not use weights or offset values, and is divided into three cases depending on the difference in reference list.

[0022] The first case is when only the forward reference list List0 is used, and the calculation of the predicted pixel is as follows:

[0023]

number

[0024]

number

[0025]

number

[0026]

number

[0027] In slice-level weighted prediction, changes in illumination intensity can cause global or local brightness changes within the same scene in a video. Examples include aperture changes during shooting and fade-in / fade-out effects caused by artificial editing. In such videos, the content of adjacent images remains similar, but the difference between corresponding pixel values ​​is large, resulting in large residuals obtained with conventional motion compensation prediction techniques. Therefore, slice-level weighted prediction can effectively address such scenes with gradual brightness changes. It can obtain predicted values ​​by performing a linear transformation (a linear function defined by one weight and one offset value) on the reconstructed pixel values ​​of the reference image.

[0028] Regarding the conditions for using slice-level weighted prediction and the analysis of syntax elements, H.266 / VVC imposes restrictions on the use of slice-level weighted prediction technology. CUs that meet the following conditions can use slice-level weighted prediction:

[0029] (1) If the value of the SPS parameter sps_weighted_pred_flag is 1, the P slice can use slice-level weighted prediction.

[0030] (2) If the value of the PPS parameter pps_weighted_pred_flag is 1, the corresponding P slice uses slice-level weighted prediction.

[0031] (3) If the value of the SPS parameter sps_weighted_bipred_flag is 1, B slices can use slice-level weighted prediction.

[0032] (4) If the value of the PPS parameter pps_weighted_bipred_flag is 1, the corresponding B slice uses slice-level weighted prediction.

[0033] (5) The CU does not use decoding-side motion vector refinement (DMVR: Decode MV Refinement).

[0034] If the value of the PPS syntax element pps_wp_info_in_ph_flag is 1, the weighting factors are included in the picture header; otherwise, they are included in the Slice header. For P slices, each reference picture in the reference picture list L0 can have a set of weighting factors. For B slices, in addition to the reference picture list L0, each reference frame in the reference picture list L1 can also have a set of weighting factors. The luma and chroma components each have different weighting factors.

[0035] Here, regarding the acquisition of reference pixel values ​​for slice-level weighted prediction, slice-level weighted prediction can be applied to both unidirectional and bidirectional prediction. For unidirectional prediction CUs, the acquisition of reference pixel values ​​can be divided into the following three cases. When only the forward reference list List0 is used, forward motion information MVL0 of the current CU is acquired, and motion compensation prediction is performed using the forward motion vector information MVL0 to obtain a forward predicted value PredSampleL0. When only the backward reference list List1 is used, backward motion information MVL1 of the current CU is acquired, and motion compensation prediction is performed using the backward motion vector information to obtain a backward predicted value PredSampleL1. In the case of bidirectional prediction, both the forward reference list List0 and the backward reference list List1 are used, and motion compensation prediction is performed using the forward motion vector information to obtain a forward predicted value PredSampleL0, and motion compensation prediction is performed using the backward motion vector information to obtain a backward predicted value PredSampleL1.

[0036] Here, regarding obtaining slice-level weighted prediction values, when slice-level weighted prediction is performed, the slice header information includes multiple sets of weight parameters, and all CUs within the slice adopt one or two sets of weight parameters.

[0037] For unidirectional prediction:

number

number

number

[0038]

number

[0039]

number

[0040] Regarding the conditions for using CU-level bidirectional weighted prediction (BCW) and the analysis of syntax elements, H.266 / VVC imposes restrictions on the use of BCW technology, and only CUs that meet the following conditions can use BCW.

[0041] (1) The value of the SPS syntax element sps_bcw_enabled_flag is 1 (BCW can be used).

[0042] (2) Currently, CU is bidirectionally predictive.

[0043] (3) Neither the luma component nor the chroma component of the current CU uses slice-level weighted prediction.

[0044] (4) The product of the width and height of the current coding block is 256 or more.

[0045] BCW uses only a few predetermined weights, and different configurations have different weight sets. For the Low Delay B (LDB) configuration, the weight set is {4, 5, 3, 10, -2}. For the Random Access (RA) configuration, the weight set is {4, 5, 3}, where the NoBackwardPredFlag can be decoded to determine whether it is the LDB or RA configuration.

[0046] To determine the weight set for BCW, it is only necessary to encode the weight index bcw_idx. If it is not present, it defaults to 0, which corresponds to the weighted averaging of the forward and backward bidirectional predicted signals with equal weights.

[0047] For CUs in Merge mode, their BCW weights are obtained directly from the Merge candidates, and for CUs in Affine Merge mode, the BCW weights corresponding to the first CPMV are used. For CUs coded in DMVR, BDOF, and CIIP modes, the BCW index is set to the default value 0, which corresponds to the weighted averaging of forward and backward bidirectional prediction signals with equal weights.

[0048] Here, regarding obtaining the weighted prediction value for bidirectional weighted prediction at the CU level, in the case of bidirectional prediction, both the forward reference list List0 and the backward reference list List1 are used, and motion compensation prediction is performed using the forward motion vector information MV0 in the forward reference list List0 to obtain the forward prediction value PredSampleL0, and motion compensation prediction is performed using the backward motion vector information MV1 in the backward reference list List1 to obtain the backward prediction value PredSampleL1.

[0049] For CUs that employ bi-prediction, BCW is enabled only for bi-predicted CUs, and only a small number of predetermined weights are used, the index of which is coded.

[0050] If BCW is adopted, the weighted forecast value is:

[0051]

number

[0052] In H.266 / VVC, a new predictive coding tool in merge mode that can utilize intra prediction values, namely, combined inter and intra prediction (CIIP) technology, has been introduced. As the name suggests, this technology combines intra prediction signals with inter prediction signals, where the intra prediction value P intra is obtained by performing normal intra prediction processing in planar mode on the current block, and the inter prediction value P inter is obtained by normal merge mode prediction for the current block. Then, the final CIIP prediction value is obtained by weighted averaging the intra prediction value and the inter prediction value.

[0053] Regarding the conditions for using CIIP and the analysis of syntax elements, the conditions under which CIIP technology can be applied to the current CU in VVC are as follows: The current CU can indicate the use of CIIP technology only if the current CU is coded in Merge mode and the size of the current CU is greater than 64 and less than 128.

[0054] The acquisition of the CIIP intra prediction weight wt is related to the coding modes of the upper and left adjacent blocks of the current CU. The coding modes of the adjacent blocks are identified by two flags, isIntraTop and isIntraLeft. If isIntraTop is 1, the upper adjacent block is available and the coding mode is intra mode. If isIntraLeft is 1, the left adjacent block is available and the coding mode is intra mode.

[0055] Here, to obtain the CIIP weighted predicted value, after obtaining the intra predicted value and inter predicted value of the current CU, the two predicted values ​​need to be weighted and averaged. Here, the weight used in the weight calculation depends on the coding mode of the upper neighboring block and the left neighboring block of the current CU. For example, FIG. 1 is a schematic diagram of neighboring blocks. As shown in FIG. 1, the specific judgment is as follows: if (isIntraLeft+isIntraLeft) is equal to 2, the weight Wt of the intra predicted block is equal to 3; otherwise, if (isIntraLeft+isIntraLeft) is equal to 1, the intra prediction weight Wt corresponding to the current CU is equal to 2; otherwise, the intra prediction weight Wt is equal to 1.

[0056] The final CIIP forecast is calculated as follows, where P intra is the intra prediction value obtained by performing normal intra prediction processing in planar mode on the current block, and P inter is the inter prediction value, and Wt is the intra prediction weight.

[0057]

number

[0058] To address the above problem, in an embodiment of the present application, the encoding / decoding can determine pixel-level weighting parameters for the current block using the type indication parameter and / or the geometric mode parameter, and then perform prediction processing on the current block based on the pixel-level weighting parameters. In this way, in an embodiment of the present application, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weighting values ​​that adapt to changes in pixel points are selected, thereby significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

[0059] 2, an exemplary block diagram of an encoder according to an embodiment of the present application is shown. As shown in FIG. 2, an encoder (specifically, a "video encoder") 50 includes a transform and quantization unit 501, an intra estimation unit 502, an intra prediction unit 503, an inter prediction unit 504, a motion estimation unit 505, an inverse transform and inverse quantization unit 506, a filter control analysis unit 507, a filtering unit 508, an encoding unit 509, and a decoded image buffer unit 510, etc., where the filtering unit 508 can realize deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 509 can realize header information coding and context-based adaptive binary arithmetic coding (CABAC). For the input original video signal, one video coding block can be obtained by dividing the coding tree unit (CTU), and then, for the residual pixel information obtained by intra prediction or inter prediction, the video coding block is transformed by the transform and quantization unit 501, which includes transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients, thereby further reducing the bit rate.The intra estimation unit 502 and the intra prediction unit 503 are configured to perform intra prediction on the video coding block. Specifically, the intra estimation unit 502 and the intra prediction unit 503 are configured to determine an intra prediction mode to be used for coding the video coding block. The inter prediction unit 504 and the motion estimation unit 505 are configured to perform inter predictive coding on the received video coding block with reference to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation performed by the motion estimation unit 505 is a process of generating motion vectors, which are used to estimate the motion of the video coding block. The inter prediction unit 504 performs motion compensation based on the motion vectors determined by the motion estimation unit 505. Therefore, the inter prediction unit 504 is also referred to as a motion compensation unit. After the intra prediction mode is determined, the intra prediction unit 503 is further configured to provide the selected intra prediction data to the encoding unit 509, and the motion estimation unit 505 is configured to send the calculated motion vector data to the encoding unit 509. Further, the inverse transform and inverse quantization unit 506 is configured to reconstruct the video coding block, the residual block is reconstructed in the pixel domain, the reconstructed residual block is filtered to remove blocking artifacts by the filter control analysis unit 507 and the filtering unit 508, and the reconstructed residual block is added to one prediction block in the frame of the decoded picture buffer unit 510 to generate a reconstructed video coding block.The encoding unit 509 is configured to encode various coding parameters and quantized transform coefficients, and in a CABAC-based encoding algorithm, the context content is based on neighboring coding blocks, and can be used to encode information indicating a determined intra-prediction mode and output a bitstream of the video signal. The decoded picture buffer unit 510 is configured to store reconstructed video coding blocks used for prediction reference. As the encoding of the video image progresses, new reconstructed video coding blocks are continuously generated, and all of these reconstructed video coding blocks are stored in the decoded picture buffer unit 510.

[0060] 3, an exemplary block diagram of a decoder configuration according to an embodiment of the present application is shown. As shown in FIG. 3, a decoder (specifically, a "video decoder") 60 may include a decoding unit 601, an inverse transform and inverse quantization unit 602, an intra prediction unit 603, an inter prediction unit 604, a filtering unit 605, and a decoded image buffer unit 606, etc., where the decoding unit 601 can realize header information decoding and CABAC decoding, and the filtering unit 605 can realize deblocking filtering and SAO filtering. After the encoding process of FIG. 2 is performed on an input video signal, a bitstream of the video signal is output. The bitstream is input to the decoder 60. First, the decoding unit 601 processes decoded transform coefficients, and the transform coefficients are processed by the inverse transform and inverse quantization unit 602 to generate residual blocks in the pixel domain. The intra prediction unit 603 is configured to generate prediction data for a current video decoding block based on the determined intra prediction mode and data of a previously decoded block from the current frame or picture. The inter prediction unit 604 is configured to determine prediction information for the video decoding block by analyzing the motion vectors and other related syntax elements, and use the prediction information to generate a prediction block for the video decoding block currently being decoded. A decoded video block is formed by adding the residual block from the inverse transform and inverse quantization unit 602 and the corresponding prediction block generated by the intra prediction unit 603 or the inter prediction unit 604. The decoded video signal is filtered by a filtering unit 605 to remove blocking artifacts and improve video quality. The decoded video block is then stored in a decoded image buffer unit 606, which is configured to store reference images used for subsequent intra prediction or motion compensation, and output the video signal to obtain a reconstructed original video signal.

[0061] Furthermore, the present embodiment further provides a network architecture of an encoding / decoding system including an encoder and a decoder. FIG. 4 is a schematic diagram of the network architecture of the encoding / decoding system according to the present embodiment. As shown in FIG. 4, the network architecture includes one or more electronic devices 13-1N and a communication network 01, where the electronic devices 13-1N can perform video interaction via the communication network 01. In the implementation process, the electronic devices may be various types of devices with video encoding / decoding functions. For example, the electronic devices may include smartphones, tablet computers, personal computers, personal digital assistants, navigation devices, digital telephones, video telephones, televisions, sensor devices, servers, etc., but the present embodiment is not particularly limited thereto. Here, the decoder or encoder according to the present embodiment may be the above-mentioned electronic devices.

[0062] The encoding / decoding method in the embodiments of the present application may be applied to a video encoding system, a video decoding system, or even simultaneously applied to both a video encoding system and a video decoding system, but the embodiments of the present application are not particularly limited thereto. It should be noted that when the encoding / decoding method is applied to a video encoding system, the "current block" specifically refers to a current encoding block in inter prediction, and when the encoding / decoding method is applied to a video decoding system, the "current block" specifically refers to a current decoding block in inter prediction.

[0063] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application.

[0064] An embodiment of the present application proposes a decoding method, which can be applied to a decoder. Figure 5 is a schematic diagram of the implementation process of the decoding method. As shown in Figure 5, the method of decoding by the decoder may include the following steps:

[0065] In step 101, the bitstream is decoded to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block.

[0066] In an embodiment of the present application, the decoder can decode the bitstream to first determine at least one motion vector information of the current block, and at the same time determine the type indication parameter and / or the geometric mode parameter.

[0067] In addition, in the embodiment of the present application, since the encoding / decoding technical solution of the present application can be applied to both unidirectional prediction and bidirectional prediction, at least one motion vector information of the current block may include a forward motion vector and / or a backward motion vector, where the forward motion vector of the current block may perform forward prediction with respect to a predicted value of the current block, and the backward motion vector of the current block may perform backward prediction with respect to a predicted value of the current block.

[0068] Illustratively, in the present embodiment, the forward motion vector is represented as MVL0 and the backward motion vector is represented as MVL1.

[0069] It should be noted that in the embodiment of the present application, the type indication parameter is a type index parameter, where the type indication parameter can be used to select the type of pixel-level weighting parameter, that is, can be used to select the determination method of the pixel-level weighting parameter.

[0070] As can be understood, in the embodiments of the present application, the type of pixel-level weighting parameters, i.e., the method of determining pixel-level weighting parameters, may include, but is not limited to, the type (method) of weighting parameters defined by a pre-stored matrix (pre-stored matrix), and the type (method) of weighting parameters defined by geometric mode parameters.

[0071] That is, in the embodiment of the present application, the type indication parameter can be used to determine whether to derive pixel-level weighting parameters using a pre-stored matrix or to derive pixel-level weighting parameters using a geometric mode parameter. It can also be understood that the type indication parameter is used to determine whether to derive pixel-level weighting parameters using a pre-stored matrix, or whether to derive pixel-level weighting parameters using a geometric mode parameter.

[0072] In some embodiments, the geometric mode parameters may include one or more of gradation mode information, gradation intensity information, change direction information, change start position information, change center position information, change end position information, gradation upper / lower limit information (i.e., lower limit weight and upper limit weight, which can be derived from other geometric mode parameters or set in advance), change range width information, and change segment information. Here, in some embodiments, the gradation intensity information may be represented as change range width information.

[0073] It should be noted that in the present embodiment, the gradation mode information can be determined using modeParm, where the gradation mode information modeParm can indicate the mode of the gradation, i.e., the type of the gradation mode.

[0074] Illustratively, in embodiments of the present application, the types of gradient modes may include, but are not limited to, horizontal gradient weighting, vertical gradient weighting, diagonal gradient weighting, radial gradient weighting, affine gradient weighting, and the like.

[0075] For example, Figure 6 is a schematic diagram of a gradient mode 1, Figure 7 is a schematic diagram of a gradient mode 2, and as shown in the figures, the horizontal gradient mode can include two different change directions. Figure 8 is a schematic diagram of a gradient mode 3, Figure 9 is a schematic diagram of a gradient mode 4, and as shown in Figures 8 and 9, the vertical gradient mode can include two different change directions. Figure 10 is a schematic diagram of a gradient mode 5, Figure 11 is a schematic diagram of a gradient mode 6, and as shown in Figures 10 and 11, the diagonal gradient mode not only includes multiple different change directions but also various different gradient intensity information. Figure 12 is a schematic diagram of a gradient mode 7, and as shown in Figure 12, the radial gradient mode is related to the change center position. Figure 13 is a schematic diagram of a gradient mode 8, and Figure 13 shows two affine gradient modes.

[0076] Furthermore, in the embodiment of the present application, the optimal gradation mode of the current coding unit / block can be determined using a template matching method. Specifically, the pixels in the upper row and / or left column of the current coding unit / block are taken as templates, and in the process of constructing the templates to predict pixel values, a gradation weighting process is performed on the prediction amounts from different sources, and the geometric parameters of the optimal gradation weighting scheme are selected and used as the parameters of the gradation weighting scheme of the current coding unit / block.

[0077] Furthermore, in the embodiment of the present application, for a coding unit / coding block of a small size, some gradation modes with a large gradation width range can be skipped, and for a coding unit / coding block of a large size, some gradation modes with a small gradation width range can be skipped.

[0078] Furthermore, in the present embodiment, for high resolution sequences or large size blocks, the number of segments in the gradation mode can be adaptively increased to make the prediction more accurate.

[0079] It should be noted that in the present embodiment, the gradation strength information can be determined using slopeParm, where the gradation strength information slopeParm can indicate the rate of change, i.e., the rate at which the gradation weight parameter changes depending on the distance between the pixel and the specified position (position of the point or line).

[0080] In the embodiment of the present application, the linear gradation intensity information can be expressed in an index manner, for example, 0 represents no gradation (jump directly), and m represents that when the distance from the specified position reaches a position of (2m-1) / M pixels, the gradation weight parameter reaches its maximum or minimum; when the distance is closer, the linear gradation is obtained; and when the distance is farther, the maximum or minimum is maintained. Here, the value of M can be 2, 1, 1 / 2, etc.

[0081] For example, in the present embodiment, it is assumed that linear gradation intensity information is represented by an index: 0 indicates that w is a constant and there is no gradation or jump, and m indicates that the gradation weight parameter reaches its maximum or minimum when the distance reaches t × width / (2m-1), where width is the width (slice width or coding block width) corresponding to the unit for calculating the gradation weight parameter, and t is a constant.

[0082] It should be noted that in an embodiment of the present application, the change direction information can be determined using dirParm, where the change direction information dirParm can indicate the direction in which the change strength changes, i.e., the direction in which the gradation strength information of the weight parameter for the first predicted pixel changes.

[0083] For example, in the embodiment of the present application, it is assumed that the change direction information is represented in an index manner, for example, 0 represents minimum to maximum, and 1 represents maximum to minimum.

[0084] It should be noted that in the embodiment of the present application, the change start position information can be determined using startPosParm, where the change start position information startPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change start position information corresponds to the gradation type (gradation mode information).

[0085] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the change start position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the change start position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and the other representing the intercept. For example, in the case of a diagonal gradation mode, the change start position information may include a set of parameters representing a line in a polar coordinate system, one representing the angle and the other representing the distance. If the gradation mode information indicates a radial gradation mode, the change start position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the start position is a single point, the change start position information may include horizontal and vertical coordinates in a Cartesian coordinate system, or an angle and distance in a polar coordinate system. If the gradation mode information indicates an affine gradation mode, the change start position information may include a set of parameters representing the positions of multiple control points or multiple control lines. Note that diagonal gradation can include both horizontal and vertical gradation modes.

[0086] In this embodiment, the variation center position information can be determined using centerPosParm, where the variation center position information centerPosParm is the position of the median value of the weight parameter of the gradation region. For example, if the gradation range is from 0 to 1, the median value is 0.5, and the weight parameter gradually increases or decreases from this position toward both sides.

[0087] As can be understood, in the embodiment of the present application, the change center position information centerPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change center position information corresponds to the gradation type (gradation mode information).

[0088] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the transformation center position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the transformation center position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and the other representing the intercept. If the gradation mode information indicates a diagonal gradation mode, the transformation center position information may include a set of parameters representing a line in a polar coordinate system, one representing the angle and the other representing the distance. If the gradation mode information indicates a radial gradation mode, the transformation center position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the center position forms a circle, the transformation center position information may include a horizontal coordinate, a vertical coordinate, and a radius in a Cartesian coordinate system, or may include position information and a radius of the center point in a polar coordinate system, or may include only radius information if the center point coincides with the origin. When the gradation mode information indicates an affine gradation mode, the transformation center position information may include a set of parameters representing multiple control point positions or multiple control line positions.

[0089] It should be noted that in the present embodiment, the change end position information can be determined using endPosParm, where the change end position endPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change end position information corresponds to the gradation type (gradation mode information).

[0090] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the change end position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the change end position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing a slope and the other representing an intercept. If the gradation mode information indicates a diagonal gradation mode, the change end position information may include a set of parameters representing a line in a polar coordinate system, one representing an angle and the other representing a distance. If the gradation mode information indicates a radial gradation mode, the change end position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the end positions form a circle, the change end position information may include a horizontal coordinate, a vertical coordinate, and a radius in a Cartesian coordinate system, or may include position information and a radius of a center point in a polar coordinate system, or may include only radius information if the center point coincides with the origin. If the gradient mode information indicates an affine gradient mode, the transition end position information may include a set of parameters that represent the positions of multiple control points or multiple control lines.

[0091] In addition, in an embodiment of the present application, the gradation upper / lower limit information (lower limit weight and upper limit weight) can be determined using maxWvalue / minWvalue, where the gradation upper / lower limit information maxWvalue / minWvalue can be used to indicate the upper / lower limit information of the weight parameter, and specifically, can be derived from other geometric mode parameters or can be set in advance.

[0092] For example, in an embodiment of the present application, the gradation upper limit / lower limit information maxWvalue / minWvalue may be values ​​corresponding to weight coefficients of 0 and 1 under corresponding precision requirements. For example, when the precision is 3 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 8; when the precision is 5 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 32.

[0093] As can be understood, in the embodiments of the present application, the lower limit of the weighting parameter generally corresponds to 0, i.e., the reference pixel at the corresponding position is not used when weighting, and the upper limit of the weighting parameter generally corresponds to 1, i.e., the reference pixel at the corresponding position is all used when weighting.

[0094] In the embodiment of the present application, the gradation upper / lower limit information maxWvalue / minWvalue may not be weight values ​​corresponding to 0 and 1, but may be values ​​corresponding to 0.2 and 0.4 under the corresponding accuracy requirements, for example.

[0095] Furthermore, in embodiments of the present application, the change segment information can be determined using segParm, where the change segment information segParm can indicate information related to a continuous gradation consisting of multiple segments and can include information that encompasses multiple parameters mentioned above.

[0096] For example, in an embodiment of the present application, the change segment information segParm may include multiple segments, including information such as gradation intensity information (change range width information), change direction information, change start position information, change end position information, etc. Alternatively, the change segment information segParm may include multiple segments, including information such as change direction information, change start position information, change end position information, gradation upper limit information, and gradation lower limit information, etc.

[0097] Furthermore, in the embodiments of the present application, any one type of information in the geometric mode parameters, i.e., gradation mode information, gradation intensity information, change direction information, change start position information, change center position information, change end position information, gradation upper / lower limit information, change range width information, and change segment information, can be converted into index format by quantization.

[0098] As can be understood, in the present embodiment, the geometric mode parameter can be used to indicate a geometric change set, where the geometric change set includes change start position information, change center position information, and change end position information.

[0099] For example, in an embodiment of the present application, the change start position information, the change center position information, and the change end position information can specify different possibilities, and each possible line is predefined as an ordered set, in which case these positions can be specified by only one index, where one index can correspond to one ordered set and thereby specify the corresponding position information.

[0100] Furthermore, in the present embodiment, the type indication parameter can be used to determine whether to use pre-stored matrices or geometric mode parameters to derive pixel-level weighting parameters.

[0101] As can be understood, in the embodiment of the present application, in the weighting mode defined by the pre-stored matrix (pre-stored matrix), the number and dimensions of the predetermined matrix are finite. Figure 14 is a schematic diagram 1 of the pre-stored matrix, and Figure 15 is a schematic diagram 2 of the pre-stored matrix. As shown in the figures, the pre-stored matrix is ​​a predetermined weighting matrix with two different dimensions. For a weighting matrix with predetermined dimensions, it can be applied to various domain ranges with different dimensions and different accuracy requirements using methods such as interpolation.

[0102] Illustratively, in an embodiment of the present application, Fig. 16 is a schematic diagram 1 of the interpolation process, Fig. 17 is a schematic diagram 2 of the interpolation process, Fig. 18 is a schematic diagram 3 of the interpolation process, and Fig. 19 is a schematic diagram 4 of the interpolation process, in which Fig. 16 shows a weighting matrix obtained by interpolating weighting matrix 1 under small dimensional requirements, Fig. 17 shows a weighting matrix obtained by interpolating weighting matrix 1 under large dimensional requirements, Fig. 18 shows a weighting matrix obtained by interpolating weighting matrix 2 under high precision requirements, and Fig. 19 shows a weighting matrix obtained by interpolating weighting matrix 2 under low precision requirements.

[0103] Furthermore, in the present embodiment, weighting parameters defined by geometric parameters (geometric mode parameters) refer to weighting parameters calculated from geometric parameters. Weighting parameters on a plane vary according to some geometric rule depending on the pixel position. Such weighting parameters WtParm that vary according to some geometric rule can be expressed by at least one parameter from among gradation mode information modeParm, gradation intensity information slopeParm, change direction information dirParm, change start position information startPosParm, change center position information centerPosParm, change end position information endPosParm, gradation upper / lower limit information minParm / maxParm, and change segment information segParm.

[0104] Furthermore, in the embodiments of the present application, when the geometric mode parameters of different image blocks are all the same, for example, when the geometric mode parameters such as the gradient intensity information, change direction information, etc. of each CU are basically consistent, one or more weight matrices can be first pre-defined, and the pixel-level weights of the coding unit block are obtained by upsampling, downsampling, or cropping with respect to the predetermined weight matrix.

[0105] In addition, in the embodiment of the present application, the mode type for deriving the pixel-level weighting parameters can be selected in an index manner based on the type indication parameter, for example, a mode index number is determined based on the type indication parameter, and then the mode type for deriving the pixel-level weighting parameters is determined based on the mode index number, i.e., whether the weighting parameters are defined by a pre-stored matrix or by a geometric parameter.

[0106] For example, in an embodiment of the present application, when the weighting parameters are obtained using a pre-stored matrix or calculated using a gradient weighting mode defined by geometric parameters, the weighting modes indicated by an index method are as shown in Table 1 below. [Table 1] For example, in an embodiment of the present application, if the weighting parameters are calculated only using some gradient weighting mode defined by the geometric parameters, the weighting modes indicated in the index manner are as shown in the table below. [Table 2] For example, in the present embodiment, if the weighting parameters are calculated using some non-linear weighting mode defined by the geometric parameters, the weighting mode indicated by the index method is as shown in Table 3 below. [Table 3] For example, in the present embodiment, if the weighting parameters are calculated using some non-linear weighting mode defined by the geometric parameters, the weighting mode indicated in the index manner is as shown in Table 4 below. [Table 4] Furthermore, in an embodiment of the present application, the bitstream can be decoded to first determine the inter-prediction mode parameters of the current block, and if the inter-prediction mode parameters indicate that pixel-level weight values ​​are used to determine the inter-prediction value of the current block, it can be selected to perform a type indication parameter and / or geometric mode parameter determination process.

[0107] That is, in an embodiment of the present application, one piece of identification information (e.g., an inter-prediction mode parameter) can be used to indicate whether or not to use the encoding / decoding method proposed in the embodiment of the present application, which performs prediction processing using pixel-level weight values. If it is determined to use pixel-level weight values ​​to determine the inter-prediction value of the current block based on the inter-prediction mode parameter, a type indication parameter and / or a geometric mode parameter can be determined, thereby further determining at least one weight parameter of the current block based on the type indication parameter and / or the geometric mode parameter.

[0108] In step 102, at least one reference predictor of the current block is determined based on at least one motion vector information, and at least one weight parameter of the current block is determined based on a type indication parameter and / or a geometric mode parameter.

[0109] In an embodiment of the present application, after determining at least one motion vector information of a current block, and a type indication parameter and / or a geometric mode parameter, at least one reference prediction value of the current block can be further determined based on the at least one motion vector information, and at the same time, at least one weight parameter of the current block can be determined based on the type indication parameter and / or the geometric mode parameter.

[0110] As can be understood, in the present embodiment, at least one weight parameter of the current block may be a pixel-level weight parameter, where the at least one weight parameter may include at least one pixel point weight value or at least one pixel point offset value, i.e., the at least one weight parameter may include at least one pixel-level weight coefficient, or at least one pixel-level weight coefficient and an offset value.

[0111] In addition, in an embodiment of the present application, since the encoding / decoding scheme of the present application can be applied to both unidirectional prediction and bidirectional prediction, at least one reference prediction value of the current block may include a forward reference value and / or a backward reference value. Here, the forward reference value of the current block may be a prediction result obtained by performing forward prediction on the current block, and the backward reference value of the current block may be a prediction result obtained by performing backward prediction on the current block.

[0112] Illustratively, in an embodiment of the present application, the forward reference value may be denoted as PredSamplesL0, and the backward reference value may be denoted as PredSamplesL1.

[0113] Furthermore, in the embodiment of the present application, the type indication parameter (type index parameter) can be used to select the type of pixel-level weighting parameters, i.e., it is possible to select to use weighting parameters defined by a pre-stored matrix or to select to use weighting parameters defined by a geometric mode parameter. Therefore, it is possible to first determine whether to use the geometric mode parameter based on the type indication parameter, i.e., it is possible to determine whether to use the geometric mode parameter to determine the weighting parameters based on the type indication parameter.

[0114] As can be understood, in the embodiment of the present application, when the type indication parameter indicates that the geometric mode parameter is not used, a pre-stored matrix can be further determined, and at least one weight parameter can be determined based on the pre-stored matrix; correspondingly, when the type indication parameter indicates that the geometric mode parameter is used, at least one weight parameter can be directly determined based on the geometric mode parameter.

[0115] Furthermore, in the embodiments of the present application, if the at least one weight parameter of the current point is at least one pixel point weight value (at least one pixel point weight coefficient), the position information of the sample point within the current block can be used in combination with the geometric mode parameter to further determine the at least one weight parameter.

[0116] It should be noted that in the embodiment of the present application, at least one pixel point weight value can be determined based on the position information of the sample points in the current block and the geometric mode parameters.

[0117] Furthermore, in the present embodiment, the derivation of the weighting parameters (at least one weighting parameter) may be performed at different levels. For example, pixel-level weights may be derived at the slice level, or pixel-level weights may be derived at the coding unit / coding block level. Here, the weighting parameters have a certain precision and upper and lower bounds. The weighting parameters with sub-pixel precision are obtained by performing interpolation filtering on the already derived integer-pixel weighting parameters.

[0118] It should be noted that in the present embodiment, different methods may be used to determine at least one weight parameter for different levels.

[0119] Furthermore, in an embodiment of the present application, when deriving at least one weight parameter of the current block at the slice level, a lower limit weight and an upper limit weight can be first determined based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy; then a first distance can be determined based on the position information of the sample point in the current block and the change start position information; a second distance can be determined based on the position information of the sample point in the current block and the change end position information; and finally, at least one pixel point weight value can be further determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight.

[0120] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0121] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0122] For example, in an embodiment of the present application, the lower limit weight can be predefined as 0 and the upper limit weight as 8, or the upper limit weight can be determined to be 16 based on a predetermined calculation accuracy, or the upper limit weight can be determined to be 32 based on geometric mode parameters.

[0123] In addition, in the embodiment of the present application, when performing slice-level weighting based on pixel-level weighting, several weight-related geometric mode parameters, such as gradation mode information modeParm, slice-level change direction information sliceDirParm, slice-level change start position information sliceStartPosParm, slice-level change end position information sliceEndPosParm, slice-level gradation lower limit information minWvalue, and slice-level gradation upper limit information maxWvalue, are determined based on the current slice. These geometric mode parameters can be used to determine one comprehensive weight parameter SlicewtParm for the current slice, and the weight wLX used in slice-level weighted prediction is ij and offset o_LX ij is derived from the parameters, where X is a reference list index, and if X is 0, it represents the forward reference list List0, otherwise it represents the backward reference list List1.

[0124] Illustratively, in an embodiment of the present application, the gradation mode information modeParm can be used to indicate that the gradation mode is a single-segment linear diagonal gradation mode defined by geometric parameters.

[0125] For example, in an embodiment of the present application, the slice level change direction information sliceDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, from right to left, from top to bottom, or from bottom to top, for example, indicating that the weighted value gradually increases from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0126] For example, in an embodiment of the present application, the slice level change start position information sliceStartPosParm can be used to indicate that the gradation start position is a straight line with a slope of α1 and an intercept of β1 (or expressed in polar coordinates as an angle of θ1 and a distance of d1). In other words, the straight line is set as the gradation start position, and the upper left corner of this position is set as the upper / lower limit weight. By combining this with the direction specified by sliceDirParm, it can be determined that the weight coefficient of the position specified by this parameter is the lower limit weight value minWvalue, that is, the gradation lower limit information can be determined.

[0127] For example, in an embodiment of the present application, the slice level change end information sliceEndPosParm can be used to indicate that the gradation end position is a straight line with a slope of α2 and an intercept of β2 (or expressed in polar coordinates as an angle of θ2 and a distance of d2). In other words, the gradation ends at this straight line, and the lower right of this position is set as the lower / upper limit weight value. By combining this with the direction specified by sliceDirParm, it can be determined that the weight value at the position specified by this parameter is the upper limit weight value maxWvalue. In other words, the gradation upper limit information can be determined.

[0128] In other words, in this embodiment, the lower and upper weights can be determined based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy. At the same time, the distances between the pixel point and the gradation start position and the gradation end position need to be determined by referring to the position information of the sample points in the current block. Here, the first distance can be determined based on the position information of the sample points in the current block and the change start position information, and the second distance can be determined based on the position information of the sample points in the current block and the change end position information.

[0129] For example, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, for each CU in the slice, a first distance d between the position information of the sample point in the current block and the gradation start position sliceStartPosParm and the gradation end position sliceEndPosParm is calculated. L0s [x0][y0] and the second distance d L0e [x0][y0] can be calculated respectively, and the weight parameter w of the pixel point can be calculated based on the first distance and the second distance. L0 [x0][y0] may further be determined, where at least one pixel point weight value may be determined based on the first distance, the second distance, the lower bound weight, and the upper bound weight.

[0130] Furthermore, in the embodiment of the present application, the first distance d L0s [x0][y0] and the second distance d L0e The weight parameter w of the pixel point is calculated based on [x0][y0]. L0 When determining [x0][y0], the following formula can be referred to:

[0131]

number

[0132] Furthermore, in an embodiment of the present application, in the case of bidirectional prediction, a first prediction weight can be determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight, and then a weight sum value can be determined based on the lower limit weight and the upper limit weight, and finally a second prediction weight can be determined based on the first prediction weight and the weight sum value.

[0133] In the embodiment of the present application, when the slice-level weighted prediction is bidirectional weighted prediction, the sum of the forward weight and the backward weight of a pixel point is equal to the sum of the upper weight and the lower weight. That is, after determining the weight sum value sumValue according to the following formula, one weight value (for example, forward weight w L0 [x0][y0]) to calculate another weight value of the pixel point (for example, the backward weight value w L1 [x0][y0]) can be determined.

[0134]

number

number

[0135] As can be understood, in the embodiment of the present application, the offset value of at least one pixel point of the current block can be determined by decoding the bitstream. Here, taking bidirectional prediction as an example, the offset parameters (offset values) o_L0[x0][y0] and o_L1[x0][y0] can be transmitted individually as constants.

[0136] As can be understood, in the embodiment of the present application, the offset value of at least one pixel point can also be determined based on at least one pixel point weight value. Here, taking bidirectional prediction as an example, the offset parameters (offset values) o_L0[x0][y0] and o_L1[x0][y0] are respectively L0 [x0][y0], w L1 It may have a linear relationship with [x0][y0].

[0137] Furthermore, in an embodiment of the present application, when deriving at least one weight parameter of the current block at the CU level, for example, in the case of BCW weighting based on pixel-level weighting, first, a lower limit weight and an upper limit weight can be determined based on gradation mode information, gradation intensity information, change direction information, change center position information, and a predetermined calculation accuracy, and a change center position weight can be determined based on the upper limit weight and the lower limit weight; next, a third distance can be determined based on the position information of the sample point in the current block and the change center position information; and finally, at least one pixel point weight value can be determined based on the third distance and the change center position weight.

[0138] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0139] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0140] For example, in an embodiment of the present application, the lower limit weight can be predefined as 0 and the upper limit weight as 8, or the upper limit weight can be determined to be 16 based on a predetermined calculation accuracy, or the upper limit weight can be determined to be 32 based on geometric mode parameters.

[0141] In addition, in the embodiment of the present application, when performing CU-level weighting based on pixel-level weighting, several weight-related geometric mode parameters, such as gradation mode information modeParm, CU-level gradation strength information cbSlopeParm, CU-level change direction information cbDirParm, and CU-level change center position information cbCenterPosParm, are determined based on the forward reference block of the current CU, and one comprehensive weight parameter cbwtParm can be determined for the current CU using these geometric mode parameters. Here, the weight wL0 used in CU-level bidirectional weighted prediction is ij , wL1 ij and offset o_L0 ij , o_L1 ij is derived from the parameters.

[0142] Illustratively, in an embodiment of the present application, the gradient mode information modeParm can be used to indicate that the gradient mode is a single-segment linear diagonal gradient mode defined by geometric parameters.

[0143] For example, in an embodiment of the present application, CU-level gradient intensity information cbSlopeParm may be used to indicate the gradient intensity of the gradient mode. For example, cbSlopeParm may indicate that the gradient weight value reaches its maximum or minimum at a position n pixels away from a specified position.

[0144] For example, in an embodiment of the present application, the CU level change direction information cbDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, from right to left, from top to bottom, or from bottom to top, for example, gradually increasing from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0145] For example, if cbDirParm is 1, it means that the weight value of the first pixel gradually decreases as the distance value changes from negative to positive, and if it is 0, it means that the weight value of the first pixel gradually increases as the distance value changes from negative to positive, and the value here is 0.

[0146] For example, in an embodiment of the present application, the CU level change center position information cbCenterPosParm may be determined based on the slope and intercept of the center position in the diagonal gradation mode, for example, as a straight line with a slope α and an intercept β (or expressed as an angle θ and a distance d in polar coordinates).

[0147] For example, in this embodiment, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the gradation start position is determined as a position that is -n pixels away from the line, and the lower limit weight value minWvalue is set to the left or below this start position, i.e., the gradation lower limit information is determined. The gradation end position is determined as a position that is n pixels away from the line, and the upper limit weight value maxWvalue is set to the right or above the end position, i.e., the gradation lower limit information is determined. The weight changes in stages within the range from the start position to the end position.

[0148] In other words, in this embodiment, the gradation range [-n, n] and gradation direction can be determined based on modeParm, cbSlopeParm, and cbDirParm. Furthermore, the gradation range [-n, n] and gradation direction can be used to determine the lower limit weight minWvalue and the upper limit weight maxWvalue. Then, in the case of a linear gradation, the transition center position weight can be determined based on the lower limit minWvalue, the upper limit maxWvalue, and the transition center position information cbCenterPosParm. Here, the weight wCenterPos of the transition center position information cbCenterPosParm must be the average value of the lower limit weight minWvalue and the upper limit weight maxWvalue, as shown in the following formula:

[0149]

number

[0150] Furthermore, in the embodiment of the present application, if the gradient mode information indicates that the gradient mode is a linear diagonal gradient mode, when calculating at least one pixel point weight value w[x0][y0] of the distance-based linear gradient, it is necessary to first determine a third distance, which can be determined based on the position information of the sample points in the current block and the change center position information.

[0151] For example, in an embodiment of the present application, for each pixel point in the forward reference block of the current coding unit CU, a distance parameter L1, i.e., a third distance, between the pixel point and the pixel point determined from the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block, and the calculation formula is as follows:

[0152]

number

[0153]

number

number

[0154]

number

[0155] Furthermore, in the embodiment of the present application, after determining the third distance, the third distance and the change center position weight can be used to finally determine at least one pixel point weight value, and the weight value includes a first prediction weight value (for example, a weight value of a pixel point of a forward reference block or a weight value of a pixel point of a reference block for intra prediction, etc.) w L0 [x0][y0] and a second prediction weight value (for example, a weight value of a pixel point of a backward reference block or a weight value of a pixel point of a reference block for intra prediction) w L1 It may include [x0][y0].

[0156] For example, in the embodiment of the present application, the third distance L1 is used to calculate the first predicted weight value w L0 When calculating [x0][y0], the following formula can be used:

[0157]

number

number

number

number

number

[0158] If the values ​​of n, shift0, and shift1 are fixed, most of the data in the above formulas except for x0, offsetX, y0, and offsetY are constants, so the calculations can be consolidated and simplified. For example, if maxWvalue and n are both powers of 2, the calculation process can be changed as follows:

[0159]

number

number

number

[0160] Furthermore, in the embodiment of the present application, the first prediction weight value (for example, the weight value of a pixel point of a forward reference block or the weight value of a pixel point of a reference block for intra prediction) w L0 After determining [x0][y0], w L0 [x0][y0] is used to calculate a second prediction weight value (for example, a weight value for a pixel point in a backward reference block or a weight value for a pixel point in a reference block for intra prediction) w L1 [x0][y0] can be derived, and the calculation formula is as follows:

[0161]

number

[0162] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0163] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0164] For example, in an embodiment of the present application, the lower limit weight can be predefined as 0 and the upper limit weight as 8, or the upper limit weight can be determined to be 16 based on a predetermined calculation accuracy, or the upper limit weight can be determined to be 32 based on geometric mode parameters.

[0165] In this embodiment, the determination of pixel-level CIIP intra prediction weights Wt is not only related to the modeParm, cbSlopeParm, cbDirParm, and cbCenterPosParm of the current CU, but also to the coding modes of the upper and left neighboring blocks of the current CU. The coding modes of the neighboring blocks can be identified using two flags, isIntraTop and isIntraLeft. Here, if isIntraTop is 1, the upper neighboring block is available and the coding mode is intra mode. If isIntraLeft is 1, the left neighboring block is available and the coding mode is intra mode.

[0166] Several parameters, including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and the coding mode information of neighboring blocks, isIntraTop and isIntraLeft, are used to determine a comprehensive parameter, cbwtParm, which can be used to determine the weight wt[x0][y0] of each pixel point of the current block when using intra mode, where x0=0...cbWidth-1, y0=0...cbHeight-1.

[0167] Illustratively, in an embodiment of the present application, the gradation mode information modeParm can be used to indicate that the gradation mode is a single-segment linear diagonal gradation mode defined by geometric parameters.

[0168] For example, in an embodiment of the present application, the gradient strength information cbSlopeParm may be used to indicate the gradient strength of the gradient mode. For example, cbSlopeParm may indicate that the gradient weight value reaches its maximum or minimum at a position that is four pixels away from the specified position.

[0169] For example, in an embodiment of the present application, the change direction information cbDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, right to left, top to bottom, bottom to top, etc., and indicates that the weighted value gradually increases from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0170] For example, a cbDirParm of 1 indicates that the weight of the first pixel gradually decreases as the distance value changes from negative to positive, and a cbDirParm of 0 indicates that the weight of the first pixel gradually increases as the distance value changes from negative to positive, and the value here is 0.

[0171] For example, in an embodiment of the present application, the change center position information cbCenterPosParm may be determined based on the slope and intercept of the center position in the diagonal gradation mode, for example, as a straight line with a slope α and an intercept β (or expressed as an angle θ and a distance d in polar coordinates).

[0172] For example, in this embodiment, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the gradation start position is determined as a position that is -n pixels away from the line, and the lower limit weight value minWvalue is set to the left or below this start position, i.e., the gradation lower limit information is determined. The gradation end position is determined as a position that is n pixels away from the line, and the upper limit weight value maxWvalue is set to the right or above the end position, i.e., the gradation lower limit information is determined. The weight changes in stages within the range from the start position to the end position.

[0173] That is, in this embodiment, the gradation range [-n, n] and gradation direction can be determined based on modeParm, cbSlopeParm, and cbDirParm. Furthermore, the gradation range [-n, n] and gradation direction can be used to determine the lower limit weight minWvalue and the upper limit weight maxWvalue. Then, in the case of a linear gradation, the transition center position weight can be determined based on the lower limit minWvalue, the upper limit maxWvalue, and the transition center position information cbCenterPosParm. Here, the weight wCenterPos of the transition center position information cbCenterPosParm must be the average value of the weighting coefficients lower limit minWvalue and upper limit maxWvalue, as shown in the following formula:

[0174]

number

[0175] Furthermore, in the embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, when calculating at least one pixel point weight value w[x0][y0] of the distance-based linear gradation, it is necessary to first determine a fourth distance, which can be determined based on the position information of the sample points in the current block and the transformation center position information.

[0176] For example, in an embodiment of the present application, for each pixel point in the forward reference block of the current coding unit CU, a distance parameter L2, i.e., a fourth distance, between the pixel point and the pixel point determined by the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block, and the calculation formula is as follows:

[0177]

number

[0178]

number

number

[0179]

number

[0180] Furthermore, in the embodiment of the present application, after determining the fourth distance, the fourth distance, the upper limit weight, the lower limit weight, and the change center position weight can be used to finally determine at least one pixel point weight value, and the weight value includes a first prediction weight value (for example, a weight value of a pixel point of a forward reference block or a weight value of a pixel point of a reference block for intra prediction, etc.) w L0 [x0][y0] and a second prediction weight value (for example, a weight value of a pixel point of a backward reference block or a weight value of a pixel point of a reference block for intra prediction) w L1 It may include [x0][y0].

[0181] For example, in the embodiment of the present application, the fourth distance L2 is used to calculate the first predicted weight value w L0 When calculating [x0][y0], the following formula can be used:

[0182]

number

number

[0183] As can be seen, in the present embodiment, in order to improve the calculation accuracy, the weight values ​​here can be multiplied by an appropriate coefficient or amplified by shifting them left by 3 bits. Alternatively, when defining minWvalue and maxWvalue, the amplification of the weight values ​​can be considered in advance, for example, when they are set 2 times larger than the actual weight values. shift3 is amplified twice.

[0184] In the embodiment of the present application, in the case of bidirectional weighted prediction, the sum of the forward weight and the backward weight of a pixel point is equal to the sum of the upper limit weight and the lower limit weight. That is, after determining the weight sum value sumValue according to the following formula, one weight value (for example, forward weight w L0 [x0][y0]) to calculate another weight value of the pixel point (for example, the backward weight value w L1 [x0][y0]) can be determined.

[0185]

number

number

[0186] As can be understood, in the embodiment of the present application, when deriving a predicted pixel value using a weighting parameter, the weighting parameter of pixel level gradation can be selected to perform calculations for pixels at different positions. In order to reduce the calculation complexity, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) can also be selected and implemented.

[0187] Furthermore, in the present embodiment, the weighting parameters on the plane may vary according to some geometric rule or a combination of different geometric rules with reference to the position of the pixel point. For example, the weighting value of a pixel level varies according to the distance of the pixel point from the central variation position, and when the distance value is between [0, L1], it is a first gradation method, and when the distance is between (L1, L2], it is a second gradation method.

[0188] Furthermore, in the embodiment of the present application, the weight value of the pixel level not only varies according to the distance between the pixel point and the center change position, but also determines different linear or non-linear gradation modes for different positions. For example, when the distance value is between [0, L1], the gradation mode is a linear gradation mode, and when the distance is between (L1, L2], the gradation mode is a non-linear gradation mode.

[0189] As can be seen, the encoding and decoding method proposed in the embodiments of the present application can be applied to both unidirectional prediction and bidirectional prediction, and can be applied when all predictions are obtained from inter prediction, or when some or all predicted pixel values ​​are obtained from intra prediction.

[0190] As can be seen, in the present embodiment, when applied to unidirectional prediction, similar to the WP mode, pixel-level weighting parameters (weight parameters) are derived for only one prediction source, which may include weighting coefficients (weight values) and offset amounts.

[0191] As can be understood, in the embodiment of the present application, when applied to bi-prediction, pixel-level weighting parameters (weight parameters) are derived for two prediction sources, similar to WP mode, which may include weighting coefficients (weight values) and offset amounts, or pixel-level weighting coefficients (weight values) are derived for only two prediction sources, similar to BCW or CIIP.

[0192] Furthermore, in an embodiment of the present application, when determining at least one weight parameter at the pixel level of the current block, the weight of a pixel point can be calculated using the coordinates of the pixel point, or can be generated by selecting a predetermined weight parameter using a preset matrix, or can be derived from the weight parameters of pixel points adjacent to the pixel point at positions above and to the left.

[0193] That is, in an embodiment of the present application, for the position information of one sample point in the current block, it is possible to select to determine the pixel point weight of the position information of the sample point based on the pixel point weight values ​​of the position information of other sample points adjacent to the position of the sample point.

[0194] For example, in the present embodiment, the weight w of a pixel point is c is the weight of the pixel point adjacent to the upper and left sides of the pixel point. t , w l can be derived from

[0195]

number

[0196] In an embodiment of the present application, at least one reference prediction value of a current block is determined based on at least one motion vector information, and at the same time, at least one weight parameter of the current block is determined based on a type indication parameter and / or a geometric mode parameter, and then a prediction value of the current block can be determined based on the at least one reference prediction value and the at least one weight parameter.

[0197] Furthermore, in the embodiment of the present application, after determining at least one weight parameter of the current block, which includes at least one pixel point weight value, or at least one pixel point weight value and at least one pixel point offset value, a prediction process is performed based on the at least one pixel point weight value (at least one pixel point weight value and at least one pixel point offset value), and further in combination with at least one reference prediction value of the current block, to obtain a prediction value of the current block.

[0198] As can be understood, in the embodiment of the present application, in the process of calculating the predicted value of the slice-level weighted prediction, the predicted value of the current block can be determined based on at least one reference predicted value, at least one pixel point weight value, and at least one pixel point offset value.

[0199] For example, in the embodiment of the present application, after obtaining the syntax element of the weighted prediction at the slice level and the reference pixel value (reference predicted value) of each CU of the current slice, in the case of unidirectional prediction, for example, forward prediction, weighted prediction processing is performed based on the following equation to obtain the predicted value Pred of the current block: WP can be determined.

[0200]

number

[0201]

number

[0202]

number

[0203]

number

[0204]

number

[0205] As can be seen, in this embodiment, to improve prediction accuracy, the intermediate calculation results have higher precision than the reference pixel values, and log2_weight_denom and chroma_log2_weight_denom represent the precision increase of the weighting coefficients. Shift1 represents the precision increase of the reference pixel values ​​in the calculation process of sub-pixel interpolation (integer pixel values ​​are also amplified). The Clip() operation clamps the pixel value within a valid range, for example, an 8-bit valid value is [0, 255], and a 10-bit valid value is [0, 1023].

[0206] As can be understood, in the embodiment of the present application, in the case of BCW weighting based on pixel-level weighting, in the process of calculating the predicted value, the predicted value of the current block can be determined based on at least one reference predicted value and at least one pixel point weight value.

[0207] In the embodiment of the present application, in the case of bidirectional prediction, both the forward reference list List0 and the backward reference list List1 are used, and motion compensation prediction is performed using the forward motion vector information MV0 in the forward reference list List0 to obtain a forward predicted value (forward reference value) PredSamplesL0, and motion compensation prediction is performed using the backward motion vector information MV1 in the backward reference list List1 to obtain a backward predicted value (backward reference value) PredSamplesL1.

[0208] As can be seen, in the present embodiment, BCW is enabled only for bidirectionally predicted CUs and uses only a small number of predetermined weights to code their indices.

[0209] For example, in the present embodiment, when pixel-level weighted BCW is adopted, the predicted value of the current block, ie, the weighted predicted value, is as follows:

[0210]

number

[0211] As can be understood, in the embodiment of the present application, in the case of CIIP weighting based on pixel-level weighting, in the process of calculating the predicted value, the predicted value of the current block can be determined based on at least one reference predicted value and at least one pixel point weight value.

[0212] In the embodiment of the present application, when calculating the CIIP weighted prediction value based on pixel-level weights, P intra is the intra prediction value obtained by performing normal intra prediction processing in planar mode on the current block, and P inter is the inter prediction value, and wt[x0][y0] is the weight of intra prediction.

[0213] For example, in the embodiment of the present application, when the pixel-level weighted CIIP is adopted, the predicted value of the current block, i.e., the weighted predicted value PredSamples CIIP is as follows:

[0214]

number

[0215]

number

[0216] That is, in the embodiment of the present application, the pixel-level weighting values ​​used in the weighted prediction process are no longer fixed as a fixed value for the entire forward reference block or the entire backward reference block, but the weighting parameters of the current slice or CU can be adaptively adjusted according to factors such as changes in illumination in the sequence content. That is, since the inter-weighted prediction is performed using pixel-level weighting values ​​rather than fixed weighting values ​​at the level of each reference block, the accuracy of inter-weighted prediction can be further improved, and the coding efficiency of weighted prediction can be improved.

[0217] In the embodiments of the present application, weighting at the slice level, weighting of two inter predictors at the CU level, and weighting of one inter predictor and one intra predictor at the CU level have been described as examples, but the encoding / decoding methods proposed in the embodiments of the present application are not designed differently for the slice level or the CU level, nor are they designed differently depending on whether each predictor involved in the weighting is derived from inter prediction or intra prediction.

[0218] An embodiment of the present application proposes a decoding method, in which a decoder determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference prediction value for the current block based on the at least one motion vector information, determines at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value for the current block based on the at least one reference prediction value and the at least one weight parameter. As can be seen, in this embodiment, encoding and decoding can determine pixel-level weight parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weight parameters. In this way, in this embodiment, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weight values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

[0219] One embodiment of the present application proposes an encoding method, which can be applied to an encoder. Figure 20 is a schematic diagram of the implementation process of the encoding method. As shown in Figure 20, the encoding method performed by the encoder may include the following steps:

[0220] In step 201, at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block are determined.

[0221] In an embodiment of the present application, the encoder may first determine at least one motion vector information of the current block, and may simultaneously determine the type indication parameter and / or the geometric mode parameter.

[0222] In addition, in an embodiment of the present application, since the encoding / decoding scheme of the present application can be applied to both unidirectional prediction and bidirectional prediction, at least one motion vector information of the current block can include a forward motion vector and / or a backward motion vector, where the forward motion vector of the current block can perform forward prediction with respect to a predicted value of the current block, and the backward motion vector of the current block can perform backward prediction with respect to a predicted value of the current block.

[0223] Illustratively, in the present embodiment, a forward motion vector may be denoted as MVL0, and a backward motion vector may be denoted as MVL1.

[0224] It should be noted that in the embodiment of the present application, the type indication parameter is a type index parameter, where the type indication parameter can be used to select the type of pixel-level weighting parameter, that is, can be used to select the determination method of the pixel-level weighting parameter.

[0225] As can be understood, in the embodiments of the present application, the type of pixel-level weighting parameters, i.e., the method of determining pixel-level weighting parameters, may include, but is not limited to, the type (method) of weighting parameters defined by a pre-stored matrix (pre-stored matrix), and the type (method) of weighting parameters defined by a geometric mode parameter.

[0226] That is, in the embodiment of the present application, the type indication parameter can be used to determine whether to derive pixel-level weighting parameters using a pre-stored matrix or to derive pixel-level weighting parameters using a geometric mode parameter, which can also be understood as determining whether to derive pixel-level weighting parameters using a pre-stored matrix or whether to derive pixel-level weighting parameters using a geometric mode parameter.

[0227] In some embodiments, the geometric mode parameters may include one or more of gradation mode information, gradation intensity information, change direction information, change start position information, change center position information, change end position information, gradation upper / lower limit information (i.e., lower limit weight and upper limit weight, which can be derived from other geometric mode parameters or set in advance), change range width information, and change segment information. Here, in some embodiments, the gradation intensity information may be represented as change range width information.

[0228] It should be noted that in the present embodiment, the gradation mode information can be determined using modeParm, where the gradation mode information modeParm can indicate the mode of the gradation, i.e., the type of the gradation mode.

[0229] Illustratively, in embodiments of the present application, the types of gradient modes may include, but are not limited to, horizontal gradient weighting, vertical gradient weighting, diagonal gradient weighting, radial gradient weighting, affine gradient weighting, and the like.

[0230] For example, a horizontal gradient mode may include two different change directions, a vertical gradient mode may include two different change directions, a diagonal gradient mode not only includes multiple different change directions but also includes various different gradient intensity information, and a radial gradient mode is related to a change center position.

[0231] Furthermore, in the embodiment of the present application, the optimal gradation mode of the current coding unit / block can be determined using a template matching method. Specifically, the pixels in the upper row and / or left column of the current coding unit / block are taken as templates, and in the process of constructing the templates to predict pixel values, a gradation weighting process is performed on the prediction amounts from different sources, and the geometric parameters of the optimal gradation weighting scheme are selected and used as the parameters of the gradation weighting scheme of the current coding unit / block.

[0232] Furthermore, in the present embodiment, for small coding units / coding blocks, some gradation modes with a large gradation width range can be skipped, and for large coding units / coding blocks, some gradation modes with a small gradation width range can be skipped.

[0233] Furthermore, in the present embodiment, for high resolution sequences or large size blocks, the number of segments in the gradation mode can be adaptively increased to make the prediction more accurate.

[0234] It should be noted that in the present embodiment, the gradation strength information can be determined using slopeParm, where the gradation strength information slopeParm can indicate the rate of change, i.e., the rate at which the gradation weight parameter changes depending on the distance between the pixel and the specified position (position of the point or line).

[0235] In addition, in the embodiment of the present application, the linear gradation intensity information can be expressed in an index manner, for example, 0 represents no gradation (jump directly), and m represents that when the distance from the specified position reaches a position of (2m-1) / M pixels, the gradation weight parameter becomes maximum or minimum, and when the distance is closer, the linear gradation is obtained, and when the distance is farther, the maximum or minimum is maintained, where the value of M can be 2, 1, 1 / 2, etc.

[0236] For example, in the present embodiment, it is assumed that linear gradation intensity information is represented by an index: 0 indicates that w is a constant and there is no gradation or jump, and m indicates that the gradation weight parameter reaches its maximum or minimum when the distance reaches t × width / (2m-1), where width is the width (slice width or coding block width) corresponding to the unit for calculating the gradation weight parameter, and t is a constant.

[0237] It should be noted that in an embodiment of the present application, the change direction information can be determined using dirParm, where the change direction information dirParm can indicate the direction in which the change strength changes, i.e., the direction in which the gradation strength information of the weight parameter for the first predicted pixel changes.

[0238] For example, in the embodiment of the present application, it is assumed that the change direction information is represented in an index manner, for example, 0 represents minimum to maximum, and 1 represents maximum to minimum.

[0239] It should be noted that in the embodiment of the present application, the change start position information can be determined using startPosParm, where the change start position information startPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change start position information corresponds to the gradation type (gradation mode information).

[0240] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the change start position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the change start position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and the other representing the intercept. For example, in the case of a diagonal gradation mode, the change start position information may include a set of parameters representing a line in a polar coordinate system, one representing the angle and the other representing the distance. If the gradation mode information indicates a radial gradation mode, the change start position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the start position is a single point, the change start position information may include horizontal and vertical coordinates in a Cartesian coordinate system, or an angle and distance in a polar coordinate system. If the gradation mode information indicates an affine gradation mode, the change start position information may include a set of parameters representing the positions of multiple control points or multiple control lines. Note that diagonal gradation can include both horizontal and vertical gradation modes.

[0241] In this embodiment, the variation center position information can be determined using centerPosParm, where the variation center position information centerPosParm is the position of the median value of the weight parameter of the gradation region. For example, if the gradation range is from 0 to 1, the median value is 0.5, and the weight parameter gradually increases or decreases from this position toward both sides.

[0242] As can be understood, in the embodiment of the present application, the change center position information centerPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change center position information corresponds to the gradation type (gradation mode information).

[0243] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the transformation center position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the transformation center position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and the other representing the intercept. If the gradation mode information indicates a diagonal gradation mode, the transformation center position information may include a set of parameters representing a line in a polar coordinate system, one representing the angle and the other representing the distance. If the gradation mode information indicates a radial gradation mode, the transformation center position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the center position forms a circle, the transformation center position information may include a horizontal coordinate, a vertical coordinate, and a radius in a Cartesian coordinate system, or may include position information and a radius of the center point in a polar coordinate system, or may include only radius information if the center point coincides with the origin. When the gradation mode information indicates an affine gradation mode, the transformation center position information may include a set of parameters representing multiple control point positions or multiple control line positions.

[0244] It should be noted that in the present embodiment, the change end position information can be determined using endPosParm, where the change end position endPosParm may include different numbers of parameters according to different gradation types, that is, the number of parameters included in the change end position information corresponds to the gradation type (gradation mode information).

[0245] For example, in an embodiment of the present application, if the gradation mode information indicates a horizontal gradation mode, the change end position information may include a horizontal axis coordinate position. If the gradation mode information indicates a diagonal gradation mode, the change end position information may include a set of parameters representing a line in a Cartesian coordinate system, one representing a slope and the other representing an intercept. If the gradation mode information indicates a diagonal gradation mode, the change end position information may include a set of parameters representing a line in a polar coordinate system, one representing an angle and the other representing a distance. If the gradation mode information indicates a radial gradation mode, the change end position information may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the end positions form a circle, the change end position information may include a horizontal coordinate, a vertical coordinate, and a radius in a Cartesian coordinate system, or may include position information and a radius of a center point in a polar coordinate system, or may include only radius information if the center point coincides with the origin. If the gradient mode information indicates an affine gradient mode, the transition end position information may include a set of parameters that represent the positions of multiple control points or multiple control lines.

[0246] In addition, in an embodiment of the present application, the gradation upper / lower limit information (lower limit weight and upper limit weight) can be determined using maxWvalue / minWvalue, where the gradation upper / lower limit information maxWvalue / minWvalue can be used to indicate the upper / lower limit information of the weight parameter, and specifically, can be derived from other geometric mode parameters or can be set in advance.

[0247] For example, in an embodiment of the present application, the gradation upper limit / lower limit information maxWvalue / minWvalue may be values ​​corresponding to weight coefficients of 0 and 1 under corresponding precision requirements. For example, when the precision is 3 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 8; when the precision is 5 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 32.

[0248] As can be understood, in the embodiments of the present application, the lower limit of the weighting parameter generally corresponds to 0, i.e., the reference pixel at the corresponding position is not used when weighting, and the upper limit of the weighting parameter generally corresponds to 1, i.e., the reference pixel at the corresponding position is all used when weighting.

[0249] In the embodiment of the present application, the gradation upper / lower limit information maxWvalue / minWvalue may be values ​​corresponding to 0 and 1, for example, 0.2 and 0.4 under the corresponding accuracy requirements, instead of weight values ​​corresponding to 0 and 1.

[0250] Furthermore, in embodiments of the present application, the change segment information can be determined using segParm, where the change segment information segParm can indicate information related to a continuous gradation consisting of multiple segments and can include information covering multiple parameters mentioned above.

[0251] For example, in an embodiment of the present application, the change segment information segParm may include multiple segments, including information such as gradation strength information, change direction information, change start position information, and change end position information for each segment, or the change segment information segParm may include information such as change direction information, change start position information, change end position information, gradation upper limit information, and gradation lower limit information for each segment.

[0252] Furthermore, in the embodiments of the present application, any one type of information in the geometric mode parameters, i.e., gradation mode information, gradation intensity information (change range width information), change direction information, change start position information, change center position information, change end position information, gradation upper / lower limit information, and change segment information, can be converted into index format by quantization.

[0253] As can be understood, in the present embodiment, the geometric mode parameter can be used to indicate a geometric change set, where the geometric change set includes change start position information, change center position information, and change end position information.

[0254] For example, in an embodiment of the present application, the change start position information, the change center position information, and the change end position information can specify different possibilities, and each possible line is predefined as an ordered set, in which case these positions can be specified by only one index, where one index can correspond to one ordered set and thereby specify the corresponding position information.

[0255] Furthermore, in embodiments of the present application, the type indication parameter can be used to determine whether to derive pixel-level weighting parameters using pre-stored matrices or to derive pixel-level weighting parameters using geometric mode parameters.

[0256] As can be understood, in the embodiment of the present application, in the weighting mode defined by the pre-stored matrix (pre-stored matrix), the number and dimensions of the predetermined matrix are finite. In the case of a weighting matrix with a predetermined dimension, it can be applied to various domain ranges with different dimensions and different accuracy requirements by using methods such as interpolation.

[0257] Furthermore, in the present embodiment, weighting parameters defined by geometric parameters (geometric mode parameters) refer to weighting parameters calculated by geometric parameters. Weighting parameters on a plane vary according to some geometric rule depending on the pixel position. Such weighting parameters wtParm that vary according to some geometric rule can be expressed by at least one parameter from among gradation mode information modeParm, gradation intensity information slopeParm, change direction information dirParm, change start position information startPosParm, change center position information centerPosParm, change end position information endPosParm, gradation upper / lower limit information minParm / maxParm, and change segment information segParm.

[0258] Furthermore, in the embodiments of the present application, when the geometric mode parameters of different image blocks are all the same, for example, when the geometric mode parameters such as the gradient intensity information, change direction information, etc. of each CU are basically consistent, one or more weight matrices can be pre-defined, and the pixel-level weighting weights of the coding unit block can be obtained by upsampling, downsampling, or cropping with respect to the predetermined weight matrix.

[0259] In addition, in the embodiment of the present application, the mode type for deriving the pixel-level weighting parameters can be selected in an index manner based on the type indication parameter, for example, a mode index number is determined based on the type indication parameter, and then the mode type for deriving the pixel-level weighting parameters is determined based on the mode index number, i.e., whether the weighting parameters are defined by a pre-stored matrix or by a geometric parameter.

[0260] Exemplarily, in an embodiment of the present application, if the weighting parameters are obtained using a pre-stored matrix or calculated using a gradation weighting mode defined by geometric parameters, the weighting mode indicated by the index method is as shown in Table 1. Exemplarily, in an embodiment of the present application, if the weighting parameters are calculated only using some gradation weighting mode defined by geometric parameters, the weighting mode indicated by the index method is as shown in Table 2.

[0261] Exemplarily, in an embodiment of the present application, if the weighting parameters are calculated using any non-linear weighting mode defined by the geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 3. Exemplarily, in an embodiment of the present application, if the weighting parameters are calculated using any non-linear weighting mode defined by the geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 4.

[0262] Furthermore, in an embodiment of the present application, the inter-prediction mode parameters of the current block can be determined first, and if the inter-prediction mode parameters indicate that pixel-level weight values ​​are used to determine the inter-prediction value of the current block, it can be selected to perform a type indication parameter and / or geometric mode parameter determination process.

[0263] That is, in an embodiment of the present application, one piece of identification information (e.g., an inter-prediction mode parameter) can be used to indicate whether or not to use the encoding / decoding method proposed in the embodiment of the present application, which performs prediction processing using pixel-level weight values. If it is determined to use pixel-level weight values ​​to determine the inter-prediction value of the current block based on the inter-prediction mode parameter, a type indication parameter and / or a geometric mode parameter can be determined, thereby further determining at least one weight parameter of the current block based on the type indication parameter and / or the geometric mode parameter.

[0264] In step 202, at least one reference predictor of the current block is determined based on at least one motion vector information, and at least one weight parameter of the current block is determined based on a type indication parameter and / or a geometric mode parameter.

[0265] In an embodiment of the present application, after determining at least one motion vector information of a current block, and a type indication parameter and / or a geometric mode parameter, at least one reference prediction value of the current block can be further determined based on the at least one motion vector information, and at the same time, at least one weight parameter of the current block can be determined based on the type indication parameter and / or the geometric mode parameter.

[0266] As can be understood, in the present embodiment, at least one weight parameter of the current block may be a pixel-level weight parameter, where the at least one weight parameter may include at least one pixel point weight value or at least one pixel point offset value, that is, the at least one weight parameter may include at least one pixel-level weight coefficient, or at least one pixel-level weight coefficient and an offset value.

[0267] In addition, in an embodiment of the present application, since the encoding / decoding scheme of the present application can be applied to both unidirectional prediction and bidirectional prediction, at least one reference prediction value of the current block may include a forward reference value and / or a backward reference value. Here, the forward reference value of the current block may be a prediction result obtained by performing forward prediction on the current block, and the backward reference value of the current block may be a prediction result obtained by performing backward prediction on the current block.

[0268] Illustratively, in an embodiment of the present application, the forward reference value may be denoted as PredSamplesL0, and the backward reference value may be denoted as PredSamplesL1.

[0269] Furthermore, in the embodiment of the present application, the type indication parameter (type index parameter) can be used to select the type of pixel-level weighting parameters, i.e., it is possible to select to use weighting parameters defined by a pre-stored matrix or to select to use weighting parameters defined by a geometric mode parameter. Therefore, it is possible to first determine whether to use the geometric mode parameter based on the type indication parameter, i.e., it is possible to determine whether to use the geometric mode parameter to determine the weighting parameters based on the type indication parameter.

[0270] As can be understood, in the embodiment of the present application, when the type indication parameter indicates that the geometric mode parameter is not used, a pre-stored matrix can be further determined, and at least one weight parameter can be determined based on the pre-stored matrix; correspondingly, when the type indication parameter indicates that the geometric mode parameter is used, at least one weight parameter can be directly determined based on the geometric mode parameter.

[0271] Furthermore, in the embodiments of the present application, if the at least one weight parameter of the current point is at least one pixel point weight value (at least one pixel point weight coefficient), the position information of the sample point within the current block can be used in combination with the geometric mode parameter to further determine the at least one weight parameter.

[0272] It should be noted that in the embodiment of the present application, at least one pixel point weight value can be determined based on the position information of the sample points in the current block and the geometric mode parameters.

[0273] Furthermore, in embodiments of the present application, the derivation of the weighting parameters (at least one weighting parameter) may be performed at different levels. For example, pixel-level weights may be derived at the slice level, or pixel-level weights may be derived at the coding unit / coding block level. Here, the weighting parameters have a certain precision and upper and lower bounds. Sub-pixel precision weighting parameters may be obtained by interpolation filtering of the already derived integer-pixel weighting parameters.

[0274] It should be noted that in the present embodiment, different methods may be used to determine at least one weight parameter for different levels.

[0275] Furthermore, in an embodiment of the present application, when deriving at least one weight parameter of the current block at the slice level, a lower limit weight and an upper limit weight can be first determined based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy; then a first distance can be determined based on the position information of the sample point in the current block and the change start position information; a second distance can be determined based on the position information of the sample point in the current block and the change end position information; and finally, at least one pixel point weight value can be further determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight.

[0276] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0277] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0278] For example, in an embodiment of the present application, the lower limit weight can be predefined as 0 and the upper limit weight as 8, or the upper limit weight can be determined to be 16 based on a predetermined calculation accuracy, or the upper limit weight can be determined to be 32 based on geometric mode parameters.

[0279] In addition, in the embodiment of the present application, when performing slice-level weighting based on pixel-level weighting, several weight-related geometric mode parameters, such as gradation mode information modeParm, slice-level change direction information sliceDirParm, slice-level change start position information sliceStartPosParm, slice-level change end position information sliceEndPosParm, slice-level gradation lower limit information minWvalue, and slice-level gradation upper limit information maxWvalue, are determined based on the current slice. These geometric mode parameters can be used to determine one comprehensive weight parameter SlicewtParm for the current slice, and the weight wLX used in slice-level weighted prediction is ij and offset o_LX ij is derived from the parameters, where X is a reference list index, and if X is 0, it represents the forward reference list List0, otherwise it represents the backward reference list List1.

[0280] Illustratively, in an embodiment of the present application, the gradation mode information modeParm can be used to indicate that the gradation mode is a single-segment linear diagonal gradation mode defined by geometric parameters.

[0281] For example, in an embodiment of the present application, the slice level change direction information sliceDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, from right to left, from top to bottom, or from bottom to top, for example, indicating that the weighted value gradually increases from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0282] For example, in an embodiment of the present application, the slice level change start position information sliceStartPosParm can be used to indicate that the gradation start position is a straight line with a slope of α1 and an intercept of β1 (or expressed in polar coordinates as an angle of θ1 and a distance of d1). In other words, the straight line is set as the gradation start position, and the upper left of this position is set as the upper / lower limit weight value. By combining this with the direction specified by sliceDirParm, it can be determined that the weight coefficient of the position specified by this parameter is the lower limit weight value minWvalue, that is, the gradation lower limit information can be determined.

[0283] For example, in an embodiment of the present application, the slice level change end information sliceEndPosParm can be used to indicate that the gradation end position is a straight line with a slope of α2 and an intercept of β2 (or expressed in polar coordinates as an angle of θ2 and a distance of d2). In other words, the gradation ends at this straight line, and the lower right of this position is set as the lower / upper limit weight value. By combining this with the direction specified by sliceDirParm, it can be determined that the weight value at the position specified by this parameter is the upper limit weight value maxWvalue. In other words, the gradation upper limit information can be determined.

[0284] In other words, in this embodiment, the lower and upper weights can be determined based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy. At the same time, the distances between the pixel point and the gradation start position and the gradation end position need to be determined by referring to the position information of the sample points in the current block. Here, the first distance can be determined based on the position information of the sample points in the current block and the change start position information, and the second distance can be determined based on the position information of the sample points in the current block and the change end position information.

[0285] For example, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, for each CU in the slice, a first distance d between the position information of the sample point in the current block and the gradation start position sliceStartPosParm and the gradation end position sliceEndPosParm is calculated. L0s [x0][y0] and the second distance d L0e [x0][y0] can be calculated respectively, and the weight parameter w of the pixel point can be calculated based on the first distance and the second distance. L0 [x0][y0] may further be determined, where at least one pixel point weight value may be determined based on the first distance, the second distance, the lower bound weight, and the upper bound weight.

[0286] Furthermore, in the embodiment of the present application, the first distance d L0s [x0][y0] and the second distance d L0e The weight parameter w of the pixel point is calculated based on [x0][y0]. L0 When determining [x0][y0], equation (12) can be referred to: where maxWvalue is the upper limit weight value, i.e., the gradation upper limit information, and minWvalue is the lower limit weight value, i.e., the gradation lower limit information.

[0287] Furthermore, in an embodiment of the present application, in the case of bidirectional prediction, a first prediction weight can be determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight, and then a weight sum value can be determined based on the lower limit weight and the upper limit weight, and finally a second prediction weight can be determined based on the first prediction weight and the weight sum value.

[0288] In the embodiment of the present application, when the slice-level weighted prediction is bidirectional weighted prediction, the sum of the forward weight and the backward weight of a pixel point is equal to the sum of the upper weight and the lower weight. That is, after determining the weight sum value sumValue according to the following formula, one weight value (for example, forward weight w L0[x0][y0]) to calculate another weight value of the pixel point (for example, backward weight value w L1 [x0][y0]) can be determined as shown in equations (13) and (14).

[0289] Furthermore, in the embodiment of the present application, the at least one weight parameter of the current block may include at least one pixel point weight value and at least one pixel point offset value, where the pixel point offset value can be set as a constant and transmitted, or the pixel point offset value can be obtained using the determined pixel point weight value.

[0290] As can be understood, in the embodiment of the present application, an offset value of at least one pixel point of the current block can be determined. Here, taking bidirectional prediction as an example, the offset parameters (offset values) o_L0[x0][y0] and o_L1[x0][y0] can be transmitted individually as constants.

[0291] As can be understood, in the embodiment of the present application, the offset value of at least one pixel point can also be determined based on at least one pixel point weight value. Here, taking bidirectional prediction as an example, the offset parameters (offset values) o_L0[x0][y0] and o_L1[x0][y0] are respectively L0 [x0][y0], w L1 It may have a linear relationship with [x0][y0].

[0292] Furthermore, in an embodiment of the present application, when deriving at least one weight parameter of the current block at the CU level, for example, in the case of BCW weighting based on pixel-level weighting, first, a lower limit weight and an upper limit weight can be determined based on gradation mode information, gradation intensity information, change direction information, change center position information, and a predetermined calculation accuracy, and a change center position weight can be determined based on the upper limit weight and the lower limit weight; next, a third distance can be determined based on the position information of the sample point in the current block and the change center position information; and finally, at least one pixel point weight value can be determined based on the third distance and the change center position weight.

[0293] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0294] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0295] For example, in an embodiment of the present application, the lower weight limit can be predefined as 0 and the upper weight limit can be predefined as 8, or the upper weight limit can be determined to be 16 based on a predetermined calculation accuracy, or the upper weight limit can be determined to be 32 based on geometric mode parameters.

[0296] In addition, in the embodiment of the present application, when performing CU-level weighting based on pixel-level weighting, several weight-related geometric mode parameters, such as gradation mode information modeParm, CU-level gradation strength information cbSlopeParm, CU-level change direction information cbDirParm, and CU-level change center position information cbCenterPosParm, are determined based on the forward reference block of the current CU, and one comprehensive weight parameter cbwtParm can be determined for the current CU using these geometric mode parameters. Here, the weight wL0 used in CU-level bidirectional weighted prediction is ij , wL1 ij and offset o_L0 ij , o_L1 ij is derived from the parameters.

[0297] Illustratively, in an embodiment of the present application, the gradient mode information modeParm can be used to indicate that the gradient mode is a single-segment linear diagonal gradient mode defined by geometric parameters.

[0298] For example, in an embodiment of the present application, CU-level gradient intensity information cbSlopeParm may be used to indicate the gradient intensity of the gradient mode. For example, cbSlopeParm may indicate that the gradient weight value reaches its maximum or minimum at a position n pixels away from a specified position.

[0299] For example, in an embodiment of the present application, the CU level change direction information cbDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, from right to left, from top to bottom, or from bottom to top, for example, gradually increasing from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0300] For example, if cbDirParm is 1, it means that the weight value of the first pixel gradually decreases as the distance value changes from negative to positive, and if it is 0, it means that the weight value of the first pixel gradually increases as the distance value changes from negative to positive, and the value here is 0.

[0301] For example, in an embodiment of the present application, the CU level change center position information cbCenterPosParm may be determined based on the slope and intercept of the center position in the diagonal gradation mode, for example, as a straight line with a slope α and an intercept β (or expressed as an angle θ and a distance d in polar coordinates).

[0302] For example, in this embodiment, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the gradation start position is determined as a position that is -n pixels away from the line, and the lower limit weight value minWvalue is set to the left or below this start position, i.e., the gradation lower limit information is determined. The gradation end position is determined as a position that is n pixels away from the line, and the upper limit weight value maxWvalue is set to the right or above the end position, i.e., the gradation lower limit information is determined. The weight changes in stages within the range from the start position to the end position.

[0303] In other words, in this embodiment, the gradation range [-n, n] and gradation direction can be determined based on modeParm, cbSlopeParm, and cbDirParm. Furthermore, the gradation range [-n, n] and gradation direction can be used to determine the lower limit weight minWvalue and the upper limit weight maxWvalue. Then, in the case of a linear gradation, the transition center position weight can be determined based on the lower limit minWvalue, the upper limit maxWvalue, and the transition center position information cbCenterPosParm. Here, the weight wCenterPos of the transition center position information cbCenterPosParm must be the average value of the lower limit minWvalue and the upper limit maxWvalue of the weight values, as shown in Equation (15).

[0304] Assume minWvalue is 0 and maxWvalue is 1.

[0305] Furthermore, in the embodiment of the present application, if the gradient mode information indicates that the gradient mode is a linear diagonal gradient mode, when calculating at least one pixel point weight value w[x0][y0] of the distance-based linear gradient, it is necessary to first determine a third distance, which can be determined based on the position information of the sample points in the current block and the change center position information.

[0306] For example, in an embodiment of the present application, for each pixel point in the forward reference block of the current coding unit CU, a distance parameter L1, i.e., a third distance, between the pixel point and the pixel point determined from the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block, and the calculation formula is as shown in Equation (16).

[0307] Here, ρ is the distance between the gradation center position and the origin. Assuming that the origin is at the center point of the entire block area, for a block with width cbWidth and height cbHeight, the relative distances dx and dy to the upper left corner pixel can be as shown in equations (17) and (18).

[0308] In this case, the third distance L1 can be calculated according to equation (19): where offset values ​​offsetX and offsetY represent the horizontal and vertical components of the distance between the gradation center position line and the origin, respectively.

[0309] Furthermore, in the embodiment of the present application, after determining the third distance, the third distance and the change center position weight can be used to finally determine at least one pixel point weight value, and the weight value includes a first prediction weight value (for example, a weight value of a pixel point of a forward reference block or a weight value of a pixel point of a reference block for intra prediction, etc.) w L0[x0][y0] and a second prediction weight value (for example, a weight value of a pixel point of a backward reference block or a weight value of a pixel point of a reference block for intra prediction) w L1 It may include [x0][y0].

[0310] For example, in the embodiment of the present application, the third distance L1 is used to calculate the first predicted weight value w L0 When calculating [x0][y0], we can refer to equations (20) and (21).

[0311] As can be seen, in the embodiment of the present application, in order to maintain the calculation accuracy, the intermediate calculation results of the above calculation process can be appropriately amplified and restored to an appropriate size before the clip operation, that is, the intermediate calculation process can be fixed-point, and the amplification operation can be performed according to the precision requirement, for example, as shown in Equations (22) to (24), where shift0 is a factor related to amplifying the intermediate calculation data to maintain sufficient precision.

[0312] If the values ​​of n, shift0, and shift1 are fixed, most of the data in the above equations except for x0, offsetX, y0, and offsetY are constants, so the calculations can be unified and simplified. For example, if maxWvalue and n are both powers of 2, the calculation process is as shown in equations (25) to (27).

[0313] As can be understood, the operation of amplifying intermediate calculation results to ensure accuracy, referred to in the embodiments of the present application, includes appropriately amplifying the weight values ​​themselves, and the shift1 in the formula corresponds to this amplification operation, which is then restored to the appropriate pixel value interval when calculating the weighted prediction value later.

[0314] Furthermore, in the embodiment of the present application, the first prediction weight value (for example, the weight value of a pixel point of a forward reference block or the weight value of a pixel point of a reference block for intra prediction) w L0 After determining [x0][y0], w L0[x0][y0] is used to calculate a second prediction weight value (for example, a weight value for a pixel point in a backward reference block or a weight value for a pixel point in a reference block for intra prediction) w L1 [x0][y0] can be derived, and the calculation formula is as shown in Equation (28).

[0315] Furthermore, in the embodiment of the present application, in the CIIP weighting based on pixel-level weighting, when deriving at least one weight parameter of the current block, first, a lower limit weight and an upper limit weight can be determined based on the gradation mode information, the gradation intensity information, the change direction information, the change center position information, and a predetermined calculation accuracy, and a change center position weight can be determined based on the upper limit weight and the lower limit weight; then, a fourth distance can be determined based on the position information and the change center position information of the sample point in the current block; and finally, at least one pixel point weight value can be determined based on the fourth distance, the lower limit weight, the upper limit weight, and the change center position weight.

[0316] As can be seen, in the present embodiment, the upper and lower weights can be determined based on the geometric mode parameters in combination with a predetermined calculation accuracy.

[0317] It should be noted that in the present embodiment, the upper and lower weights can be determined by one or more parameters of the geometric mode parameters, or can be predefined, i.e., the predefined upper and lower weights can be directly used without referring to the geometric mode parameters.

[0318] For example, in an embodiment of the present application, the lower limit weight can be predefined as 0 and the upper limit weight as 8, or the upper limit weight can be determined to be 16 based on a predetermined calculation accuracy, or the upper limit weight can be determined to be 32 based on geometric mode parameters.

[0319] In this embodiment, the determination of pixel-level CIIP intra prediction weights Wt is not only related to the modeParm, cbSlopeParm, cbDirParm, and cbCenterPosParm of the current CU, but also to the coding modes of the upper and left neighboring blocks of the current CU. The coding modes of the neighboring blocks can be identified using two flags, isIntraTop and isIntraLeft. Here, if isIntraTop is 1, the upper neighboring block is available and the coding mode is intra mode. If isIntraLeft is 1, the left neighboring block is available and the coding mode is intra mode.

[0320] Several parameters, including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and the coding mode information of neighboring blocks, isIntraTop and isIntraLeft, are used to determine a comprehensive parameter, cbwtParm, which can be used to determine the weight wt[x0][y0] of each pixel point of the current block when the current block adopts intra mode, where x0=0...cbWidth-1, y0=0...cbHeight-1.

[0321] Illustratively, in an embodiment of the present application, the gradation mode information modeParm can be used to indicate that the gradation mode is a single-segment linear diagonal gradation mode defined by geometric parameters.

[0322] For example, in an embodiment of the present application, the gradient strength information cbSlopeParm may be used to indicate the gradient strength of the gradient mode. For example, cbSlopeParm may indicate that the gradient weight value reaches its maximum or minimum at a position that is four pixels away from the specified position.

[0323] For example, in an embodiment of the present application, the change direction information cbDirParm can be used to indicate different possible change directions of the weighted value of the first predicted pixel, such as from left to right, right to left, top to bottom, bottom to top, etc., and indicates that the weighted value gradually increases from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0324] For example, a cbDirParm of 1 indicates that the weight of the first pixel gradually decreases as the distance value changes from negative to positive, and a cbDirParm of 0 indicates that the weight of the first pixel gradually increases as the distance value changes from negative to positive, and the value here is 0.

[0325] For example, in an embodiment of the present application, the change center position information cbCenterPosParm may be determined based on the slope and intercept of the center position in the diagonal gradation mode, for example, as a straight line with a slope α and an intercept β (or expressed as an angle θ and a distance d in polar coordinates).

[0326] For example, in this embodiment, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the gradation start position is determined as a position that is -n pixels away from the line, and the lower limit weight value minWvalue is set to the left or below this start position, i.e., the gradation lower limit information is determined. The gradation end position is determined as a position that is n pixels away from the line, and the upper limit weight value maxWvalue is set to the right or above the end position, i.e., the gradation lower limit information is determined. The weight changes in stages within the range from the start position to the end position.

[0327] That is, in this embodiment, the gradation range [-n, n] and gradation direction can be determined based on modeParm, cbSlopeParm, and cbDirParm. Furthermore, the lower limit weight minWvalue and upper limit weight maxWvalue can be determined using the gradation range [-n, n] and gradation direction. Then, in the case of a linear gradation, the transition center position weight can be determined based on the lower limit minWvalue, the upper limit maxWvalue, and the transition center position information cbCenterPosParm. Here, the weight wCenterPos of the transition center position information cbCenterPosParm must be the average value of the lower limit minWvalue and the upper limit maxWvalue of the weighting coefficients, as shown in Equation (29). Assume that minWvalue is 0 and maxWvalue is 1.

[0328] Furthermore, in the embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, when calculating at least one pixel point weight value w[x0][y0] of the distance-based linear gradation, it is necessary to first determine a fourth distance, which can be determined based on the position information of the sample points in the current block and the transformation center position information.

[0329] For example, in an embodiment of the present application, for each pixel point in the forward reference block of the current coding unit CU, a distance parameter L2, i.e., a fourth distance, between the pixel point and the pixel point determined from the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block, and the calculation formula is as shown in Equation (30).

[0330] Here, ρ is the distance between the gradation center position and the origin. Assuming that the origin is at the center point of the entire block area, for a block with width cbWidth and height cbHeight, the relative distances dx and dy to the upper left corner pixel can be as shown in Equations (31) and (32).

[0331] In this case, the fourth distance L2 can be calculated according to equation (33).

[0332] Here, the offset values ​​offsetX and offsetY respectively represent the horizontal and vertical components of the distance between the gradation center position line and the origin.

[0333] Furthermore, in the embodiment of the present application, after determining the fourth distance, the fourth distance, the upper limit weight, the lower limit weight, and the change center position weight can be used to finally determine at least one pixel point weight value, and the weight value includes a first prediction weight value (for example, a weight value of a pixel point of a forward reference block or a weight value of a pixel point of a reference block for intra prediction, etc.) w L0 [x0][y0] and a second prediction weight value (for example, a weight value of a pixel point of a backward reference block or a weight value of a pixel point of a reference block for intra prediction) w L1 It may include [x0][y0].

[0334] For example, in the embodiment of the present application, the fourth distance L2 is used to calculate the first predicted weight value w L0 When calculating [x0][y0], we can refer to equations (34) and (35).

[0335] Here, the number of gradation pixels on both sides of the gradation center position is n, and the offset values ​​offsetX and offsetY of the current CU block are determined based on the size and gradation mode of the current CU block.

[0336] As can be seen, in the present embodiment, in order to improve the calculation accuracy, the weight values ​​here can be multiplied by an appropriate coefficient or amplified by shifting them left by 3 bits. Alternatively, when defining minWvalue and maxWvalue, the amplification of the weight values ​​can be considered in advance, for example, when they are set 2 times larger than the actual weight values. shift3 is amplified twice.

[0337] In the embodiment of the present application, in the case of bidirectional weighted prediction, the sum of the forward weight and the backward weight of a pixel point is equal to the sum of the upper limit weight and the lower limit weight. That is, after determining the weight sum value sumValue according to the following formula, one weight value (for example, forward weight w L0 [x0][y0]) to calculate another weight value of the pixel point (for example, the backward weight value w L1 [x0][y0]) can be determined as shown in equations (36) and (37).

[0338] Furthermore, in the embodiments of the present application, the at least one weight parameter of the current block may be a pixel-level weight parameter or may be a weight parameter of at least one sub-block of the current block, i.e., the at least one weight parameter may include a weight value of at least one sub-block of the current block.

[0339] As can be understood, in the embodiment of the present application, when deriving a predicted pixel value using a weighting parameter, the weighting parameter of pixel level gradation can be selected to perform calculations for pixels at different positions. In order to reduce the calculation complexity, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) can also be selected and implemented.

[0340] Furthermore, in the present embodiment, the weighting parameters on the plane may vary according to some geometric rule or a combination of different geometric rules with reference to the position of the pixel point. For example, the weighting value of a pixel level varies according to the distance of the pixel point from the central variation position, and when the distance value is between [0, L1], it is a first gradation method, and when the distance is between (L1, L2], it is a second gradation method.

[0341] Furthermore, in the embodiment of the present application, the weight value of the pixel level not only varies according to the distance between the pixel point and the center change position, but also determines different linear or non-linear gradation modes for different positions. For example, when the distance value is between [0, L1], the gradation mode is a linear gradation mode, and when the distance is between (L1, L2], the gradation mode is a non-linear gradation mode.

[0342] As can be seen, the encoding and decoding method proposed in the embodiments of the present application can be applied to both unidirectional prediction and bidirectional prediction, and can be applied when all predictions are obtained from inter prediction, or when some or all predicted pixel values ​​are obtained from intra prediction.

[0343] As can be seen, in the present embodiment, when applied to unidirectional prediction, similar to the WP mode, pixel-level weighting parameters (weight parameters) are derived for only one prediction source, which may include weighting coefficients (weight values) and offset amounts.

[0344] As can be understood, in the embodiment of the present application, when applied to bi-prediction, pixel-level weighting parameters (weight parameters) can be derived for only two prediction sources, similar to the WP mode, which can include weighting coefficients (weight values) and offset amounts. Alternatively, pixel-level weighting coefficients (weight values) can be derived for only two prediction sources, similar to BCW or CIIP.

[0345] Furthermore, in an embodiment of the present application, when determining at least one weight parameter at the pixel level of the current block, the weight of a pixel point can be calculated using the coordinates of the pixel point, or can be generated by selecting a predetermined weight parameter using a preset matrix, or can be derived from the weight parameters of pixel points adjacent to the pixel point at positions above and to the left.

[0346] That is, in an embodiment of the present application, for the position information of one sample point in the current block, it is possible to select to determine the pixel point weight of the position information of the sample point based on the pixel point weight values ​​of the position information of other sample points adjacent to the position of the sample point.

[0347] For example, in the present embodiment, the weight w of a pixel point is c is the weight of the pixel point adjacent to the upper and left sides of the pixel point. t , w l can be derived from Equation (38).

[0348] In step 203, a prediction value for the current block is determined based on at least one reference predictor and at least one weighting parameter.

[0349] In an embodiment of the present application, at least one reference prediction value of a current block is determined based on at least one motion vector information, and at the same time, at least one weight parameter of the current block is determined based on a type indication parameter and / or a geometric mode parameter, and then a prediction value of the current block can be determined based on the at least one reference prediction value and the at least one weight parameter.

[0350] Furthermore, in the embodiment of the present application, after determining at least one weight parameter of the current block, which includes at least one pixel point weight value, or at least one pixel point weight value and at least one pixel point offset value, a prediction process is performed based on the at least one pixel point weight value (at least one pixel point weight value and at least one pixel point offset value), and further in combination with at least one reference prediction value of the current block, to obtain a prediction value of the current block.

[0351] As can be understood, in the embodiment of the present application, in the process of calculating the predicted value of the slice-level weighted prediction, the predicted value of the current block can be determined based on at least one reference predicted value, at least one pixel point weight value, and at least one pixel point offset value.

[0352] For example, in the embodiment of the present application, after obtaining the syntax element of the weighted prediction at the slice level and the reference pixel value (reference predicted value) of each CU of the current slice, in the case of unidirectional prediction, for example, forward prediction, weighted prediction processing is performed based on the following equation to obtain the predicted value Pred of the current block: WP can be determined as shown in equation (39).

[0353] For example, in the embodiment of the present application, after obtaining the syntax element of the weighted prediction at the slice level and the reference pixel value (reference predicted value) of each CU of the current slice, in the case of unidirectional prediction, for example, backward prediction, weighted prediction processing is performed based on the following equation to obtain the predicted value Pred of the current block: WP can be determined as shown in equation (40).

[0354] For example, in the embodiment of the present application, after obtaining the syntax element of the weighted prediction at the slice level and the reference pixel value (reference predicted value) of each CU of the current slice, in the case of bidirectional prediction, the weighted prediction process is performed based on the following equation, and the predicted value Pred of the current block is calculated. WP can be determined as shown in equation (41).

[0355] In the present embodiment, equation (42) holds true for the luminance block.

[0356] In the present embodiment, equation (43) holds true for the chromaticity block.

[0357] where PredSamplesL0 and PredSamplesL1 are the reference pixel values ​​in the reference lists List0 and List1, respectively, and w L0 [x0][y0] and w L1[x0][y0] are the pixel-level weighting values ​​of the forward reference block and the backward reference block, respectively, i.e., the pixel-level weighting values ​​of the current block, and o_L0[x0][y0] and o_L1[x0][y0] represent the corresponding offset amounts, i.e., the pixel-level offset values ​​of the current block.

[0358] As can be seen, in this embodiment, to improve prediction accuracy, the intermediate calculation results have higher precision than the reference pixel values, and log2_weight_denom and chroma_log2_weight_denom represent the precision increase of the weighting coefficients. Shift1 represents the precision increase of the reference pixel values ​​in the calculation process of sub-pixel interpolation (integer pixel values ​​are also amplified). The Clip() operation clamps the pixel value within a valid range, for example, an 8-bit valid value is [0, 255], and a 10-bit valid value is [0, 1023].

[0359] As can be understood, in the embodiment of the present application, in the case of BCW weighting based on pixel-level weighting, in the process of calculating the predicted value, the predicted value of the current block can be determined based on at least one reference predicted value and at least one pixel point weight value.

[0360] In the embodiment of the present application, in the case of bidirectional prediction, both the forward reference list List0 and the backward reference list List1 are used, and motion compensation prediction is performed using the forward motion vector information MV0 in the forward reference list List0 to obtain a forward predicted value (forward reference value) PredSamplesL0, and motion compensation prediction is performed using the backward motion vector information MV1 in the backward reference list List1 to obtain a backward predicted value (backward reference value) PredSamplesL1.

[0361] As can be seen, in the present embodiment, BCW is enabled only for bi-predicted CUs and uses only a small number of predetermined weights to code their indices.

[0362] For example, in the embodiment of the present application, when pixel-level weighted BCW is adopted, the predicted value of the current block, ie, the weighted predicted value, is as shown in Equation (44).

[0363] where PredSamplesL0 and PredSamplesL1 are the reference pixel values ​​in the reference lists List0 and List1, respectively, and w L1 [x0][y0] is the weight of the backward reference pixel value at the block relative position (x0, y0), and w L0 [x0][y0] is the weight of the forward reference pixel value at the block relative position (x0, y0), where x0=0...cbWidth-1, y0=0...cbHeight-1. maxTempBitDepth is the maximum bit depth allowed in the calculation intermediate process.

[0364] As can be understood, in the embodiment of the present application, in the case of CIIP weighting based on pixel-level weighting, in the process of calculating the predicted value, the predicted value of the current block can be determined based on at least one reference predicted value and at least one pixel point weight value.

[0365] In the embodiment of the present application, when calculating the CIIP weighted prediction value based on pixel-level weights, P intra is the intra prediction value obtained by performing normal intra prediction processing in planar mode on the current block, and P inter is the inter prediction value, and wt[x0][y0] is the weight of intra prediction.

[0366] For example, in the embodiment of the present application, when the pixel-level weighted CIIP is adopted, the predicted value of the current block, i.e., the weighted predicted value PredSamples CIIP is as shown in equation (45).

[0367] where w L0 [x0][y0] is the weight of the forward reference pixel value, and w L1[x0][y0] is the weight of the backward reference pixel value, shift3 is a parameter used to amplify the weight value in the previous step to improve the calculation accuracy, and right shift is used to return the predicted pixel value to the appropriate value range. Without amplification, it can be simply written as Equation (46).

[0368] As can be seen from this, in the embodiments of the present application, the encoding and decoding method proposed by the present application is applied to weighting based on the slice level, weighting based on two inter predictors at the CU level (BCW), and weighting based on one inter predictor and one intra predictor at the CU level (CIIP), respectively, to determine pixel-level weighting parameters, thereby improving the coding efficiency and performance of weighted prediction.

[0369] That is, in the embodiment of the present application, the pixel-level weighting values ​​used in the weighted prediction process are no longer fixed as a fixed value for the entire forward reference block or the entire backward reference block, but the weighting parameters of the current slice or CU can be adaptively adjusted according to factors such as changes in illumination in the sequence content. That is, since the weighting values ​​at the pixel level are not fixed as a fixed value for each reference block level but are used to perform inter weighted prediction, the accuracy of inter weighted prediction can be further improved and the coding efficiency of weighted prediction can be improved.

[0370] In the embodiments of the present application, weighting at the slice level, weighting of two inter predictors at the CU level, and weighting of one inter predictor and one intra predictor at the CU level have been described as examples, but the encoding / decoding methods proposed in the embodiments of the present application are not designed differently for the slice level or the CU level, nor are they designed differently depending on whether each predictor involved in the weighting is derived from inter prediction or intra prediction.

[0371] An embodiment of the present application proposes an encoding method, in which an encoder determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference prediction value for the current block based on the at least one motion vector information, determines at least one weighting parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be seen, in this embodiment, encoding and decoding can determine pixel-level weighting parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weighting parameters. In this way, in this embodiment, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weighting values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

[0372] Based on the above embodiment, the encoding / decoding method proposed in the embodiment of the present application can determine pixel-level weighting parameters for a reference block during weighted prediction, and this solution can be applied to various inter-weighted prediction technology scenarios. Here, the pixel-level weighting parameters are derived from a small number of control parameters. The control parameters include type indexes (type indication parameters) and / or geometric parameters (type indication parameters). The geometric parameters can be given directly in their geometric meaning or in the form of an index of candidates in a selectable set.

[0373] The type index parameter is used to select the type of pixel-level weighting parameters, which may include, but are not limited to, weighting parameters defined by pre-stored matrices and weighting parameters defined by geometric parameters.

[0374] In the weighting mode defined by pre-stored matrices, the number and dimensions of the pre-defined matrices are finite. For weighting matrices with pre-defined dimensions, they can be applied to various domains with different dimensions and different accuracy requirements through methods such as interpolation.

[0375] A weighting parameter defined by geometric parameters refers to a weighting parameter calculated from geometric parameters. A weighting parameter on a plane changes according to some geometric rule depending on the pixel position. Such a weighting parameter wtParm that changes according to some geometric rule can be expressed by at least one of the following parameters: gradation mode information modeParm, gradation strength information slopeParm, change direction information dirParm, change start position information startPosParm, change center position information centerPosParm, change end position information endPosParm, gradation upper / lower limit information minParm / maxParm, and change segment information segParm.

[0376] Here, the gradation mode information modeParm indicates the gradation mode and may indicate the type of gradation mode, including, but not limited to, horizontal gradation weighted, vertical gradation weighted, diagonal gradation weighted, radial gradation weighted, affine gradation weighted, etc.

[0377] When the weighting parameters are obtained using a pre-stored matrix or calculated using a gradient weighting mode defined by geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 1. When the weighting parameters are calculated only using some gradient weighting mode defined by geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 2. When the weighting parameters are calculated using some non-linear weighting mode defined by geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 3. When the weighting parameters are calculated using some non-linear weighting mode defined by geometric parameters, the weighting mode indicated by the indexing scheme is as shown in Table 4.

[0378] The gradient strength slopeParm can indicate how quickly the gradient weight parameter changes depending on the distance between the pixel and the specified position (point or line position). For example, when indicating linear gradient strength using an index, 0 indicates no gradient (direct jump), and m indicates the distance from the specified position (2 m-1 ) / M pixels, the gradient weight parameter reaches its maximum or minimum, indicating a linear gradient when the distance is closer, or maintaining the maximum or minimum when the distance is farther, where M can be 2, 1, 1 / 2, etc. For example, when indicating linear gradient strength in an indexed manner, 0 indicates that w is a constant and there is no gradient or jump, and m indicates that the distance is t×width / (2 m-1 ), where width is the width (slice width or coding block width) corresponding to the unit in which the gradient weight parameter is calculated, and t is a constant.

[0379] The change direction information dirParm can indicate the direction of the gradation strength change of the weight parameter of the first predicted pixel, for example, 0 represents from minimum to maximum, and 1 represents from maximum to minimum.

[0380] The transition start position information, startPosParm, may include different numbers of parameters depending on the gradient type. For example, in a horizontal gradient mode, it includes one horizontal axis coordinate position. In one example, in a diagonal gradient mode, it includes a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and another representing the intercept. In one example, in a diagonal gradient mode, it includes a set of parameters representing a line in a polar coordinate system, one representing the angle and another representing the distance. In one example, in a radial gradient mode, it includes a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is a circle and the start position is a single point, the transition start position information includes horizontal and vertical coordinates in a Cartesian coordinate system, or an angle and distance in a polar coordinate system. For example, in an affine gradient mode, it includes a set of parameters representing the positions of multiple control points or multiple control lines. Note that a diagonal gradient can include both horizontal and vertical gradient modes.

[0381] The centerPosParm parameter is the median value of the weight parameter in the gradient region (when the gradient range is 0 to 1, the median value is 0.5). The weight parameter gradually increases or decreases from this position toward both sides. Different gradient types may include different numbers of parameters. For example, a horizontal gradient mode may include one horizontal axis coordinate position. In one example, a diagonal gradient mode may include a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and the other representing the intercept. In one example, a diagonal gradient mode may include a set of parameters representing a line in a polar coordinate system, one representing the angle and the other representing the distance. In one example, a radial gradient mode may include a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the center position forms a circle, the center position information may include the horizontal coordinate, vertical coordinate, and radius in a Cartesian coordinate system. Alternatively, the center position information and radius in a polar coordinate system may include only the radius information if the center point coincides with the origin. For example, an affine gradient mode includes a set of parameters that represent the positions of multiple control points or multiple control lines.

[0382] The end position information, endPosParm, may contain different numbers of parameters depending on the gradient type. For example, in horizontal gradient mode, it contains one horizontal axis coordinate position. In diagonal gradient mode, it contains a set of parameters representing a line in a Cartesian coordinate system, one representing the slope and one representing the intercept. In diagonal gradient mode, it contains a set of parameters representing a line in a polar coordinate system, one representing the angle and one representing the distance. In radial gradient mode, it contains a set of parameters representing a radial shape and its corresponding position. For example, if the radial shape is circular and the end positions form a circle, the end position information may include the horizontal coordinate, vertical coordinate, and radius in a Cartesian coordinate system, or the center point position information and radius in a polar coordinate system, or only the radius information if the center point coincides with the origin. In affine gradient mode, it contains a set of parameters representing the positions of multiple control points or multiple control lines.

[0383] The gradation upper / lower limit information minParm / maxParm specifically refers to the upper / lower limit information of the weight parameter. For example, weight values ​​0 and 1 correspond to values ​​under the corresponding precision requirements (for example, if the precision is 3 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 8; for example, if the precision is 5 bits below the binary point, the lower limit 0 after fixed-point conversion corresponds to 0 and the upper limit 1 corresponds to 32). The lower limit of the weight parameter generally corresponds to 0, meaning that the reference pixel at the corresponding position is not used during weighting, and the upper limit weight parameter generally corresponds to 1, meaning that all reference pixels at the corresponding position are used during weighting. The gradation upper / lower limit information minParm / maxParm does not have to correspond to weight values ​​corresponding to 0 and 1, for example, they can be values ​​corresponding to 0.2 and 0.4 under the corresponding precision requirements.

[0384] The change segment information segParm can indicate information related to a continuous gradation consisting of multiple segments and can include information encompassing the multiple parameters described above. For example, the change segment information segParm can include information such as the gradation intensity, change direction, change start position, and change end position of each segment. Alternatively, the change segment information segParm can include information such as the gradation change direction, change start position, change end position, gradation upper limit, and gradation lower limit of each segment.

[0385] Each of the above pieces of information can be converted into an index format through quantization. The start position, center position, and end position of the change can be specified as different possibilities, and all possible lines can be predefined as an ordered set, and these positions can be specified with just one index.

[0386] The weighting parameters can be derived at different levels, for example, at the slice level or at the coding unit / coding block level. The weighting parameters have a certain precision and upper and lower bounds. Sub-pixel precision weighting parameters are obtained by performing interpolation filtering on the already derived integer pixel weighting parameters.

[0387] This solution can be applied to both unidirectional and bidirectional prediction, and can be applied when all predictions are obtained from inter prediction, or when some or all predicted pixel values ​​are obtained from intra prediction.

[0388] When used for unidirectional prediction, pixel-level weighting parameters are derived for only one prediction source, similar to the WP mode, and include weighting coefficients and offset amounts.

[0389] When applied to bi-prediction, pixel-level weighting parameters and offsets can be derived for two prediction sources, similar to WP mode, or pixel-level weighting factors can be derived for only two prediction sources, similar to BCW or CIIP.

[0390] In the encoding and decoding proposed in the embodiment of the present application, taking bidirectional prediction at the coding unit / coding block level as an example, the weighted prediction process proposed in the embodiment of the present application first obtains the forward and backward motion vector information MV0, MV1 of the current block, and then performs motion compensation using MV0, MV1 to obtain the forward and backward predicted values ​​PredSampleL0, PredSampleL1 of the current block, and then uses the set parameters of the current block to calculate the pixel-level weights wL0 of the forward and backward predicted blocks. ij , wL1 ij , or wL0 ij , wL1 ij , and the offset amount oL0 ij , oL1 ij Here, first, one or more parameters among a gradation strength parameter slopeParm, a change direction parameter dirParm, a change segment parameter segParm, a change start position parameter startPosParm, a change center position parameter centerPosParm, and a change end position parameter endPosParm are determined, and then, based on the obtained one or more parameters, weights wL0 of the pixel levels of forward prediction and backward prediction are determined. ij , wL1 ij , or wL0 ij , wL1 ij , and offset oL0 ij , oL1 ij Finally, weighted prediction processing is performed, that is, luma weighted prediction and chroma weighted prediction can be performed sequentially.

[0391] Below, we will explain the specific details of this technical proposal using technologies similar to three weighting technologies, namely slice-level weighted prediction, CU-level bidirectional weighted prediction (BCW), and joint inter-intra prediction (CIIP), as examples.

[0392] Regarding the slice-level weighting based on pixel-level weighting, in this technical proposal, the slice-level weighting based on pixel-level weighting determines six weight-related parameters for the current slice, namely modeParm, sliceDirParm, sliceStartPosParm, sliceEndPosParm, minWvalue, and maxWvalue. These six parameters can be used to determine one comprehensive weight parameter SlicewtParm for the current slice, and the weight wLX used in the slice-level weighted prediction is ij and offset o_LX ij is derived from the parameters, and X is a reference list index, where if X is 0 it represents the forward reference list L0, otherwise it represents the backward reference list L1.

[0393] For example, the obtained parameter instruction information is as follows:

[0394] The modeParm specifies that the mode is a single segment linear diagonal gradient mode defined by geometric parameters.

[0395] sliceDirParm indicates the direction of change of the weight value of the first predicted pixel, with different possibilities such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (calculated distance is negative) to the bottom right (calculated distance is positive).

[0396] sliceStartPosParm indicates that the gradation start position is a straight line with a slope of α1 and an intercept of β1 (or expressed in polar coordinates as an angle of θ1 and a distance of d1). In other words, this straight line is the gradation start position, and the upper left and upper left points of this position are the upper and lower limit weight values. When combined with the direction specified by sliceDirParm, it is possible to determine that the weight coefficient for the position specified by this parameter is the lower limit weight value minWvalue.

[0397] sliceEndPosParm indicates that the gradation end position is a straight line with a slope of α2 and an intercept of β2 (or expressed in polar coordinates as an angle of θ2 and a distance of d2). In other words, the gradation ends at this line, and the lower and right corners of this position are the lower and upper weight limits. When combined with the direction specified by sliceDirParm, the weight coefficient for the position specified by this parameter is the upper weight value maxWvalue.

[0398] In this case, the weight value w[x0][y0] of the linear gradation according to distance can be calculated by the following steps.

[0399] For each CU in the slice, the distance d between the position information of the sample point in the current block and the gradient start position sliceStartPosParm and gradient end position sliceEndPosParm L0s [x0][y0] and d L0e [x0][y0] can be calculated, and the weight parameter w of the pixel point is calculated based on the distance. L0 [x0][y0] can be determined as shown in the following equations:

[0400]

number

[0401]

number

[0402] For unidirectional prediction,

number

number

number

[0403]

number

[0404]

number

[0405] Regarding pixel-level weight-based BCW weighting, for example, the pixel-level weight-based BCW weighting determines four weight-related parameters for the current CU, namely, modeParm, cbSlopeParm, cbDirParm, and cbCenterPosParm. These four parameters can be used to determine one comprehensive weight parameter, cbwtParm, for the current slice. The weight, wL0, used in the CU-level bidirectional weighted prediction is ij , wL1 ij , and offset o_L0 ij , o_L1 ij is derived from the parameters.

[0406] The modeParm indicates that the mode is a single segment linear diagonal gradient mode.

[0407] cbSlopeParm indicates that the gradient strength of the gradient mode is such that the gradient weight value reaches its maximum or minimum at a distance of n pixels from the specified position.

[0408] cbDirParm indicates that the weight of the first predicted pixel gradually increases from the left or bottom (calculated distance is negative) to the right or top (calculated distance is positive). For example, when cbDirParm is 1, the weight of the first pixel gradually decreases as the distance value changes from negative to positive, and when cbDirParm is 0, the weight gradually increases as the distance value changes from negative to positive, and the value here is 0.

[0409] cbCenterPosParm is determined based on the slope and intercept of the center position in diagonal gradient mode. For example, the gradient center position is a line with slope α and intercept β (or expressed in polar coordinates as angle θ and distance d). Combined with the information provided by cbDirParm and cbSlopeParm, the gradient start position is determined to be -n pixels away from the line, with the lower weight limit being to the left or below this start position, and the gradient end position is determined to be n pixels away from the line, with the upper weight limit being to the right or above the end position. The weights change in stages within the range from the start position to the end position.

[0410] The gradient range [-n, n] and gradient direction can be determined based on two parameters, cbSlopeParm and cbDirParm.

[0411] According to the lower limit minWvalue and the upper limit maxWvalue, in the case of a linear gradient, the weight value wCenterPos of the gradient center position cbCenterPosParm should be the average value of the lower limit minWvalue and the upper limit maxWvalue of the weight value, i.e.

number

[0412] For each pixel point in the forward reference block of the current coding unit CU, a distance parameter L between the pixel point and a pixel point determined from the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block.

[0413]

number

[0414] Assuming that the origin is at the center point of the entire block area, for a block with a width of cbWidth and a height of cbHeight, the relative distances dx and dy to the upper left corner pixel are as shown in the following equations.

[0415]

number

number

[0416]

number

[0417] Based on the parameter, the weight value w of the pixel point of the forward reference block is L0 [x0][y0] is determined, and the weight value is obtained by the following formula:

[0418]

number

number

[0419] If the values ​​of n, shift0, and shift1 are fixed, most of the data in the above formulas except for x0, offsetX, y0, and offsetY are constants, so the calculations can be consolidated and simplified. For example, if maxWvalue and n are both powers of 2, the calculation process can be changed as follows:

[0420]

number

[0421] The weight value of the pixel point of the backward reference block is obtained from the weight value of the forward reference block as follows:

number

[0422] BCW is enabled only for bidirectionally predicted CUs, and uses only a small number of predetermined weights, the index of which is coded.

[0423] When pixel-level weighted BCW is adopted, the weighted prediction value is:

[0424]

number

[0425] The pixel-level determination of the CIIP intra prediction weight wt is related not only to the modeParm, cbSlopeParm, cbDirParm, and cbCenterPosParm of the current CU, but also to the coding modes of the upper and left neighboring blocks of the current CU. The coding modes of the neighboring blocks can be identified using two flags, isIntraTop and isIntraLeft. If isIntraTop is 1, the upper neighboring block is available and the coding mode is intra mode. If isIntraLeft is 1, the left neighboring block is available and the coding mode is intra mode. Several parameters, including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and the coding mode information of neighboring blocks, isIntraTop and isIntraLeft, are used to determine a comprehensive parameter, cbwtParm, which can be used to determine the weight wt[x0][y0] of each pixel point of the current block when using intra mode, where x0=0...cbWidth-1, y0=0...cbHeight-1.

[0426] For example, the obtained parameter instruction information is as follows:

[0427] The modeParm indicates that the mode is a single segment linear diagonal gradient mode.

[0428] cbSlopeParm indicates that the gradient strength of the gradient mode is such that the gradient weight value reaches its maximum or minimum at a distance of 4 pixels from the specified position.

[0429] cbDirParm indicates that the weight of the first predicted pixel gradually increases from the upper left (calculated distance is negative) to the lower right (calculated distance is positive).

[0430] cbCenterPosParm is determined based on the slope and intercept of the center position in diagonal gradient mode. For example, the gradient center position is a straight line with slope α and intercept β (or expressed in polar coordinates as angle θ and distance d). Combined with the information given by cbDirParm and cbSlopeParm, the position that is -n pixels away from the line is the gradient start position, the position to the left or below this start position is the lower limit weight value, the position that is n pixels away from the line is the gradient end position, the position to the right or above the end position is the upper limit weight value, and the weights change in stages within the range from the start position to the end position.

[0431] In this case, the weight value wt[x0][y0] of the linear gradation according to distance can be calculated by the following steps.

[0432] The gradient range [-n, n] and gradient direction are determined based on two parameters, cbSlopeParm and cbDirParm, respectively.

[0433] Based on the derived gradient range range[-n,n], the lower limit minWvalue and upper limit maxWvalue of the weight are adaptively derived.

[0434] The weight value wCenterPos of the gradation center position cbCenterPosParm is guaranteed to be the average value of the lower limit minWvalue and the upper limit maxWvalue of the weight value, i.e.,

number

[0435] For each pixel point in the forward reference block of the current coding unit CU, a distance parameter L between the pixel point and a pixel point determined from the gradation center position cbCenterPosParm of the forward reference block is calculated based on the position information of the sample point in the current block.

[0436]

number

[0437]

number

number

[0438]

number

[0439]

number

number

[0440]

number

[0441]

number

[0442] In the embodiments of the present application, the pixel-level weight values ​​used in weighted prediction are no longer fixed as fixed values ​​for the entire forward reference block or the entire backward reference block, but the weight parameters of the current slice or CU are adjusted according to factors such as lighting changes in the sequence content, thereby further improving the coding efficiency of weighted prediction.

[0443] In the embodiment of the present application, instead of using fixed weighting values ​​at each reference block level, inter-weighted prediction is performed using pixel-level weighting values, which further improves the accuracy of inter-weighted prediction and is beneficial for improving coding efficiency.

[0444] In the embodiment of the present application, when deriving a predicted pixel value using a weighting parameter, pixels at different positions are calculated using a weighting parameter of pixel level gradation. In order to reduce the calculation complexity, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) can also be implemented.

[0445] In the present embodiment, the weighting parameters on the plane may vary according to a certain geometric rule or a combination of different geometric rules depending on the pixel position. For example, the weighting value varies according to the distance of the pixel point from the center variation position, and when the distance value is between [0, L1], it is a first gradation method, and when the distance is between (L1, L2), it is a second gradation method.

[0446] In the present embodiment, different linear or non-linear gradation modes can be determined for different positions, for example, when the distance value is between [0, L1], the gradation mode is a linear gradation mode, and when the distance is between (L1, L2], the gradation mode is a non-linear gradation mode.

[0447] In the embodiment of the present application, when the parameters such as gradation intensity information, change direction information, etc. of each CU are basically consistent, one or more weight matrices can be first pre-defined, and the pixel-level weights of the coding unit block are obtained by upsampling, downsampling, or cropping with respect to the predetermined weight matrix.

[0448] In the present embodiment, the weight of the current pixel point can be generated not only by coordinate-based calculation (main technique) or by using a predetermined weight parameter (item 1 in Table 2.1, or extension technique 3), but also by using the weight parameter derived from the weight parameters of the pixel points adjacent to the upper and left sides of the pixel point, for example, wc=(wl+wt+1) / 2.

[0449] In an embodiment of the present application, the optimal gradation mode of the current coding unit / block can be determined using a template matching method. Specifically, the pixels in the upper row and / or left column of the current coding unit / block are taken as templates, and in the process of constructing the templates to predict pixel values, a gradation weighting process is performed on the predictions from different sources, and the geometric parameters of the optimal gradation weighting scheme are selected and used as the parameters of the gradation weighting scheme of the current coding unit / block.

[0450] In the embodiment of the present application, for a coding unit / coding block of a small size, some gradation modes with a large gradation width range can be skipped, and for a coding unit / coding block of a large size, some gradation modes with a small gradation width range can be skipped.

[0451] In the present embodiment, for high resolution sequences or large size blocks, the number of segments in the gradation mode can be adaptively increased to make the prediction more accurate.

[0452] An embodiment of the present application provides an encoding / decoding method, in which a codec determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference predicted value for the current block based on the at least one motion vector information, determines at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a predicted value for the current block based on the at least one reference predicted value and the at least one weight parameter. As can be understood, in this embodiment, the encoding / decoding can determine pixel-level weight parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weight parameters. In this way, in this embodiment, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weight values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

[0453] Based on the above embodiment, in another embodiment of the present application, based on the same inventive concept as the above embodiment, refer to FIG. 21, an exemplary structure diagram 1 of the encoder configuration is shown, and as shown in FIG. 21, the encoder 30 can include a first determination unit 31.

[0454] The first determination unit 31 is configured to determine at least one motion vector information, and a type indication parameter and / or a geometric mode parameter of a current block, determine at least one reference prediction value of the current block based on the at least one motion vector information, determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0455] In this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it should be understood that a "unit" may be modular or non-modular. Furthermore, each component in this embodiment may be integrated into a single processing unit, or each unit may be a separate, independent physical unit, or two or more units may be integrated into a single unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.

[0456] When the integrated unit is realized in the form of a software functional module rather than being sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, an essential part of the technical solution of the present embodiment, i.e., a part contributing to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media capable of storing program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0457] Therefore, an embodiment of the present application provides a computer-readable storage medium applied to the encoder 30, the computer-readable storage medium storing a computer program, the computer program causing a first processor to perform the method in any of the above embodiments.

[0458] Based on the above-described configuration of the encoder 30 and the computer-readable storage medium, FIG. 22 illustrates an exemplary structure diagram 2 of the encoder configuration. As shown in FIG. 22, the encoder 30 may include a first memory 32, a first processor 33, a first communication interface 34, and a first bus system 35, where the first memory 32, the first processor 33, and the first communication interface 34 are coupled to each other by the first bus system 35. As can be understood, the first bus system 35 is configured to realize communication between these components. In addition to the data bus, the first bus system 35 further includes a power bus, a control bus, and a status signal bus. However, for clarity, various buses are referred to as the first bus system 35.

[0459] The first communication interface 34 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.

[0460] The first memory 32 is configured to store a computer program executable by the first processor.

[0461] The first processor 33 is configured to execute the computer program to perform the following processes, including determining at least one motion vector information, and a type indication parameter and / or a geometric mode parameter of a current block; determining at least one reference prediction value of the current block based on the at least one motion vector information, determining at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter; and determining a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0462] It should be understood that first memory 32 in the present embodiment may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Here, nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM), and the first memory 32 in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0463] The first processor 33 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be performed by a hardware-type integrated logic circuit or software-type instructions in the first processor 33. The first processor 33 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be performed directly by a hardware decoding processor or by a combination of hardware and software modules in the decoding processor. The software modules may be located in conventional storage media such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is arranged in a first memory 32, and a first processor 33 reads the information in the first memory 32 and performs the steps of the above method in combination with its hardware.

[0464] As can be appreciated, the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit can be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processing (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof. For a software implementation, the techniques described herein can be implemented by modules (processes, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented within or external to the processor.

[0465] Illustratively, as another embodiment, the first processor 33 is further configured to execute the computer program to thereby perform the method described in any one of the above embodiments.

[0466] FIG. 23 is an exemplary structural diagram 1 of a decoder configuration. As shown in FIG. 23, a decoder 40 includes a decoding unit 41 and a second determining unit 42.

[0467] said decoding unit 41 being configured to decode a bitstream; The second determination unit 42 is configured to determine at least one motion vector information, and a type indication parameter and / or a geometric mode parameter of a current block, determine at least one reference prediction value of the current block based on the at least one motion vector information, determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

[0468] In this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it should be understood that a "unit" may be modular or non-modular. Furthermore, each component in this embodiment may be integrated into a single processing unit, or each unit may be a separate, independent physical unit, or two or more units may be integrated into a single unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.

[0469] When the integrated unit is realized in the form of a software functional module rather than being sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, an essential part of the technical solution of the present embodiment, i.e., a part contributing to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media capable of storing program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0470] Therefore, an embodiment of the present application provides a computer-readable storage medium applied to a decoder 40, the computer-readable storage medium storing a computer program, the computer program causing a first processor to perform the method in any of the above embodiments.

[0471] Based on the above-described configuration of the decoder 40 and the computer-readable storage medium, FIG. 24 illustrates an exemplary structure diagram 2 of the decoder configuration. As shown in FIG. 24, the decoder 40 may include a second memory 43, a second processor 44, a second communication interface 45, and a second bus system 46. The second memory 43, the second processor 44, and the second communication interface 45 are coupled to each other by the second bus system 46. As can be understood, the second bus system 46 is configured to realize communication connections between these components. In addition to the data bus, the second bus system 46 further includes a power bus, a control bus, and a status signal bus. However, for clarity, various buses are referred to as the second bus system 46.

[0472] The second communication interface 45 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.

[0473] The second memory 43 is configured to store a computer program executable by the second processor.

[0474] The second processor 44 is configured to execute the computer program to perform the following processes, including: decoding a bitstream and determining at least one motion vector information, and a type indication parameter and / or a geometric mode parameter of a current block; determining at least one reference prediction value of the current block based on the at least one motion vector information, determining at least one weight parameter of the current block based on the type indication parameter and / or the geometric mode parameter; and determining a prediction value of the current block based on the at least one reference prediction value and the at least one weight parameter.

[0475] It should be understood that second memory 43 in the present embodiment may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Here, nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM), and the second memory 43 in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0476] The second processor 44 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be performed by a hardware-type integrated logic circuit or software-type instructions in the second processor 44. The second processor 44 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and may implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be performed directly by a hardware decoding processor or by a combination of hardware and software modules in the decoding processor. The software modules may be located in conventional storage media such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in a second memory 43, and a second processor 44 reads the information in the second memory 43 and performs the steps of the above method in combination with its hardware.

[0477] As can be appreciated, the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit can be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processing (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof. For a software implementation, the techniques described herein can be implemented by modules (processes, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented within or external to the processor.

[0478] An embodiment of the present application provides a codec, which, on the decoding side, determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference predicted value for the current block based on the at least one motion vector information, determines at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a predicted value for the current block based on the at least one reference predicted value and the at least one weight parameter. As can be understood, in this embodiment, encoding and decoding can determine pixel-level weight parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weight parameters. In this way, in this embodiment, the weights used in prediction processing are no longer fixed and invariant, but pixel-level weight values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

[0479] In yet another embodiment of the present application, the embodiment of the present application further provides a bitstream generated by bit encoding based on information to be encoded, wherein the information to be encoded may include at least one of an inter-prediction mode parameter of a current block, at least one motion vector information of the current block, a type indication parameter and / or a geometric mode parameter.

[0480] It should be noted that in the examples of this application, the terms "comprise," "include," or any other variations thereof are intended to be non-exclusive inclusive, meaning that a process, method, article, or apparatus that includes a set of elements does not merely include those elements, but also includes other elements not expressly listed, as well as inherent elements of the process, method, article, or apparatus. Unless otherwise limited, an element qualified by the expression "comprises" does not exclude the presence of other similar elements in the process, method, article, or apparatus that includes that element.

[0481] The numbers of the above-mentioned embodiments of the present application do not indicate the superiority or inferiority of the embodiments, but are used for the convenience of explanation.

[0482] The methods disclosed in the several method embodiments provided herein can be combined in any manner without conflict to obtain new method embodiments.

[0483] The features disclosed in the several product embodiments provided herein may be combined in any non-conflicting manner to obtain new product embodiments.

[0484] Features disclosed in any method or apparatus embodiment provided herein may be combined in any non-conflicting manner to obtain new method or apparatus embodiments.

[0485] The above content is merely a specific embodiment of the present application, and the protection scope of the present application is not limited thereto. Any modifications or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. [Industrial Applicability]

[0486] The present embodiment provides an encoding / decoding method, a codec, a bitstream, and a storage medium, in which the codec determines at least one motion vector information and a type indication parameter and / or a geometric mode parameter for a current block, determines at least one reference prediction value for the current block based on the at least one motion vector information, determines at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value for the current block based on the at least one reference prediction value and the at least one weight parameter. As can be seen, in the present embodiment, the encoding / decoding can determine pixel-level weight parameters for the current block using the type indication parameter and / or the geometric mode parameter, thereby performing prediction processing on the current block based on the pixel-level weight parameters. In this way, in the present embodiment, the weights used in the prediction processing are no longer fixed and invariant, but pixel-level weight values ​​that adapt to changes in pixel points are selected, significantly improving the accuracy of weighted prediction and improving coding efficiency and compression performance.

Claims

1. A decoding method applied to a decoder, comprising: decoding the bitstream to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block; determining at least one reference predictor for the current block based on the at least one motion vector information, and determining at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter; determining a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter.

2. The geometric mode parameters include one or more parameters of gradation mode information, gradation intensity information, change direction information, change start position information, change center position information, change end position information, change range width information, and change segment information. The decoding method of claim 1 .

3. The geometric mode parameter is used to indicate a geometric change set, and the geometric change set includes change start position information, change center position information, and change end position information. The decoding method of claim 1 .

4. The decoding method comprises: if the type indication parameter indicates that the geometric mode parameter is not to be used, determining a pre-stored matrix and determining the at least one weight parameter based on the pre-stored matrix; If the type indication parameter indicates that the geometric mode parameter is to be used, determining the at least one weight parameter based on the geometric mode parameter.

4. The decoding method according to claim 2 or 3.

5. the at least one motion vector information includes a forward motion vector and / or a backward motion vector; The decoding method of claim 1 .

6. the at least one reference prediction value includes a forward reference value and / or a backward reference value; The decoding method of claim 1 .

7. the at least one weight parameter includes at least one pixel point weight value; The decoding method according to claim 2.

8. The decoding method comprises: determining the at least one pixel point weight value based on position information of sample points within the current block and the geometric mode parameter; The decoding method according to claim 7.

9. The decoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy; determining a first distance based on the position information of the sample points in the current block and the change start position information, and determining a second distance based on the position information of the sample points in the current block and the change end position information; determining the at least one pixel point weight value based on the first distance, the second distance, the lower weight limit, and the upper weight limit. The decoding method according to claim 8.

10. The decoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the gradation strength information, the change direction information, the change center position information, and a predetermined calculation accuracy, and determining a change center position weight based on the upper limit weight and the lower limit weight; determining a third distance based on position information of the sample points in the current block and the variation center position information; determining the at least one pixel point weight value based on the third distance and the variation center position weight. The decoding method according to claim 8.

11. The decoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the gradation strength information, the change direction information, the change center position information, and a predetermined calculation accuracy, and determining a change center position weight based on the upper limit weight and the lower limit weight; determining a fourth distance based on position information of the sample points in the current block and the variation center position information; determining the at least one pixel point weight value based on the fourth distance, the lower limit weight, the upper limit weight, and the variation center position weight. The decoding method according to claim 8.

12. The decoding method comprises: The upper limit weight and the lower limit weight are set in advance. Decoding method according to any one of claims 9 to 11.

13. The pixel point weight values ​​include a first prediction weight and a second prediction weight, and the decoding method includes: determining a weighted sum based on the lower weight and the upper weight; determining the second prediction weight based on the first prediction weight and the weighted sum value. Decoding method according to any one of claims 9 to 12.

14. the at least one weighting parameter includes an offset value for at least one pixel point; The decoding method according to claim 9.

15. The decoding method comprises: further comprising decoding the bitstream and determining an offset value for the at least one pixel point.

15. The decoding method of claim 14.

16. The decoding method comprises: determining an offset value for the at least one pixel point based on the at least one pixel point weight value.

15. The decoding method of claim 14.

17. The decoding method comprises: determining a prediction value of the current block based on the at least one reference prediction value, the at least one pixel point weight value, and the at least one pixel point offset value; 17. A decoding method according to claim 15 or 16.

18. The decoding method comprises: determining a prediction value for the current block based on the at least one reference prediction value and the at least one pixel point weight value; 12. A decoding method according to claim 10 or 11.

19. the at least one weight parameter includes a weight value of at least one sub-block of the current block; The decoding method according to claim 2.

20. The decoding method comprises: and determining a pixel point weight of position information of one sample point in the current block based on pixel point weight values ​​of position information of other sample points adjacent to the position information of the one sample point. The decoding method according to claim 8.

21. The decoding method comprises: decoding a bitstream to determine an inter-prediction mode parameter of the current block; If the inter-prediction mode parameter indicates that a pixel-level weight value is used to determine the inter-prediction value of the current block, performing a determination process of the type indication parameter and / or the geometric mode parameter. The decoding method of claim 1 .

22. 1. A coding method applied to an encoder, comprising: determining at least one motion vector information and a type indication parameter and / or a geometric mode parameter of the current block; determining at least one reference predictor for the current block based on the at least one motion vector information, and determining at least one weight parameter for the current block based on the type indication parameter and / or the geometric mode parameter; determining a prediction value for the current block based on the at least one reference prediction value and the at least one weighting parameter.

23. The geometric mode parameters include one or more parameters of gradation mode information, gradation intensity information, change direction information, change start position information, change center position information, change end position information, change range width information, and change segment information.

23. The encoding method of claim 22.

24. The geometric mode parameter is used to indicate a geometric change set, and the geometric change set includes change start position information, change center position information, and change end position information.

23. The encoding method of claim 22.

25. The encoding method comprises: if the type indication parameter indicates that the geometric mode parameter is not to be used, determining a pre-stored matrix and determining the at least one weight parameter based on the pre-stored matrix; If the type indication parameter indicates that the geometric mode parameter is to be used, determining the at least one weight parameter based on the geometric mode parameter.

25. The encoding method according to claim 23 or 24.

26. the at least one motion vector information includes a forward motion vector and / or a backward motion vector; 22. The encoding method of claim 21.

27. the at least one reference prediction value includes a forward reference value and / or a backward reference value; 22. The encoding method of claim 21.

28. the at least one weight parameter includes at least one pixel point weight value; 24. The encoding method of claim 23.

29. The encoding method comprises: determining the at least one pixel point weight value based on position information of sample points within the current block and the geometric mode parameter; 29. The encoding method of claim 28.

30. The encoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the change start position information, the change end position information, the change direction information, and a predetermined calculation accuracy; determining a first distance based on the position information of the sample points in the current block and the change start position information, and determining a second distance based on the position information of the sample points in the current block and the change end position information; determining the at least one pixel point weight value based on the first distance, the second distance, the lower weight limit, and the upper weight limit.

30. The encoding method of claim 29.

31. The encoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the gradation strength information, the change direction information, the change center position information, and a predetermined calculation accuracy, and determining a change center position weight based on the upper limit weight and the lower limit weight; determining a third distance based on position information of the sample points in the current block and the variation center position information; determining the at least one pixel point weight value based on the third distance and the variation center position weight.

30. The encoding method of claim 29.

32. The encoding method comprises: determining a lower limit weight and an upper limit weight based on the gradation mode information, the gradation strength information, the change direction information, the change center position information, and a predetermined calculation accuracy, and determining a change center position weight based on the upper limit weight and the lower limit weight; determining a fourth distance based on position information of the sample points in the current block and the variation center position information; determining the at least one pixel point weight value based on the fourth distance, the lower limit weight, the upper limit weight, and the variation center position weight.

30. The encoding method of claim 29.

33. The upper limit weight and the lower limit weight are set in advance.

33. Coding method according to any one of claims 30 to 32.

34. The pixel point weight values ​​include a first prediction weight and a second prediction weight, and the encoding method includes: determining a weighted sum based on the lower weight and the upper weight; determining the second prediction weight based on the first prediction weight and the weighted sum value.

34. Coding method according to any one of claims 30 to 33.

35. the at least one weighting parameter includes an offset value for at least one pixel point; 31. The encoding method of claim 30.

36. The encoding method comprises: further comprising decoding the bitstream and determining an offset value for the at least one pixel point.

36. The encoding method of claim 35.

37. The encoding method comprises: determining an offset value for the at least one pixel point based on the at least one pixel point weight value.

36. The encoding method of claim 35.

38. The encoding method comprises: determining a prediction value of the current block based on the at least one reference prediction value, the at least one pixel point weight value, and the at least one pixel point offset value; 38. The encoding method according to claim 36 or 37.

39. The encoding method comprises: determining a prediction value for the current block based on the at least one reference prediction value and the at least one pixel point weight value; 33. The encoding method according to claim 31 or 32.

40. the at least one weight parameter includes a weight value of at least one sub-block of the current block; 24. The encoding method of claim 23.

41. The encoding method comprises: and determining a pixel point weight for position information of one sample point in the current block based on pixel point weight values ​​of position information of other sample points in the current block adjacent to the position information of the one sample point.

30. The encoding method of claim 29.

42. The encoding method comprises: determining inter prediction mode parameters of the current block; If the inter-prediction mode parameter indicates that a pixel-level weight value is used to determine the inter-prediction value of the current block, performing a determination process of the type indication parameter and / or the geometric mode parameter.

23. The encoding method of claim 22.

43. an encoder comprising a first determination unit; the first determination unit is configured to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of a current block, determine at least one reference prediction value of the current block based on the at least one motion vector information, determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

44. 1. An encoder comprising:

43. An encoder comprising a first processor and a first memory storing instructions executable by the first processor, the first processor executing the instructions to implement the encoding method of any one of claims 22 to 42.

45. a decoder comprising a decoding unit and a second determining unit; the decoding unit is configured to decode a bitstream; the second determination unit is configured to determine at least one motion vector information and a type indication parameter and / or a geometric mode parameter of a current block, determine at least one reference prediction value of the current block based on the at least one motion vector information, determine at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determine a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter.

46. A decoder comprising:

22. A decoder comprising a second processor and a second memory storing instructions executable by the second processor, the second processor executing the instructions to implement the decoding method of any one of claims 1 to 21.

47. A bitstream generated by bit encoding based on information to be encoded, the information to be encoded including at least one of an inter-prediction mode parameter of a current block, at least one motion vector information of the current block, a type indication parameter and / or a geometric mode parameter.

48. A computer storage medium having stored thereon a computer program for causing a first processor to execute the encoding method of any one of claims 22 to 42 or a computer program for causing a second processor to execute the decoding method of any one of claims 1 to 21.