Inter-prediction method, encoder, decoder, and storage medium

The inter prediction method addresses the complexity and overhead of existing video encoding technologies by using GEO parameters to simplify weight calculations and reduce data storage, while maintaining coding performance.

JP7693884B2Active Publication Date: 2025-06-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024043451
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2025-06-17
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

Existing video encoding technologies using inter-block geometric partitioning prediction mode (GEO) face challenges due to large weight mapping tables, leading to increased data storage overhead and complex code.

Method used

An inter prediction method that determines a prediction mode parameter for a current block, uses GEO parameters to calculate predicted values and weight indices, and performs clamping to reduce the absolute weight index values, thereby simplifying the weight calculation and reducing data storage.

Benefits of technology

The proposed method simplifies the text and code during inter prediction, reduces data storage overhead, and maintains coding performance by effectively managing weight values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007693884000008
    Figure 0007693884000008
  • Figure 0007693884000009
    Figure 0007693884000009
  • Figure 0007693884000010
    Figure 0007693884000010
Patent Text Reader

Abstract

To provide an inter prediction method, an encoder, a decoder, and a storage medium using an inter block geometric partition prediction mode (GEO).SOLUTION: When a prediction mode parameter of a current block indicates that GEO is used to determine inter prediction of the current block, a first predicted value, a second predicted value, and a weight index corresponding to a pixel point in the current block are determined on the basis of the GEO parameter. A clamping process is performed on each weight index corresponding to a pixel point in the current block to obtain absolute information of the weight index, and the clamping process clamps the maximum absolute value of the weight index corresponding to a pixel point in the current block to half the preset value. A first weight value and a second weight value are determined on the basis of the absolute information of the weight index corresponding to the pixel point in the current block to obtain an inter prediction value of the current block.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to video encoding technology, including, but not limited to, an inter prediction method, an encoder, a decoder, and a storage medium.

Background Art

[0002] In a video codec, in the process of encoding the current block, in addition to intra prediction, an inter prediction method can also be adopted. Inter prediction can include motion estimation and motion compensation. For motion compensation, the current block between frames can be divided into two non-rectangular partitions using the inter-block geometrical partitioning prediction mode (GEO), and after predicting each partition respectively, weighted fusion can be performed to obtain the predicted value of the current block.

[0003] In the prior art, in the prediction process of GEO, it is necessary to use an angle mapping table and a weight mapping table. However, when predicting the current block, since the length of the weight mapping table for one partition is 27, the total length of the mapping tables for the two partitions is 54. However, the weight values corresponding to these 54 are composed of 5 types: {4, 5, 6, 7, 8}.

[0004] However, there are many duplicate weights in the existing weight mapping table, and the weight table is too long, so the overhead of data storage during inter prediction becomes large, and the text and code become complicated.

Summary of the Invention

Problems to be Solved by the Invention

[0005] The embodiments of the present application provide an inter prediction method, an encoder, a decoder, and a storage medium, which can simplify the text and code during inter prediction and reduce the overhead of data storage.

Means for Solving the Problem

[0006] In the first aspect, an embodiment of the present application provides an inter prediction method applied to an encoder, and the method includes: determining a prediction mode parameter of a current block; when the prediction mode parameter instructs to determine the inter prediction of the current block using an inter-block geometric partitioning prediction mode (GEO), determining a GEO parameter of the current block; determining a first predicted value of a first partition of the current block and a second predicted value of a second partition of the current block based on the GEO parameter; determining a weight index corresponding to a pixel point in the current block based on the GEO parameter; performing a clamping process on the weight index corresponding to the pixel point in the current block respectively to obtain absolute information of the weight index corresponding to the pixel point in the current block, where the clamping process is to clamp the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block to half of a preset value; determining a first weight value of a pixel point in the current block and a second weight value of a pixel point in the current block based on the absolute information of the weight index corresponding to the pixel point in the current block; performing weighted fusion of the pixel points in the current block using the first predicted value, the first weight value, the second predicted value, and the second weight value to obtain an inter prediction value of the current block.

[0007] In the second aspect, an embodiment of the present application provides an inter prediction method applied to a decoder, and the method includes: analyzing a bitstream and determining a prediction mode parameter of a current block; When the prediction mode parameter instructs to determine the inter prediction of the current block using the inter-block geometric partitioning prediction mode (GEO), analyze the bitstream and determine the GEO parameter of the current block, Based on the GEO parameter, determine the first prediction value of the first partition of the current block and the second prediction value of the second partition of the current block, Based on the GEO parameter, determine the weight index corresponding to the pixel point in the current block, Perform clamping processing on the weight index corresponding to the pixel point in the current block respectively to obtain the absolute information of the weight index corresponding to the pixel point in the current block, and the clamping processing is to clamp the maximum value of the weight index corresponding to the pixel point in the current block to half of the preset value, Based on the absolute information of the weight index corresponding to the pixel point in the current block, determine the first weight value of the pixel point in the current block and the second weight value of the pixel point in the current block, Using the first prediction value, the first weight value, the second prediction value, and the second weight value to determine the weighted fusion of the pixel points in the current block and obtain the inter prediction value of the current block.

[0008] In a third aspect, the embodiment of the present application provides an encoder, which includes a first determination unit, a first clamping unit, and a first prediction unit. The first determination unit is used to determine the prediction mode parameter of the current block, and when the prediction mode parameter is instructed to determine the inter prediction of the current block using the inter-block geometric partitioning prediction mode (GEO), to determine the GEO parameter of the current block, to determine a first predicted value of a first partition of the current block and a second predicted value of a second partition of the current block based on the GEO parameter, and to determine a weight index corresponding to a pixel point in the current block based on the GEO parameter. The first clamping unit is used to perform clamping processing on the weight index corresponding to the pixel point in the current block respectively to obtain the absolute information of the weight index corresponding to the pixel point in the current block, and the clamping processing is to clamp the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block to half of the preset value. The first determination unit is further used to determine a first weight value of the pixel point in the current block and a second weight value of the pixel point in the current block based on the absolute information of the weight index corresponding to the pixel point in the current block. The first prediction unit is used to perform weighted fusion of the pixel points in the current block using the first predicted value, the first weight value, the second predicted value, and the second weight value to obtain the inter prediction value of the current block.

[0009] In a fourth aspect, an embodiment of the present application provides a decoder, which includes an analysis unit, a second determination unit, a second clamping unit, and a second prediction unit. The analysis unit is used to analyze the bitstream and determine the prediction mode parameter of the current block. When the second determination unit is instructed to determine the inter prediction of the current block by using the inter-block geometric partitioning prediction mode (GEO) as the prediction mode parameter, it analyzes the bitstream to determine the GEO parameter of the current block, determines the first prediction value of the first partition of the current block and the second prediction value of the second partition of the current block based on the GEO parameter, and determines the weight index corresponding to the pixel point in the current block based on the GEO parameter. It is used for: The second clamping unit is used to perform clamping processing on the weight index corresponding to the pixel point in the current block respectively to obtain the absolute information of the weight index corresponding to the pixel point in the current block. The clamping processing is to clamp the maximum value of the weight index corresponding to the pixel point in the current block to half of the preset value. The second determination unit is used to determine the first weight value of the pixel point in the current block and the second weight value of the pixel point in the current block based on the absolute information of the weight index corresponding to the pixel point in the current block. The second prediction unit is used to determine the weighted fusion of the pixel points in the current block by using the first prediction value, the first weight value, the second prediction value, and the second weight value, and obtain the inter prediction value of the current block.

[0010] In the fifth aspect, the embodiment of the present application further provides an encoder, comprising a first memory and a first processor, wherein a computer program executable by the first processor is stored in the first memory, and when the first processor executes the program, the inter prediction method of the encoder is realized.

[0011] In the sixth aspect, the embodiment of the present application further provides a decoder, comprising a second memory and a second processor, A computer program executable by a second processor is stored in the second memory, and when the second processor executes the program, the inter prediction method of the decoder is realized.

[0012] In a seventh aspect, an embodiment of the present application provides a storage medium in which a computer program is stored. When the computer program is executed by a first processor, the inter prediction method of the encoder is realized, or when the computer program is executed by a second processor, the inter prediction method of the decoder is realized.

Advantages of the Invention

[0013] Embodiments of the present application provide an inter prediction method, an encoder, a decoder, and a storage medium, which determine the prediction mode parameters of the current block. When the prediction mode parameters instruct to determine the inter prediction of the current block using the inter-block geometric partitioning prediction mode (GEO), the GEO parameters of the current block are determined. Based on the GEO parameters, the first prediction value of the first partition of the current block and the second prediction value of the second partition of the current block are determined. Based on the GEO parameters, the weight index corresponding to the pixel point in the current block is determined. Clamping processing is respectively performed on the weight indexes corresponding to the pixel points in the current block to obtain the absolute information of the weight indexes corresponding to the pixel points in the current block. The clamping processing is to clamp the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block to half of the preset value. Based on the absolute information of the weight index corresponding to the pixel point in the current block, the first weight value of the pixel point in the current block and the second weight value of the pixel point in the current block are determined. Weighted fusion of the pixel points in the current block is performed using the first prediction value, the first weight value, the second prediction value, and the second weight value to obtain the inter prediction value of the current block. By adopting the above technical solution, in the process of performing inter prediction, the encoder determines the weight index corresponding to the pixel point in the current block based on the GEO parameters, and further, by the clamping processing of the absolute value, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of the preset value. Then, the size reduced by half in the conventional case of clamping to the preset value is reduced. Therefore, the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by about half. As a result, the text and code during inter prediction are simplified, and the overhead of data storage is reduced.

Brief Description of the Drawings

[0014]

Figure 1

Figure 2

Figure 3

Figure 4a

Figure 4b

Figure 4c

Figure 4d

Figure 4e

Figure 4f

Figure 4g

Figure 5

Figure 6a

Figure 6b

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Embodiments for Carrying Out the Invention

[0015] This application provides a video encoding system. As shown in FIG. 1, the video encoding system 11 includes a conversion unit 111, a quantization unit 112, a mode selection and encoding control logic unit 113, an intra prediction unit 114, an inter prediction unit 115 (including motion compensation and motion estimation), an inverse quantization unit 116, an inverse conversion unit 117, a loop filtering unit 118, an encoding unit 119, and a decoded image buffering unit 110. For the input original video signal, one video reconstruction block can be obtained by dividing a coding tree unit (CTU). The mode selection and encoding control logic unit 113 determines the encoding mode. Next, for the residual pixel information obtained through intra prediction or inter prediction, the conversion unit 111 and the quantization unit 112 convert the video reconstruction block, including converting the residual information from the pixel domain to the transform domain. The obtained transform coefficients are quantized, thereby further reducing the bit rate. The intra prediction unit 114 is used to perform intra prediction on the video reconstruction block. The intra prediction unit 114 is used to determine the optimal intra prediction mode (i.e., the target prediction mode) of the video reconstruction block. The inter prediction unit 115 is used to perform inter prediction encoding on one or more blocks in one or more reference frames of the received video reconstruction block, thereby providing temporal prediction information. Here, motion estimation is a process of generating a motion vector capable of estimating the motion of the video reconstruction block. Next, motion compensation is performed based on the motion vector determined by motion estimation. After the inter prediction mode is determined, the inter prediction unit 115 is further used to provide the selected inter prediction data to the encoding unit 119 and also transmit the calculated and determined motion vector data to the encoding unit 119.Also, the inverse quantization unit 116 and the inverse transform unit 117 are used for the reconstruction of the video reconstruction block, reconstruct the residual block in the pixel domain, the reconstructed residual block has the blocking artifacts removed by the loop filtering unit 118, and then, in order to generate the reconstructed video reconstruction block, the reconstructed residual block is added to one prediction block in the frame of the decoded image buffering unit 110. The encoding unit 119 is used for encoding various encoding parameters and the quantized transform coefficients. The decoded image buffering unit 110 is used for storing the reconstructed video reconstruction block for prediction reference. As the video image encoding progresses, new reconstructed video reconstruction blocks are continuously generated, and all of these reconstructed video reconstruction blocks are stored in the decoded image buffering unit 110.

[0016] Embodiments of the present application provide a video decoding system. FIG. 2 is a structural schematic diagram of a video decoding system according to an embodiment of the present application. As shown in FIG. 2, the video decoding system 12 includes a decoding unit 121, an inverse transform unit 127, an inverse quantization unit 122, an intra prediction unit 123, a motion compensation unit 124, a loop filtering unit 125, and a decoded image buffering unit 126. After the input video signal is encoded by the video encoding system 11, a bitstream of the video signal is output. The bitstream is input to the video decoding system 12 and first passes through the decoding unit 121 to obtain the decoded transform coefficients thereby. The inverse transform unit 127 and the inverse quantization unit 122 perform processing on the transform coefficients to generate a residual block in the pixel domain thereby. The intra prediction unit 123 can be used to generate prediction data for the current video decoding block based on the determined intra prediction direction and data from previously decoded blocks in the current frame or picture. The motion compensation unit 124 analyzes the motion vector and other related syntax elements to determine prediction information for the video decoding block and uses the prediction information to generate a prediction block of the video decoding block that is just being decoded. By obtaining the sum of the residual block of the inverse transform unit 127 and the inverse quantization unit 122 and the corresponding prediction block generated by the intra prediction unit 123 or the motion compensation unit 124, a decoded video block is formed. The decoded video signal can have its blocking artifacts removed by the loop filtering unit 125, and the video quality can be improved. Next, the decoded video block is stored in the decoded image buffering unit 126, and the decoded image buffering unit 126 stores a reference image for subsequent intra prediction or motion compensation and is also used to output the video signal to obtain the restored original video signal at the same time.

[0017] The inter-prediction method according to the embodiments of the present application mainly plays a role in the inter-prediction unit 115 of the video encoding system 11 and the inter-prediction unit, i.e., the motion compensation unit 124, of the video decoding system 12. That is, when a relatively good prediction effect can be obtained by the inter-prediction method according to the embodiments of the present application in the video encoding system 11, correspondingly, the recovery quality of video decoding can also be improved on the decoding side.

[0018] Based on this, the following will further elaborate on the technical solution of the present application with reference to the drawings and embodiments. Before providing a detailed description, it should be noted that the "first", "second", "third", etc. mentioned throughout the specification are only used to distinguish different features and do not have the function of limiting priority, sequence, size relationship, etc.

[0019] The embodiments of the present application provide an inter-prediction method applicable to a video encoding device, i.e., an encoder. The functions realized by the method can be realized by a processor in the video encoding device calling program code. Of course, the program code can be stored in a computer storage medium. As can be seen from this, the video encoding device includes at least a processor and a storage medium.

[0020] FIG. 3 is a schematic flowchart 1 of the realization of the intra-prediction method according to the embodiments of the present application. As shown in FIG. 3, the method includes the following steps S101 to S107.

[0021] In step S101, determine the prediction mode parameter of the current block.

[0022] In an embodiment of the present application, the video image may be divided into a plurality of image blocks, and each current image block to be encoded may be referred to as a coding block (CB). Each coding block may include a first image component, a second image component, and a third image component. The current block is a coding block waiting to perform prediction on the current first image component, second image component, or third image component in the video image.

[0023] If the current block performs prediction on the first image component, and assuming that the first image component is a luminance component, that is, the image component to be predicted is a luminance component, the current block may be referred to as a luminance block. Or, if the current block performs prediction on the second image component, and assuming that the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, the current block may be referred to as a chrominance block.

[0024] In addition, the prediction mode parameter indicates the encoding mode of the current block and the parameters related to the mode. Usually, the prediction mode parameter of the current block can be determined by the method of rate distortion optimization (RDO).

[0025] Specifically, in some embodiments, the realization of the encoder determining the prediction mode parameter of the current block is that the encoder determines the image component to be predicted of the current block, and based on the parameters of the current block, uses a plurality of prediction modes to perform predictive encoding on the image component to be predicted respectively, calculates the rate distortion cost results corresponding to each prediction mode in the plurality of prediction modes, selects the minimum rate distortion cost result from the plurality of rate distortion cost results obtained by the calculation, and determines the prediction mode corresponding to the minimum rate distortion cost result as the prediction mode parameter of the current block.

[0026] That is, on the encoder side, for the current block, multiple prediction modes may be adopted to perform encoding on the image component to be predicted respectively. Here, the multiple prediction modes usually include an inter prediction mode, a conventional intra prediction mode, and a non-conventional intra prediction mode. And the conventional intra prediction mode may further include a direct current (DC) mode, a planar (PLANAR) mode, an angular mode, etc. The non-conventional intra prediction mode may further include an MIP mode, a cross-component linear model prediction (CCLM) mode, an intra block copy (IBC) mode, a palette (PLT) mode, etc. The inter prediction mode may include an inter-block geometrical partitioning prediction mode (GEO), a triangle prediction mode (TPM), etc.

[0027] In this way, as a result of performing encoding on the current block using multiple prediction modes respectively, rate-distortion cost results corresponding to each prediction mode can be obtained. Next, the minimum rate-distortion cost result is selected from the obtained multiple rate-distortion cost results, and the prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block. Then, finally, encoding can be performed on the current block using the determined prediction mode, and in this prediction mode, the prediction residual is small and the encoding efficiency can be improved.

[0028] In step S102, when the prediction mode parameter is instructed to determine the inter prediction of the current block using GEO, the GEO parameter of the current block is determined.

[0029] In the embodiments of the present application, when instructing to determine the inter prediction of the current block using the prediction mode parameter GEO, the GEO parameter of the current block can be obtained or determined. Here, the current block in the embodiments of the present application refers to an inter block.

[0030] In the embodiments of the present application, the GEO parameter of the current block includes angle index information and the size information of the current block, and may further include step size index information, target partition mode, etc.

[0031] In addition, in the embodiments of the present application, GEO is to divide the inter block (i.e., the current block) into two non-rectangular sub-partitions for the edge part of the object in the image, and then perform weighted fusion after prediction respectively. For example, the non-rectangular form may be as shown in FIGS. 4a to 4g below.

[0032] In the current VVC Draft7, GEO has a total of 82 partition modes, and each partition mode corresponds to one angle α and one step size ρ. The angle divides 360 degrees into 24 equal parts. Therefore, the angle includes 24 parts and the step size includes 4 parts. Then, the combination of the angle and the step size is 96.

[0033] In addition, for the angle table, the angle table based on the fixed step size before is replaced by the gradient-based angle table, and an unevenly spaced angle table is constructed using five fixed gradients (1, 1 / 2, 1 / 4, 4, 2).

[0034] As an example, as shown in FIG. 5, a combination of each angle α and step size ρ constitutes one division mode (here, after excluding all the first type of step sizes with angle indices of 0, 6, 12 to 23, 82 division modes are obtained). All division modes of GEO include the TPM mode, and the TPMs are integrated and replaced. GEO currently divides the current block into two non-rectangular sub-partitions. Each sub-partition independently performs one-way motion compensation to obtain a one-way prediction value, and finally, a weight matrix corresponding to the current block is used to perform weighted fusion on the one-way prediction values of the two partitions to obtain the final GEO prediction value.

[0035] In the embodiment of the present application, on the encoder side, when it is determined to perform inter prediction by adopting GEO, the encoder can obtain the GEO parameters when the current block performs inter prediction by adopting GEO.

[0036] In the embodiment of the present application, the encoder traverses 82 division modes corresponding to GEO to determine the division mode with the smallest rate-distortion cost, that is, to determine the target division mode. Then, based on the target division mode, the encoder can determine the angle index information and step size index information corresponding to the target division mode according to the mapping table of the preset division mode, angle index, and step size index. The mapping table of the preset division mode, angle index, and step size index is shown in Table 1.

[0037]

Table 1

[0038] wedge_partition_idx is the division mode index, angleIdx is the angle index information, and distanceIdx is the step size index information.

[0039] In step S103, based on the GEO parameter, a first predicted value of the first partition of the current block and a second predicted value of the second partition of the current block are determined.

[0040] In the embodiment of the present application, since the GEO parameter can include angle index information and a target splitting mode, the encoder splits the current block based on the target splitting mode to obtain a first partition and a second partition, and determines first motion information of a first reference block corresponding to the first partition and second motion information of a second reference block corresponding to the second partition from a preset merge candidate list. The encoder performs motion compensation based on the first motion information to obtain a first predicted value of the first partition, and the encoder performs motion compensation based on the second motion information to obtain a second predicted value of the second partition.

[0041] In addition, in the embodiment of the present application, GEO adopts a one-way merge candidate list of TPM in the existing VVC7, that is, a preset merge candidate list, to find the respective MVs, that is, motion information, of the two partitions after GEO splitting.

[0042] The merge candidate list usually includes elements of a preset number of reference blocks. The preset number may be 6, and each element stores data in the form of a structure. Each structure may include motion information of the reference block, a reference frame list, a prediction direction, etc. When storing data corresponding to GEO, it is stored in a 4×4 size block.

[0043] In the embodiment of the present application, information such as angle index information, step size index information, first motion information, and second motion information all need to be written into the bitstream during encoding because they are used during decoding.

[0044] In step S104, based on the GEO parameter, a weight index corresponding to the pixel point in the current block is determined.

[0045] The GEO parameters include the size information and the angle index information of the current block, and the size information is the height and width of the current block. The current block contains many pixel points, and the encoder can determine the position information of the pixel points in the current block based on the size information of the current block. Based on the position information, angle index information, and updated angle mapping table of each pixel point in the current block, the weight index corresponding to each pixel point in the current block can be calculated and obtained.

[0046] The detailed acquisition process will be described in the subsequent embodiments.

[0047] In step S105, each weight index corresponding to the pixel points in the current block is respectively clamped to obtain the absolute information of the weight index corresponding to the pixel points in the current block. The clamping process is to clamp the maximum value of the absolute value of the weight index corresponding to the pixel points in the current block to half of the preset value.

[0048] The encoder obtains the pixel points in the current block, obtains the absolute value of the weight index corresponding to the pixel points in the current block, clamps the result within the range of [0 to half of the preset value], thereby obtaining the absolute information of the weight index corresponding to each pixel point in the current block. Here, when the absolute value of the weight index of one pixel point exceeds half of the preset value, the absolute information of the weight index corresponding to the one pixel point is half of the preset value; when the absolute value of the weight index of one pixel point does not exceed half of the preset value, the absolute value of the weight index of the one pixel point is the absolute information of the weight index.

[0049] In the embodiment of the present application, the preset value is 26. In this case, the absolute information of the weight index is within the range of [0 to 13].

[0050] For example, by adopting the implementation method of the ternary operator, the absolute information of the weight index can be obtained by formula (1). Formula (1) is as follows.

[0051] weightIdxAbs = Clip3(0, 13, abs(weightIdx)) (1) In the formula, weightIdxAbs is the absolute information of the weight index, weightIdx is the weight index, abs() is the absolute value function, and Clip3() is the clamp function.

[0052] In step S106, based on the absolute information of the weight index corresponding to the pixel point in the current block, the first weight value of the pixel point in the current block and the second weight value of the pixel point in the current block are determined.

[0053] After the encoder obtains the absolute information of the weight index corresponding to the pixel point in the current block, first, based on the weight index corresponding to the pixel point in the current block and the absolute information of the weight index corresponding to the pixel point in the current block, the weight value corresponding to the absolute information of the weight index is determined. Further, based on the weight value corresponding to the absolute information of the weight index, the weight value of the first pixel point of the first partition and the weight value of the second pixel point of the second partition are determined from the pixel points in the current block. Then, based on the weight value of the first pixel point of the first partition and the weight value of the second pixel point of the second partition, the first weight value of the pixel point in the current block corresponding to the first partition is determined. Finally, based on the first weight value, the second weight value of the pixel point in the current block corresponding to the second partition can be determined.

[0054] In the embodiments of the present application, when the weight index corresponding to one pixel point among the pixel points in the current block is 0 or less, it indicates that the one pixel point belongs to the first partition. When the weight index corresponding to one pixel point among the pixel points in the current block is greater than 0, it indicates that the one pixel point belongs to the second partition. The process of obtaining the first weight value of the pixel points in the current block based on the first partition may be to obtain the absolute information of the first weight index corresponding to the first pixel point of the first partition and the absolute information of the second weight index corresponding to the second pixel point of the second partition from the absolute information of the weight index corresponding to the pixel points in the current block, obtain the weight value of the first pixel point based on the absolute information of the first weight index, obtain the weight value of the second pixel point based on the absolute information of the second weight index, and obtain the first weight value of the pixel points in the current block corresponding to the first partition based on the weight value of the first pixel point and the weight value of the second pixel point. On the other hand, the second weight value of the pixel points in the current block is 8 - the first weight value.

[0055] In the embodiments of the present application, the specific implementation in which the encoder determines the first weight value of the pixel points in the current block and the second weight value of the pixel points in the current block based on the absolute information of the weight index corresponding to the pixel points in the current block may include the following five methods.

[0056] Method 1 When the absolute information of the weight index is smaller than the preset index threshold value, the encoder combines the absolute information of the weight index with the first numerical value, performs a preset bit right shift process, and then adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index. When the absolute information of the weight index is greater than or equal to the preset index threshold value, the encoder combines the absolute information of the weight index with the second numerical value, performs a preset bit right shift process, and then adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index. The encoder determines the first weight value of the pixel points in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points in the current block. The encoder obtains the second weight value of the pixel points in the current block corresponding to the second partition based on the first weight value.

[0057] In the embodiment of the present application, since the range of the absolute information of the weight index is within the range of [0 to half of the preset value], the encoder may first calculate the weight value corresponding to the absolute information of each weight index within the range of [0 to half of the preset value] based on the absolute information of the weight index of the pixel points in the current block. Specifically, when the absolute information of the weight index is smaller than the preset index threshold value, the encoder adds the first numerical value to the absolute information of the weight index, performs a preset bit right shift process, and then adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index. When the absolute information of the weight index is greater than or equal to the preset index threshold value, the encoder combines the absolute information of the weight index with the second numerical value, performs a preset bit right shift process, and then adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index.

[0058] As an example, adopting the implementation method of the ternary operator, the weight value corresponding to the absolute information of the weight index can be obtained by formula (2). Formula (2) is as follows.

[0059] WedgeFilter = weightIdxAbs < 9? ((weightIdxAbs + 2)>>2)+4 : ((weightIdxAbs + 3)>>2)+4 (2) In the formula, the preset index threshold is 9, the first numerical value is 2, the second numerical value is 3, the preset weight value is 4, the preset bit is 2, WedgeFilter is the weight value corresponding to weightIdxAbs, and weightIdxAbs is the absolute information of one weight index.

[0060] Note that the result after the right shift in formula (2) only takes the integer part.

[0061] Adopt the method of the division mapping function, and the weight value corresponding to the absolute information of the weight index can be obtained by formula (3). Formula (3) is as follows.

[0062]

Number

[0063] When the preset value is 26, the absolute information of the weight index (weightIdxAbs) is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. Then, the weight values (WedgeFilter[weightIdxAbs]) of the absolute information of the weight index are the results calculated by formula (2) or (3), which are 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8 respectively.

[0064] As can be understood, the encoder utilizes a single partitioning function to integrate the process of weight table lookup into the process of GEO operations, directly and simply calculating the corresponding weights based on the GEO weight index, omitting the weight mapping table and the table lookup operation, and actually implicitly achieving lossless reduction of the GEO weight table.

[0065] In the embodiments of the present application, the encoder, based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point within the current block, obtains the absolute information of the first weight index corresponding to the first pixel point of the first partition and the absolute information of the second weight index corresponding to the second pixel point of the second partition, obtains the weight value of the first pixel point based on the absolute information of the first weight index, obtains the weight value of the second pixel point based on the absolute information of the second weight index, and obtains the first weight value of the pixel point within the current block corresponding to the first partition based on the weight value of the first pixel point and the weight value of the second pixel point.

[0066] As an example, the first weight value of each pixel point can be obtained using Equation (4). Equation (4) is as follows.

[0067] sampleWeight = weightIdx <= 0? WedgeFilter : 8 - WedgeFilter (4) In the formula, sampleWeight is the weight value of a pixel point, weightIdx is the weight index of the pixel point, and WedgeFilter is the weight value corresponding to the absolute information of the weight of a pixel point.

[0068] As can be seen from Equation (4), when obtaining the first weight value of the pixel points within the current block mainly by the first partition, it is necessary to determine the weight values of each pixel point in these two partitions based on the two partitions. Thereby, the first weight of the pixel points within the current block can be obtained. On the contrary, the second weight of the pixel points within the current block mainly by the second partition is obtained by subtracting the first weight value of the pixel points within the current block from 8.

[0069] Method 2 The encoder combines the absolute information of the weight index with the first numerical value and the value indicating whether the absolute information of the weight index is greater than 8, then further performs a preset bit right shift process, and finally adds the preset weight numerical value to obtain the weight value corresponding to the absolute information of the weight index. The encoder determines the first weight value of the pixel points within the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points within the current block. The encoder obtains the second weight value of the pixel points within the current block corresponding to the second partition based on the first weight value.

[0070] In the embodiments of the present application, since the range of the absolute information of the weight index is within the range of [0 to half of the preset value], the encoder may first calculate the weight values corresponding to the absolute information of each weight index within the range of [0 to half of the preset value] based on the absolute information of the weight index of the pixel points within the current block. Specifically, the encoder adds the first numerical value and the value indicating whether the absolute information of the weight index is greater than 8 to the absolute information of the weight index, then further performs a preset bit right shift process, and finally adds the preset weight numerical value to obtain the weight value corresponding to the absolute information of the weight index.

[0071] As an example, by adopting the implementation method of the ternary operator, the weight value corresponding to the absolute information of the weight index can be obtained by formula (5). Formula (5) is as follows.

[0072] WedgeFilter = ((weightIdxAbs + 2+(weightIdxAbs >8))>>2)+4 (5) In the formula, the first numerical value is 2, the preset weight value is 4, the preset bit is 2, WedgeFilter is the weight value corresponding to weightIdxAbs, and weightIdxAbs is the absolute information of one weight index.

[0073] In addition, the result after the right shift in formula (3) only takes the integer part. When the absolute information of the weight index is greater than 8, the value is 1, and when it is 8 or less, the value is 0.

[0074] When the preset value is 26, the absolute information (weightIdxAbs) of the weight index is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. Then, the weight values (WedgeFilter[weightIdxAbs]) of the absolute information of the weight index are 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8 respectively as calculated by formula (5).

[0075] In addition, the process in which the encoder determines the first weight value of the pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, and obtains the second weight value of the pixel point in the current block corresponding to the second partition based on the first weight value is consistent with the description of the implementation of Method 1, and will not be repeatedly described here.

[0076] Method 3 The encoder combines the absolute information of the weight index with the value after sign determination for the absolute information of the 8-weight index, then performs a preset bit right shift operation, and finally adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index. Based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point within the current block, the encoder determines the first weight value of the pixel point within the current block corresponding to the first partition, and based on the first weight value, obtains the second weight value of the pixel point within the current block corresponding to the second partition.

[0077] In the embodiment of the present application, since the range of the absolute information of the weight index is within the range of [0 to half of the preset value], the encoder may first calculate the weight value corresponding to the absolute information of each weight index within the range of [0 to half of the preset value] based on the absolute information of the weight index of the pixel point within the current block. Specifically, the encoder adds the first numerical value to the absolute information of the weight index, adds the value after sign determination to the absolute information of the 8-weight index, then performs a preset bit right shift operation, and finally adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index.

[0078] As an example, adopting the implementation method of the ternary operator, the weight value corresponding to the absolute information of the weight index can be obtained by Equation (6). Equation (6) is as follows.

[0079] WedgeFilter = ((weightIdxAbs + 2 + sign(8 - weightIdxAbs)) >> 2) + 4 (6) Wherein, the first numerical value is 2, the preset weight value is 4, the preset bit is 2, WedgeFilter is the weight value corresponding to weightIdxAbs, weightIdxAbs is the absolute information of one weight index, sign() is a function for determining the sign, when 8 - weightIdxAbs < 0, the value is 1, and when 8 - weightIdxAbs ≥ 0, the value is 0.

[0080] When the preset value is 26, the absolute information of the weight index (weightIdxAbs) is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13. Then, the weight values (WedgeFilter[weightIdxAbs]) of the absolute information of the weight index are 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8 respectively as calculated by Equation (5).

[0081] In addition, the process in which the encoder determines the first weight value of the pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, and obtains the second weight value of the pixel point in the current block corresponding to the second partition based on the first weight value is consistent with the description of the implementation of Method 1, and will not be repeatedly described here.

[0082] Furthermore, in order to reach a calculation result that is relatively similar to Equation (6), Equation (7) or Equation (8) may be further adopted for implementation, and the embodiments of the present application do not limit this. Equation (7) and Equation (8) are as follows.

[0083] WedgeFilter = ((weightIdxAbs + 2)) >> 2) + 4 (7) WedgeFilter = ((weightIdxAbs + 1)) >> 2) + 4 (8)

[0084] Method 4 The encoder obtains, based on the absolute information of the weight index, the weight value corresponding to the absolute information of the weight index from a preset weight mapping table. The preset weight mapping table is obtained by performing a clamping process within half of the preset value for each weight index corresponding to the pixel points within the current block. The encoder determines the first weight value of the pixel points within the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points within the current block. The encoder obtains the second weight value of the pixel points within the current block corresponding to the second partition based on the first weight value.

[0085] In the embodiments of the present application, the encoder can obtain the weight values from 0 to half of the preset value of the absolute information of the weight index based on any one of Method 1 to Method 3, and use it as the preset weight mapping table. When the encoder obtains the absolute information of the weight index of the pixel points within the current block, it can find out the weight values corresponding to each pixel point from the preset weight mapping table.

[0086] As an example, the preset weight mapping table is shown in Table 2.

[0087]

Table 2

[0088] In addition, the process in which the encoder determines the first weight value of the pixel points within the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points within the current block, and obtains the second weight value of the pixel points within the current block corresponding to the second partition based on the first weight value is consistent with the description of the implementation of Method 1, and will not be repeatedly described here.

[0089] Method 5 When the absolute information of the weight index is smaller than the preset index threshold, the encoder combines the absolute information of the weight index with the first numerical value and performs a preset bit right shift process to obtain a new weight index. When the absolute information of the weight index is greater than or equal to the preset index threshold, the encoder combines the absolute information of the weight index with the second numerical value and performs a preset bit right shift process to obtain a new weight index. The encoder obtains a new weight value corresponding to the new weight index from the preset new weight mapping table. When the weight index information is 0 or less, the encoder determines the new weight value as the weight value corresponding to the absolute information of the weight index. When the weight index information is greater than 0, the encoder determines 8 - the new weight value as the weight value corresponding to the absolute information of the weight index. The encoder determines the first weight value of the pixel points in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points in the current block, and the encoder obtains the second weight value of the pixel points in the current block corresponding to the second partition based on the first weight value.

[0090] In the embodiments of the present application, a preset new weight mapping table representing the correspondence between the weight value and the weight index information is set. Here, the weight values do not have duplicate values, the weight index information belongs to [0 to half of the preset value], the specific number of weight index information items is the same as the number of weight values, as shown in Table 3.

[0091]

Table 3

[0092] Here, ReduceIdx is the weight index information, and WedgeFilter[ReduceIdx] is the weight value.

[0093] When the encoder obtains the absolute information of the weight index of the pixel point within the current block, if the absolute information of the weight index is smaller than the preset index threshold, the encoder adds a first value to the absolute information of the weight index and performs a preset bit right shift operation to obtain a new weight index. If the absolute information of the weight index is greater than or equal to the preset index threshold, the encoder adds a second value to the absolute information of the weight index and performs a preset bit right shift operation to obtain a new weight index.

[0094] As an example, adopting the implementation method of the ternary operator, the new weight index can be obtained by formula (9). Formula (9) is as follows.

[0095] ReduceIdx=WeightIdxabs < 9? ((WeightIdxabs + 2)>>2) : ((WeightIdxabs + 3)>>2) (9) In the formula, ReduceIdx is the new weight index, WeightIdxabs is the absolute information of the weight index of a pixel point, the preset index threshold is 9, the first value is 2, the second value is 3, the preset weight value is 4, and the preset bit is 2.

[0096] Note that only the integer part is taken for the result after the right shift in formula (9).

[0097] Adopting the method of the classification mapping function, the new weight index can be further obtained by formula (10). Formula (10) is as follows.

[0098]

Number

[0099] In the embodiments of the present application, the encoder can obtain, from a new preset weight mapping table, the weight value corresponding to the absolute information of the weight index of each pixel point in the current block, that is, the new weight value WedgeFilter[ReduceIdx] corresponding to the new weight index. When the weight index information of each pixel point is 0 or less, the encoder determines the new weight value as the weight value corresponding to the absolute information of the weight index. When the weight index information is greater than 0, the encoder determines 8 - the new weight value as the weight value corresponding to the absolute information of the weight index.

[0100] In the embodiments of the present application, based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, the encoder obtains the absolute information of the first weight index corresponding to the first pixel point of the first partition and the absolute information of the second weight index corresponding to the second pixel point of the second partition, obtains the weight value of the first pixel point based on the absolute information of the first weight index, obtains the weight value of the second pixel point based on the absolute information of the second weight index, and based on the weight value of the first pixel point and the weight value of the second pixel point, obtains the first weight value of the pixel point in the current block corresponding to the first partition.

[0101] As an example, the first weight value of each pixel point can be obtained using Equation (11). Equation (11) is as follows.

[0102] sampleWeight = weightIdx <= 0? WedgeFilter[ReduceIdx] : 8 - WedgeFilter[ReduceIdx] (11) In the formula, sampleWeight is the weight value of one pixel point, weightIdx is the weight index of the one pixel point, and WedgeFilter[ReduceIdx] is the new weight value corresponding to the absolute weight information of one pixel point.

[0103] As can be understood, the encoder simplifies the GEO weight mapping table, derives the GEO weights using executable mathematical formulas in the process of calculation, omits the weight mapping table and the table look-up operation, and implicitly realizes the reduction of the existing weight mapping table, thereby further simplifying the code and text and reducing the memory overhead of the weight mapping table.

[0104] In step S107, weighted fusion of pixel points in the current block is performed using the first prediction value, the first weight value, the second prediction value, and the second weight value, and an inter prediction value of the current block is obtained.

[0105] In the embodiment of the present application, the encoder multiplies the first prediction value and the first weight value of each pixel point, and adds the product of the second prediction value and the second weight value of the corresponding each pixel point, thereby performing weighted fusion on the pixel points in the current block and obtaining the inter prediction value of the current block.

[0106] It should be noted that the first prediction value and the second prediction value are two prediction values corresponding to each pixel point in the current block, and the first weight value and the second weight value are also two different weight values corresponding to each pixel point in the current block respectively.

[0107] The inter prediction value of the current block can be obtained by adopting the following formula (23).

[0108] pbSamples[x][y]=Clip3(0,(1<<bitDepth)-1,(predSamplesLPART1[x][y]*(8 - sampleWeight1)+predSamplesLPART2[x][y]*sampleWeight2+offset1)>>shift1) (23) Where pbSamples[x][y] is the inter-prediction value of each pixel point of the current block, predSamplesLPART1[x][y] is the first prediction value of each pixel point, sampleWeight1 is the first weight value of each pixel point, predSamplesLPART2[x][y] is the second prediction value of each pixel point, and sampleWeight2 is the second weight value of each pixel point.

[0109] In some embodiments of the present application, when the encoder performs inter-prediction on the current block, it predicts each video component respectively. That is, both the first prediction value and the second prediction value include the luminance prediction value and the chrominance prediction value.

[0110] In an embodiment of the present application, the encoder may first obtain the weight value of the luminance component, and the weight value of the chrominance component can be obtained based on the weight value of the luminance component.

[0111] The aforementioned first weight and second weight values of the present application may be the weight values of the luminance component.

[0112] In addition, the encoder can obtain the weight of the luminance sample at the upper right corner of each 2*2 block and directly use it as the weight of the chrominance sample at the current (x, y) position, that is, perform downsampling on the weight of the luminance sample.

[0113] As an example, downsampling is performed on the first weight of the luminance shown in FIG. 6a to obtain the first weight value of the chrominance shown in FIG. 6b. Similarly, after performing downsampling on the second weight of the luminance, the second weight of the luminance sample at the upper right corner of each 2*2 block can be directly used as the second weight of the chrominance sample at the current (x, y) position.

[0114] As can be understood, in the process of the encoder performing inter prediction, based on the GEO parameters, the encoder determines the weight index corresponding to the pixel point in the current block, and further, by performing a clamping process on the absolute value, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of the preset value. In this way, the size is reduced by half compared to the conventional case where it is clamped to the preset value. Therefore, the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by about half. As a result, the text and code during inter prediction are simplified, and the overhead of data storage is reduced.

[0115] In some embodiments of the present application, as shown in FIG. 7, the GEO parameters of the current block include angle index information and the size information of the current block. The implementation of step S104 in the inter prediction method according to the embodiments of the present application may include the following steps S1041 to S1042.

[0116] In step S1041, based on the size information of the current block, the position information of the pixel points in the current block is determined.

[0117] In step S1042, based on the angle index information and the preset angle mapping table, in combination with the position information of the pixel points in the current block respectively, the weight index corresponding to the pixel points in the current block is determined.

[0118] In the embodiments of the present application, the size information of the current block of the encoder includes the height H of the current block and the width W of the current block, thereby determining the coordinate area where the current block is located, and further determining the position information of each pixel point in the current block, that is, the coordinate information (x, y) of each pixel point. The encoder can determine the weight index corresponding to the pixel points in the current block based on the angle index information, the preset angle mapping table, and the position information of the pixel points in the current block.

[0119] In some embodiments of the present application, for the realization process in which the encoder determines the weight index corresponding to the pixel point in the current block based on the angle index information, the preset angle mapping table, and the position information of the pixel point in the current block, the encoder determines the cosine angle index information and the sine angle index information based on the angle index information, the encoder reduces the degree of the angle of the preset angle mapping table to obtain an updated angle mapping table, and the encoder combines the cosine angle index information, the sine angle index information, and the updated angle mapping table with the position information of the pixel point in the current block respectively to determine the weight index corresponding to the pixel point in the current block.

[0120] Note that the preset angle mapping table is the angle mapping table adopted in the prior art, as shown in Table 4.

[0121] [Table 4]

[0122] Here, angleIdx is the angle index information, and Dis[angleIdx] is the angle.

[0123] In the embodiments of the present application, as shown in Table 5, the angles in the updated angle mapping table obtained by the encoder reducing the degree of the angle of the preset angle mapping table are all angle values with the degree of the preset angle mapping table reduced by one.

[0124] [Table 5]

[0125] In the encoder, the original preset angle mapping table is deleted, and only the updated angle mapping table remains, thereby reducing the memory overhead.

[0126] In the embodiment of the present application, in the implementation process where the encoder determines the weight index corresponding to the pixel point in the current block by combining the position information of the pixel point in the current block based on the cosine angle index information, sine angle index information, and updated angle mapping table respectively, the encoder first determines the vertical distance (rho) from the block center point to the current dividing line based on the cosine angle index information and sine angle index information, and then needs to determine the weight index of each pixel point based on the cosine angle index information, sine angle index information, updated angle mapping table, position information of the pixel point in the current block, and rho.

[0127] As an example, the cosine angle index information can be obtained by Equation (12), and the sine angle index information can be obtained by Equation (13). Equations (12) and (13) are as follows.

[0128] displacementX = angleIdx (12) displacementY=(displacementX + 6)%24 (13) In the formula, displacementX is the cosine angle index information, displacementY is the sine angle index information, and angleIdx is the angle index information.

[0129] It should be noted that the cos(α) index number corresponding to the current angle is displacementX, and the corresponding -sin(α) index number is displacementY.

[0130] rho can be obtained by Equation (14). Equation (14) is as follows.

[0131] rho=(Dis [displacementX]<< 8) + (Dis[displacementY] << 8) (14) In the formula, Dis [displacementX] is the cosine angle (the first angle) corresponding to the cosine angle index information, Dis[displacementY] is the sine angle (the second angle) corresponding to the sine angle index information, and the cosine angle and the sine angle can be obtained based on the updated mapping table.

[0132] The weight index of each pixel point of the current block can be obtained by Equation (15). Equation (15) is as follows.

[0133] weightIdx = ((x<<1) + 1)*Dis[displacementX] + ((y<<1) + 1))*Dis[displacementY] - rho (15) In the formula, weightIdx is the weight index of one pixel point, x is the abscissa value of one pixel point, and y is the ordinate value of the one pixel point. The position information of one pixel point is (x, y).

[0134] As can be understood, by looking up the weight mapping table with the obtained index to obtain the corresponding weight, it can be seen that each step of the above calculation needs to be multiplied by the angles Dis[displacementX] and Dis[displacementY]. In contrast, in this invention, the weight mapping table is removed, and a mathematical method is designed to implicitly halve the weight mapping table. Therefore, in each step of calculating the weight index and the motion index, it is necessary to divide by 2. However, since the values in the angle mapping table are all powers of 2, by reducing the order of the angle mapping table, the operation of dividing the weight index and the motion index by 2 can be realized, and it can be associated with the reduced weight mapping table.

[0135] In some embodiments of the present application, after step S107 of the inter-prediction method according to the embodiments of the present application, the method may further include steps S108 to S113.

[0136] In step S108, based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, a motion offset value is determined. Based on the angle index information, the step size index information, and the size information of the current block, the motion horizontal coordinate offset value and the motion vertical coordinate offset value corresponding to the current block are obtained.

[0137] In step S109, based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information, motion index information is obtained.

[0138] In step S110, when the absolute value of the motion index information is smaller than half of the preset motion index threshold, the first motion information and the second motion information are determined as the motion information of the current block.

[0139] In step S111, when the motion index information is 0 or less, the first motion information is determined as the motion information of the current block.

[0140] In step S112, when the motion index information is greater than 0, the second motion information is determined as the motion information of the current block.

[0141] In step S113, the motion information of the current block is stored in the preset merge candidate list.

[0142] In the embodiment of the present application, when the encoder performs encoding of the current block, in order to be used for inter prediction of subsequent encoded blocks, it is further necessary to store the encoded motion information of the current block. The encoder calculates the first angle and the second angle based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, and further obtains a motion offset value based on the first angle and the second angle. The encoder obtains the motion index information based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information. When the absolute value of the motion index information is smaller than half of the preset motion index threshold, the encoder determines the first motion information and the second motion information as the motion information of the current block. When the motion index information is 0 or less, the encoder determines the first motion information as the motion information of the current block. When the motion index information is greater than 0, the encoder determines the second motion information as the motion information of the current block. The motion information of the current block is stored in the preset merge candidate list.

[0143] As an example, the motion offset value (motionOffset) can be obtained using Equation (16). Equation (16) is as follows.

[0144] motionOffset = 3*Dis[displacementX]+ 3*Dis[displacementY] (16)

[0145] In the embodiment of the present application, since the GEO parameter further includes step size index information, the realization that the encoder can obtain the motion horizontal coordinate offset value and the motion vertical coordinate offset value corresponding to the current block based on the angle index information, the step size index information, and the size information of the current block can be realized by adopting equations (17) and (18) when shiftHor == 0. Equations (17) and (18) are as follows.

[0146] offsetX = ( 64 - numSbX ) >> 1 (17) offsetY=(64-numSbY)>>1+angleIdx<12?(distanceIdx*nCbH)>>3:-((distanceIdx*nCbH) >>3) (18) In the formulas, offsetX is the motion horizontal coordinate offset value, offsetY is the motion vertical coordinate offset value, angleIdx is the angle index information, distanceIdx is the step size index information, numSbX is the width of the motion mask matrix of the current block, numSbY is the height of the motion mask matrix of the current block, and nCbW and nCbH represent the width and height of the current block.

[0147] In the embodiment of the present application, since the GEO parameter further includes step size index information, the realization that the encoder can obtain the motion horizontal coordinate offset value and the motion vertical coordinate offset value corresponding to the current block based on the angle index information, the step size index information, and the size information of the current block can be realized by adopting equations (19) and (20) when shiftHor == 1. Equations (19) and (20) are as follows.

[0148] offsetX = (64 - numSbX) >> 1 + (angleIdx < 12? (distanceIdx * nCbW) >> 3 : -((distanceIdx * nCbW) >> 3)) (19) offsetY = (64 - numSbY) >> 1 (20) In the formula, offsetX is the motion horizontal coordinate offset value, offsetY is the motion vertical coordinate offset value, angleIdx is the angle index information, distanceIdx is the step size index information, numSbX is the width of the motion mask matrix of the current block, numSbY is the height of the motion mask matrix of the current block, and nCbW and nCbH represent the width and height of the current block.

[0149] As an example, in the embodiments of the present application, the realization that the encoder obtains motion index information based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information can be obtained by Equation (21). Equation (21) is as follows.

[0150] motionIdx = (((xSbIdx + offsetX) << 3) + 1) * Dis[displacementX] + (((ySbIdx + offsetY << 3) + 1)) * Dis[displacementY] - rho + motionOffset (21) In the formula, motionIdx is motion index information, the position information of the pixel point at the upper left corner of the current block is (xSbIdx, ySbIdx), offsetX is the motion horizontal coordinate offset value, offsetY is the motion vertical coordinate offset value, Dis[displacementX] is the first angle, Dis[displacementY] is the second angle, rho is also the vertical distance from the center point of the block obtained based on the first angle and the second angle to the current dividing line, and motionOffset is the motion offset value.

[0151] In addition, ShiftHor is the horizontal offset, and its value is 0. A plurality of offsets are required on the Y axis, and its value is 1. A plurality of offsets are required on the X axis.

[0152] If (angleIdx%12 == 6) || (angleIdx%12!= 0 && hwRatio ≥ 1), then ShiftHor = 0. Otherwise, ShiftHor = 1.

[0153] In some embodiments of the present application, the encoder may determine the motion information of the current block from the first motion information and the second motion information based on the current motion mask matrix and store it in the preset merge candidate list.

[0154] In some embodiments of the present application, the encoder may further determine the motion information of the current block based on the motion index information. When the absolute value of the motion index information is smaller than half of the preset motion index threshold, the first motion information and the second motion information are determined as the motion information of the current block. When the motion index information is 0 or less, the first motion information is determined as the motion information of the current block. When the motion index information is greater than 0, the second motion information is determined as the motion information of the current block. The motion information of the current block is stored in the preset merge candidate list.

[0155] Assuming that the current block is 16×16, the encoder determines whether the current sub-block stores one-way motion information or bidirectional motion information based on the size of abs(motionIdx) in each 4×4 sub-block.

[0156] As an example, if abs(motionIdx) < 16, the current block stores the configured bidirectional motion information, i.e., the first motion information and the second motion information. If (motionIdx) ≤ 0, the current block stores the first motion information of the first partition. If (motionIdx) > 0, the current block stores the second motion information of the second partition.

[0157] Here, the preset motion index threshold is 32.

[0158] In addition, in the embodiments of the present application, the encoder can first obtain the motion mask matrix, and then trim it from the preset motion mask matrix based on the motion horizontal coordinate offset value and the motion vertical coordinate offset value to obtain the current motion mask matrix of the current block.

[0159] As an example, in the preset motion mask matrix 1 shown in FIG. 8, different current motion mask matrices 2, 3, and 4 can be obtained by trimming from the preset motion mask matrix 1 using the size A of the current block due to differences in the splitting mode, the angle ψ, the step size ρ, offsetX, and offsetY.

[0160] Still, since GEO inherits the method in which the TPM stores motion information, the storage of motion information in GEO mode is still performed in units of small 4×4 blocks. Therefore, the size of the pre-defined motion mask matrix of GEO is 56*56. The motion information of each small 4×4 block is determined by the weighted weight at the upper left corner point of the block. Finally, the motion masks of all the calculated small 4×4 blocks are stored in a 56×56 matrix. Specifically, the encoder obtains the motion offset value (motionOffset) according to Equation (16), and obtains all the motion index information (motionIdx1) based on the position information (x, y) of each pixel point in 56×56, motionOffset, rho, the first angle, and the second angle. Equation (22) is as follows.

[0161] motionIdx1 = ((x << 3)+1)*Dis[displacementX]+((y << 3 + 1))*Dis[displacementY] - rho + motionOffset (22)

[0162] Here, the mask corresponding to the motion information in the 56×56 preset motion mask matrix is determined based on abs(motionIdx1) and motionIdx1.

[0163] For example, if abs(motionIdx) < 16, the motion mask of the current 4×4 sub-block is 2 (representing bidirectional motion information). Otherwise, if (motionIdx) ≤ 0, the motion mask of the current 4×4 sub-block is 0 (representing the first motion information). if (motionIdx) > 0, the motion mask of the current 4×4 sub-block is 1 (representing the second motion information).

[0164] Furthermore, in the embodiments of the present application, actually, there are seven pre-stored mask matrices in total (including the weighted weight mask matrix and the motion mask matrix), and the first type of step size at seven angles between 0 and 90 corresponds to the situation where the center point of the block is passed through. The pre-stored mask matrices at other angles are obtained by mirroring these seven matrices horizontally or vertically, thereby reducing the storage space.

[0165] As can be understood, after the inter-prediction method according to the embodiments of the present application is implemented in the GEO-based VVC reference software VTM7.0_common_base, under the Random Access condition, the test of the test sequence required by JVET is performed, and there is no change in the BD-rate in the Y, Cb, and Cr components (consistent with the performance of the Anchor). As can be seen from this data, the proposed simplification scheme has no impact on the coding performance, and moreover, the storage size of the weight table is reduced, and the text description and code implementation are simplified. In terms of time complexity, since the GEO pre-defined weight matrix is only calculated once before starting the encoding / decoding for each sequence, the ternary operator operation brought about by this application does not affect the complexity of the overall encoding / decoding time, and it can be said that the time complexity hardly changes.

[0166] The embodiments of the present application provide an inter-prediction method applicable to a video decoding device, that is, a decoder. The functions realized by the method can be realized by a processor in the video decoding device calling program code. Of course, the program code can be stored in a computer storage medium. As can be seen from this, the video decoding device includes at least a processor and a storage medium.

[0167] FIG. 9 is a schematic flowchart of the implementation of the intra-prediction method according to the embodiments of the present application. As shown in FIG. 10, the method includes the following steps S201 to S213.

[0168] In S201, the bitstream is analyzed to determine the prediction mode parameters of the current block.

[0169] In S202, when the prediction mode parameters instruct to determine the inter prediction of the current block using the inter-block geometric partitioning prediction mode (GEO), the bitstream is analyzed to determine the GEO parameters of the current block.

[0170] In S203, based on the GEO parameters, the first predicted value of the first partition of the current block and the second predicted value of the second partition of the current block are determined.

[0171] In S204, based on the GEO parameters, the weight index corresponding to the pixel point in the current block is determined.

[0172] In S205, each weight index corresponding to the pixel point in the current block is clamped, and the absolute information of the weight index corresponding to the pixel point in the current block is obtained. The clamping process is to clamp the maximum value of the weight index corresponding to the pixel point in the current block to half of the preset value.

[0173] In S206, based on the absolute information of the weight index corresponding to the pixel point in the current block, the first weight value of the pixel point in the current block and the second weight value of the pixel point in the current block are determined.

[0174] In S207, using the first predicted value, the first weight value, the second predicted value, and the second weight value, the weighted fusion of the pixel points in the current block is determined, and the inter prediction value of the current block is obtained.

[0175] In some embodiments of the present application, a specific implementation in which the decoder determines the first weight value of the pixel points in the current block and the second weight value of the pixel points in the current block based on the absolute information of the weight index corresponding to the pixel points in the current block may include the following five methods.

[0176] Method 1 When the absolute information of the weight index is smaller than the preset index threshold, the decoder combines the absolute information of the weight index with the first numerical value, performs a preset bit right shift process, and then adds the preset weight numerical value to obtain the weight value corresponding to the absolute information of the weight index. When the absolute information of the weight index is greater than or equal to the preset index threshold, the decoder combines the absolute information of the weight index with the second numerical value, performs a preset bit right shift process, and then adds the preset weight numerical value to obtain the weight value corresponding to the absolute information of the weight index. The decoder determines the first weight value of the pixel points in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points in the current block. The decoder obtains the second weight value of the pixel points in the current block corresponding to the second partition based on the first weight value.

[0177] Method 2 The decoder combines the absolute information of the weight index with the first numerical value and the value indicating whether the absolute information of the weight index is greater than 8, then performs a preset bit right shift process, and finally adds the preset weight numerical value to obtain the weight value corresponding to the absolute information of the weight index. The decoder determines the first weight value of the pixel points in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points in the current block. The decoder obtains the second weight value of the pixel points in the current block corresponding to the second partition based on the first weight value.

[0178] Method 3 The decoder combines the absolute information of the weight index with the value after sign determination for the absolute information of the 8-weight index of the first numerical value, then further performs a preset bit right shift process, and finally adds the preset weight value to obtain the weight value corresponding to the absolute information of the weight index. Based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, the decoder determines the first weight value of the pixel point in the current block corresponding to the first partition, and based on the first weight value, obtains the second weight value of the pixel point in the current block corresponding to the second partition.

[0179] Method 4 Based on the absolute information of the weight index, the decoder searches for and obtains the weight value corresponding to the absolute information of the weight index from the preset weight mapping table. The preset weight mapping table is obtained by performing a clamp process within half of the preset value for each weight index corresponding to the pixel point in the current block. Based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, the decoder determines the first weight value of the pixel point in the current block corresponding to the first partition. The decoder obtains the second weight value of the pixel point in the current block corresponding to the second partition based on the first weight value.

[0180] Method 5 When the absolute information of the weight index is smaller than the preset index threshold value, the decoder combines the absolute information of the weight index with the first numerical value to perform a preset bit right shift process to obtain a new weight index. When the absolute information of the weight index is greater than or equal to the preset index threshold value, the decoder combines the absolute information of the weight index with the second numerical value to perform a preset bit right shift process to obtain a new weight index. The decoder obtains a new weight value corresponding to the new weight index from the preset new weight mapping table. When the weight index information is 0 or less, the decoder determines the new weight value as the weight value corresponding to the absolute information of the weight index, and when the weight index information is greater than 0, the decoder determines 8 - the new weight value as the weight value corresponding to the absolute information of the weight index. The decoder determines a first weight value of the pixel points in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel points in the current block, and the decoder obtains a second weight value of the pixel points in the current block corresponding to the second partition based on the first weight value.

[0181] In the embodiment of the present application, the decoder analyzes, from the bit stream, angle index information corresponding to the current block, first motion information of the first reference block corresponding to the first partition, second motion information of the second reference block corresponding to the second partition, and step size index information, and performs motion compensation based on the first motion information and the second motion information respectively to obtain a first one - direction prediction value corresponding to the first partition and a second one - direction prediction value corresponding to the second partition.

[0182] Here, the preset value is 26, the preset index threshold value is 9, the first numerical value is 2, the second numerical value is 3, the preset weight numerical value is 4, and the preset bit is 2.

[0183] In the embodiments of the present application, the realization of steps S201 to S207 of the decoder basically coincides with the realization process of steps S101 to S107 on the encoder side, and will not be repeatedly described here.

[0184] The difference is that the prediction mode parameter and the GEO parameter of the current block on the decoder side are both analyzed from the bitstream, while the encoder obtains them by itself.

[0185] As can be understood, in the process of performing inter prediction, the decoder determines the weight index corresponding to the pixel point in the current block based on the GEO parameter, and further, by means of absolute value clamping processing, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of the preset value. In this way, the size reduced by half in the conventional case of clamping to the preset value is reduced, so that the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by about half, thereby simplifying the text and code during inter prediction and reducing the overhead of data storage.

[0186] In some embodiments of the present application, the GEO parameter of the current block includes angle index information and the size information of the current block, and the realization of step S204 in the inter prediction method according to the embodiments of the present application may include the following steps S2041 to S2042.

[0187] In step S2041, based on the size information of the current block, the position information of the pixel points in the current block is determined.

[0188] In step S2042, based on the angle index information and the preset angle mapping table, in combination with the position information of the pixel points in the current block respectively, the weight index corresponding to the pixel points in the current block is determined.

[0189] In some embodiments of the present application, the decoder determines cosine angle index information and sine angle index information based on angle index information, reduces the angles of a preset angle mapping table to obtain an updated angle mapping table, and based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, in combination with the position information of pixel points within the current block respectively, can determine the weight index corresponding to the pixel points within the current block.

[0190] In the embodiments of the present application, the realization of steps S2041 - S2042 of the decoder is basically the same as the steps S1041 - S1042 of the realization process on the encoder side, and will not be repeatedly described here.

[0191] As can be understood, it can be seen that each step of the above calculation needs to multiply by the angle Dis[displacementX] and Dis[displacementY] by looking up the weight mapping table with the obtained index to obtain the corresponding weight. In contrast, in this solution, the weight mapping table is removed, and a mathematical method is designed to implicitly halve the weight mapping table. Therefore, it is necessary to divide by 2 in each step of calculating the weight index and the motion index. However, since the values in the angle mapping table are all powers of 2, by reducing the order of the angle mapping table, the operation of dividing the weight index and the motion index by 2 can be realized and associated with the reduced weight mapping table.

[0192] In step S208, based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, a motion offset value is determined, and based on the angle index information, the step size index information, and the size information of the current block, the motion horizontal coordinate offset value and the motion vertical coordinate offset value corresponding to the current block are obtained.

[0193] In step S209, motion index information is obtained based on the motion offset value, the horizontal motion coordinate offset value, the vertical motion coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information.

[0194] In step S210, when the absolute value of the motion index information is smaller than half of the preset motion index threshold, the first motion information and the second motion information are determined as the motion information of the current block.

[0195] In step S211, when the motion index information is 0 or less, the first motion information is determined as the motion information of the current block.

[0196] In step S212, when the motion index information is greater than 0, the second motion information is determined as the motion information of the current block.

[0197] In step S213, the motion information of the current block is stored in the preset merge candidate list.

[0198] In the embodiment of the present application, the realization of steps S208 to S213 of the decoder basically coincides with the realization process of steps S108 to S113 on the encoder side, and will not be repeatedly described here.

[0199] Here, the preset motion index threshold is 32.

[0200] As can be understood, the inter-prediction method according to the embodiments of the present application is realized in the VVC reference software VTM7.0_common_base based on GEO. After that, under the Random Access condition, the test of the test sequence required by JVET is performed, and there is no change in the BD-rate in the Y, Cb, and Cr components (consistent with the performance of the Anchor). As can be seen from this data, the proposed simplification plan has no impact on the coding performance, and moreover, the memory size of the weight table is reduced, and the text description and code implementation are simplified. In terms of time complexity, since the GEO pre-defined weight matrix is calculated only once before starting the encoding / decoding for each sequence, the ternary operator operation brought by the present application does not affect the complexity of the overall encoding / decoding time, and it can be said that the time complexity hardly changes.

[0201] As shown in FIG. 10, the embodiment of the present application provides an encoder 1, which includes a first determination unit 10, a first clamping unit 11, and a first prediction unit 12. The first determination unit 10 is used to determine the prediction mode parameter of the current block, and when the prediction mode parameter is instructed to determine the inter-prediction of the current block using the inter-block geometric partitioning prediction mode (GEO), to determine the GEO parameter of the current block, and based on the GEO parameter, to determine the first prediction value of the first partition of the current block and the second prediction value of the second partition of the current block, and based on the GEO parameter, to determine the weight index corresponding to the pixel point in the current block. The first clamping unit 11 is used to perform clamping processing on the weight index corresponding to the pixel point in the current block respectively to obtain the absolute information of the weight index corresponding to the pixel point in the current block. The clamping processing is to clamp the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block to half of the preset value. The first determination unit 10 is further used to determine a first weight value of a pixel point in the current block and a second weight value of the pixel point in the current block based on absolute information of a weight index corresponding to the pixel point in the current block. The first prediction unit 12 is used to perform weighted fusion of pixel points in the current block using the first predicted value, the first weight value, the second predicted value, and the second weight value, and obtain an inter prediction value of the current block.

[0202] In some embodiments of the present application, the GEO parameter of the current block includes angle index information and size information of the current block. The first determination unit 10 is further used to determine position information of pixel points in the current block based on the size information of the current block, and to determine a weight index corresponding to a pixel point in the current block by combining with the position information of the pixel point in the current block respectively based on the angle index information and a preset angle mapping table.

[0203] In some embodiments of the present application, the first determination unit 10 is further used to determine cosine angle index information and sine angle index information based on the angle index information, to obtain the updated angle mapping table by reducing the degree of the angle of the preset angle mapping table, and to determine a weight index corresponding to a pixel point in the current block by combining with the position information of the pixel point in the current block respectively based on the cosine angle index information, the sine angle index information, and the updated angle mapping table.

[0204] In some embodiments of the present application, when the absolute information of the weight index is smaller than a preset index threshold, the first determination unit 10 further combines the absolute information of the weight index with a first numerical value, performs a preset bit right shift process, and then adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; when the absolute information of the weight index is greater than or equal to the preset index threshold, the first determination unit 10 combines the absolute information of the weight index with a second numerical value, performs a preset bit right shift process, and then adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of the pixel point in the current block corresponding to the second partition based on the first weight value.

[0205] In some embodiments of the present application, the first determination unit 10 further combines the absolute information of the weight index with a first numerical value and a value indicating whether the absolute information of the weight index is greater than 8, then performs a preset bit right shift process, and finally adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of the pixel point in the current block corresponding to the second partition based on the first weight value.

[0206] In some embodiments of the present application, the first determination unit 10 further combines the absolute information of the weight index with a first numerical value and a value after sign determination with respect to the absolute information of the weight index, then further performs a preset bit right shift process, and finally adds a preset weight value to obtain a weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0207] In some embodiments of the present application, the first determination unit 10 further searches for and obtains, from a preset weight mapping table based on the absolute information of the weight index, a weight value corresponding to the absolute information of the weight index, where the preset weight mapping table is obtained by performing a clamping process within half of a preset value for each weight index corresponding to a pixel point in the current block; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0208] In some embodiments of the present application, when the absolute information of the weight index is smaller than a preset index threshold value, the first determination unit 10 further combines the absolute information of the weight index with a first numerical value to perform a preset bit right shift process to obtain new weight index information; when the absolute information of the weight index is greater than or equal to the preset index threshold value, the absolute information of the weight index is combined with a second numerical value to perform a preset bit right shift process to obtain new weight index information; obtains a new weight value corresponding to the new weight index information from a preset new weight mapping table; when the weight index information is 0 or less, determines the new weight value as the weight value corresponding to the absolute information of the weight index; when the weight index information is greater than 0, determines 8 - the new weight value as the weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block within the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0209] In some embodiments of the present application, the encoder 1 further includes a writing unit 13 and a first storage unit 14 (both not shown in the figure). The writing unit 13 is used to perform weighted fusion of pixel points in the current block using the first predicted value, the first weight value, the second predicted value, and the second weight value, and after obtaining an inter-predicted value of the current block, write the angle index information into a bit stream. The first determination unit 10 further determines a motion offset value based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, and obtains a motion horizontal coordinate offset value and a motion vertical coordinate offset value corresponding to the current block based on the angle index information, the step size index information, and the size information of the current block, and obtains motion index information based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information. When the absolute value of the motion index information is smaller than half of a preset motion index threshold, determining the first motion information and the second motion information as the motion information of the current block; when the motion index information is 0 or less, determining the first motion information as the motion information of the current block; and when the motion index information is greater than 0, determining the second motion information as the motion information of the current block. It is used for The first storage unit 14 is used to store the motion information of the current block in a preset merge candidate list.

[0210] In some embodiments of the present application, the preset value is 26, the preset index threshold is 9, the first numerical value is 2, the second numerical value is 3, the preset weight numerical value is 4, the preset bit is 2, and the preset motion index threshold is 32.

[0211] In actual applications, as shown in FIG. 11, the embodiments of the present application further provide an encoder, which includes a first memory 15 and a first processor 16. A computer program executable by the first processor 16 is stored in the first memory 15. When the first processor 16 executes the program, an inter-prediction method on the encoder side is realized.

[0212] As can be understood, in the process of the encoder performing inter prediction, based on the GEO parameters, the encoder determines the weight index corresponding to the pixel point in the current block, and further, by performing a clamp process on the absolute value, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of the preset value. By doing so, the size is reduced by half compared to the conventional case where it is clamped to the preset value. Therefore, the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by approximately half, thereby simplifying the text and code during inter prediction and reducing the overhead of data storage.

[0213] As shown in FIG. 12, the embodiment of the present application provides a decoder 2, which includes an analysis unit 20, a second determination unit 21, a second clamp unit 22, and a second prediction unit 23. The analysis unit 20 is used to analyze the bitstream and determine the prediction mode parameters of the current block. When the prediction mode parameters indicate that the inter-block geometric partitioning prediction mode (GEO) is used to determine the inter prediction of the current block, the second determination unit 21 is used to analyze the bitstream to determine the GEO parameters of the current block, determine the first prediction value of the first partition of the current block and the second prediction value of the second partition of the current block based on the GEO parameters, and determine the weight index corresponding to the pixel point in the current block based on the GEO parameters. The second clamp unit 22 is used to perform a clamp process on the weight index corresponding to the pixel point in the current block respectively to obtain the absolute information of the weight index corresponding to the pixel point in the current block. The clamp process is to clamp the maximum value of the weight index corresponding to the pixel point in the current block to half of the preset value. The second determination unit 21 is further used to determine a first weight value of a pixel point in the current block and a second weight value of the pixel point in the current block based on absolute information of a weight index corresponding to the pixel point in the current block. The second prediction unit 23 is used to determine weighted fusion of pixel points in the current block by using the first predicted value, the first weight value, the second predicted value, and the second weight value, and to obtain an inter prediction value of the current block.

[0214] In some embodiments of the present application, the GEO parameter of the current block includes angle index information and size information of the current block. The second determination unit 21 is further used to determine position information of a pixel point in the current block based on the size information of the current block, and to determine a weight index corresponding to the pixel point in the current block by combining with the position information of the pixel point in the current block respectively based on the angle index information and a preset angle mapping table.

[0215] In some embodiments of the present application, the second determination unit 21 is further used to determine cosine angle index information and sine angle index information based on the angle index information, to obtain the updated angle mapping table by reducing the degree of the angle of the preset angle mapping table, and to determine a weight index corresponding to the pixel point in the current block by combining with the position information of the pixel point in the current block respectively based on the cosine angle index information, the sine angle index information, and the updated angle mapping table.

[0216] In some embodiments of the present application, when the absolute information of the weight index is smaller than a preset index threshold, the second determination unit 21 further combines the absolute information of the weight index with a first numerical value, performs a preset bit right shift process, and then adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; when the absolute information of the weight index is greater than or equal to the preset index threshold, the second determination unit 21 further combines the absolute information of the weight index with a second numerical value, performs a preset bit right shift process, and then adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, determine a first weight value of the pixel point in the current block corresponding to the first partition; and based on the first weight value, obtain a second weight value of the pixel point in the current block corresponding to the second partition.

[0217] In some embodiments of the present application, the second determination unit 21 further combines the absolute information of the weight index with a first numerical value and a value indicating whether the absolute information of the weight index is greater than 8, then performs a preset bit right shift process, and finally adds a preset weight numerical value to obtain a weight value corresponding to the absolute information of the weight index; based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block, determine a first weight value of the pixel point in the current block corresponding to the first partition; and based on the first weight value, obtain a second weight value of the pixel point in the current block corresponding to the second partition.

[0218] In some embodiments of the present application, the second determination unit 21 further combines the absolute information of the weight index with a first numerical value and a value after sign determination with respect to the absolute information of the weight index, then performs a preset bit right shift process, and finally adds a preset weight value to obtain a weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0219] In some embodiments of the present application, the second determination unit 21 further searches for and obtains a weight value corresponding to the absolute information of the weight index from a preset weight mapping table based on the absolute information of the weight index, where the preset weight mapping table is obtained by performing a clamp process within half of a preset value for each weight index corresponding to a pixel point in the current block; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0220] In some embodiments of the present application, when the absolute information of the weight index is smaller than a preset index threshold, the second determination unit 21 further combines the absolute information of the weight index with a first numerical value to perform a preset bit right shift process to obtain new weight index information; when the absolute information of the weight index is greater than or equal to the preset index threshold, the second determination unit 21 combines the absolute information of the weight index with a second numerical value to perform a preset bit right shift process to obtain new weight index information; obtains a new weight value corresponding to the new weight index information from a preset new weight mapping table; when the weight index information is 0 or less, determines the new weight value as the weight value corresponding to the absolute information of the weight index; when the weight index information is greater than 0, determines 8 - the new weight value as the weight value corresponding to the absolute information of the weight index; determines a first weight value of a pixel point in the current block corresponding to the first partition based on the weight value corresponding to the absolute information of the weight index and the weight index corresponding to the pixel point in the current block; and obtains a second weight value of a pixel point in the current block corresponding to the second partition based on the first weight value.

[0221] In some embodiments of the present application, the decoder 2 further includes a second storage unit 24 (not shown), The second determination unit 21 further performs weighted fusion of each pixel point using the first one-way prediction value, the first weight value, the second one-way prediction value, and the second weight value to obtain a prediction value of the current block. After that, based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, a motion offset value is determined, and based on the angle index information, the step size index information, and the size information of the current block, a motion horizontal coordinate offset value and a motion vertical coordinate offset value corresponding to the current block are obtained. And based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point at the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information, motion index information is obtained. When the absolute value of the motion index information is smaller than half of the preset motion index threshold, the first motion information and the second motion information are determined as the motion information of the current block. When the motion index information is 0 or less, the first motion information is determined as the motion information of the current block. When the motion index information is greater than 0, the second motion information is determined as the motion information of the current block. It is used for The second storage unit 24 is used to store the motion information of the current block in a preset merge candidate list.

[0222] In some embodiments of the present application, the preset value is 26, the preset index threshold is 9, the first numerical value is 2, the second numerical value is 3, the preset weight numerical value is 4, the preset bit is 2, and the preset motion index threshold is 32.

[0223] In actual applications, as shown in FIG. 13, the embodiments of the present application further provide a decoder, which includes a second memory 25 and a second processor 26. The second memory 25 stores a computer program that can be executed by the second processor 26. When the second processor 26 executes the program, an inter prediction method on the decoder side is realized.

[0224] As can be understood, in the process of performing inter prediction, the decoder determines a weight index corresponding to a pixel point in the current block based on the GEO parameter, and further, by performing a clamping process on the absolute value, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of the preset value. In this way, the size that is half of the conventional case where it is clamped to the preset value is reduced. Therefore, the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by about half. As a result, the text and code during inter prediction are simplified, and the overhead of data storage is reduced.

[0225] Correspondingly, the embodiments of the present application provide a storage medium on which a computer program is stored. When the computer program is executed by a first processor, an inter prediction method of an encoder is realized, or when the computer program is executed by a second processor, an inter prediction method of a decoder is realized.

[0226] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the foregoing method embodiments and has beneficial effects similar to those of the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, reference may be made to the description of the method embodiments of the present application for understanding.

[0227] The above description is merely an embodiment of the present application and is not intended to limit the protection scope of the present application. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application should be included within the protection scope of the present application. Therefore, the protection scope of the present application should be in accordance with the scope of the claims.

Industrial Applicability

[0228] In an embodiment of the present application, in the process of performing inter prediction, a weight index corresponding to a pixel point in the current block is determined based on a GEO parameter, and further, by means of absolute value clamping processing, the maximum value of the absolute value of the weight index corresponding to the pixel point in the current block can be clamped to half of a preset value. By doing so, half of the size in the conventional case where it is clamped to the preset value is reduced. Therefore, the storage and use of the weight value corresponding to the absolute information of the weight index are reduced by about half. As a result, the text and code during inter prediction are simplified, and the overhead of data storage is reduced.

Claims

1. 1. An inter prediction method, applied in a decoder, comprising: Parsing the bitstream to determine a prediction mode parameter for a current block; determining a geometric partitioning prediction mode parameter of a current block when the prediction mode parameter indicates that an inter prediction value of the current block is determined using an inter block geometric partitioning prediction mode; determining a first predicted value of a pixel point in a current block and a second predicted value of a pixel point in a current block according to the geometric partition prediction mode parameter, the first predicted value being obtained by predicting based on first motion information corresponding to a first partition of the current block, and the second predicted value being obtained by predicting based on second motion information corresponding to a second partition of the current block; determining angle index information and step size index information corresponding to the target partition mode according to a mapping table of partition mode, angle index information, and step size index information based on a target partition mode included in the geometric partition prediction mode parameter; determining size information of the current block; determining a motion abscissa offset value and a motion ordinate offset value corresponding to the current block based on size information of the current block, the angle index information, and the step size index information; determining cosine angle index information and sine angle index information based on the angle index information; determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; performing clamping on weight indices corresponding to pixel points in the current block to obtain absolute information of weight indices corresponding to pixel points in the current block; determining a first weight value of a pixel point in the current block and a second weight value of a pixel point in the current block according to absolute information of weight indexes corresponding to the pixel point in the current block; determining an inter prediction value for a pixel point in the current block based on a weighted fusion of the first prediction value, the first weighting value, the second prediction value, and the second weighting value.

2. determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; Reducing the angle of the preset angle mapping table by an order to obtain an updated angle mapping table; and determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and the updated angle mapping table.

3. 1. An inter prediction method, applied in an encoder, comprising: determining a prediction mode parameter for a current block; determining a geometric partitioning prediction mode parameter of a current block when the prediction mode parameter indicates that an inter prediction value of the current block is determined using an inter block geometric partitioning prediction mode; determining a first predicted value of a pixel point in a current block and a second predicted value of a pixel point in a current block according to the geometric partition prediction mode parameter, the first predicted value being obtained by predicting based on first motion information corresponding to a first partition of the current block, and the second predicted value being obtained by predicting based on second motion information corresponding to a second partition of the current block; determining angle index information and step size index information corresponding to the target partition mode according to a mapping table of partition mode, angle index information, and step size index information based on a target partition mode included in the geometric partition prediction mode parameter; determining size information of the current block; determining a motion abscissa offset value and a motion ordinate offset value corresponding to the current block based on size information of the current block, the angle index information, and the step size index information; determining cosine angle index information and sine angle index information based on the angle index information; determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; performing clamping on weight indices corresponding to pixel points in the current block to obtain absolute information of weight indices corresponding to pixel points in the current block; determining a first weight value of a pixel point in the current block and a second weight value of a pixel point in the current block according to absolute information of weight indexes corresponding to the pixel point in the current block; determining an inter prediction value for a pixel point in the current block based on a weighted fusion of the first prediction value, the first weighting value, the second prediction value, and the second weighting value.

4. determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; Reducing the angle of the preset angle mapping table by an order to obtain an updated angle mapping table; and determining a weight index corresponding to a pixel point in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and the updated angle mapping table.

5. a decoder comprising a parsing unit, a second determining unit, a second clamping unit and a second prediction unit; The parsing unit is used for parsing a bitstream and determining a prediction mode parameter of a current block; The second determination unit determines a geometric partition prediction mode parameter of the current block when the prediction mode parameter indicates to determine an inter prediction value of the current block using an inter block geometric partition prediction mode; determines a first predicted value of a pixel point in the current block and a second predicted value of a pixel point in the current block based on the geometric partition prediction mode parameter, the first predicted value being obtained by predicting based on first motion information corresponding to a first partition of the current block, and the second predicted value being obtained by predicting based on second motion information corresponding to a second partition of the current block; and determines a matrix of partition mode, angle index information, and step size index information based on a target partition mode included in the geometric partition prediction mode parameter. determining angle index information and step size index information corresponding to the target partition mode according to a mapping table; determining size information of the current block; determining a motion abscissa offset value and a motion ordinate offset value corresponding to the current block based on the size information, the angle index information, and the step size index information of the current block; determining cosine angle index information and sine angle index information based on the angle index information; and determining weight indexes corresponding to pixel points in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; the second clamping unit is used for performing clamping on weight indexes corresponding to pixel points in the current block, respectively, to obtain absolute information of weight indexes corresponding to pixel points in the current block; The second determining unit is configured to determine a first weight value of a pixel point in the current block and a second weight value of a pixel point in the current block according to absolute information of a weight index corresponding to the pixel point in the current block; The second prediction unit is used to determine an inter prediction value of a pixel point in the current block based on a weighted fusion of the first prediction value, the first weighting value, the second prediction value, and the second weighting value.

6. An encoder comprising a first decision unit, a first clamping unit and a first prediction unit; The first determination unit determines a prediction mode parameter of a current block; if the prediction mode parameter indicates that an inter prediction value of the current block is to be determined using an inter block geometric partition prediction mode, determines a geometric partition prediction mode parameter of the current block; determines a first predicted value of a pixel point in the current block and a second predicted value of a pixel point in the current block based on the geometric partition prediction mode parameter, the first predicted value being obtained by predicting based on first motion information corresponding to a first partition of the current block, and the second predicted value being obtained by predicting based on second motion information corresponding to a second partition of the current block; and determines a partition mode, angle index information, and step number based on a target partition mode included in the geometric partition prediction mode parameter. determining angle index information and step size index information corresponding to the target partition mode according to a size index information mapping table; determining size information of the current block; determining a motion abscissa offset value and a motion ordinate offset value corresponding to the current block based on the size information, the angle index information, and the step size index information of the current block; determining cosine angle index information and sine angle index information based on the angle index information; and determining weight indexes corresponding to pixel points in the current block based on the motion abscissa offset value, the motion ordinate offset value, the cosine angle index information, the sine angle index information, and a preset angle mapping table; the first clamping unit is used for performing clamping on weight indexes corresponding to pixel points in the current block, respectively, to obtain absolute information of weight indexes corresponding to pixel points in the current block; The first determining unit is further used for determining, according to absolute information of weight indexes corresponding to pixel points in the current block, a first weight value of a pixel point in the current block and a second weight value of a pixel point in the current block; The first prediction unit is adapted to determine an inter prediction value of a pixel point in the current block based on a weighted fusion of the first prediction value, the first weighting value, the second prediction value, and the second weighting value.

7. 3. A computer-readable storage medium storing a computer program, the computer program causing a computer to execute the method according to claim 1 or 2.

8. A computer-readable storage medium storing a computer program, the computer program causing a computer to execute the method according to claim 3 or 4.

Citation Information

Patent Citations

  • Geometric partitioning mode in video coding

    WO2021101791A1

  • Simplified inter prediction with geometric partitioning

    WO2021104433A1