Encoding / Decoding Method, Codec, Bitstream, and Storage Medium
By dynamically determining weight parameters for inter prediction based on type and geometric mode parameters, the method addresses illumination changes in video sequences, improving prediction accuracy and compression efficiency.
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-26
AI Technical Summary
Existing video encoding and decoding technologies face challenges in accurately predicting illumination changes within video sequences, leading to reduced compression performance due to the use of fixed weight values for inter prediction, which do not adapt to localized lighting variations.
Adaptive determination of weight parameters for inter prediction based on type indication and geometric mode parameters, allowing for dynamic adjustment of weights to match lighting changes within video sequences.
Improves the accuracy of weighted prediction and enhances coding efficiency and compression performance by adapting weights to localized lighting changes.
Smart Images

Figure 00000000_0000_ABST
Abstract
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 of a current block, determines at least one reference prediction value of the current block based on the at least one motion vector information, determines at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be understood, in the present embodiment, the encoding / decoding may determine at least one motion vector information of the current block using the type indication parameter and / or the geometric mode parameter. sample A weight parameter for the level can be determined, whereby sample Prediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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 filtering. Here, the prediction module may include intra prediction and inter prediction, and inter prediction may include motion estimation and motion compensation. Within one frame of a video image, adjacent LCUs are coded. sample Because of the strong correlation between adjacent pixels, the inter-prediction method is used in video coding and decoding technology. sampleHowever, since 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 the 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] Also, if you do not use slice-level weighted forecasting or BCW, sample The calculation of the forecast value is also classified as default weighted forecast (when slice-level weighted forecasting is not enabled). The default weighted forecasting method is relatively simple, does not use weights or offset values, and is divided into three cases based on the difference in the reference list.
[0022] The first case is when only the forward reference list List0 is used, and the predicted sample The calculation is as follows:
[0023]
number
[0024]
number
[0025]
number
[0026]
number
[0027] In slice-level weighted prediction, lighting intensity changes can cause global or local brightness changes in the same scene in a video, such as aperture changes during shooting or fade-in / fade-out effects caused by artificial editing. In such videos, the content of adjacent images remains similar, but the corresponding sample Because the difference in values is large, the residual obtained by conventional motion compensation prediction technology is large. Therefore, slice-level weighted prediction can effectively deal with such scenes where the luminance changes gradually overall, i.e., the reconstruction of the reference image sampleA predicted value can be obtained by performing a linear transformation on the value (a linear function defined by one weight and one offset value).
[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, the reference for slice-level weighted forecasting is sample Regarding the value retrieval, slice-level weighted prediction can be applied to both unidirectional and bidirectional prediction. For unidirectional prediction CUs, see sample The value is obtained in the following three cases. When only the forward reference list List0 is used, forward motion information MVL0 of the current CU is obtained, and motion compensation prediction is performed using the forward motion vector information MVL0 to obtain the forward predicted value PredSampleL0. When only the backward reference list List1 is used, backward motion information MVL1 of the current CU is obtained, and motion compensation prediction is performed using the backward motion vector information to obtain the 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 the forward predicted value PredSampleL0, and motion compensation prediction is performed using the backward motion vector information to obtain the 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 prediction value, after obtaining the intra prediction value and inter prediction value of the current CU, the two prediction values need to be weighted and averaged. Here, the weight used in the weight calculation depends on the coding modes of the upper and left neighboring blocks of the current CU. For example, Figure 1 is a schematic diagram of neighboring blocks. As shown in Figure 1, the specific determination is as follows: (isIntraLeft+isIntra Top ) is equal to 2, the weight Wt of the intra predicted block is equal to 3, otherwise (isIntraLeft+isIntra Top ) 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 the embodiment of the present application, the encoding and decoding of the current block is performed using the type indication parameter and / or the geometric mode parameter. sample A weight parameter for the level can be determined, whereby sample Prediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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 an input original video signal, a video coding block can be obtained by dividing a coding tree unit (CTU), and a residual obtained by intra prediction or inter prediction is used. sample The information is transformed by the transform and quantization unit 501 into the video coding block, which converts the residual information into sampleThe video coding block may be encoded using a transform from the video coding block to a transform domain and quantized, thereby further reducing the bitrate. 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 encoding the video coding block. The inter prediction unit 504 and the motion estimation unit 505 are configured to perform inter prediction 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 coding unit 509, and the motion estimation unit 505 is configured to send the calculated motion vector data to the coding unit 509. Furthermore, the inverse transform and inverse quantization unit 506 is configured to reconstruct the video coding block, and the residual block is sampleThe reconstructed residual block is reconstructed in a region, and the reconstructed residual block is subjected to blocking artifact removal by a filter control analysis unit 507 and a filtering unit 508. The reconstructed residual block is then added to one prediction block in the frame in a decoded picture buffer unit 510 to generate a reconstructed video coding block. The coding unit 509 is configured to code various coding parameters and quantized transform coefficients. In a CABAC-based coding algorithm, the context content is based on neighboring coding blocks, and the coding unit 509 encodes information indicating a determined intra-prediction mode, which can be used to 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 coding of a 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 the 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, which are then processed by the inverse transform and inverse quantization unit 602, samplea residual block is generated in the region. The intra prediction unit 603 is configured to generate prediction data for the current video decoded 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 decoded block by analyzing the motion vectors and other related syntax elements, and use the prediction information to generate a prediction block for the video decoded block currently being decoded, the residual block from the inverse transform and inverse quantization unit 602 is added to the corresponding prediction block generated by the intra prediction unit 603 or the inter prediction unit 604 to form a decoded video block, the decoded video signal is filtered by a filtering unit 605 to remove blocking artifacts and improve video quality, and the decoded video block is stored in a decoded image buffer unit 606, which is configured to store a reference image used for subsequent intra prediction or motion compensation, and output a 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] Note that in the present embodiment, the type indication parameter is a type index parameter, where the type indication parameter is: sample The type of weighting parameter of the level can be used to select, i.e. sample It can be used to select the determination method of the level weighting parameters.
[0070] As can be seen, in the present embodiment: sample The type of weighting parameter for the level, i.e. sample The method for determining the weighting parameters of the levels may include, but is not limited to, the types (methods) of weighting parameters defined by a pre-stored matrix (pre-stored matrix) and weighting parameters defined by geometric mode parameters.
[0071] That is, in the present embodiment, the type indication parameter is calculated using a pre-stored matrix. sample Either derive the level weighting parameters or use the geometric mode parameters. sample The type indicator parameter can be used to determine how to derive the weighting parameters for the levels. sampleDetermine whether to derive the level weighting parameters or use the type indication parameters and the geometric mode parameters. sample It can also be understood as determining whether or not to derive a level weighting 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, a template matching method can be used to determine the optimal gradation mode of the current coding unit / block. Specifically, the upper row and / or left column of the current coding unit / block can be sample as a template, and build the template sample In the process of predicting the values, a gradient weighting process is performed on the predicted values from different sources, and the geometric parameters of the optimal gradient weighting scheme are selected and used as the parameters of the gradient weighting scheme for 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 is the rate of change, i.e., the weight parameter of the gradation, as follows: sample It can show a speed that changes depending on the distance between and a specified position (position of a point or line).
[0080] In addition, in the embodiment of the present application, the linear gradation intensity information can be expressed in an index manner, for example, 0 indicates no gradation (direct jump), and m indicates that the distance from the specified position is (2m-1) / M. sample indicates that when the position of M is reached, the gradient weight parameter will be at its maximum or minimum, and if the distance is closer, it will follow a linear gradient, and if the distance is farther, it will remain at its maximum or minimum, where the value of M can be 2, 1, 1 / 2, etc.
[0081] For illustrative purposes, in the present embodiment, it is assumed that linear gradation intensity information is represented in an index manner. 0 indicates that w is a constant and there is no gradation 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.
[0082] It should be noted that in the embodiment of the present application, the change direction information can be determined using dirParm, where the change direction information dirParm indicates the direction in which the change strength changes, i.e., the first prediction sample The gradation strength information of the weight parameter for the vector can indicate the direction in which the weight parameter 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 seen, in the present embodiment, the lower limit of the weighting parameter generally corresponds to 0, i.e., the reference position corresponding to the weighting sample This means that the upper limit of the weighting parameter generally corresponds to 1, that is, the reference position corresponding to the weighting sample This means adopting all of the above.
[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 is: sample It can be used to decide whether to use pre-stored matrices or geometric modal parameters to derive the weighting parameters of the levels.
[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 embodiments of the present application, the weighting parameters defined by the geometric parameters (geometric mode parameters) refer to the weighting parameters calculated from the geometric parameters. sample The weighting parameter WtParm, which changes according to some geometric rule depending on the position, can be expressed by at least one parameter from among 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.
[0104] Furthermore, in the embodiment 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 gradation intensity information, change direction information, etc. of each CU are basically consistent, one or more weight matrices can be predefined first, and the weight matrices of the coding unit block can be predefined. sample The weights of the levels are obtained by upsampling, downsampling or clipping a given weight matrix.
[0105] In the embodiment of the present application, the type indicator parameter is used in the form of an index. sampleA mode type for deriving the level weighting parameter can be selected, for example, by determining a mode index number based on the type indication parameter, and then, based on the mode index number, sample The mode type for deriving the level weighting parameters is determined, that is, whether the weighting parameters are defined by pre-stored matrices or by geometric parameters.
[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 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 may be decoded to first determine the inter-prediction mode parameter of the current block, and the inter-prediction mode parameter may be used to determine the inter-prediction value of the current block. sample If it is indicated that a level weight value is to be used, then it is possible to choose to perform a type indication parameter and / or geometric mode parameter determination process.
[0107] That is, in the embodiment of the present application, one piece of identification information (for example, an inter-prediction mode parameter) is used to perform the following proposed in the embodiment of the present application: sample It can indicate whether to use an encoding / decoding method that performs prediction processing using the weight value of the level, and to determine the inter prediction value of the current block based on the inter prediction mode parameter. sample If it is decided to use the weight value of the level, a determination of a type indication parameter and / or a geometric mode parameter may be performed, whereby the determination of at least one weight parameter of the current block is further performed 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 seen, in the present embodiment, at least one weight parameter of the current block is: sample level weight parameters, wherein the at least one weight parameter is at least one sample may include a point weight value and at least one sample At least one weight parameter may include an offset value for the point. sample may include a weighting factor for the level, or at least one sample It may include a level weighting factor 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) is: sample The type indicator parameter can be used to select the type of the level weighting parameter, i.e., it can be selected to use the weighting parameter defined by the pre-stored matrix or the weighting parameter defined by the geometric mode parameter. Therefore, it can be determined whether to use the geometric mode parameter first based on the type indicator parameter, i.e., it can be determined whether to use the geometric mode parameter to determine the weighting parameter based on the type indicator 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 an embodiment of the present application, at least one weight parameter of the current point is sample Point weight values (at least one sample If the geometric mode parameter is a point weighting factor, the position information of the sample points within the current block may be used in combination with the geometric mode parameter to further determine at least one weighting parameter.
[0116] In the embodiment of the present application, at least one of the following is calculated based on the position information of the sample points in the current block and the geometric mode parameters: sample A point weight value can be determined.
[0117] Furthermore, in embodiments of the present application, the derivation of the weighting parameters (at least one weight parameter) may be performed at different levels, e.g., at the slice level. sample The level weights can also be derived at the coding unit / coding block level. sample Level weights can also be derived, where the weighting parameters have a certain precision and upper and lower bounds. sample The precision weighting parameter is the integer already derived sample It is obtained by performing interpolation filtering on the 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 the 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 determined first 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 points in the current block and the change start position information; and a second distance can be determined based on the position information of the sample points in the current block and the change end position information; finally, at least one weight parameter can be determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight. sample A point weight value may further be determined.
[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 the examples of the present application, sampleWhen performing slice-level weighting based on level weights, several weight-related geometric mode parameters are determined based on the current slice, such as gradient 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 gradient lower limit information minWvalue, and slice-level gradient upper limit information maxWvalue. These geometric mode parameters are used to determine one comprehensive weight parameter SlicewtParm for the current slice, and the weight wLX used in slice-level weighted prediction is used. 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 the embodiment of the present application, the slice level change direction information sliceDirParm is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[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] That is, in the embodiment of the present application, the lower limit weight and the upper limit weight 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 position information of the sample point in the current block is referenced to determine the lower limit weight and the upper limit weight. sample It is further necessary to determine the distances between the point and the gradation start position and the gradation end position, where the first distance can be determined based on the position information of the sample point 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 point 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 based on the first and second distances above. sample Point weight parameter w L0 [x0][y0] can further be determined, where at least one [x0][y0] is determined based on the first distance, the second distance, the lower bound weight, and the upper bound weight. sample A point weight value can be determined.
[0130] Furthermore, in the embodiment of the present application, the first distance d L0s [x0][y0] and the second distance d L0e Based on [x0][y0] sample Point weight parameter w 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, sampleThe sum of the forward weight and backward weight of a point is equal to the sum of the upper weight and lower weight. That is, after determining the sum of the weights, sumValue, based on the following formula: sample The weight value of one of the points (for example, the forward weight w L0 [x0][y0]) sample Another weight value for the point (e.g., backward weight w L1 [x0][y0]) can be determined.
[0134]
number
number
[0135] As can be seen, in the present embodiment, decoding the bitstream results in at least one sample The offset values of the points can be determined. 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 seen, in the present embodiment, at least one sample Based on the point weight value, at least one sample It is also possible to determine the offset value of the point. Here, taking bidirectional prediction as an example, the offset parameters (offset values) o_L0[x0][y0] and o_L1[x0][y0] are respectivelyL0 [x0][y0], w L1 It may have a linear relationship with [x0][y0].
[0137] Furthermore, in the embodiment of the present application, when deriving at least one weight parameter of the current block at the CU level, for example, sample In the case of BCW weighting based on level weight, first, a lower limit weight and an upper limit weight are 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 is determined based on the upper limit weight and the lower limit weight. Then, a third distance is determined based on the position information of the sample point in the current block and the change center position information. Finally, at least one third distance is determined based on the third distance and the change center position weight. sample A point weight value can be determined.
[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 the examples of the present application, sampleWhen performing CU-level weighting based on level weights, 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 for the current CU can be determined 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, the CU-level gradation intensity information cbSlopeParm can be used to indicate the gradation intensity of the gradation mode. For example, cbSlopeParm indicates the gradation intensity when the distance from the specified position is n sample It can be shown that the gradient weight value reaches a maximum or minimum at a position where
[0144] For example, in the embodiment of the present application, the change direction information cbDirParm at the CU level is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[0145] For example, a cbDirParm of 1 means the first sampleThe weighted value of indicates that the distance value gradually decreases as it changes from negative to positive, and a value of 0 indicates that the distance value gradually increases as it 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 an embodiment of the present application, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the distance from the line is -n sample The position where the distance from the line is n is set as the gradation start position, and the position to the left or below this start position is set as the lower limit weight value minWvalue, that is, the gradation lower limit information is determined. sample The position where is the gradation end position, and the upper right or upper part of the end position is the upper limit weight value maxWvalue. upper limit The information is determined by the weighting, which varies in steps 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] Further, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, at least one of the distance-based linear gradations is sample When calculating the point weight value w[x0][y0], the third distance must first be determined, which can be determined based on the position information of the sample point in the current block and the change center position information.
[0151] Illustratively, in the embodiment of the present application, each of the forward reference blocks in the current coding unit CU sample For a point, it is determined based on the position information of the sample point in the current block and the gradation center position cbCenterPosParm of the previous reference block. sample The distance parameter L1 between the points, that is, the third distance, is calculated using the following formula:
[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 variation center position weight are used to finally calculate at least one sample A point weight value can be determined, which includes a first prediction weight value (e.g., a forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 [x0][y0] and the second prediction weight value (e.g., backward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) 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 (e.g., the forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 After determining [x0][y0], w L0 [x0][y0] is used to calculate the second prediction weight (e.g., the weight of the backward reference block). sample Weight value for a point or reference block for intra prediction sample (e.g., point weight value) 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 the examples of the present application, sample The determination of the CIIP intra prediction weight Wt for a level 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. Here, if isIntraTop is 1, it indicates that the upper neighboring block is available and the coding mode is intra mode, and if isIntraLeft is 1, it indicates that the left neighboring block is available and the coding mode is intra mode.
[0166] A comprehensive parameter cbwtParm is determined using several parameters including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and the coding mode information of the neighboring blocks, isIntraTop and isIntraLeft. The parameter is used to determine each of the current block's coding modes when the intra mode is adopted. sample The weights of the points wt[x0][y0] can be determined, 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 the embodiment of the present application, the gradient intensity information cbSlopeParm can be used to indicate the gradient intensity of the gradient mode. For example, cbSlopeParm can be used to indicate the gradient intensity of the gradient mode when the distance from the specified position is 4 sample It can be shown that the gradient weight value reaches a maximum or minimum at a position where
[0169] For example, in the embodiment of the present application, the change direction information cbDirParm is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[0170] For example, a cbDirParm of 1 means the first sample indicates that the weighted value of becomes gradually smaller as the distance value changes from negative to positive, and being 0 indicates that the distance value becomes gradually larger 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 an embodiment of the present application, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the distance from the line is -n sample The position where the distance from the line is n is set as the gradation start position, and the position to the left or below this start position is set as the lower limit weight value minWvalue, that is, the gradation lower limit information is determined. sample The position where is the gradation end position, and the upper right or upper part of the end position is the upper limit weight value maxWvalue. upper limitThe information is determined by the weighting, which varies in steps 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] Further, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, at least one of the distance-based linear gradations is sample When calculating the point weight value w[x0][y0], the fourth distance must first be determined, which can be determined based on the position information of the sample point in the current block and the change center position information.
[0176] Illustratively, in the embodiment of the present application, each of the forward reference blocks in the current coding unit CU sample For a point, it is determined from the gradation center position cbCenterPosParm of the point and the previous reference block based on the position information of the sample point in the current block. sampleThe distance parameter L2 between the points, that is, the fourth distance, is calculated using the following formula:
[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 variation center position weight are used to finally determine at least one sample A point weight value can be determined, which includes a first prediction weight value (e.g., a forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 [x0][y0] and the second prediction weight value (e.g., backward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) 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, sample The sum of the forward weight and backward weight of a point is equal to the sum of the upper weight and lower weight. That is, after determining the sum of the weights, sumValue, based on the following formula: sample The weight value of one of the points (for example, the forward weight w L0 [x0][y0]) sample Another weight value for the point (e.g., backward weight w L1 [x0][y0]) can be determined.
[0185]
number
number
[0186] As can be seen, in the present embodiment, weighting parameters are used to predict sample When deriving the value, sample Select the weight parameter of the level gradation to adjust the sample In order to reduce the complexity of the calculation, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) may be selected.
[0187] Furthermore, in the present embodiment, the weighting parameters on the plane are: sample The position of the point may be changed according to some geometric rule, or may be changed according to a combination of several different geometric rules. For example, sample The weight value of the level is sample It varies depending on the distance of the point, and if the distance value is between [0, L1], it is the first gradient method, and if the distance is between (L1, L2], it is the second gradient method.
[0188] Furthermore, in the examples of the present application, sample The weight value of the level is sample It not only changes according to the distance between the point and the center change position, but also can determine different linear or non-linear gradient modes for different positions. For example, when the distance value is between [0,L1], the gradient mode is linear gradient mode, and when the distance is (L1,L2], it is non-linear gradient mode.
[0189] As can be seen from this, the encoding and decoding method proposed in the embodiments of the present application can be applied to both unidirectional prediction and bidirectional prediction. It can also be applied when all predictions are obtained from inter-prediction, or when some or all predictions are obtained from bidirectional prediction. sample It can also be applied if the 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, only one prediction source is used. sample Level weighting parameters (weight parameters) are derived, which may include weighting coefficients (weight values) and offset amounts.
[0191] As can be seen, in the present embodiment, when applied to bi-prediction, similar to the WP mode, for two prediction sources sample Derive level weighting parameters (weight parameters), which can include weighting coefficients (weight values) and offset amounts. Alternatively, similar to BCW or CIIP, for only two forecast sources. sample Derive the level weighting coefficients (weight values).
[0192] Furthermore, in the embodiment of the present application, sample In determining at least one weight parameter of a level, sample The weight of the point is sample It can be calculated using the coordinates of the points, or it can be generated by selecting predetermined weight parameters using a predefined matrix. sample Adjacent to the positions above and to the left of the point sample It can also be derived from the weight parameters of the points.
[0193] That is, in the embodiment of the present application, for the position information of one sample point in the current block, the position information of other sample points adjacent to the position of that sample point is calculated. sample Based on the point weight value, the position information of the sample point is calculated. sample You can choose to determine point weights.
[0194] Illustratively, in the present embodiment, sample Point weight w c is the sample The coordinates of the point are adjacent to the upper and left sides. sample Point weight w 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 present embodiment, at least one sample Point weight value, or at least one sample Point weight values and at least one sample After determining at least one weight parameter of the current block, including the offset value of the point, sample Point weight values (at least one sample Point weight values and at least one sample A prediction process can be performed based on the offset value of the current block, and further combined with at least one reference predicted value of the current block, to obtain a predicted value of the current block.
[0198] As can be seen, in the embodiment of the present application, in the process of calculating the predicted value of the slice-level weighted prediction, at least one reference predicted value, at least one sample point weight values, and at least one sampleBased on the offset value of the point, a predicted value for the current block can be determined.
[0199] For example, in the embodiment of the present application, the syntax elements of the slice-level weighted prediction, the references of each CU of the current slice, sample After obtaining the reference prediction value, in the case of unidirectional prediction, for example, forward prediction, weighted prediction is performed based on the following formula 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 the embodiment of the present application, in order to improve the prediction accuracy, the intermediate calculation results are sample The value has higher accuracy than the log2_weight_denom and chroma_log2_weight_denom, and the shift1 indicates the accuracy improvement of the weighting coefficient. sample Reference in the interpolation calculation process sample Represents the precision improvement of the value (integer sample The Clip() operation is sample Clamps values to within a valid range, e.g. valid values for 8 bits are [0,255], valid values for 10 bits are [0,1023].
[0206] As can be seen, in the present embodiment: sample In the case of BCW weighting based on level weights, in the calculation process of the forecast value, at least one reference forecast value and at least one sample Based on the point weight values, a prediction value for the current block can be determined.
[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 bi-predicted CUs and uses only a small number of predetermined weights to code their indices.
[0209] Illustratively, in the present embodiment: sample When 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 seen, in the present embodiment: sample For CIIP weighting based on level weights, in the calculation process of the forecast, at least one reference forecast and at least one sample Based on the point weight values, a prediction value for the current block can be determined.
[0212] In the examples of the present application, sample The P used to calculate the CIIP weighted forecast based on the level weights 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] Illustratively, in the present embodiment: sample When using level-weighted CIIP, 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 present embodiment, the weighted prediction process uses sample Regarding the weighting value of a level, the weighting value of the entire forward reference block or the entire backward reference block is no longer fixed as a fixed value, but the weighting parameter of the current slice or CU can be adaptively adjusted according to factors such as changes in illumination of the sequence content. That is, instead of fixing the weighting value of each reference block level, sample Since the inter-weighted prediction is performed using the weight values of the levels, the accuracy of the inter-weighted prediction can be further improved, and the coding efficiency of the 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] The present embodiment proposes a decoding method, in which a decoder determines at least one motion vector information of a current block and a type indication parameter and / or a geometric mode parameter, determines at least one reference prediction value of the current block based on the at least one motion vector information, determines at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be understood, in the present embodiment, the encoding and decoding of the current block can be performed using the type indication parameter and / or the geometric mode parameter. sample A weight parameter for the level can be determined, whereby samplePrediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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] Note that in the present embodiment, the type indication parameter is a type index parameter, where the type indication parameter is: sample The level weighting parameter can be used to select the type of sample It can be used to select the determination method of the level weighting parameters.
[0225] As can be seen, in the present embodiment: sample The type of level weighting parameter, i.e. sample The method for determining the level weighting parameters may include, but is not limited to, the types (methods) of weighting parameters defined by a pre-stored matrix (pre-stored matrix) and weighting parameters defined by geometric mode parameters.
[0226] That is, in the present embodiment, the type indication parameter is calculated using a pre-stored matrix. sample Either derive the level weighting parameters or use the geometric mode parameters. sample This can be used to determine how to derive the level weighting parameters. This can be done using a pre-stored matrix with a type indicator parameter. sample Determine whether to derive the level weighting parameters or not using the type indication parameters and the geometric mode parameters. sample It can also be understood as determining whether or not to derive a level weighting 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, a template matching method can be used to determine the optimal gradation mode of the current coding unit / block. Specifically, the upper row and / or left column of the current coding unit / block can be sample as a template, and build the template sample In the process of predicting the values, a gradient weighting process is performed on the predicted values from different sources, and the geometric parameters of the optimal gradient weighting scheme are selected and used as the parameters of the gradient weighting scheme for 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 is the rate of change, i.e., the weight parameter of the gradation, as follows: sample It can show a speed that changes depending on the distance between and a specified position (position of a 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 indicates no gradation (direct jump), and m indicates that the distance from the specified position is (2m-1) / M. sample indicates that when the position of M is reached, the gradient weight parameter will be at its maximum or minimum, and if the distance is closer, it will follow a linear gradient, and if the distance is farther, it will remain at its maximum or minimum, where the value of M can be 2, 1, 1 / 2, etc.
[0236] For illustrative purposes, in the present embodiment, it is assumed that linear gradation intensity information is represented in an index manner. 0 indicates that w is a constant and there is no gradation 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.
[0237] It should be noted that in the embodiment of the present application, the change direction information can be determined using dirParm, where the change direction information dirParm indicates the direction in which the change strength changes, i.e., the first prediction sample The gradation strength information of the weight parameter for the vector can indicate the direction in which the weight parameter 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 seen, in the present embodiment, the lower limit of the weighting parameter generally corresponds to 0, i.e., the reference position corresponding to the weighting sample This means that the upper limit of the weighting parameter generally corresponds to 1, that is, the reference position corresponding to the weighting sample This means adopting all of the above.
[0249] 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.
[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 the present embodiment, the type indication parameter is calculated using a pre-stored matrix. sample Derive the level weighting parameters or use the geometric mode parameters sample This can be used to determine which level weighting parameters to derive.
[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 embodiments of the present application, the weighting parameters defined by the geometric parameters (geometric mode parameters) refer to the weighting parameters calculated by the geometric parameters. sample The weighting parameter wtParm, which changes according to some geometric rule depending on the position, can be expressed by at least one parameter from among 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.
[0258] Furthermore, in the embodiment 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 gradation intensity information, change direction information, etc. of each CU are basically consistent, one or more weight matrices can be predefined, and the weight matrices of the coding unit block can be predefined. sample The weights of the levels are obtained by upsampling, downsampling or clipping a given weight matrix.
[0259] In the embodiment of the present application, the type indicator parameter is used in the form of an index. sample A mode type for deriving the level weighting parameter can be selected, for example, by determining a mode index number based on the type indication parameter, and then, based on the mode index number, sample The mode type for deriving the level weighting parameters is determined, that is, whether the weighting parameters are defined by pre-stored matrices or by geometric parameters.
[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] Further, in an embodiment of the present application, an inter-prediction mode parameter of the current block may be determined first, and the inter-prediction mode parameter is used to determine the inter-prediction value of the current block. sample If it is indicated that a level weight value is to be used, then it is possible to choose to perform a type indication parameter and / or geometric mode parameter determination process.
[0263] That is, in the embodiment of the present application, one piece of identification information (for example, an inter-prediction mode parameter) is used to perform the following proposed in the embodiment of the present application: sample It can indicate whether to use an encoding / decoding method that performs prediction processing using the weight value of the level, and to determine the inter prediction value of the current block based on the inter prediction mode parameter. sampleIf it is decided to use the weight value of the level, a determination of a type indication parameter and / or a geometric mode parameter may be performed, whereby the determination of at least one weight parameter of the current block is further performed 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 seen, in the present embodiment, at least one weight parameter of the current block is: sample level weight parameters, wherein the at least one weight parameter is at least one sample may include a point weight value and at least one sample At least one weight parameter may include an offset value for the point. sample may include a weighting factor for the level, or at least one sample It may include a level weighting factor 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) is: sample The type indicator parameter can be used to select the type of the level weighting parameter, i.e., it can be selected to use the weighting parameter defined by the pre-stored matrix or the weighting parameter defined by the geometric mode parameter. Therefore, it can be determined whether to use the geometric mode parameter first based on the type indicator parameter, i.e., it can be determined whether to use the geometric mode parameter to determine the weighting parameter based on the type indicator 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 an embodiment of the present application, at least one weight parameter of the current point is sample Point weight values (at least one sample If the geometric mode parameter is a point weighting factor, the position information of the sample points within the current block may be used in combination with the geometric mode parameter to further determine at least one weighting parameter.
[0272] In the embodiment of the present application, at least one of the following is calculated based on the position information of the sample points in the current block and the geometric mode parameters: sample A point weight value can be determined.
[0273] Furthermore, in embodiments of the present application, the derivation of the weighting parameters (at least one weight parameter) may be performed at different levels, e.g., at the slice level. sample The level weights can also be derived at the coding unit / coding block level. sample Level weights can also be derived, where the weighting parameters have a certain precision and upper and lower bounds. sample The precision weighting parameter is the integer already derived sample The weighting parameters can be obtained by interpolation filtering.
[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 the 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 determined first 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 points in the current block and the change start position information; and a second distance can be determined based on the position information of the sample points in the current block and the change end position information; finally, at least one weight parameter can be determined based on the first distance, the second distance, the lower limit weight, and the upper limit weight. sample A point weight value may further be determined.
[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 the examples of the present application, sample When performing slice-level weighting based on level weights, several weight-related geometric mode parameters are determined based on the current slice, such as gradient 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 gradient lower limit information minWvalue, and slice-level gradient upper limit information maxWvalue. These geometric mode parameters are used to determine one comprehensive weight parameter SlicewtParm for the current slice, and the weight wLX used in slice-level weighted prediction is used. ij and offset o_LX ijis 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 the embodiment of the present application, the slice level change direction information sliceDirParm is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[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] That is, in the embodiment of the present application, the lower limit weight and the upper limit weight 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 position information of the sample point in the current block is referenced to determine the lower limit weight and the upper limit weight. sample It is further necessary to determine the distances between the point and the gradation start position and the gradation end position, where the first distance can be determined based on the position information of the sample point 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 point 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 based on the first and second distances above. sample Point weight parameter w L0 [x0][y0] can further be determined, where at least one [x0][y0] is determined based on the first distance, the second distance, the lower bound weight, and the upper bound weight. sampleA point weight value can be determined.
[0286] Furthermore, in the embodiment of the present application, the first distance d L0s [x0][y0] and the second distance d L0e Based on [x0][y0] sample Point weight parameter w 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, sample The sum of the forward weight and backward weight of a point is equal to the sum of the upper weight and lower weight. That is, after determining the sum of the weights, sumValue, based on the following formula: sample The weight value of one of the points (for example, the forward weight w L0 [x0][y0]) sample Another weight value for the point (e.g., backward weight w L1 [x0][y0]) can be determined as shown in equations (13) and (14).
[0289] Furthermore, in an embodiment of the present application, at least one weight parameter of the current block is sample may include a point weight value and at least one sample It may also include an offset value for the point, where: sample For the offset value of the point, sample It was also decided to set the offset value of the point as a constant and transmit it. sampleUsing point weight values sample You can also get the offset value of the point.
[0290] As can be seen, in the present embodiment, at least one of the current blocks sample The offset values of the points can be determined. 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 seen, in the present embodiment, at least one sample Based on the point weight value, at least one sample It is also possible to determine the offset value of the point. 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 the embodiment of the present application, when deriving at least one weight parameter of the current block at the CU level, for example, sample In the case of BCW weighting based on level weight, first, a lower limit weight and an upper limit weight are 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 is determined based on the upper limit weight and the lower limit weight. Then, a third distance is determined based on the position information of the sample point in the current block and the change center position information. Finally, at least one third distance is determined based on the third distance and the change center position weight. sample A point weight value can be determined.
[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 the examples of the present application, sample When performing CU-level weighting based on level weights, 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 for the current CU can be determined 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, the CU-level gradation intensity information cbSlopeParm can be used to indicate the gradation intensity of the gradation mode. For example, cbSlopeParm indicates the gradation intensity when the distance from the specified position is n sample It can be shown that the gradient weight value reaches a maximum or minimum at a position where
[0299] For example, in the embodiment of the present application, the change direction information cbDirParm at the CU level is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[0300] For example, a cbDirParm of 1 means the first sample The weighted value of indicates that the distance value gradually decreases as it changes from negative to positive, and a value of 0 indicates that the distance value gradually increases as it 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 an embodiment of the present application, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the distance from the line is -n sample The position where the distance from the line is n is set as the gradation start position, and the position to the left or below this start position is set as the lower limit weight value minWvalue, that is, the gradation lower limit information is determined. sampleThe position where is the gradation end position, and the position to the right or above the end position is the upper limit weight value maxWvalue, that is, 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] Further, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, at least one of the distance-based linear gradations is sample When calculating the point weight value w[x0][y0], the third distance must first be determined, which can be determined based on the position information of the sample point in the current block and the change center position information.
[0306] Illustratively, in the embodiment of the present application, each of the forward reference blocks in the current coding unit CU sample For a point, it is determined based on the position information of the sample point in the current block and the gradation center position cbCenterPosParm of the previous reference block. sampleThe distance parameter L1 to the point, that is, the third distance, is calculated using the following formula (16).
[0307] Here, ρ is the distance between the gradient center position and the origin. Assuming that the origin is at the center of the entire block area, for a block with width cbWidth and height cbHeight, sample The relative distances dx and dy to the vectors r and r 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 variation center position weight are used to finally calculate at least one sample A point weight value can be determined, which includes a first prediction weight value (e.g., a forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 [x0][y0] and the second prediction weight value (e.g., backward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) 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 seen, 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 shift 1 in the formula corresponds to this amplification operation, and is used appropriately when calculating the weighted prediction value later. sample The value is restored to the range.
[0314] Furthermore, in the embodiment of the present application, the first prediction weight value (e.g., the forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 After determining [x0][y0], w L0 [x0][y0] is used to calculate the second prediction weight (e.g., the weight of the backward reference block). sample Weight value for a point or reference block for intra prediction sample (e.g., point weight value) w L1 [x0][y0] can be derived, and the calculation formula is as shown in Equation (28).
[0315] Furthermore, in the examples of the present application, sampleIn the CIIP weighting based on the level weight, 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 of the sample point in the current block and the change center position information; finally, at least one weight parameter can be determined based on the fourth distance, the lower limit weight, the upper limit weight, and the change center position weight. sample A point weight value can be determined.
[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 the examples of the present application, sampleThe determination of the CIIP intra prediction weight Wt for a level 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. Here, if isIntraTop is 1, it indicates that the upper neighboring block is available and the coding mode is intra mode, and if isIntraLeft is 1, it indicates that the left neighboring block is available and the coding mode is intra mode.
[0320] A comprehensive parameter cbwtParm is determined using several parameters including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and coding mode information of neighboring blocks, isIntraTop and isIntraLeft. When the current block adopts the intra mode, the parameter is used to determine each of the current block's coding modes. sample The weights of the points wt[x0][y0] can be determined, 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 the embodiment of the present application, the gradient intensity information cbSlopeParm can be used to indicate the gradient intensity of the gradient mode. For example, cbSlopeParm can be used to indicate the gradient intensity of the gradient mode when the distance from the specified position is 4 sample It can be shown that the gradient weight value reaches a maximum or minimum at a position where
[0323] For example, in the embodiment of the present application, the change direction information cbDirParm is sample The weighted values of can be used to indicate different directions of change in the likelihood, such as from left to right, right to left, top to bottom, or bottom to top, e.g., gradually increasing from the top left (negative calculated distance) to the bottom right (positive calculated distance).
[0324] For example, a cbDirParm of 1 means the first sample indicates that the weighted value of becomes gradually smaller as the distance value changes from negative to positive, and being 0 indicates that the distance value becomes gradually larger 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 an embodiment of the present application, based on the change center position information cbCenterPosParm, in combination with the information provided by cbDirParm and cbSlopeParm, the distance from the line is -n sample The position where the distance from the line is n is set as the gradation start position, and the position to the left or below this start position is set as the lower limit weight value minWvalue, that is, the gradation lower limit information is determined. sample The position where is the gradation end position, and the position to the right or above the end position is the upper limit weight value maxWvalue, that is, 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] Further, in an embodiment of the present application, if the gradation mode information indicates that the gradation mode is a linear diagonal gradation mode, at least one of the distance-based linear gradations is sample When calculating the point weight value w[x0][y0], the fourth distance must first be determined, which can be determined based on the position information of the sample point in the current block and the change center position information.
[0329] Illustratively, in the embodiment of the present application, each of the forward reference blocks in the current coding unit CU sample For a point, it is determined from the gradation center position cbCenterPosParm of the point and the previous reference block based on the position information of the sample point in the current block. sample The distance parameter L2 between the point, that is, the fourth distance, is calculated using the formula (30).
[0330] Here, ρ is the distance between the gradient center position and the origin. Assuming that the origin is at the center of the entire block area, for a block with width cbWidth and height cbHeight, sampleThe relative distances dx and dy to the point y 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 variation center position weight are used to finally determine at least one sample A point weight value can be determined, which includes a first prediction weight value (e.g., a forward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) w L0 [x0][y0] and the second prediction weight value (e.g., backward reference block sample Point weight value or reference block for intra prediction sample (e.g., point weight value) 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 gradients on both sides of the center position of the gradient sample 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, sample The sum of the forward weight and backward weight of a point is equal to the sum of the upper weight and lower weight. That is, after determining the sum of the weights, sumValue, based on the following formula: sample The weight value of one of the points (for example, the forward weight w L0 [x0][y0]) sample Another weight value for the point (e.g., backward weight w L1 [x0][y0]) can be determined as shown in equations (36) and (37).
[0338] Furthermore, in an embodiment of the present application, at least one weight parameter of the current block is: sample It may be a weight parameter of a level, or may be a weight parameter of at least one sub-block of the current block, that is, 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 seen, in the present embodiment, weighting parameters are used to predict sample When deriving the value, sample Select the weight parameter of the level gradation to adjust the sample In order to reduce the complexity of the calculation, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) may be selected.
[0340] Furthermore, in the present embodiment, the weighting parameters on the plane are: sampleThe position of the point may be changed according to some geometric rule, or may be changed according to a combination of several different geometric rules. For example, sample The weight value of the level is sample It varies depending on the distance of the point, and if the distance value is between [0, L1], it is the first gradient method, and if the distance is between (L1, L2], it is the second gradient method.
[0341] Furthermore, in the examples of the present application, sample The weight value of the level is sample It not only changes according to the distance between the point and the center change position, but also can determine different linear or non-linear gradient modes for different positions. For example, when the distance value is between [0,L1], the gradient mode is linear gradient mode, and when the distance is (L1,L2], it is non-linear gradient mode.
[0342] As can be seen from this, the encoding and decoding method proposed in the embodiments of the present application can be applied to both unidirectional prediction and bidirectional prediction. It can also be applied when all predictions are obtained from inter-prediction, or when some or all predictions are obtained from bidirectional prediction. sample It can also be applied if the 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, only one prediction source is used. sample Level weighting parameters (weight parameters) are derived, which may include weighting coefficients (weight values) and offset amounts.
[0344] As can be seen, in the present embodiment, when applied to bi-prediction, similar to the WP mode, only two prediction sources are used. sample Level weighting parameters (weight parameters) can be derived, which can include weighting coefficients (weight values) and offset amounts. Alternatively, similar to BCW or CIIP, for only two forecast sources: sampleLevel weighting factors (weight values) can also be derived.
[0345] Furthermore, in the embodiment of the present application, sample In determining at least one weight parameter of a level, sample The weight of the point is sample It can be calculated using the coordinates of the points, or it can be generated by selecting predetermined weight parameters using a predefined matrix. sample Adjacent to the positions above and to the left of the point sample It can also be derived from the weight parameters of the points.
[0346] That is, in the embodiment of the present application, for the position information of one sample point in the current block, the position information of other sample points adjacent to the position of that sample point is calculated. sample Based on the point weight value, the position information of the sample point is calculated. sample You can choose to determine point weights.
[0347] Illustratively, in the present embodiment, sample Point weight w c is the sample The coordinates of the point are adjacent to the upper and left sides. sample Point weight w 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 present embodiment, at least one sample Point weight value, or at least one sample Point weight values and at least one sample After determining at least one weight parameter of the current block, including the offset value of the point, sample Point weight values (at least one sample Point weight values and at least one sample A prediction process can be performed based on the offset value of the current block, and further combined with at least one reference predicted value of the current block, to obtain a predicted value of the current block.
[0351] As can be seen, in the embodiment of the present application, in the process of calculating the predicted value of the slice-level weighted prediction, at least one reference predicted value, at least one sample point weight values, and at least one sample Based on the offset value of the point, a predicted value for the current block can be determined.
[0352] For example, in the embodiment of the present application, the syntax elements of the slice-level weighted prediction, the references of each CU of the current slice, sample After obtaining the reference prediction value, in the case of unidirectional prediction, for example, forward prediction, weighted prediction is performed based on the following formula 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, the syntax elements of the slice-level weighted prediction, the references of each CU of the current slice, sample After obtaining the reference prediction value, in the case of unidirectional prediction, for example, backward prediction, weighted prediction is performed based on the following formula 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, the syntax elements of the slice-level weighted prediction, the references of each CU of the current slice, sampleAfter obtaining the reference prediction value, in the case of bidirectional prediction, weighted prediction is performed based on the following formula to obtain the predicted value Pred of the current block. 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] Here, PredSamplesL0 and PredSamplesL1 are the references in the reference lists List0 and List1, respectively. sample is the value, and w L0 [x0][y0] and w L1 [x0][y0] are the forward and backward reference blocks, respectively. sample The weight value of the level, i.e., the current block sample The weight values of the level, o_L0[x0][y0] and o_L1[x0][y0] are the corresponding offsets, i.e., the offsets of the current block. sample Represents the level offset value.
[0358] As can be seen, in the embodiment of the present application, in order to improve the prediction accuracy, the intermediate calculation results are sample The value has higher accuracy than the log2_weight_denom and chroma_log2_weight_denom, and the shift1 indicates the accuracy improvement of the weighting coefficient. sample Reference in the interpolation calculation process sample Represents the precision improvement of the value (integer sample The Clip() operation is sample Clamps values to within a valid range, e.g. valid values for 8 bits are [0,255], valid values for 10 bits are [0,1023].
[0359] As can be seen, in the present embodiment: sampleIn the case of BCW weighting based on level weights, in the calculation process of the forecast value, at least one reference forecast value and at least one sample Based on the point weight values, a prediction value for the current block can be determined.
[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] Illustratively, in the present embodiment: sample When the level-weighted BCW is adopted, the predicted value of the current block, that is, the weighted predicted value, is as shown in Equation (44).
[0363] Here, PredSamplesL0 and PredSamplesL1 are the references in the reference lists List0 and List1, respectively. sample is the value, and w L1 [x0][y0] is a backward reference at block relative position (x0,y0) sample is the weight of the value, and w L0 [x0][y0] is a forward reference at block relative position (x0,y0) sample The weights of the values, where x0=0...cbWidth-1, y0=0...cbHeight-1. maxTempBitDepth is the maximum bit depth allowed in the computational intermediate process.
[0364] As can be seen, in the present embodiment: sampleFor CIIP weighting based on level weights, in the calculation process of the forecast, at least one reference forecast and at least one sample Based on the point weight values, a prediction value for the current block can be determined.
[0365] In the examples of the present application, sample The P used to calculate the CIIP weighted forecast based on the level weights 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] Illustratively, in the present embodiment: sample When using level-weighted CIIP, 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 a forward reference sample is the weight of the value, and w L1 [x0][y0] is a backward reference sample The weight of the value, shift3 is a parameter used to amplify the weight value in the previous step to improve the calculation accuracy, and the right shift is the prediction sample It is used to bring the value back into the appropriate range. Without amplification, it can be written simply as equation (46).
[0368] As can be seen from this, in the embodiment of the present application, by applying the encoding / decoding method proposed by the present application to weighting based on slice level, weighting based on two inter predictors at CU level (BCW), and weighting based on one inter predictor and one intra predictor at CU level (CIIP), sample Level weighting parameters can be determined, which can improve the coding efficiency and performance of weighted prediction.
[0369] That is, in the present embodiment, the weighted prediction process uses sample Regarding the weighting value of the level, the weighting value of the entire forward reference block or the entire backward reference block is no longer fixed as a fixed value, but the weighting parameter of the current slice or CU can be adaptively adjusted according to factors such as changes in illumination of the sequence content. That is, instead of fixing the weighting value of each reference block level, sample Since the inter-weighted prediction is performed using the weight values of the levels, the accuracy of the inter-weighted prediction can be further improved, and the coding efficiency of the 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 of a current block and a type indication parameter and / or a geometric mode parameter, determines at least one reference prediction value of the current block based on the at least one motion vector information, determines at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be understood, in the embodiment of the present application, the encoding and decoding may be performed by using the type indication parameter and / or the geometric mode parameter to determine the current block's prediction value. sample A weight parameter for the level can be determined, whereby samplePrediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved coding efficiency and compression performance.
[0372] Based on the above embodiment, the encoding / decoding method proposed in the embodiment of the present application performs weighted prediction on a reference block. sample The weighting parameters of the levels can be determined and this solution can be applied to various inter-weighted prediction technique scenarios, where: sample The level weighting parameters are derived from a small number of control parameters, including type indexes (type indicating parameters) and / or geometric parameters (type indicating parameters), which 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 sample Used to select the type of level weighting parameter. sample The types of level weighting parameters may include, but are not limited to, weighting parameters defined by pre-stored matrices, weighting parameters defined by geometric parameters.
[0374] In the weighting mode defined by the pre-stored matrix, the number and dimensions of the predetermined matrix are finite. For a weighting matrix with a predetermined dimension, it can be applied to a range of domains with different dimensions and different accuracy requirements through methods such as interpolation.
[0375] The weighting parameters defined by geometric parameters refer to weighting parameters calculated from geometric parameters. sampleThe weighting parameter wtParm, which changes according to some geometric rule depending on the position, can be expressed by at least one parameter from among 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 is the gradient weight parameter, sampleIt can indicate the speed at which the gradient changes depending on the distance between the specified position (point or line position). For example, when indicating linear gradient intensity using an index, 0 means no gradient (jumps directly), and m means the distance from the specified position (2 m-1 ) / M sample When the distance reaches the position where the gradient weight parameter reaches its maximum or minimum, it indicates a linear gradient when the distance is closer, and maintains 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 is the first prediction sample can indicate the direction of the gradient strength change of the weight parameter, for example, 0 represents minimum to maximum and 1 represents 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 gradient upper / lower limit information minParm / maxParm specifically refers to the upper / lower limit information of the weight parameter. For example, the weight values 0 and 1 correspond to the values under the corresponding precision requirements (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). The lower limit of the weight parameter generally corresponds to 0, that is, the reference to the corresponding position when weighting. sample This means that the upper limit weighting parameter generally corresponds to 1, that is, the reference position corresponding to the weighting sample The gradient upper / lower limit information minParm / maxParm does not have to be weight values corresponding to 0 and 1, for example, values corresponding to 0.2 and 0.4 under the corresponding accuracy 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. sample The precision weighting parameter is the integer already derived sample It is obtained by performing interpolation filtering on the weighting parameters.
[0387] This solution can be applied to unidirectional prediction as well as bidirectional prediction, where all predictions are obtained from inter prediction, or where some or all predictions are obtained from inter prediction. sample It can also be applied if the values are obtained from intra prediction.
[0388] When used for unidirectional prediction, it is similar to the WP mode in that it uses only one prediction source. sample Level weighting parameters are derived and include weighting coefficients and offset amounts.
[0389] When applied to bidirectional prediction, similar to WP mode, for two prediction sources sampleLevel weighting parameters and offset amounts can be derived, or, similar to BCW or CIIP, for only two forecast sources. sample Derive the level weighting factors.
[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 obtain the forward and backward predicted values PredSampleL1 of the current block. sample Level weighting wL0 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, the forward prediction, the backward prediction, and the like are determined. sample Level weighting wL0 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] sample Regarding the weighting of slice levels based on level weights, in this technical proposal, sample Slice-level weighting based on level weights determines six weight-related parameters for the current slice: modeParm, sliceDirParm, sliceStartPosParm, sliceEndPosParm, minWvalue, and maxWvalue. Using these six parameters, one comprehensive weight parameter, SlicewtParm, can be determined for the current slice. The weight wLX used in 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 is the first prediction sample This indicates that the weighted values of are different possible change directions, such as from left to right, right to left, top to bottom, and bottom to top, and gradually increase 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 based on the distance, sample Point weight parameter w 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] sample For BCW weighting based on level weights, e.g. sample The BCW weighting based on the level weight determines four weight-related parameters for the current CU: modeParm, cbSlopeParm, cbDirParm, and cbCenterPosParm. Using these four parameters, one comprehensive weight parameter cbwtParm can be determined for the current slice. The weight wL0 is used for the CU-level bidirectional weighted prediction. 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 specifies the gradient intensity for the gradient mode at a distance n from the specified position. sample indicates that the gradient weight value reaches a maximum or minimum at a position.
[0408] cbDirParm is the first predictor sample indicates that the weights of the nodes increase gradually from the left or bottom (negative calculated distance) to the right or top (positive calculated distance). For example, a cbDirParm of 1 indicates that the first sampleThe weighted value of cbDirParm indicates that the distance value gradually decreases as it changes from negative to positive, and cbDirParm being 0 indicates that the distance value gradually increases as it 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), and the distance from the line is -n in combination with the information given by cbDirParm and cbSlopeParm. sample The position where is the gradation start position, and the left or bottom of this start position is the lower limit weight value, and the distance from the line is n sample The position where is the gradation end position, the position to the right or above the end position is the upper limit weight value, and the weight changes 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] Each block in the forward reference block of the current coding unit CU sampleFor a point, it is determined based on the position information of the sample point in the current block and the gradation center position cbCenterPosParm of the previous reference block. sample Calculate the distance parameter L to the point.
[0413]
number
[0414] Assuming the origin is at the center point of the entire block area, for a block with width cbWidth and height cbHeight, the top left corner sample The relative distances dx and dy are as shown in the following equations.
[0415]
number
number
[0416]
number
[0417] Based on the parameter, a forward reference block sample Point weight value w 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] Backward Reference Blocks sample The weight value of a point is obtained from the weight value of the forward reference block as follows:
number
[0422] BCW is enabled only for bidirectionally predicted CUs, and only a small number of predetermined weights are used, the index of which is coded.
[0423] sample When level-weighted BCW is adopted, the weighted prediction value is:
[0424]
number
[0425] sampleThe determination of the level-based 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. A comprehensive parameter, cbwtParm, is determined using several parameters, including modeParm, cbSlopeParm, cbDirParm, cbCenterPosParm, and the coding mode information of the neighboring blocks, isIntraTop and isIntraLeft. When intra mode is adopted, the CIIP intra prediction weight wt is used to determine the coding mode of each of the current block. sample The weights of the points wt[x0][y0] can be determined, 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 specifies that the gradient intensity of the gradient mode is 4 sample indicates that the gradient weight value reaches a maximum or minimum at a position.
[0429] cbDirParm is the first predictor sample The weighted value of gradually increases from the top left (calculated distance is negative) to the bottom 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 line with slope α and intercept β (or expressed in polar coordinates as angle θ and distance d), and the distance from the line is -n in combination with the information given by cbDirParm and cbSlopeParm. sample The position where is the gradation start position, and the left or bottom of this start position is the lower limit weight value, and the distance from the line is n sample The position where is the gradation end position, the position to the right or above the end position is the upper limit weight value, and the weight changes 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] Each block in the forward reference block of the current coding unit CU sampleFor a point, it is determined based on the position information of the sample point in the current block and the gradation center position cbCenterPosParm of the previous reference block. sample Calculate the distance parameter L to the point.
[0436]
number
[0437]
number
number
[0438]
number
[0439]
number
number
[0440]
number
[0441]
number
[0442] In the present embodiment, weighted prediction is used. sample Regarding the weighting value of a level, instead of fixing the weighting value of the entire forward reference block or the entire backward reference block as a fixed value, the coding efficiency of weighted prediction can be further improved by adjusting the weighting parameters of the current slice or CU according to factors such as lighting changes in the sequence content.
[0443] In the embodiment of the present application, the weight value of each reference block level is not set to a fixed value, but is set to sample Since inter-weighted prediction is performed using the weight values of the levels, the accuracy of inter-weighted prediction is further improved, which is beneficial for improving coding efficiency.
[0444] In the present embodiment, the weighting parameters are used to predict sample When deriving the value, sample Use the level gradation weighting parameter to sample To reduce the complexity of the calculation, a method of taking the same weight value for each sub-block (for example, a sub-block of 2x2 size or 4x4 size) may be implemented.
[0445] In the present embodiment, the weighting parameters on the plane are: sample The weight value may vary according to a certain geometric rule or may vary according to a combination of several different geometric rules. sample It changes according to the distance from the center change position of the point, and if the distance value is between [0, L1], it is the first gradation method, and if the distance is between (L1, L2], it is the 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 an embodiment of the present application, if the parameters such as gradation intensity information, change direction information, etc. of each CU are basically the same, first, one or more weight matrices can be predefined, and the coding unit block sample The weights of the levels are obtained by upsampling, downsampling or clipping a given weight matrix.
[0448] In the present embodiment, sample The weights of the points can be generated using coordinate-based calculations (main technique) or predetermined weight parameters (item 1 in Table 2.1, or extension technique 3). The weight parameters can also be sample adjacent to the top and left of the point sample It can also be derived from the weight parameters of the points, for example wc = (wl + wt + 1) / 2.
[0449] In an embodiment of the present application, a template matching method can be used to determine the optimal gradation mode of the current coding unit / block. Specifically, the upper row and / or left column of the current coding unit / block sample as a template, and build the template sample In the process of predicting the values, a gradient weighting process is performed on the predicted values from different sources, and the geometric parameters of the optimal gradient weighting scheme are selected and used as the parameters of the gradient weighting scheme for 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 of a current block and a type indication parameter and / or a geometric mode parameter, determines at least one reference prediction value of the current block based on the at least one motion vector information, determines at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be understood, in the embodiment of the present application, the encoding / decoding may include: determining a motion vector of the current block using the type indication parameter and / or the geometric mode parameter; sample A weight parameter for the level can be determined, whereby sample Prediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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, and at the decoding side, the codec can determine at least one motion vector information of a current block and a type indication parameter and / or a geometric mode parameter, 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. As can be understood, in the embodiment of the present application, the encoding and decoding can be performed by using the type indication parameter and / or the geometric mode parameter to determine at least one reference prediction value of the current block. sampleA weight parameter for the level can be determined, whereby sample Prediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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 of a current block, determines at least one reference prediction value of the current block based on the at least one motion vector information, determines at least one weighting parameter of the current block based on the type indication parameter and / or the geometric mode parameter, and determines a prediction value of the current block based on the at least one reference prediction value and the at least one weighting parameter. As can be understood, in the present embodiment, the encoding / decoding may determine at least one motion vector information of the current block using the type indication parameter and / or the geometric mode parameter. sample A weight parameter for the level can be determined, whereby sample Prediction can be performed on the current block based on the level weight parameters. Thus, in this embodiment, the weights used in the prediction process are no longer fixed and invariant. sample Adapt to point changes sample Because the weight values of the levels are selected, the accuracy of weighted prediction is significantly improved, leading to improved 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 at least one motion vector information includes a forward motion vector and / or a backward motion vector; The decoding method of claim 1 .
4. the at least one reference prediction value includes a forward reference value and / or a backward reference value; The decoding method of claim 1 .
5. the at least one weighting parameter includes at least one sample point weight value; The decoding method according to claim 2.
6. The decoding method comprises: determining the at least one sample point weight value based on position information of the sample points within the current block and the geometric mode parameter; The decoding method according to claim 5.
7. The decoding method comprises: Presetting an upper weight limit and a lower weight limit; 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 sample point weight value based on the first distance, the second distance, the lower bound weight, and the upper bound weight.
7. The decoding method according to claim 6.
8. The sample 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. The decoding method according to claim 7.
9. 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 sample-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 .
10. 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.
11. 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 encoding method of claim 10.
12. the at least one motion vector information includes a forward motion vector and / or a backward motion vector; The encoding method of claim 10.
13. the at least one reference prediction value includes a forward reference value and / or a backward reference value; The encoding method of claim 10.
14. 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.
15. 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.
16. A computer-readable storage medium on which a computer program and a bitstream are stored, the computer program causing a processor to execute an encoding method described in any one of claims 10 to 13 to generate the bitstream.