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

By constructing a motion information candidate list based on time domain motion information, the problem of low encoding and decoding efficiency in inter-frame prediction is solved, and the encoding and decoding efficiency is improved.

CN114079785BActive Publication Date: 2025-08-05GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010851919.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-21
Publication Date
2025-08-05
Estimated Expiration
2041-02-01

AI Technical Summary

Technical Problem

When using GPM or AWP for inter-frame prediction, due to the particularity of prediction block division, some partitions have weak correlation with adjacent blocks in the airspace, and low encoding and decoding efficiency.

Method used

By constructing a motion information candidate list based on the importance of time domain motion information, improve the encoding and decoding efficiency.

Benefits of technology

By considering the tightness of time-domain motion information, the inter prediction method is improved and the encoding and decoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114079785B_ABST
    Figure CN114079785B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an inter-frame prediction method, encoder, decoder, and computer-readable storage medium. The method includes: parsing a bitstream to obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block; when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, determining a partitioning mode type for the current block based on the prediction mode parameter; the partitioning mode type indicates the degree of closeness between the partitioning mode of the current block and temporal motion information; determining a motion information list for the current block based on the partitioning mode type; and determining an inter-frame prediction value for the current block based on the first motion information index value and the motion information list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video coding and decoding technology, and in particular to an inter-frame prediction method, encoder, decoder and storage medium. Background Art

[0002] In the field of video coding and decoding, in addition to intra-frame prediction, inter-frame prediction can also be used in the process of encoding and decoding the current block. Among them, inter-frame prediction can include Geometric Partitioning Mode (GPM) and Angular Weighted Prediction (AWP). By dividing the current block between frames into two non-rectangular partitions (or two blocks), performing predictions separately, and then weighted fusion, the predicted value of the current block can be obtained.

[0003] Currently, when using GPM or AWP for inter-frame prediction, due to the special nature of the prediction block division, in most division modes, one of the two partitions will inevitably be located to the right, below, or below-right, making these partitions relatively far from their spatially adjacent blocks to the left, above, above-left, and above-right. Because the correlation decreases with distance, encoding and decoding efficiency is low when this partition still uses motion information from these spatially adjacent blocks for prediction. Summary of the Invention

[0004] The embodiments of the present application provide an inter-frame prediction method, an encoder, a decoder, and a storage medium, which can establish a motion information candidate list based on the importance of temporal motion information, thereby improving encoding and decoding efficiency.

[0005] The technical solution of this application is achieved as follows:

[0006] The present application provides an inter-frame prediction method, including:

[0007] Parsing the bitstream to obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block;

[0008] When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, determining a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type represents a degree of closeness between the partitioning mode of the current block and the temporal motion information;

[0009] Determining a motion information list of the current block based on the partition mode type;

[0010] An inter-frame prediction value of the current block is determined based on the first motion information index value and the motion information list.

[0011] The present application also provides an inter-frame prediction method, including:

[0012] Determining prediction mode parameters for the current block;

[0013] When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, determining a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type represents a degree of closeness between the partitioning mode of the current block and the temporal motion information;

[0014] Determining a motion information list of the current block based on the partition mode type;

[0015] Determining the motion information corresponding to the first motion information index value from the motion information list;

[0016] An inter-frame prediction value of the current block is determined based on the motion information.

[0017] An embodiment of the present application provides a decoder, including:

[0018] A decoding unit, configured to parse a bitstream and obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block;

[0019] a first determining unit configured to, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determine a partition mode type of the current block according to the prediction mode parameter; the partition mode type representing a degree of closeness between the partition mode of the current block and temporal motion information; and determine a motion information list for the current block based on the partition mode type;

[0020] The first prediction unit is configured to determine an inter-frame prediction value of the current block based on the first motion information index value and the motion information list.

[0021] An embodiment of the present application provides an encoder, including:

[0022] a second determining unit configured to determine a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determine a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type represents a degree of closeness between the partitioning mode of the current block and temporal motion information; determine a motion information list of the current block based on the partitioning mode type; and determine, from the motion information list, motion information corresponding to a first motion information index value;

[0023] The second prediction unit is configured to determine an inter-frame prediction value of the current block based on the motion information.

[0024] The present application also provides a decoder, including:

[0025] A first processor and a first memory storing instructions executable by the first processor. When the executable instructions are executed, the first processor implements the method described in the decoder side.

[0026] The present application also provides an encoder, including:

[0027] A second processor and a second memory storing instructions executable by the second processor, wherein when the executable instructions are executed, the second processor implements the method described in the encoder side.

[0028] An embodiment of the present application provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by a first processor, the method described at the decoder side is implemented. Or, when the executable instructions are executed by a second processor, the method described at the encoder side is implemented.

[0029] The embodiments of the present application provide an inter-frame prediction method, an encoder, a decoder and a storage medium, which classify the partition model of the current block according to the closeness between the partition mode of the current block and the temporal motion information, and determine the motion information list of the current block based on the partition mode type. In the process of constructing the initial motion information list, the importance of the temporal motion information is taken into account, rather than just the spatial motion information. Therefore, for a certain partition of the inter-frame prediction mode, when only the temporal adjacent motion information has the strongest correlation, the motion information list obtained in this way can rely on the temporal motion information to improve the encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of an image group structure provided in an embodiment of the present application;

[0031] Figure 2 Schematic diagram of weight distribution provided in the embodiment of this application Figure 1 ;

[0032] Figure 3 Schematic diagram of weight distribution provided in the embodiment of this application Figure 2 ;

[0033] Figure 4 Schematic diagram of an exemplary motion information list provided in an embodiment of the present application Figure 1 ;

[0034] Figure 5 This is a diagram illustrating the spatial position relationship of the prediction blocks provided in the embodiment of the present application;

[0035] Figure 6Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 1 ;

[0036] Figure 7 A schematic block diagram of a video encoding system according to an embodiment of the present application;

[0037] Figure 8 A schematic block diagram of a video decoding system according to an embodiment of the present invention;

[0038] Figure 9 A flowchart of an inter-frame prediction method provided in an embodiment of the present application;

[0039] Figure 10A Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 1 ;

[0040] Figure 10B Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 2 ;

[0041] Figure 11 Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 3 ;

[0042] Figure 12 Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 4 ;

[0043] Figure 13 Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 5 ;

[0044] Figure 14 Display of exemplary prediction mode classification mode types provided in the embodiment of the present application Figure 6 ;

[0045] Figure 15 Schematic diagram of an exemplary motion information list provided in an embodiment of the present application Figure 2 ;

[0046] Figure 16 Schematic diagram of an exemplary motion information list provided in an embodiment of the present application Figure 3 ;

[0047] Figure 17 Schematic diagram of index adjustment of exemplary temporal motion information provided in the embodiment of the present application Figure 1 ;

[0048] Figure 18Schematic diagram of index adjustment of exemplary temporal motion information provided in the embodiment of the present application Figure 2 ;

[0049] Figure 19 Schematic diagram of index adjustment of exemplary temporal motion information provided in the embodiment of the present application Figure 3 ;

[0050] Figure 20 Schematic diagram of index adjustment of exemplary temporal motion information provided in the embodiment of the present application Figure 4 ;

[0051] Figure 21 Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 2 ;

[0052] Figure 22 Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 3 ;

[0053] Figure 23A Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 4 ;

[0054] Figure 23B Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 5 ;

[0055] Figure 24A Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 6 ;

[0056] Figure 24B Schematic diagram of the spatial position relationship between the current block and the adjacent blocks provided in the embodiment of the present application Figure 7 ;

[0057] Figure 25 A flowchart of another inter-frame prediction method provided in an embodiment of the present application;

[0058] Figure 26 A schematic diagram of the structure of a decoder provided in an embodiment of the present application Figure 1 ;

[0059] Figure 27 A schematic diagram of the structure of a decoder provided in an embodiment of the present application Figure 2 ;

[0060] Figure 28 A schematic diagram of the structure of an encoder provided in an embodiment of the present application Figure 1 ;

[0061] Figure 29A schematic diagram of the structure of an encoder provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0062] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the related applications and are not intended to limit the applications. It should also be noted that for ease of description, only the parts relevant to the related applications are shown in the drawings.

[0063] In a video image, a first image component, a second image component, and a third image component are generally used to represent a current block (Coding Block, CB); wherein the three image components are a luminance component, a blue chrominance component, and a red chrominance component, respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, the video image can be represented in either the YCbCr format or the YUV format.

[0064] Currently, common video coding and decoding standards are based on a block-based hybrid coding framework. Each frame in a video image is divided into square maximum coding units (LCUs) of the same size (such as 128×128, 64×64, etc.). Each maximum coding unit can also be divided into rectangular coding units (CUs) according to rules; and coding units may be further divided into smaller prediction units (PUs). Specifically, the hybrid coding framework may include modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. Among them, the prediction module may include intra-frame prediction and inter-frame prediction, and inter-frame prediction may include motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels within a video frame, intra-frame prediction is used in video coding and decoding technology to eliminate spatial redundancy between adjacent pixels. However, because there is also a strong similarity between adjacent frames in a video image, inter-frame prediction is used in video coding and decoding technology to eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. The following application will describe inter-frame prediction in detail.

[0065] Motion information can include motion vector (MV) information and reference frame information. Specifically, for a current block using inter-frame prediction, the current frame in which the current block is located has one or more reference frames, and the current block can be a coding unit or a prediction unit. A motion information set containing a set of motion vectors and reference frame information can be used to indicate a pixel area of the same size as the current block in a reference frame, which is referred to as a reference block. Alternatively, a motion information set containing two sets of motion vectors and reference frame information can be used to indicate two reference blocks in two reference frames, which can be the same or different. Motion compensation can then obtain the inter-frame prediction value of the current block based on the reference block indicated by the motion information.

[0066] A current frame that can be coded using inter-frame prediction has one or more reference frames. For a current block of the current frame that can be coded using inter-frame prediction, the current block can be a coding unit or a prediction unit. Motion information containing a set of motion vectors (MVs) and reference frame information can be used to indicate a pixel region of the same size as the current block in a reference frame, referred to herein as a reference block. Alternatively, motion information containing two sets of motion vectors and reference frame information can be used to indicate two reference blocks in two reference frames that can be the same or different. Motion compensation (MC) derives a prediction value for the current coding unit based on the reference block indicated by the motion information.

[0067] It should be understood that a P frame (Predictive Frame) is a frame that can only be predicted using a reference frame that is before the current frame in the picture playback order (POC). The current reference frame has only one reference frame list, denoted as RefPicL0 (can also be denoted as RefPicList0, or List0, or L0). The reference frame list RefPicL0 contains reference frames whose POC is before the current frame. A B frame (Bi-directional interpolated prediction Frame) is a frame that can be predicted using a reference frame whose POC is before the current frame and a reference frame whose POC is after the current frame. A B frame has two reference frame lists, denoted by RefPicL0 and RefPicL1 (RefPicL1 can also be denoted as RefPicList1, or List1, or L1). RefPicL0 contains reference frames whose POC is before the current frame, and RefPicL1 contains reference frames whose POC is after the current frame. For the current block, it can reference only the reference blocks of a certain frame in RefPicL0, which is called forward prediction; or it can reference only the reference blocks of a certain frame in RefPicL1, which is called backward prediction; or it can reference both the reference blocks of a certain frame in RefPicL0 and the reference blocks of a certain frame in RefPicL1, which is called bidirectional prediction. A simple way to simultaneously reference two reference blocks is to average the pixels at each corresponding position in the two reference blocks to obtain the inter-frame prediction value (or prediction block) for each pixel in the current block. Later B frames no longer limit RefPicL0 to only reference frames with a POC before the current frame and RefPicL1 to only reference frames with a POC after the current frame. In other words, RefPicL0 can also contain reference frames with a POC after the current frame, and RefPicL1 can also contain reference frames with a POC before the current frame. In other words, the current block can reference both reference frames with a POC before the current frame and reference frames with a POC after the current frame. However, when the current block is bidirectionally predicted, one reference frame must come from RefPicL0 and the other from RefPicL1; this type of B frame is also called a generalized B frame.

[0068] Since the encoding and decoding order of the random access (RA) configuration is different from the POC order, the B frame can refer to the information before and after the current frame at the same time, which can significantly improve the encoding performance. Figure 1 is a schematic diagram of the image group structure, such as Figure 1As shown in FIG, in a classic Group Of Pictures (GOP) structure of RA, arrows represent reference relationships. Since I frames do not require reference frames, after decoding an I frame with a POC of 0, a P frame with a POC of 4 will be decoded. When decoding a P frame with a POC of 4, the I frame with a POC of 0 can be referenced. After decoding a P frame with a POC of 4, a B frame with a POC of 2 will be decoded. When decoding a B frame with a POC of 2, the I frame with a POC of 0 and the P frame with a POC of 4 can be referenced, and so on. In this way, according to Figure 4 It can be obtained that when the POC order is {0 1 2 3 4 5 6 7 8}, the corresponding decoding order is {0 3 2 4 1 7 6 85}.

[0069] In addition, the encoding and decoding order of the Low Delay (LD) configuration is the same as the POC order. At this time, the current frame can only refer to the information before the current frame. Among them, the Low Delay configuration is divided into Low Delay P and Low Delay B. Low Delay P is the traditional Low Delay configuration. Its typical structure is IPPP..., that is, an I frame is encoded and decoded first, and the subsequent decoded frames are all P frames. The typical structure of Low Delay B is IBBB..., the difference from Low Delay P is that each inter-frame frame is a B frame, that is, two reference frame lists are used, and the current block can simultaneously refer to the reference block of a frame in RefPicL0 and the reference block of a frame in RefPicL1. Here, a reference frame list of the current frame can have a maximum of several reference frames, such as 2, 3 or 4, etc. When encoding or decoding a current frame, the number of reference frames in RefPicL0 and RefPicL1 is determined by a preset configuration or algorithm, but the same reference frame can appear in both RefPicL0 and RefPicL1, that is, the encoder or decoder allows the current block to simultaneously reference two reference blocks in the same reference frame.

[0070] In the embodiment of the present application, the encoder or decoder can generally use the index value (represented by index) in the reference frame list to correspond to the reference frame. If the length of a reference frame list is 4, then index has four values: 0, 1, 2, and 3. For example, if the RefPicL0 of the current frame has four reference frames with POCs 5, 4, 3, and 0, then index 0 of RefPicL0 is the reference frame with POC 5, index 1 of RefPicL0 is the reference frame with POC 4, index 2 of RefPicL0 is the reference frame with POC 3, and index 3 of RefPicL0 is the reference frame with POC 0.

[0071] In the current Versatile Video Coding (VVC) standard, the inter-frame prediction mode can be the GPM mode. In the current AVS3 video codec standard, the inter-frame prediction mode can be the AWP mode. Although these two prediction modes have different names and specific implementation forms, they are in principle the same, that is, both prediction modes can be applied to the inter-frame prediction method of this application.

[0072] It should be noted that traditional unidirectional prediction only searches for a reference block of the same size as the current block, while traditional bidirectional prediction uses two reference blocks of the same size. The pixel value of each point in the predicted block is the average of the corresponding positions in the two reference blocks, meaning that all points in each reference block have a 50% weighted ratio. Bidirectional weighted prediction allows for different weights in the two reference blocks, for example, all points in the first reference block have a 75% weighted ratio, and all points in the second reference block have a 25% weighted ratio. However, all points in the same reference block have the same weighted ratio. Other optimization methods, such as decoder-side motion vector refinement (DMVR) and bidirectional optical flow (BIO), can cause some changes in the reference or predicted pixels. GPM or AWP also use two reference blocks of the same size as the current block, but some pixel positions use 100% of the pixel values corresponding to the first reference block, while others use 100% of the pixel values corresponding to the second reference block. In the boundary area, pixel values from both reference blocks are used in a certain ratio. How these weights are specifically distributed is determined by the prediction mode of GPM or AWP, or it can also be considered that GPM or AWP uses two reference blocks of different sizes from the current block, that is, each takes a required part as the reference block.

[0073] For example, Figure 2 Schematic diagram of weight distribution Figure 1 ,like Figure 2 As shown, it shows a weight distribution diagram of multiple partitioning modes of a GPM on a 64×64 current block provided by an embodiment of the present application, wherein there are 64 partitioning modes of GPM. Figure 3 Schematic diagram of weight distribution Figure 2 ,like Figure 3 As shown, it shows a weight distribution diagram of multiple partitioning modes of an AWP provided by an embodiment of the present application on a 64×64 current block, wherein there are 56 partitioning modes of AWP. Figure 2 still Figure 3In each division mode, the black area indicates that the weight value of the corresponding position of the first reference block is 0%, the white area indicates that the weight value of the corresponding position of the first reference block is 100%, and the gray area indicates that the weight value of the corresponding position of the first reference block is a weight value greater than 0% and less than 100% according to the depth of the color. The weight value of the corresponding position of the second reference block is 100% minus the weight value of the corresponding position of the first reference block.

[0074] It should be understood that early codec technologies only used rectangular partitioning methods, whether for CU, PU, or transform unit (TU) partitioning. However, both GPM and AWP implement non-rectangular partitioning, meaning that a straight line can be used to divide a rectangular block into two partitions. Depending on the position and angle of the line, the two partitions may be triangular, trapezoidal, or rectangular, allowing the partitioning to be closer to the edge of an object or the edge of two regions with different motion. It should be noted that the partitioning mentioned here is not a true partitioning, but more of a partitioning based on prediction effects. This is because this partitioning only divides the weights of the two reference blocks when generating the prediction block, or it can be simply understood as part of the position of the prediction block coming from the first reference block and the other part coming from the second reference block. The current block is not actually divided into two CUs, PUs, or TUs according to the partitioning line. Therefore, after the prediction, the transformation, quantization, inverse transformation, and inverse quantization of the residual are all processed as a whole.

[0075] It should be noted that in the embodiments of the present application, GPM or AWP is an inter-frame prediction technology. GPM or AWP needs to transmit a flag in the bitstream to indicate whether GPM or AWP is used. This flag can indicate whether the current block uses GPM or AWP. If GPM or AWP is used, the encoder needs to transmit the specific mode used in the bitstream, that is, one of the 64 partitioning modes of GPM, or one of the 56 partitioning modes of AWP; as well as the index values of two unidirectional motion information. In other words, for the current block, the decoder can obtain information on whether GPM or AWP is used by parsing the bitstream. If it is determined that GPM or AWP is used, the decoder can parse out the prediction mode parameters of GPM or AWP and the two motion information index values. For example, if the current block can be divided into two partitions, then the first index value corresponding to the first partition and the second index value corresponding to the second partition can be parsed.

[0076] Specifically, for GPM mode, if GPM is used, the bitstream will transmit GPM prediction mode parameters, such as the specific GPM partitioning mode; generally, GPM includes 64 partitioning modes. For AWP mode, if AWP is used, the bitstream will transmit AWP prediction mode parameters, such as the specific AWP partitioning mode; generally, AWP includes 56 partitioning modes.

[0077] In inter-frame prediction modes, such as GPM and AWP, two unidirectional motion information are required to search for two reference blocks. The current implementation method is to use the relevant information of the encoded / decoded part before the current block on the encoder side to build a unidirectional motion information candidate list, select unidirectional motion information from the unidirectional motion information candidate list, and write the index values (index) of the two unidirectional motion information in the unidirectional motion information candidate list into the bitstream. The same method is used on the decoder side, that is, to use the relevant information of the decoded part before the current block to build a unidirectional motion information candidate list. This unidirectional motion information candidate list must be the same as the candidate list built on the encoder side. In this way, the index values of the two unidirectional motion information are parsed from the bitstream, and then the two unidirectional motion information are found in the unidirectional motion information candidate list, which are the two unidirectional motion information needed for the current block.

[0078] That is, the unidirectional motion information described in this application may include: motion vector information, i.e., the value of (x, y), and corresponding reference frame information, i.e., a reference frame list and the reference frame index value in the reference frame list. One representation method is to record the reference frame index values of two reference frame lists, where the reference frame index value corresponding to one reference frame list is valid, such as 0, 1, 2, etc.; and the reference frame index value corresponding to the other reference frame list is invalid, i.e., -1. The reference frame list with a valid reference frame index value is the reference frame list used for the motion information of the current block. The corresponding reference frame can be found from the reference frame list based on the reference frame index value. Each reference frame list has a corresponding motion vector. The motion vector corresponding to a valid reference frame list is valid, while the motion vector corresponding to an invalid reference frame list is invalid. The decoder can find the required reference frame using the reference frame information in the unidirectional motion information. Based on the position of the current block and the motion vector, i.e., the value of (x, y), the reference block can be found in the reference frame, thereby determining the inter-frame prediction value of the current block.

[0079] Exemplarily, the method for constructing a unidirectional motion information candidate list is introduced by taking the AWP in AVS as an example.

[0080] First, all motion information is processed as bidirectional motion information, and a list of bidirectional motion information is constructed, namely AwpCandArray below. Then, the unidirectional motion information is taken out from the list of bidirectional motion information according to the parity of the index of the unidirectional motion information. When constructing the bidirectional motion information list, it is necessary to obtain spatial motion information and temporal motion information. Spatial motion information is the motion information used by the following F, G, C, A, and D blocks. Spatial motion information needs to be checked for duplicates (pruned) to remove the same motion information. When checking for duplicates, it is determined whether the two motion information are the same, that is, whether each item of the two motion information is the same. If the corresponding reference frame list (such as Figure 4 As shown, if the reference frame index (including L0 and L1) and the horizontal and vertical components of the motion vector are the same, then the two motion information are the same. The partial duplication checking method is used here, that is, not all the motion information filled in the bidirectional motion information list and all the motion information in the list are checked for duplication, but the duplication is checked by grouping according to the positions of adjacent blocks. That is the content of the first step described below. The spatial motion information occupies a maximum of 4 positions in this motion information list. Then add the derived temporal motion information to the list, which is the content of the third step described below. If the motion information list is less than 5, then add the scaled motion information, which is the content of the fourth step described below. Finally, the unidirectional motion information is taken out from the list of bidirectional motion information based on the index of the unidirectional motion information and its parity, which is the content of the fifth and sixth steps described below. Among them, Figure 5 is a schematic diagram of the spatial position relationship of the predicted blocks, such as Figure 5 As shown, block E is the current block, and blocks A, B, C, D, F, and G are all neighboring blocks of block E. Block A of block E is the block where the sample (x0-1, y0) is located, block B of block E is the block where the sample (x0, y0-1) is located, block C of block E is the block where the sample (x0+1, y0-1) is located, block D of block E is the block where the sample (x0-1, y0-1) is located, block F of block E is the block where the sample (x0-1, y1) is located, and block G of block E is the block where the sample (x1, y0-1) is located. (x0, y0) are the coordinates of the upper-left corner sample of block E in the image, (x1, y0) are the coordinates of the upper-right corner sample of block E in the image, and (x0, y1) are the coordinates of the lower-left corner sample of block E in the image.

[0081] Based on the above Figure 5, the presence of a neighboring block X (X is represented by A, B, C, D, F, or G) means that the block should be within the image to be decoded and should belong to the same spatial region as block E; otherwise, the neighboring block "does not exist." It follows that if a block "does not exist" or has not yet been decoded, then the block is "unavailable"; otherwise, the block is "available." Alternatively, if the block containing a sample from the image to be decoded "does not exist" or the sample has not yet been decoded, then the sample is "unavailable"; otherwise, the sample is "available."

[0082] Assume that the first unidirectional motion information of the AWP is represented by mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L1. Among them, mvAwp0L0 represents the corresponding motion vector in the first reference frame list RefPicL0, and RefIdxAwp0L0 represents the reference frame index value of the corresponding reference frame in the first reference frame list RefPicL0; mvAwp0L1 represents the corresponding motion vector in the second reference frame list RefPicL1, and RefIdxAwp0L1 represents the reference frame index value of the corresponding reference frame in the second reference frame list RefPicL1. The same applies to the second unidirectional motion information.

[0083] Since the motion information here is unidirectional, one of RefIdxAwp0L0 and RefIdxAwp0L1 must be a valid value, such as 0, 1, or 2, and the other must be an invalid value, such as -1. If RefIdxAwp0L0 is a valid value, then RefIdxAwp0L1 is -1; in this case, the corresponding mvAwp0L0 is the required motion vector, i.e., (x, y), and mvAwp0L1 is not considered. The reverse is also true.

[0084] Specifically, the steps for deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1 are as follows:

[0085] The first step, such as Figure 5 As shown, F, G, C, A, B, and D are neighboring blocks of the current block E. The "availability" of F, G, C, A, B, and D is determined as follows:

[0086] (a) If F exists and uses inter-frame prediction mode, then F is "available"; otherwise, F is "unavailable".

[0087] (b) If G exists and uses inter-frame prediction mode, G is "available"; otherwise, G is "unavailable".

[0088] (c) If C exists and uses inter-frame prediction mode, then C is "available"; otherwise, C is "unavailable".

[0089] (d) If A exists and uses inter-frame prediction mode, then A is "available"; otherwise, A is "unavailable".

[0090] (e) If B exists and uses inter-frame prediction mode, B is "available"; otherwise, B is "unavailable".

[0091] (f) If D exists and uses inter-frame prediction mode, then D is "available"; otherwise, D is "unavailable".

[0092] In the second step, the available unidirectional motion information is put into the unidirectional motion information candidate list (represented by AwpUniArray) in the order of F, G, C, A, B and D, until the length of AwpUniArray is 3 or the traversal is completed.

[0093] In the third step, if the length of AwpUniArray is less than 3, the bidirectionally available motion information is split into unidirectional motion information pointing to the reference frame list RefPicL0 and unidirectional motion information pointing to the reference frame list List1 in the order of F, G, C, A, B, and D. The unidirectional motion information is checked for duplicates first. If there is no duplication, it is put into AwpUniArray until the length is 3 or the traversal is completed.

[0094] The fourth step is to split the temporal bidirectional motion information into unidirectional motion information pointing to the reference frame list RefPicL0 and unidirectional motion information pointing to the reference frame list List1. The unidirectional motion information is first checked for duplicates. If there are no duplicates, they are placed into AwpUniArray until the length reaches 4 or the traversal is completed. The motion vectors corresponding to the four motion information lists generated are (x0, y0), (x1, y1), (x2, y2), and (x3, y3).

[0095] The generation of the four motion information can be achieved by scaling the values of the horizontal component or the vertical component. The rules are as follows:

[0096] 1. x0=abs(x)<8?8:(abs(x)<=64?((abs(x)*5+2)>>2):(abs(x)<=128?((abs(x)*9+4)>>3):((abs(x)*33+16)>>5)))

[0097] x0=x<0? -x0:x0

[0098] y0=y

[0099] 2. x1 = x

[0100] y1=abs(y)<8?8:(abs(y)<=64?((abs(y)*5+2)>>2):(abs(y)<=128?((abs(y)*9+4)>>3):((abs(y)*33+16)>>5)))

[0101] y1=y<0? -y1:y1

[0102] 3. x2=abs(x)<8?8:(abs(x)<=64?((abs(x)*3+2)>>2):(abs(x)<=128?((abs(x)*7+4)>>3):((abs(x)*31+16)>>5)))

[0103] x2=x<0? -x2:x2

[0104] x2=abs(x)<8? -x2:x2

[0105] y2=y

[0106] 4. x3=x

[0107] y3=abs(y)<8?8:(abs(y)<=64?((abs(y)*3+2)>>2):(abs(y)<=128?((abs(y)*7+4)>>3):((abs(y)*31+16)>>5)))

[0108] y3=y<0? -y3:y3

[0109] y3=abs(y)<8? -y3:y3

[0110] If the length of AwpUniArray is less than 5, the last unidirectional motion information in AwpUniArray is repeatedly filled until the length of AwpUniArray reaches 5.

[0111] The fifth step is to assign the AwpCandIdx0+1th motion information in AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L1 as follows:

[0112] 1. If AwpCandIdx0 is an even number, the unidirectional motion information of the motion candidate pointing to the reference frame list List0 is assigned to mvAwp0L0 and RefIdxAwp0L0, mvAwp0L1 is equal to zero, and RefIdxAwp0L1 is equal to -1; if the unidirectional motion information of List0 does not exist, the unidirectional motion information of the motion candidate pointing to the reference frame list List1 is assigned to mvAwp0L1 and RefIdxAwp0L1, mvAwp0L0 is equal to zero, and RefIdxAwp0L0 is equal to -1.

[0113] 2. If AwpCandIdx0 is an odd number, the unidirectional motion information of the motion candidate pointing to the reference frame list List1 is assigned to mvAwp0L1 and RefIdxAwp0L1, mvAwp0L0 is equal to zero, and RefIdxAwp0L0 is equal to -1; if the unidirectional motion information of List1 does not exist, the unidirectional motion information of the motion candidate pointing to the reference frame list List0 is assigned to mvAwp0L0 and RefIdxAwp0L0, mvAwp0L1 is equal to zero, and RefIdxAwp0L1 is equal to -1.

[0114] Step 6: Assign the AwpCandIdx1+1th motion information in AwpUniArray to mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefIdxAwp1L1. As follows:

[0115] 1. If AwpCandIdx1 is an even number, the unidirectional motion information of the motion candidate pointing to the reference frame list List0 is assigned to mvAwp1L0 and RefIdxAwp1L0, mvAwp1L1 is equal to zero, and RefIdxAwp1L1 is equal to -1; if List0 unidirectional motion information does not exist, the unidirectional motion information of the motion candidate pointing to the reference frame list List1 is assigned to mvAwp1L1 and RefIdxAwp1L1, mvAwp1L0 is equal to zero, and RefIdxAwp1L0 is equal to -1.

[0116] 2. If AwpCandIdx1 is an odd number, the unidirectional motion information of the motion candidate pointing to the reference frame list List1 is assigned to mvAwp1L1 and RefIdxAwp1L1, mvAwp1L0 is equal to zero, and RefIdxAwp1L0 is equal to -1; if the unidirectional motion information of List1 does not exist, the unidirectional motion information of the motion candidate pointing to the reference frame list List0 is assigned to mvAwp1L0 and RefIdxAwp1L0, mvAwp1L1 is equal to zero, and RefIdxAwp1L1 is equal to -1.

[0117] It should be noted that, in the embodiment of the present application, the spatial motion information (i.e., the above-mentioned unidirectional available motion information) and temporal motion information used by the AWP mode when constructing its unidirectional motion information candidate list actually only take the motion information stored at a certain pixel point in the adjacent block, such as Figure 6 The hollow point 1 in the figure represents the actual pixel points of the spatial adjacent CU, and the solid point 2 represents the actual pixel points of the temporal CU. The current block is represented as Current CU.

[0118] Here, the acquisition of the time domain bidirectional operation information in the third step is achieved by obtaining the top left corner of the current prediction unit (such as Figure 6 The temporal motion information of the luminance sample corresponding to the luminance sample position (shown as the solid point in the middle) is used as the bidirectional motion information candidate of the current prediction unit. The specific process of deriving the temporal information is shown in the following example:

[0119] The steps to export motion information are as follows:

[0120] Taking the upper left corner of the current block as an example, the steps to derive motion information are as follows:

[0121] first step,

[0122] If the reference frame index stored in the temporal motion information storage unit where the luma sample corresponding to the upper left corner luma sample position of the current prediction unit in the image with a reference index value of 0 in the reference picture queue 1 is located is -1, then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The size and position of the coding unit where the current prediction unit is located are used as the size and position of the current prediction unit, and then the obtained L0 motion vector prediction value and L1 motion vector prediction value are used as the L0 motion vector MvE0 and L1 motion vector MvE1 of the current prediction unit respectively, and the L0 reference index RefIdxL0 and L1 reference index RefIdxL1 of the current prediction unit are both set to 0, and the motion information derivation process is terminated.

[0123] otherwise,

[0124] The L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The distance indexes of the images corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as DistanceIndexL0 and DistanceIndexL1 respectively; the BlockDistance of the images corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as BlockDistanceL0 and BlockDistanceL1 respectively.

[0125] The L0 motion vector of the time domain motion information storage unit where the luminance sample corresponding to the upper left corner luminance sample position of the current prediction unit in the image with reference index 0 in the reference image queue 1 is located is recorded as mvRef(mvRef_x, mvRef_y), the distance index of the image where the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.

[0126] Step 2,

[0127] BlockDistanceRef=DistanceIndexCol-DistanceIndexRef

[0128] Step 3,

[0129] Let the L0 reference index RefIdxL0 of the current prediction unit be equal to 0, and calculate the L0 motion vector mvE0 (mvE0_x, mvE0_y) of the current prediction unit:

[0130]

[0131] Here, mvX is mvRef, and MVX is mvE0.

[0132] Let the L1 reference index RefIdxL1 of the current prediction unit be equal to 0, and calculate the L1 motion vector mvE1 (mvE1_x, mvE1_y) of the current prediction unit:

[0133]

[0134] Here, mvX is mvRef, and MVX is mvE1.

[0135] Step 4, the value of interPredRefMode is equal to 'PRED_List01'.

[0136] It can be seen that the two unidirectional motion information determined by the above method can be used to find two reference blocks. According to the specific prediction mode used by GPM or AWP, the weights of the two reference blocks at each pixel position can be determined. Finally, the two reference blocks are weighted and calculated to obtain the prediction block of the current block.

[0137] Furthermore, on the encoding side, if the current mode is skip mode, the predicted block is also the coded block, marking the end of coding for the current block. If the current mode is not skip mode, quantization coefficients must be written into the bitstream. The quantization coefficients are the residual block formed by subtracting the inter-frame prediction value from the actual value of the current block. This residual block is transformed and quantized, and coding for the current block is now complete.

[0138] Furthermore, on the decoding side, if the current mode is skip mode, the predicted block is the decoded block, marking the end of decoding for the current block. If the current mode is not skip mode, entropy decoding parses the quantized coefficients, followed by inverse quantization and inverse transformation to obtain the residual block. The residual block is then added to the predicted block to obtain the decoded block, marking the end of decoding for the current block.

[0139] It should be understood that the embodiment of the present application provides a video encoding system. Figure 7 A block diagram of a video encoding system according to an embodiment of the present application is shown in FIG. Figure 7As shown, the video coding system 11 may include: a transform unit 111, a quantization unit 112, a mode selection and coding control logic unit 113, an intra-frame prediction unit 114, an inter-frame prediction unit 115 (including: motion compensation and motion estimation), an inverse quantization unit 116, an inverse transform unit 117, a loop filter unit 118, a coding unit 119 and a decoded image buffer unit 110; for the input original video signal, a coding tree block (Coding Tree A video reconstructed block can be obtained by dividing the video reconstructed block into a CTU. The coding mode is determined by the mode selection and coding control logic unit 113. Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform unit 111 and the quantization unit 112 to transform the video reconstructed block, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame prediction unit 114 is used to perform intra-frame prediction on the video reconstructed block; wherein the intra-frame prediction unit 114 is used to determine the optimal intra-frame prediction mode (i.e., target prediction mode) of the video reconstructed block; the inter-frame prediction unit 115 is used to perform inter-frame prediction coding of the received video reconstructed block relative to one or more blocks in one or more reference frames to provide temporal prediction information; wherein, motion estimation is used to generate The motion vector process estimates the motion of the video reconstructed block. Motion compensation is then performed based on the motion vector determined by motion estimation. After determining the inter-frame prediction mode, the inter-frame prediction unit 115 is further configured to provide the selected inter-frame prediction data to the encoding unit 119, and also to send the calculated motion vector data to the encoding unit 119. In addition, the inverse quantization unit 116 and the inverse transform unit 117 are configured to reconstruct the video reconstructed block, reconstructing a residual block in the pixel domain. This reconstructed residual block is passed through the loop filter unit 118 to remove blocking artifacts. This reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video reconstructed block. The encoding unit 119 is configured to encode various coding parameters and quantized transform coefficients. The decoded image buffer unit 110 is configured to store the reconstructed video reconstructed block for prediction reference. As video encoding progresses, new reconstructed video reconstructed blocks are continuously generated and stored in the decoded image buffer unit 110.

[0140] The embodiment of the present application also provides a video decoding system, Figure 8 A block diagram of a video decoding system according to an embodiment of the present invention is shown in FIG. Figure 8As shown, the video decoding system 12 may include: a decoding unit 121, an inverse transform unit 127, an inverse quantization unit 122, an intra-frame prediction unit 123, a motion compensation unit 124, a loop filter unit 125 and a decoded image cache unit 126; after the input video signal is encoded by the video encoding system 11, a code stream of the video signal is output; the code stream is input to the video decoding system 12, and first passes through the decoding unit 121 to obtain a decoded transform coefficient; the transform coefficient is processed by the inverse transform unit 127 and the inverse quantization unit 122 to generate a residual block in the pixel domain; the intra-frame prediction unit 123 can be used to generate a prediction number of the current video decoding block based on the determined intra-frame prediction direction and data from a previously decoded block of the current frame or picture. The motion compensation unit 124 determines prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate a predictive block for the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform unit 127 and the inverse quantization unit 122 with the corresponding predictive block generated by the intra-frame prediction unit 123 or the motion compensation unit 124; the decoded video signal passes through the loop filter unit 125 to remove blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 126, which stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal to obtain the restored original video signal.

[0141] An inter-frame prediction method provided in an embodiment of the present application mainly acts on the inter-frame prediction unit 215 of the video encoding system 11 and the inter-frame prediction unit of the video decoding system 12, namely, the motion compensation unit 124; that is, if the video encoding system 11 can obtain a better prediction effect through the inter-frame prediction method provided in an embodiment of the present application, then, correspondingly, in the video decoding system 12, the video decoding recovery quality can also be improved.

[0142] Based on this, the technical solution of this application is further described in detail below with reference to the accompanying drawings and embodiments. Before proceeding with the detailed description, it should be noted that the terms "first", "second", "third", etc. mentioned throughout the specification are only used to distinguish different features and do not have the function of defining priority, sequence, size relationship, etc.

[0143] The present invention provides an inter-frame prediction method for a video decoding device, i.e., a decoder. The functions implemented by the method can be implemented by a first processor in the decoder calling a computer program. The computer program can also be stored in a first memory. Therefore, the decoder includes at least a first processor and a first memory.

[0144] Furthermore, in the embodiments of the present application, Figure 9 Schematic diagram of the implementation process of the inter-frame prediction method Figure 1 ,like Figure 9 As shown, the method for the decoder to perform inter-frame prediction may include the following steps:

[0145] S101: Parse a bitstream to obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block.

[0146] In an embodiment of the present application, the decoder can first parse the binary bitstream to obtain the prediction mode parameters of the current block and the first motion information index value used by the encoder. The prediction mode parameters can be used to determine the prediction mode used for the current block. The first motion information index value is the index value corresponding to the motion information used by the encoder for encoding. When the encoder encodes the current block, it is written into the bitstream and can be obtained by the decoder from the bitstream.

[0147] It should be noted that the image to be decoded can be divided into multiple image blocks, and the image block currently to be decoded can be referred to as a current block (which can be represented by a CU), and the image blocks adjacent to the current block can be referred to as neighboring blocks; that is, in the image to be decoded, the current block and the neighboring blocks have an adjacent relationship. Here, each current block can include a first image component, a second image component, and a third image component, that is, the current block represents an image block in the image to be decoded for which prediction of the first image component, the second image component, or the third image component is currently being performed.

[0148] Here, assuming that the current block performs a first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block can also be called a luminance block; or, assuming that the current block performs a second image component prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.

[0149] Furthermore, in an embodiment of the present application, the prediction mode parameter may not only indicate the prediction mode adopted by the current block, but also indicate parameters related to the prediction mode.

[0150] It can be understood that in the embodiments of the present application, the prediction modes may include inter-frame prediction mode, traditional intra-frame prediction mode and non-traditional intra-frame prediction mode, among which the inter-frame prediction mode may include ordinary inter-frame prediction mode, GPM mode and AWP mode.

[0151] That is to say, on the encoding side, the encoder can select the optimal prediction mode to pre-encode the current block. In this process, the prediction mode of the current block can be determined, and then the prediction mode parameters used to indicate the prediction mode can be determined, so that the corresponding prediction mode parameters are written into the bitstream and transmitted from the encoder to the decoder.

[0152] Accordingly, on the decoder side, the decoder can directly obtain the prediction mode parameters of the current block by parsing the bitstream, and determine the prediction mode used by the current block and the relevant parameters corresponding to the prediction mode based on the prediction mode parameters obtained by parsing.

[0153] Furthermore, in an embodiment of the present application, after parsing and obtaining the prediction mode parameters, the decoder may determine whether the current block uses a preset inter-frame prediction mode based on the prediction mode parameters. The preset inter-frame prediction mode may include at least one inter-frame prediction mode, for example, the preset inter-frame prediction mode may be a GPM mode, an AWP mode, or other common inter-frame prediction mode, which is not limited in the embodiment of the present application.

[0154] S102. When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determine a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type represents the degree of closeness between the partitioning mode of the current block and the temporal motion information.

[0155] In an embodiment of the present application, after the decoder parses and obtains the prediction mode parameters, if the parsed prediction mode parameters indicate that the current block uses a preset inter-frame prediction mode to determine the inter-frame prediction value of the current block, then the decoder can determine, based on the prediction mode parameters, whether the division mode used in the prediction of the current block is a mode with a high degree of closeness to the temporal motion information, so as to subsequently construct motion information lists with different emphases according to different division mode types.

[0156] It should be noted that, in the embodiment of the present application, the partitioning mode types of the current block include: a temporal motion information dense type and a temporal motion information non-dense type. The temporal motion information dense type is a type in which temporal motion information is relatively important, and the temporal motion information non-dense type is a type in which temporal motion information is not important.

[0157] In some embodiments of the present application, the temporal motion information tight type flag is a first preset value;

[0158] The non-compact type flag of the temporal motion information is set to a second preset value.

[0159] Exemplarily, in an embodiment of the present application, binary can be used to represent the first preset value and the second preset value. For example, the tight type of time domain motion information is marked as 0, and the non-tight type of time domain motion information is marked as 1; or, the tight type of time domain motion information is marked as 1, and the non-tight type of time domain motion information is marked as 0, etc., which is not limited in the embodiment of the present application.

[0160] In some embodiments of the present application, the prediction mode parameter includes: mode index information of the prediction mode. The process of the decoder determining the partition mode type of the current block based on the prediction mode parameter may include at least one of the following methods:

[0161] Method 1:

[0162] The decoder traverses the mapping table between preset modes and partition mode types, and determines the partition mode type of the current block corresponding to the mode index information.

[0163] like Figure 10A As shown, for example, the distribution of prediction modes corresponding to the mapping table of preset modes and divided mode types, wherein the gray circles represent the dense type of temporal motion information; the black circles represent the non-dense type of temporal motion information.

[0164] Method 2:

[0165] The decoder determines the angle index and weight step index corresponding to the current block based on the mode index information of the prediction mode; and determines the partition mode type of the current block based on the mode index information, the angle index and weight step index corresponding to the current block.

[0166] Method 3:

[0167] When the pattern index information satisfies the second preset distribution relationship, the decoder determines that the division pattern type of the current block is a time domain motion information tight type; wherein the second preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the pattern index information does not satisfy the second preset distribution relationship, the decoder determines that the division pattern type of the current block is a time domain motion information non-tight type.

[0168] With respect to method 1, the decoder can implement different mode divisions and specify the corresponding division mode type for each prediction mode, thereby obtaining a mapping relationship between the preset mode and the division mode type. In the embodiment of the present application, the mapping relationship between the preset mode and the division mode type can be expressed in the form of a table, i.e., a mapping table of preset modes and division mode types. The corresponding relationship between the prediction mode and the division mode type can be expressed in the form of mode index information, which is not limited in the embodiment of the present application.

[0169] In this way, when the decoder decodes the current block, it can traverse the mapping table of preset modes and partition mode types according to the mode index information corresponding to the current block, thereby determining the partition mode type of the current block corresponding to the mode index information.

[0170] For method 2, in an embodiment of the present application, the decoder determines the angle index and weight step index corresponding to the current block based on the mode index information of the prediction mode, mainly by performing modulo operation and division operation on the mode index information respectively.

[0171] For example, in the embodiment of the present application, the preset inter-frame prediction mode may be the AWP mode for detailed description. The decoder derives the corresponding angle index AngleIdx and weight step index StepIdx according to the mode index information AwpModeIdx.

[0172] It should be noted that the angle index AngleIdx is obtained by dividing the mode index information by 8, and the weight step index is obtained by dividing the mode index information by 8 and then subtracting 3.

[0173] The formula is as follows:

[0174] AngleIdx=AwpModeIdx%8

[0175] StepIdx = (AwpModeIdx / 8) – 3

[0176] It should be noted that, in the embodiment of the present application, the relationship between the division mode, angle index and weight step index calculated from the 56 modes in the AWP mode is shown in Table 1:

[0177] Table 1

[0178] 0(0,-3) 1(1,-3) 2(2,-3) 3(3,-3) 4(4,-3) 5(5,-3) 6(6,-3) 7(7,-3) 8(0,-2) 9(1,-2) 10(2,-2) 11(3,-2) 12(4,-2) 13(5,-2) 14(6,-2) 15(7,-2) 16(0,-1) 17(1,-1) 18(2,-1) 19(3,-1) 20(4,-1) 21(5,-1) 22(6,-1) 23(7,-1) 24(0,0) 25(1,0) 26(2,0) 27(3,0) 28(4,0) 29(5,0) 30(6,0) 31(7,0) 32(0,1) 33(1,1) 34(2,1) 35(3,1) 36(4,1) 37(5,1) 38(6,1) 39(7,1) 40(0,2) 41(1,2) 42(2,2) 43(3,2) 44(4,2) 45(5,2) 46(6,2) 47(7,2) 48(0,3) 49(1,3) 50(2,3) 51(3,3) 52(4,3) 53(5,3) 54(6,3) 55(7,3)

[0179] Among them, the first term in () is the angle index, and the second term is the weight step index. The weight step of each row is consistent, and the angle index of each column is consistent.

[0180] In some embodiments of the present application, the decoder determines the partitioning mode type of the current block according to the mode index information, the angle index corresponding to the current block, and the weight step index as follows:

[0181] When the angle index and the weight step index satisfy the first preset distribution relationship, the decoder can determine that the division mode type of the current block is a tight type of time domain motion information; wherein, the first preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the angle index and the weight step index do not satisfy the first preset distribution relationship, the decoder can determine that the division mode type of the current block is a non-tight type of time domain motion information.

[0182] It should be noted that, in the embodiment of the present application, the first preset distribution relationship represents the distribution of the part that is closely related to the time domain motion information in the distribution arranged according to 0-55 division modes.

[0183] In some embodiments of the present application, the first preset distribution relationship includes at least one of the following:

[0184] The angle index is less than 4 and the weight step index is greater than -2;

[0185] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -2;

[0186] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -1;

[0187] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -2;

[0188] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -1.

[0189] In the embodiment of the present application, different first preset distribution relationships may be used to determine the compliance condition of the time domain motion information close type.

[0190] In the embodiment of the present application, exemplarily, in the embodiment of the present application, the preset inter-frame prediction mode can be used as the AWP mode for detailed description.

[0191] For the case where the angle index is less than 4 and the weight step index is greater than -2, assuming that the time domain motion information compact type is marked as 0 and the time domain motion information non-compact type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (1):

[0192] TmvpIdx=(AngleIdx<4)&&(StepIdx>-2)? 0:1 (1)

[0193] TmvpIdx indicates the partition mode type.

[0194] like Figure 10B The distribution of prediction modes corresponding to formula (1) is shown in the third to seventh rows. The prediction modes corresponding to the first to fourth columns correspond to the dense temporal motion information type, marked as gray circles, while the others correspond to the non-dense temporal motion information type, marked as black circles. That is, the 5*4 (5 rows and 4 columns) mode in the lower left corner is marked as a gray circle group, and the remaining modes are marked as black circle groups.

[0195] It should be noted that the AwpModeIdx here starts from 0, and the diagram starts from 1. The serial numbers 1-56 in the diagram only identify 56 modes in the picture, and generally when we say index or Idx, it defaults to starting from 0.

[0196] For the case where the angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -2, assuming that the time domain motion information compact type is marked as 0 and the time domain motion information non-compact type is marked as 1, the conditions for determining the partition mode type of the current block are as follows:

[0197] TmvpIdx=((AngleIdx<4)||(AngleIdx==7))&&(StepIdx>-2)? 0:1 (2)

[0198] TmvpIdx=(((AngleIdx+1)<=4))&&(StepIdx>-2)? 0:1 (3)

[0199] It should be noted that the effects achieved by formula (3) and (2) are consistent. Formula (3) can also be understood as the case where the angle index is cyclically shifted by one column, that is, after +1, it is less than or equal to 4, and the weight step index is greater than -2.

[0200] like Figure 11 The distribution of prediction modes corresponding to formula (2) or (3) is shown in the third to seventh rows and the first to fourth columns. The prediction modes corresponding to the five modes {24, 32, 40, 48, 56} correspond to the dense temporal motion information type, marked as gray circles, and the others correspond to the non-dense temporal motion information type, marked as black circles. That is, the 5*4 (5 rows and 4 columns) mode in the lower left corner is marked as a gray circle group, and the five modes {24, 32, 40, 48, 56} (5 rows and 1 column) in the lower right corner are marked as a gray circle group, and the remaining modes are marked as black circle groups.

[0201] For the case where the angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -1, assuming that the time domain motion information compact type is marked as 0 and the time domain motion information non-compact type is marked as 1, the conditions for determining the partition mode type of the current block are as follows:

[0202] TmvpIdx=((AngleIdx<4)||(AngleIdx==7))&&(StepIdx>-1)? 0:1 (4)

[0203] TmvpIdx=(((AngleIdx+1)<=4))&&(StepIdx>-1)? 0:1 (5)

[0204] It should be noted that the effects achieved by formula (4) and (5) are the same. Formula (5) can also be understood as the case where the angle index is cyclically shifted by one column, that is, after +1, it is less than or equal to 4, and the weight step index is greater than -1.

[0205] like Figure 12 The following table shows the distribution of prediction modes corresponding to formula (4) or (5), from the 4th to the 7th row, and from the 1st to the 4th column, as well as the prediction modes corresponding to the four modes {32, 40, 48, 56}, which correspond to the dense temporal motion information type, marked as gray circles, and the others corresponding to the non-dense temporal motion information type, marked as black circles. That is, the 4*4 (4 rows and 4 columns) modes in the lower left corner are marked as gray circle groups, and the four modes {32, 40, 48, 56} (4 rows and 1 column) in the lower right corner are marked as gray circle groups, and the remaining modes are marked as black circle groups.

[0206] For the case where the angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -2, assuming that the time domain motion information compact type is marked as 0 and the time domain motion information non-compact type is marked as 1, the conditions for determining the partition mode type of the current block are as follows:

[0207] TmvpIdx=((AngleIdx<3)||(AngleIdx==7))&&(StepIdx>-2)? 0:1 (6)

[0208] TmvpIdx=(((AngleIdx+1)<=3))&&(StepIdx>-2)? 0:1 (7)

[0209] It should be noted that the effects achieved by formula (6) and (7) are the same. Formula (7) can also be understood as the case where the angle index is cyclically shifted by one column, that is, after +1, it is less than or equal to 3, and the weight step index is greater than -2.

[0210] like Figure 13 The following table shows the distribution of prediction modes corresponding to formula (6) or (7), which are rows 3 to 7 and columns 1 to 3. The prediction modes corresponding to the five modes {24, 32, 40, 48, 56} correspond to the dense temporal motion information type, marked as gray circles, and the others correspond to the non-dense temporal motion information type, marked as black circles. That is, the 5*3 (5 rows and 3 columns) modes in the lower left corner are marked as gray circle groups, and the five modes {24, 32, 40, 48, 56} (5 rows and 1 column) in the lower right corner are marked as gray circle groups, and the remaining modes are marked as black circle groups.

[0211] For the case where the angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -1, assuming that the time domain motion information compact type is marked as 0 and the time domain motion information non-compact type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (8) or (9):

[0212] TmvpIdx=((AngleIdx<3)||(AngleIdx==7))&&(StepIdx>-1)? 0:1 (8)

[0213] TmvpIdx=(((AngleIdx+1)<=3))&&(StepIdx>-1)? 0:1 (9)

[0214] It should be noted that the effects achieved by formulas (8) and (9) are the same. Formula (9) can also be understood as the case where the angle index is cyclically shifted by one column, that is, after +1, it is less than or equal to 3, and the weight step index is greater than -1.

[0215] like Figure 14 The distribution of prediction modes corresponding to formula (8) or (9) is shown. The prediction modes corresponding to the 4th to 7th rows and the 1st to 3rd columns, as well as the 4 modes {32, 40, 48, 56}, correspond to the dense type of temporal motion information and are marked as gray circles. The other modes correspond to the non-dense type of temporal motion information and are marked as black circles. That is, the 4*3 modes (4 rows and 3 columns) in the lower left corner are marked as gray circle groups, and the 4 modes {32, 40, 48, 56} in the lower right corner (4 rows and 1 column) are marked as gray circle groups. The remaining modes are marked as black circle groups.

[0216] With respect to method three, in an embodiment of the present application, the decoder directly determines the partition mode type of the current block based on the mode index information of the prediction mode, as long as the second preset distribution relationship is satisfied.

[0217] In some embodiments of the present application, the second preset distribution relationship is obtained based on one of the results of dividing the pattern index information by 8, the results of right shifting the pattern index information by 3 bits, the result of modulo 8 of the pattern index information, the result of adding 1 to the pattern index information, the result of modulo 8, the result of bitwise AND of the pattern index information and 7, and the result of bitwise AND of the pattern index information and 7.

[0218] In the embodiment of the present application, the second preset distribution relationship includes at least one of the following:

[0219] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is greater than or equal to 2 after being right-shifted by 3 bits, and the modulo result of the pattern index and 8 is less than 4, or the bitwise AND result of the pattern index and 7 is less than 4;

[0220] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is greater than or equal to 2 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index and then taking the modulo value of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index and 7 is less than or equal to 7, or the result of adding 1 to the pattern index and then taking the bitwise AND of 7 is less than or equal to 4;

[0221] The result of dividing the pattern index by 8 is greater than or equal to 3, or the pattern index is greater than or equal to 3 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index and then taking the modulo value of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index and 7 is less than or equal to 7, or the result of adding 1 to the pattern index and then taking the bitwise AND of the pattern index and 7 is less than or equal to 4;

[0222] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is shifted right by 3 bits and is greater than or equal to 2, and the result modulo the pattern index and 8 is less than 3 or equal to 7, or the result modulo the pattern index by 1 and 8 is less than or equal to 3, or the result of the bitwise AND of the pattern index and 7 is less than or equal to 3, or the result of the bitwise AND of the pattern index by 1 and 7 is less than or equal to 3;

[0223] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right shifted by 3 bits, and the result modulo the pattern index information and 8 is less than 3 or equal to 7, or the result modulo the pattern index information plus 1 and 8 is less than or equal to 3, or the result of the bitwise AND of the pattern index information and 7 is less than 3 or equal to 7, or the result of the bitwise AND of the pattern index information plus 1 and 7 is less than or equal to 3.

[0224] It should be noted that, in the embodiment of the present application, the above Figure 10B-Figure 14 The purpose of clustering the prediction patterns can also be achieved through method 3. Among them, the second preset distribution relationship is mainly processed from three aspects: software, hardware, and a combination of software and hardware to achieve the purpose of clustering.

[0225] In the embodiment of the present application, for example, in the embodiment of the present application, the preset inter-frame prediction mode may be the AWP mode for detailed description. The second preset distribution can be divided into the following ways:

[0226] Method 1: The second preset distribution relationship includes at least one of the following:

[0227] 1. The result of dividing the pattern index by 8 is greater than or equal to 2, and the modulo result of the pattern index and 8 is less than 4;

[0228] 2. The pattern index information is shifted right by 3 bits and is greater than or equal to 2, and the bitwise AND result of the pattern index information and 7 is less than 4;

[0229] 3. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of bitwise AND of the pattern index and 7 is less than 4;

[0230] 4. The pattern index information is shifted right by 3 bits and is greater than or equal to 2, and the modulo 8 of the pattern index information is less than 4.

[0231] It should be noted that the first method is to achieve Figure 10B The method shown corresponds to the above Figure 10B Description.

[0232] For 1, assuming that the time domain motion information close type is marked as 0 and the time domain motion information non-close type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (10):

[0233] TmvpIdx=((AwpModeIdx / 8)>=2)&&((AwpModeIdx%8)<4)? 0:1 (10)

[0234] For 2, assuming that the time domain motion information close type is marked as 0 and the time domain motion information non-close type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (11):

[0235] TmvpIdx=((AwpModeIdx>>3)>=2)&&((AwpModeIdx&0x07)<4)? 0:1 (11)

[0236] For 3, assuming that the time domain motion information close type is marked as 0 and the time domain motion information non-close type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (12):

[0237] TmvpIdx=((AwpModeIdx / 8)>=2)&&((AwpModeIdx&0x07)<4)? 0:1 (12)

[0238] For 4, assuming that the time domain motion information close type is marked as 0 and the time domain motion information non-close type is marked as 1, the condition for determining the partition mode type of the current block is as shown in formula (13):

[0239] TmvpIdx=((AwpModeIdx>>3)>=2)&&((AwpModeIdx%8)<4)? 0:1 (13)

[0240] Method 2: The second preset distribution relationship includes at least one of the following:

[0241] 1. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of adding 1 to the pattern index and then multiplying it by 8 is less than or equal to 4;

[0242] For example, the expression is as shown in formula (14) or (15):

[0243] TmvpIdx=((AwpModeIdx / 8)>=2)&&(((AwpModeIdx%8)<4)||((AwpModeIdx%8)==7))? 0:1(14)

[0244] TmvpIdx=((AwpModeIdx / 8)>=2)&&((((AwpModeIdx+1)%8)<=4))? 0:1 (15)

[0245] 2. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of bitwise AND of the pattern index and 7 is less than 4 or equal to 7;

[0246] For example, the expression is shown in formula (16):

[0247] TmvpIdx=((AwpModeIdx / 8)>=2)&&(((AwpModeIdx&0x07)<4)||((AwpModeIdx&0x07)==7))? 0:1(16)

[0248] 3. The result of dividing the pattern index information by 8 is greater than or equal to 2, and the result of adding 1 to the pattern index information and then performing a bitwise AND operation with 7 is less than or equal to 4. For example, the expression is shown in formula (17):

[0249] TmvpIdx=((AwpModeIdx / 8)>=2)&&((((AwpModeIdx+1)&0x07)<=4))? 0:1(17)

[0250] 4. The pattern index information is shifted right by 3 bits and is greater than or equal to 2. The pattern index information is incremented by 1 and the result modulo 8 is less than or equal to 4.

[0251] For example, the expression is shown in formula (18):

[0252] TmvpIdx=((AwpModeIdx>>3)>>=2)&&(((AwpModeIdx+1)%8)<=4)||((AwpModeIdx&0x07)==7))? 0:1(18)

[0253] 5. The pattern index information is shifted right by 3 bits and is greater than or equal to 2, and the bitwise AND result of the pattern index information and 7 is less than 4 or equal to 7;

[0254] For example, the expression is shown in formula (19):

[0255] TmvpIdx=((AwpModeIdx>>3)>>=2)&&(((AwpModeIdx&0x07)<4)||((AwpModeIdx&0x07)==7))? 0:1(19)

[0256] 6. The pattern index information is shifted right by 3 bits and is greater than or equal to 2. The pattern index information is incremented by 1 and then bitwise ANDed with 7, resulting in a value less than or equal to 4.

[0257] For example, the expression is shown in formula (20):

[0258] TmvpIdx=((AwpModeIdx>>3)>=2)&&((((AwpModeIdx+1)&0x07)<=4))? 0:1(20)

[0259] It should be noted that the second method is to achieve Figure 11 The method shown corresponds to the above Figure 11 Description.

[0260] Method 3: The second preset distribution relationship includes at least one of the following:

[0261] 1. The result of dividing the pattern index by 8 is greater than or equal to 3, and the result of adding 1 to the pattern index and then multiplying it by 8 is less than or equal to 4;

[0262] For example, the expression is as shown in formula (21) or (22):

[0263] TmvpIdx=((AwpModeIdx / 8)>=3)&&((((AwpModeIdx+1)%8)<=4))? 0:1 (21)

[0264] TmvpIdx=((AwpModeIdx / 8)>=3)&&(((AwpModeIdx%8)<4)||((AwpModeIdx%8)==7))? 0:1(22)

[0265] It should be noted that formula (22) can represent the purpose of adding 1 to the pattern index information and then taking the modulus of 8 to be less than or equal to 4. Formula (22) can also be understood as the result of taking the modulus of 8 to be less than 4 or equal to 7.

[0266] 2. The result of dividing the pattern index by 8 is greater than or equal to 3, and the result of bitwise AND of the pattern index and 7 is less than 4 or equal to 7;

[0267] For example, the expression is shown in formula (23):

[0268] TmvpIdx=((AwpModeIdx / 8)>=3)&&(((AwpModeIdx&0x07)<4)||((AwpModeIdx&0x07)==7))? 0:1(23)

[0269] 3. The result of dividing the pattern index by 8 is greater than or equal to 3, and the result of adding 1 to the pattern index and then adding it to 7 is less than or equal to 4;

[0270] For example, the expression is shown in formula (24):

[0271] TmvpIdx=((AwpModeIdx / 8)>=3)&&((((AwpModeIdx+1)&0x07)<=4))? 0:1(24)

[0272] 4. The pattern index information is shifted right by 3 bits and is greater than or equal to 3. The pattern index information is incremented by 1 and the result modulo 8 is less than or equal to 4.

[0273] For example, the expression is shown in formula (25):

[0274] TmvpIdx=((AwpModeIdx>>3)>>=3)&&((((AwpModeIdx+1)%8)<=4))? 0:1 (25)

[0275] 5. The pattern index information is shifted right by 3 bits and is greater than or equal to 3, and the result of the bitwise AND of the pattern index information and 7 is less than 4 or equal to 7;

[0276] For example, the expression is shown in formula (26):

[0277] TmvpIdx=((AwpModeIdx>>3)>>=3)&&(((AwpModeIdx&0x07)<4)||((AwpModeIdx&0x07)==7))? 0:1(26)

[0278] 6. The pattern index information is shifted right by 3 bits and is greater than or equal to 3. The pattern index information is incremented by 1 and then bitwise ANDed with 7, resulting in a value less than or equal to 4.

[0279] For example, the expression is shown in formula (27):

[0280] TmvpIdx=((AwpModeIdx>>3)>=3)&&((((AwpModeIdx+1)&0x07)<=4))? 0:1(27)

[0281] It should be noted that the third method is to achieve Figure 12 The method shown corresponds to the above Figure 12Description.

[0282] Method 4: The second preset distribution relationship includes at least one of the following:

[0283] 1. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result modulo 8 is less than 3 or equal to 7;

[0284] For example, the expression is shown in formula (28):

[0285] TmvpIdx=((AwpModeIdx / 8)>=2)&&(((AwpModeIdx%8)<3)||((AwpModeIdx%8)==7))? 0:1(28)

[0286] 2. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of adding 1 to the pattern index and then multiplying it by 8 is less than or equal to 3;

[0287] For example, the expression is shown in formula (29):

[0288] TmvpIdx=((AwpModeIdx / 8)>=2)&&((((AwpModeIdx+1)%8)<=3))? 0:1 (29)

[0289] 3. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of bitwise AND of the pattern index and 7 is less than 3 or equal to 7;

[0290] For example, the expression is shown in formula (30):

[0291] TmvpIdx=((AwpModeIdx / 8)>=2)&&(((AwpModeIdx&0x07)<3)||((AwpModeIdx&0x07)==7))? 0:1(30)

[0292] 4. The result of dividing the pattern index by 8 is greater than or equal to 2, and the result of adding 1 to the pattern index and then adding it to 7 is less than or equal to 3;

[0293] For example, the expression is shown in formula (31):

[0294] TmvpIdx=((AwpModeIdx / 8)>=2)&&((((AwpModeIdx+1)&0x07)<=3))? 0:1(31)

[0295] 5. The pattern index information is shifted right by 3 bits and is greater than or equal to 2, and the result of multiplying the pattern index information by 8 is less than 3 or equal to 7;

[0296] For example, the expression is shown in formula (32):

[0297] TmvpIdx=((AwpModeIdx>>3)>>=2)&&(((AwpModeIdx%8)<3)||((AwpModeIdx%8)==7))? 0:1(32)

[0298] 6. The pattern index information is shifted right by 3 bits and is greater than or equal to 2. The pattern index information is incremented by 1 and the result modulo 8 is less than or equal to 3.

[0299] For example, the expression is shown in formula (33):

[0300] TmvpIdx=((AwpModeIdx>>3)>=2)&&(((AwpModeIdx+1)%8)<=3))? 0:1 (33)

[0301] 7. The pattern index information is shifted right by 3 bits and is greater than or equal to 2, and the bitwise AND result of the pattern index information and 7 is less than 3 or equal to 7;

[0302] For example, the expression is shown in formula (34):

[0303] TmvpIdx=((AwpModeIdx>>3)>>=2)&&(((AwpModeIdx&0x07)<3)||((AwpModeIdx&0x07)==7))? 0:1(34)

[0304] 8. The pattern index information is shifted right by 3 bits and is greater than or equal to 2. The pattern index information is incremented by 1 and then bitwise ANDed with 7, resulting in a value less than or equal to 3.

[0305] For example, the expression is shown in formula (35):

[0306] TmvpIdx=((AwpModeIdx>>3)>=2)&&((((AwpModeIdx+1)&0x07)<=3))? 0:1(35)

[0307] It should be noted that the fourth method is to achieve Figure 13 The method shown corresponds to the above Figure 13 Description.

[0308] Method 5: The second preset distribution relationship includes at least one of the following:

[0309] 1. The result of dividing the pattern index information by 8 is greater than or equal to 3, and the result of modulo 8 of the pattern index information is less than 3 or equal to 7.

[0310] For example, the expression is shown in formula (36):

[0311] TmvpIdx=((AwpModeIdx / 8)>=3)&&(((AwpModeIdx%8)<3)||((AwpModeIdx%8)==7))? 0:1(36)

[0312] 2. The result of dividing the pattern index information by 8 is greater than or equal to 3, and the result of adding 1 to the pattern index information and then taking the remainder with 8 is less than or equal to 3.

[0313] For example, the expression is shown in formula (37):

[0314] TmvpIdx=((AwpModeIdx / 8)>=3)&&((((AwpModeIdx+1)%8)<=3))? 0:1 (37)

[0315] 3. The result of dividing the pattern index information by 8 is greater than or equal to 3, and the result of the bitwise AND of the pattern index information and 7 is less than 3 or equal to 7.

[0316] For example, the expression is shown in formula (38):

[0317] TmvpIdx=((AwpModeIdx / 8)>=3)&&(((AwpModeIdx&0x07)<3)||((AwpModeIdx&0x07)==7))? 0:1(38)

[0318] 4. The result of dividing the pattern index information by 8 is greater than or equal to 3. The result of adding 1 to the pattern index information and then performing a bitwise AND operation with 7 is less than or equal to 3.

[0319] For example, the expression is shown in formula (39):

[0320] TmvpIdx=((AwpModeIdx / 8)>=3)&&((((AwpModeIdx+1)&0x07)<=3))? 0:1(39)

[0321] 5. The pattern index information is greater than or equal to 3 after being right-shifted by 3 bits, and the result of multiplying the pattern index information by 8 is less than 3 or equal to 7.

[0322] For example, the expression is shown in formula (40):

[0323] TmvpIdx=((AwpModeIdx>>3)>>=3)&&(((AwpModeIdx%8)<3)||((AwpModeIdx%8)==7))? 0:1(40)

[0324] 6. The pattern index information is shifted right by 3 bits and is greater than or equal to 3. The pattern index information is incremented by 1 and then modulo 8 is less than or equal to 3.

[0325] For example, the expression is shown in formula (41):

[0326] TmvpIdx=((AwpModeIdx>>3)>>=3)&&((((AwpModeIdx+1)%8)<=3))? 0:1 (41)

[0327] 7. The pattern index information is greater than or equal to 3 after being right-shifted by 3 bits, and the bitwise AND result of the pattern index information and 7 is less than 3 or equal to 7.

[0328] For example, the expression is shown in formula (42):

[0329] TmvpIdx=((AwpModeIdx>>3)>>=3)&&(((AwpModeIdx&0x07)<3)||((AwpModeIdx&0x07)==7))? 0:1(42)

[0330] 8. The pattern index information is shifted right by 3 bits and is greater than or equal to 3. The pattern index information is incremented by 1 and then bitwise ANDed with 7, resulting in a value less than or equal to 3.

[0331] For example, the expression is shown in formula (43):

[0332] TmvpIdx=((AwpModeIdx>>3)>=3)&&((((AwpModeIdx+1)&0x07)<=3))? 0:1(43)

[0333] It should be noted that the fifth method is to achieve Figure 14 The method shown corresponds to the above Figure 14 Description.

[0334] It can be understood that the above expression method can simplify the logical expression, thereby reducing complexity.

[0335] S103: Determine a motion information list of the current block based on the partition mode type.

[0336] In an embodiment of the present application, after determining the partition mode type corresponding to the current block, the decoder can determine the motion information list of the current block based on the partition mode type.

[0337] It should be noted that the motion information list here may refer to the adjustment of spatial motion information and temporal motion information based on the division mode type when constructing a unidirectional motion information list, or it may refer to the adjustment of spatial motion information and temporal motion information when constructing a bidirectional motion information list. The embodiment of this application does not impose any restrictions.

[0338] The following description takes the construction of a bidirectional motion information list as an example, and the logic of a unidirectional motion information list is the same.

[0339] In an embodiment of the present application, the decoder obtains the temporal motion information of a preset position corresponding to the current block and the spatial motion information of an adjacent reference block; when the division mode type is a tight temporal motion information type, the first index value of the temporal motion information is set to be lower than at least one second index value of the spatial motion information; based on the temporal motion information, the first index value, the second index value and the spatial motion information, a bidirectional motion information list is constructed.

[0340] In some embodiments of the present application, the decoder obtains motion information of at least one reference block adjacent to the current block; determines available motion information of at least one reference block from the motion information of the at least one reference block; the available motion information is spatial motion information; and then obtains temporal motion information of a preset position corresponding to the current block.

[0341] It should be noted that, in the embodiment of the present application, when the division mode type is the time domain motion information compact type, the decoder may prioritize placing the time domain motion information into the motion information list before placing the spatial domain motion information.

[0342] In some embodiments of the present application, the spatial motion information and the corresponding second index value include a plurality of;

[0343] Setting the first index value of the temporal motion information to be lower than the at least one second index value of the spatial motion information may be implemented by one of the following:

[0344] Set the first index value of the temporal motion information to be lower than a second index value of the spatial motion information; or

[0345] Setting the first index value of the temporal motion information to be lower than the two second index values of the spatial motion information; or,

[0346] Set the first index value of the temporal motion information to be lower than the three second index values of the spatial motion information by two second index values; or,

[0347] The first index value of the temporal motion information is set to be lower than the three second index values and the four second index values of the spatial motion information.

[0348] In some embodiments of the present application, the decoder adds the corresponding temporal motion information and spatial motion information to the original bidirectional motion information list in the order of the first index value and the second index value from small to large, and constructs a bidirectional motion information list.

[0349] Based on the above implementation, it can be understood that when the decoder constructs the motion information list, if the division mode type of the current block is the time domain motion information tight type, the time domain motion information needs to be placed in the motion information list to be constructed in priority to the spatial domain motion information. The priority method can be to place the time domain motion information at the first place in the motion information list to be constructed, or to place the time domain motion information at the second place in the motion information list to be constructed, or to place the time domain motion information at the third or fourth place in the motion information list to be constructed, and the embodiments of the present application are not limited thereto.

[0350] It can be understood that the present application uniformly adjusts the index value according to the partition characteristics under different AWP modes and the importance of the time domain motion candidate to all AWP modes, reduces the index codeword of the time domain motion information while keeping the complexity basically unchanged, and improves the prediction quality of the time domain motion candidates in most AWP modes by more effectively playing the role of TMVP, thereby improving the decoding performance.

[0351] In some embodiments of the present application, when the prediction mode parameter indicates the use of a preset inter-frame prediction mode to determine the inter-frame prediction value of the current block, the decoder obtains the temporal motion information of the preset position corresponding to the current block and the spatial motion information of the adjacent reference block; sets the first index value of the temporal motion information to be lower than at least one second index value of the spatial motion information; constructs a motion information list based on the temporal motion information, the first index value, the second index value and the spatial motion information; and finally, determines the inter-frame prediction value of the current block based on the first motion information index value and the motion information list.

[0352] The method for setting the first index value is consistent with the implementation principle of the previous embodiment and will not be repeated here.

[0353] It can be understood that the present application adjusts the index value of the temporal motion information according to the partition characteristics under different AWP modes, and before adjusting the index value of the spatial motion information, reduces the index codeword of the temporal motion information while keeping the complexity basically unchanged, and improves the prediction quality of the temporal motion candidates under most AWP modes by more effectively playing the role of TMVP, thereby improving the decoding performance.

[0354] For example, for the AWP mode, the priority of the temporal motion information is advanced to the first place in the motion information list, that is, the third and second steps in the above method of obtaining motion information are swapped. The candidate at position 1 is the temporal motion information, the candidate at position 2 is the spatial motion information, and the candidate at position 3 is the scaled motion information. Figure 15 The first four candidates of the AWP bidirectional motion information list AwpCandArray shown are filled with available spatial motion information, and the temporal candidate can only be filled to the fifth position, and the scaled motion information cannot be filled into the list; Figure 16 As shown, only three available spatial motion information are filled into the AWP bidirectional motion information list AwpCandArray, the temporal candidate can only be filled to the fourth position, and the scaled motion information is filled to the fifth position. Even after adjusting the priority position of the temporal motion information, the priority of the scaled motion information remains unchanged.

[0355] In an implementation example, the decoder first places the temporal motion information at the top of the bidirectional motion information list.

[0356] That is, the decoder puts the temporal bidirectional motion information into the motion candidate list AwpCandArray, and then puts the available motion information into the motion candidate list AwpCandArray in the order of F, G, C, A, and D until the length of AwpCandArray reaches 5 or the traversal is completed.

[0357] like Figure 17 As shown, the temporal motion information 8 and 9 are adjusted to the positions of 0 and 1, mainly by setting the first index value of the temporal motion information to 0.

[0358] In an implementation example, the decoder first places the temporal motion information in the second position of the bidirectional motion information list.

[0359] That is, if at least one available motion information item from F, G, C, A, and D is available, the decoder places the first available motion information item in the order of F, G, C, A, and D into the motion candidate list AwpCandArray. It then places the derived temporal bidirectional motion information into the motion candidate list AwpCandArray. Otherwise, the temporal bidirectional motion information item is directly placed at the top of the motion candidate list AwpCandArray. The remaining available motion information items from F, G, C, A, and D are then placed into the motion candidate list AwpCandArray in order until the length of AwpCandArray reaches 5 or the traversal is completed.

[0360] like Figure 18 As shown, the temporal motion information 8 and 9 are adjusted to positions 2 and 3, mainly by setting the first index value of the temporal motion information to 1.

[0361] In an implementation example, the decoder first places the temporal motion information at the third position in the bidirectional motion information list.

[0362] That is, if at least two available motion information items are available from F, G, C, A, and D, the decoder places the first two available motion information items into the motion candidate list AwpCandArray in the order of F, G, C, A, and D. It then places the derived temporal bidirectional motion information into the motion candidate list AwpCandArray. Otherwise, after all available spatial motion information items are filled, the temporal bidirectional motion information is placed at the top of the motion candidate list AwpCandArray. Finally, the remaining available motion information items from F, G, C, A, and D are placed into the motion candidate list AwpCandArray in order until the length of AwpCandArray reaches 5 or the traversal is completed.

[0363] like Figure 19 As shown, the temporal motion information 8 and 9 are adjusted to positions 4 and 5, mainly by setting the first index value of the temporal motion information to 2.

[0364] In an implementation example, the decoder first places the temporal motion information at the fourth position in the bidirectional motion information list.

[0365] That is, if at least three of the available motion information from F, G, C, A, and D are available, the decoder places the first three available motion information into the motion candidate list AwpCandArray in that order, and then places the derived temporal bidirectional motion information into the motion candidate list AwpCandArray. Otherwise, after all available spatial motion information is available, the temporal bidirectional motion information is placed at the top of the motion candidate list AwpCandArray. The remaining available motion information from F, G, C, A, and D is then placed into the motion candidate list AwpCandArray in that order until the length of AwpCandArray reaches 5 or the traversal is completed.

[0366] like Figure 20 As shown, the temporal motion information 8 and 9 are adjusted to the positions of 6 and 7, mainly by setting the first index value of the temporal motion information to 3.

[0367] It should be noted that in the embodiment of the present application, the decoder can selectively adjust the index value of its temporal motion information according to the different division modes of the AWP, and can advance the index value of the temporal motion information of different modes to make appropriate adjustments based on the shape of the sub-partitions of each AWP mode, whether the location is closer to the spatially adjacent pixels of the current block, the proportion of the selected temporal motion information of each mode, etc. For example, the shape and location of the sub-partitions in different modes can indicate that one of the partitions in certain AWP division modes has few available spatially adjacent reference pixels, so this partition is more dependent on temporal motion information. Therefore, the index value of the TMVP in the list of these modes can be appropriately adjusted to be smaller.

[0368] For example, Figure 10B-14 , the 56 AWP modes are roughly divided into two groups based on the division characteristics. The modes marked with gray circles are one group, and the modes marked with black circles are another group. The index value of the TMVP of the mode marked with gray circles can be adjusted to the first / second / third / fourth position, and the TMVPs of the other modes marked with black circles remain in the original position. Or the index value of the TMVP of the mode marked with gray circles can be adjusted to the first / second / third / fourth position, and the TMVPs of the other modes marked with blue circles can be adjusted to other positions except the first and last position. The index values of the TMVP under the two groupings can have multiple combinations. Under the premise of ensuring that the TMVP index values of the two partitions are not equal, any combination can be made between any two index values in the first / second / third / fourth / last position. Of course, the acquisition position of the above-mentioned TMVP can also be used in combination with the subsequent temporal motion information acquisition method (method 1 / method 2 / method 3 / method 4). The TMVP can be obtained from the upper right, lower left, lower right or inside the center point of the current coding unit. Among them, the temporal motion information acquisition method is as follows:

[0369] Method 1:

[0370] The preset position for obtaining the existing temporal motion information is moved from the upper left corner of the current block to the lower right corner, that is, the upper left corner information in the first step of the aforementioned temporal motion information method is changed to the lower right corner information. Since the current coding block itself lacks the spatial domain encoded pixel value for reference in the lower right corner, it is necessary to obtain the temporal motion information of the lower right corner to fill the missing spatial domain motion information in the lower right corner.

[0371] For example, Figure 21 As shown, the original Figure 6 The solid dot-pixel in the upper left corner is moved to the lower right corner. Note that if the black pixel in the lower right corner is outside the CTU\LCU boundary, the position needs to be indented:

[0372] If the pixel point only exceeds the left boundary, it will be indented in the direction of arrow ①;

[0373] If the pixel point only exceeds the lower boundary, it will be indented in the direction of arrow ②;

[0374] If the pixel exceeds both the bottom and left boundaries, it will be indented in the direction of arrow ③;

[0375] It should be noted that there are multiple ways to select the lower right pixel. Under the premise of not exceeding the CTU / LCU boundary, the lower right pixel point may be a solid point-pixel point pointed by any of arrows ①, ②, and ③.

[0376] Exemplarily, obtaining the temporal motion information is specifically implemented as follows:

[0377] The top left corner luminance sample position of the current prediction unit is recorded as (x, y), the width of the luminance prediction block is l_width, and the height of the luminance prediction block is l_height. The bottom right luminance sample position of the selected current prediction unit is recorded as (x', y').

[0378] x'=x+l_width

[0379] y'=y+l_height

[0380] If the (x',y') derived above is not available, such as outside the image boundary, the patch boundary.

[0381] If x' is not available, x'=x+l_width-1

[0382] If y' is not available, y'=y+l_height-1

[0383] first step:

[0384] 1) If the reference frame index stored in the temporal motion information storage unit where the luminance sample corresponding to the lower right luminance sample position of the current prediction unit in the image with a reference index value of 0 in the reference picture queue 1 is located is -1, then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The size and position of the coding unit where the current prediction unit is located are used as the size and position of the current prediction unit, and then the obtained L0 motion vector prediction value and L1 motion vector prediction value are used as the L0 motion vector MvE0 and L1 motion vector MvE1 of the current prediction unit respectively, and the L0 reference index RefIdxL0 and L1 reference index RefIdxL1 of the current prediction unit are both set to 0, and the motion information derivation process is terminated.

[0385] 2) Otherwise, the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The distance indexes of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as DistanceIndexL0 and DistanceIndexL1 respectively; the BlockDistance of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as BlockDistanceL0 and BlockDistanceL1 respectively.

[0386] The L0 motion vector of the time domain motion information storage unit where the luminance sample corresponding to the luminance sample position at the lower right of the current prediction unit in the image with reference index 0 in the reference image queue 1 is located is recorded as mvRef(mvRef_x, mvRef_y), the distance index of the image where the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.

[0387] Method 2:

[0388] Moving the location for obtaining the existing temporal motion information from the top left corner of the current block to the center means replacing the top left corner information in the first step of the temporal motion information acquisition method with information at the center of the current coding block. Since the current coding block itself lacks referenceable spatially encoded pixel values within the current coding block, it is necessary to obtain the temporal motion information corresponding to the center point within the current block to fill in the missing spatial motion information.

[0389] For example, Figure 22 As shown, the original Figure 6 The solid dot-pixel in the upper left corner is moved to the center.

[0390] Exemplarily, obtaining the temporal motion information is specifically implemented as follows:

[0391] The top left corner luminance sample position of the current prediction unit is recorded as (x, y), the width of the luminance prediction block is l_width, and the height of the luminance prediction block is l_height. The bottom right luminance sample position of the selected current prediction unit is recorded as (x', y').

[0392] x'=x+(l_width>>1)

[0393] y'=y+(l_height>>1)

[0394] first step,

[0395] 1) If the reference frame index stored in the temporal motion information storage unit where the luminance sample corresponding to the center point luminance sample position of the current prediction unit in the image with a reference index value of 0 in the reference picture queue 1 is located is -1, then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The size and position of the coding unit where the current prediction unit is located are used as the size and position of the current prediction unit, and then the obtained L0 motion vector prediction value and L1 motion vector prediction value are used as the L0 motion vector MvE0 and L1 motion vector MvE1 of the current prediction unit respectively, and the L0 reference index RefIdxL0 and L1 reference index RefIdxL1 of the current prediction unit are both set to 0, and the motion information derivation process is terminated.

[0396] 2) Otherwise, the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The distance indexes of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as DistanceIndexL0 and DistanceIndexL1 respectively; the BlockDistance of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as BlockDistanceL0 and BlockDistanceL1 respectively.

[0397] The L0 motion vector of the time domain motion information storage unit where the luminance sample corresponding to the luminance sample position of the center point of the current prediction unit in the image with reference index 0 in the reference image queue 1 is located is recorded as mvRef(mvRef_x, mvRef_y), the distance index of the image where the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.

[0398] Method 3:

[0399] The location where the existing temporal motion information is obtained is moved from the upper left corner of the current block to the lower left. This means that the upper left corner information in the first step of the temporal motion information acquisition method is replaced with the information at the lower left position of the current coding block. Since the current coding block itself lacks the referenced spatially encoded pixel values below, it is necessary to obtain the temporal motion information below to fill in the missing spatial motion information below.

[0400] For example, Figure 23A As shown, the original Figure 6 The solid dot-pixel in the upper left corner is moved to the lower left position. It should be noted that if the black pixel in the lower left corner is outside the boundary of the CTU\LCU, the position needs to be indented. Here is an example:

[0401] If the pixel only exceeds the lower boundary, then Figure 23A Indent in the direction indicated by the arrow ①.

[0402] It should be noted that if Figure 23B As shown, there are multiple selection methods for the lower left corner. Under the premise of not exceeding the CTU / LCU boundary, the lower left pixel may be Figure 23B A solid point pointed by any of the arrows ①, ②, and ③ - pixel point.

[0403] Exemplarily, obtaining the temporal motion information is specifically implemented as follows:

[0404] The top left corner luminance sample position of the current prediction unit is recorded as (x, y), the width of the luminance prediction block is l_width, and the height of the luminance prediction block is l_height. The bottom left luminance sample position of the selected current prediction unit is recorded as (x', y').

[0405] x'=x

[0406] y'=y+l_height

[0407] If the (x',y') derived above is not available, such as outside the image boundary, the patch boundary.

[0408] x'=x

[0409] y'=y+l_height-1

[0410] first step,

[0411] 1) If the reference frame index stored in the temporal motion information storage unit where the luminance sample corresponding to the lower left luminance sample position of the current prediction unit in the image with a reference index value of 0 in the reference picture queue 1 is located is -1, then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The size and position of the coding unit where the current prediction unit is located are used as the size and position of the current prediction unit, and then the obtained L0 motion vector prediction value and L1 motion vector prediction value are used as the L0 motion vector MvE0 and L1 motion vector MvE1 of the current prediction unit respectively, and the L0 reference index RefIdxL0 and L1 reference index RefIdxL1 of the current prediction unit are both set to 0, and the motion information derivation process is terminated.

[0412] 2) Otherwise, the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The distance indexes of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as DistanceIndexL0 and DistanceIndexL1 respectively; the BlockDistance of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as BlockDistanceL0 and BlockDistanceL1 respectively.

[0413] The L0 motion vector of the time domain motion information storage unit where the luminance sample corresponding to the lower left luminance sample position of the current prediction unit in the image with reference index 0 in the reference image queue 1 is located is recorded as mvRef(mvRef_x, mvRef_y), the distance index of the image where the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.

[0414] Method 4:

[0415] The position where the existing temporal motion information is obtained is moved from the upper left corner of the current block to the upper right position, that is, the upper left corner information in the first step of the aforementioned method for obtaining the temporal motion information is changed to the information at the upper right position of the current coding block.

[0416] Since the current coding block itself lacks the referenced spatially coded pixel values on the right, it is necessary to fill the missing spatial motion information on the right by obtaining the temporal motion information on the right.

[0417] For example, Figure 24A As shown, the original Figure 6 The solid dot-pixel in the upper left corner is moved to the upper right position. It should be noted that if the upper right black pixel is outside the boundary of the CTU\LCU, the position needs to be indented as follows:

[0418] If the pixel only exceeds the lower boundary, then Figure 24A Indent in the direction indicated by the arrow ①.

[0419] It should be noted that if Figure 24B As shown, there are multiple selection methods for the upper right corner. Under the premise of not exceeding the CTU / LCU boundary, the upper right pixel may be Figure 24B A solid point pointed by any of the arrows ①, ②, and ③ - pixel point.

[0420] Exemplarily, obtaining the temporal motion information is specifically implemented as follows:

[0421] The top left corner luminance sample position of the current prediction unit is recorded as (x, y), the width of the luminance prediction block is l_width, and the height of the luminance prediction block is l_height. The top right luminance sample position of the selected current prediction unit is recorded as (x', y').

[0422] x'=x+l_width

[0423] y'=y

[0424] If the (x',y') derived above is not available, such as outside the image boundary, the patch boundary.

[0425] x'=x+l_width-1

[0426] y'=y

[0427] first step,

[0428] 1) If the reference frame index stored in the temporal motion information storage unit where the luminance sample corresponding to the upper right luminance sample position of the current prediction unit in the image with a reference index value of 0 in the reference picture queue 1 is located is -1, then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The size and position of the coding unit where the current prediction unit is located are used as the size and position of the current prediction unit, and then the obtained L0 motion vector prediction value and L1 motion vector prediction value are used as the L0 motion vector MvE0 and L1 motion vector MvE1 of the current prediction unit respectively, and the L0 reference index RefIdxL0 and L1 reference index RefIdxL1 of the current prediction unit are both set to 0, and the motion information derivation process is terminated.

[0429] 2) Otherwise, the L0 reference index and L1 reference index of the current prediction unit are both equal to 0. The distance indexes of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as DistanceIndexL0 and DistanceIndexL1 respectively; the BlockDistance of the image corresponding to the L0 reference index and L1 reference index of the current prediction unit are recorded as BlockDistanceL0 and BlockDistanceL1 respectively.

[0430] The L0 motion vector of the time domain motion information storage unit where the luminance sample corresponding to the upper right luminance sample position of the current prediction unit in the image with reference index 0 in the reference image queue 1 is located is recorded as mvRef(mvRef_x, mvRef_y), the distance index of the image where the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.

[0431] It can be understood that the embodiments of the present application improve the acquisition position of the time domain motion information in the existing AWP motion candidate list, and appropriately adjust the index value of the time domain motion information in the list, thereby reducing the index codeword of the time domain motion information while keeping the complexity basically unchanged, improving the prediction quality of the time domain motion candidates in most AWP modes, and thus improving the encoding and decoding performance.

[0432] S104 : Determine an inter-frame prediction value of the current block based on the first motion information index value and the motion information list.

[0433] In the embodiment of the present application, when the motion information list is a bidirectional motion information list, the decoder can

[0434] A duplicate check process is performed based on the bidirectional motion information list to construct a unidirectional motion information list; and an inter-frame prediction value of the current block is determined according to the first motion information index value and the unidirectional motion information list.

[0435] In an embodiment of the present application, the preset inter-frame prediction mode includes: a geometric partitioning prediction mode or an angle weighted prediction mode.

[0436] In this way, when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using a preset inter-frame prediction mode, two partitions of the current block are determined; the two partitions include a first partition and a second partition; according to the first motion information index value, the first information corresponding to the first partition and the second information corresponding to the second partition are determined from the unidirectional motion information list; the first motion information index value includes: a first index value corresponding to the first information, and a second index value corresponding to the second information; the first prediction value of the first partition is calculated using the first information, and the second prediction value of the second partition is calculated using the second information; and the inter-frame prediction value of the current block is determined based on the first prediction value and the second prediction value.

[0437] In an embodiment of the present application, when the prediction mode parameter indicates the use of a preset inter-frame prediction mode (such as GPM or AWP) to determine the inter-frame prediction value of the current block, two partitions of the current block can be determined at this time. That is, the method may further include: when the prediction mode parameter indicates the use of GPM or AWP to determine the inter-frame prediction value of the current block, determining two partitions of the current block; wherein the two partitions include a first partition and a second partition. After obtaining the motion information list, the first information corresponding to the first partition of the current block and the second information of the second partition can be determined; then, based on the first information corresponding to the first partition and the second information of the second partition, the inter-frame prediction value of the current block can be determined.

[0438] The decoder calculates a first prediction value of the first partition using the first information of the first partition and calculates a second prediction value of the second partition using the second information of the second partition; and performs weighted fusion on the first prediction value and the second prediction value to obtain an inter-frame prediction value of the current block.

[0439] For example, AWP has 56 partitioning modes. In each partitioning mode, the black area indicates that the weight value of the position corresponding to the first reference block is 0%, the white area indicates that the weight value of the position corresponding to the first reference block is 100%, and the gray area, depending on the color, indicates that the weight value of the position corresponding to the first reference block is greater than 0% and less than 100%. The weight value of the position corresponding to the second reference block is 100% minus the weight value of the position corresponding to the first reference block.

[0440] It should be understood that early codec technologies only used rectangular partitioning methods, whether for CU, PU, or transform unit (TU) partitioning. However, both GPM and AWP implement non-rectangular partitioning, meaning that a straight line can be used to divide a rectangular block into two partitions. Depending on the position and angle of the line, the two partitions may be triangular, trapezoidal, or rectangular, allowing the partitioning to be closer to the edge of an object or the edge of two regions with different motion. It should be noted that the partitioning mentioned here is not a true partitioning, but more of a partitioning based on prediction effects. This is because this partitioning only divides the weights of the two reference blocks when generating the prediction block, or it can be simply understood as part of the position of the prediction block coming from the first reference block and the other part coming from the second reference block. The current block is not actually divided into two CUs, PUs, or TUs according to the partitioning line. Therefore, after the prediction, the transformation, quantization, inverse transformation, and inverse quantization of the residual are all processed as a whole.

[0441] It can be understood that by classifying the partition model of the current block according to the closeness between the partition mode of the current block and the temporal motion information, the motion information list of the current block is determined based on the partition mode type, and the importance of temporal motion information is taken into account in the process of constructing the initial motion information list, rather than just considering the spatial motion information. Then, for a certain partition of the inter-frame prediction mode, when only the temporal adjacent motion information has the strongest correlation, the bidirectional motion information list obtained in this way can rely on the temporal motion information to improve the decoding efficiency.

[0442] The present invention provides an inter-frame prediction method for a video encoding device, i.e., an encoder. The functions implemented by the method can be implemented by a second processor in the encoder calling a computer program. The computer program can also be stored in a second memory. Therefore, the encoder includes at least a second processor and a second memory.

[0443] Furthermore, in the embodiments of the present application, Figure 25 Schematic diagram of the implementation process of the inter-frame prediction method Figure 1 ,like Figure 25 As shown, the method for the encoder to perform inter-frame prediction may include the following steps:

[0444] S201, determining prediction mode parameters of the current block;

[0445] S202: When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determining a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type indicates how closely the partitioning mode of the current block is aligned with temporal motion information;

[0446] In an embodiment of the present application, the partition mode types of the current block include: a time domain motion information compact type and a time domain motion information non-compact type; and the prediction mode parameters include: mode index information of the prediction mode.

[0447] The process of determining the partition mode type of the current block according to the prediction mode parameter may include at least one of the following methods:

[0448] Method 1:

[0449] The encoder traverses a mapping table between preset modes and partition mode types, and determines a partition mode type of the current block corresponding to the mode index information.

[0450] Method 2:

[0451] The encoder determines the angle index and weight step index corresponding to the current block according to the mode index information of the prediction mode; and determines the partition mode type of the current block according to the mode index information, the angle index and weight step index corresponding to the current block.

[0452] In some embodiments of the present application, when the angle index and the weight step index satisfy a first preset distribution relationship, the encoder determines that the division mode type of the current block is a time domain motion information tight type; wherein the first preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the angle index and the weight step index do not satisfy the first preset distribution relationship, the encoder determines that the division mode type of the current block is a time domain motion information non-tight type.

[0453] In some embodiments of the present application, the first preset distribution relationship includes at least one of the following:

[0454] The angle index is less than 4 and the weight step index is greater than -2;

[0455] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -2;

[0456] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -1;

[0457] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -2;

[0458] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -1.

[0459] Method 3:

[0460] When the pattern index information satisfies the second preset distribution relationship, the encoder determines that the division pattern type of the current block is a time domain motion information tight type; wherein the second preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the pattern index information does not satisfy the second preset distribution relationship, the encoder determines that the division pattern type of the current block is a time domain motion information non-tight type.

[0461] In some embodiments of the present application, the second preset distribution relationship includes at least one of the following:

[0462] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is greater than or equal to 2 after being right-shifted by 3 bits, and the modulo result of the pattern index and 8 is less than 4, or the bitwise AND result of the pattern index and 7 is less than 4;

[0463] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is greater than or equal to 2 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index and then taking the modulo value of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index and 7 is less than or equal to 7, or the result of adding 1 to the pattern index and then taking the bitwise AND of 7 is less than or equal to 4;

[0464] The result of dividing the pattern index by 8 is greater than or equal to 3, or the pattern index is greater than or equal to 3 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index and then taking the modulo value of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index and 7 is less than or equal to 7, or the result of adding 1 to the pattern index and then taking the bitwise AND of the pattern index and 7 is less than or equal to 4;

[0465] The result of dividing the pattern index by 8 is greater than or equal to 2, or the pattern index is shifted right by 3 bits and is greater than or equal to 2, and the result modulo the pattern index and 8 is less than 3 or equal to 7, or the result modulo the pattern index by 1 and 8 is less than or equal to 3, or the result of the bitwise AND of the pattern index and 7 is less than or equal to 3, or the result of the bitwise AND of the pattern index by 1 and 7 is less than or equal to 3;

[0466] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right shifted by 3 bits, and the result modulo the pattern index information and 8 is less than 3 or equal to 7, or the result modulo the pattern index information plus 1 and 8 is less than or equal to 3, or the result of the bitwise AND of the pattern index information and 7 is less than 3 or equal to 7, or the result of the bitwise AND of the pattern index information plus 1 and 7 is less than or equal to 3.

[0467] In some embodiments of the present application, the temporal motion information tight type flag is a first preset value;

[0468] The non-compact type flag of the temporal motion information is set to a second preset value.

[0469] S203, determining a motion information list of the current block based on the partition mode type;

[0470] In some embodiments of the present application, the process of determining the motion information list of the current block based on the division mode type is as follows: the encoder obtains the temporal motion information of a preset position corresponding to the current block and the spatial motion information of the adjacent reference block; when the division mode type is a tight temporal motion information type, the first index value of the temporal motion information is set to be lower than at least one second index value of the spatial motion information; based on the temporal motion information, the first index value, the second index value and the spatial motion information, a motion information list is constructed.

[0471] In some embodiments of the present application, the encoder obtains motion information of at least one reference block adjacent to the current block; determines available motion information of at least one reference block from the motion information of the at least one reference block; the available motion information is spatial motion information; and obtains temporal motion information of a preset position corresponding to the current block.

[0472] In some embodiments of the present application, the encoder adds the corresponding temporal motion information and spatial motion information to the original bidirectional motion information list in the order of the first index value and the second index value from small to large to construct a motion information list.

[0473] In some embodiments of the present application, the spatial motion information and the corresponding second index value include a plurality of;

[0474] The encoder sets the first index value of the temporal motion information lower than at least one second index value of the spatial motion information as follows: setting the first index value of the temporal motion information lower than one second index value of the spatial motion information; or setting the first index value of the temporal motion information lower than two second index values of the spatial motion information; or setting the first index value of the temporal motion information lower than three second index values and two second index values of the spatial motion information; or setting the first index value of the temporal motion information lower than three second index values and four second index values of the spatial motion information.

[0475] It can be understood that the present application groups the temporal motion information according to the partition characteristics under different AWP modes and adjusts the index value, or uniformly adjusts the index value according to the importance of the temporal motion candidate to all AWP modes, thereby reducing the index codeword of the temporal motion information while keeping the complexity basically unchanged, and improving the prediction quality of the temporal motion candidates under most AWP modes by more effectively playing the role of TMVP, thereby improving the coding performance.

[0476] S204: Determine the motion information corresponding to the first motion information index value from the motion information list;

[0477] After obtaining the first motion information index value, the encoder writes the first motion information index value into the bitstream.

[0478] In some embodiments of the present application, duplicate checking is performed based on the motion information list to construct a unidirectional motion information list; and the motion information corresponding to the first motion information index value is determined from the unidirectional motion information list.

[0479] S205 : Determine an inter-frame prediction value of the current block based on the motion information.

[0480] In the embodiment of the present application, the preset inter-frame prediction mode includes: a geometric partition prediction mode or an angle weighted prediction mode; the motion information includes first information and second information;

[0481] The encoder determines the inter-frame prediction value of the current block based on motion information as follows:

[0482] When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of a current block, two partitions of the current block are determined; the two partitions include a first partition and a second partition; a first prediction value of the first partition is calculated using the first information, and a second prediction value of the second partition is calculated using the second information; and an inter-frame prediction value of the current block is determined based on the first prediction value and the second prediction value.

[0483] It can be understood that by classifying the partition model of the current block according to the closeness between the partition mode of the current block and the temporal motion information, the motion information list of the current block is determined based on the partition mode type, and the importance of temporal motion information is taken into account in the process of constructing the initial motion information list, rather than just considering spatial motion information. Then, for a certain partition of the inter-frame prediction mode, when only the temporal adjacent motion information has the strongest correlation, the bidirectional motion information list obtained in this way can rely on temporal motion information to improve coding efficiency.

[0484] It should be noted that the description of the specific implementation of the encoder is consistent with that of the decoder and will not be repeated here.

[0485] Based on the above embodiment, in yet another embodiment of the present application, Figure 26 Schematic diagram of the decoder structure Figure 1 ,like Figure 26 As shown, an embodiment of the present application provides a decoder 1, comprising:

[0486] The decoding unit 10 is configured to parse a bitstream to obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block;

[0487] A first determining unit 11 is configured to, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determine a partitioning mode type of the current block according to the prediction mode parameter; the partitioning mode type represents a degree of closeness between the partitioning mode of the current block and the temporal motion information; and determine a motion information list for the current block based on the partitioning mode type;

[0488] The first prediction unit 12 is configured to determine an inter-frame prediction value of the current block based on the first motion information index value and the motion information list.

[0489] In some embodiments of the present application, the partition mode type of the current block includes: a temporal motion information compact type and a temporal motion information non-compact type;

[0490] The first determination unit 11 is further used to obtain the temporal motion information of the preset position corresponding to the current block and the spatial motion information of the adjacent reference block; when the division mode type is the tight type of the temporal motion information, the first index value of the temporal motion information is set to be lower than at least one second index value of the spatial motion information; based on the temporal motion information, the first index value, the second index value and the spatial motion information, the motion information list is constructed.

[0491] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0492] The first determining unit 11 is further configured to traverse a mapping table between preset modes and partitioning mode types, and determine the partitioning mode type of the current block corresponding to the mode index information.

[0493] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0494] The first determination unit 11 is also used to determine the angle index and weight step index corresponding to the current block based on the mode index information of the prediction mode; and determine the partition mode type of the current block based on the mode index information, the angle index and weight step index corresponding to the current block.

[0495] In some embodiments of the present application, the first determination unit 11 is further used to determine that the division pattern type of the current block is the time domain motion information tight type when the angle index and the weight step index satisfy a first preset distribution relationship; wherein the first preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the angle index and the weight step index do not satisfy the first preset distribution relationship, determine that the division pattern type of the current block is the time domain motion information non-tight type.

[0496] In some embodiments of the present application, the first preset distribution relationship includes at least one of the following:

[0497] The angle index is less than 4, and the weight step index is greater than -2;

[0498] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -2;

[0499] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -1;

[0500] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -2;

[0501] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -1.

[0502] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0503] The first determination unit 11 is also used to determine that the division pattern type of the current block is the tight type of the time domain motion information when the pattern index information satisfies a second preset distribution relationship; wherein the second preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the pattern index information does not satisfy the second preset distribution relationship, determine that the division pattern type of the current block is the non-tight type of the time domain motion information.

[0504] In some embodiments of the present application, the second preset distribution relationship is obtained based on one of the result of dividing the pattern index information by 8, the result of right shifting the pattern index information by 3 bits, the result of modulo 8 of the pattern index information, the result of adding 1 to the pattern index information and then modulo 8, the result of bitwise AND of the pattern index information and 7, and the result of adding 1 to the pattern index information and then bitwise AND of 7.

[0505] In some embodiments of the present application, the second preset distribution relationship includes at least one of the following:

[0506] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result modulo 8 of the pattern index information is less than 4, or the result of bitwise AND of the pattern index information and 7 is less than 4;

[0507] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 4;

[0508] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 4;

[0509] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result modulo the pattern index information and 8 is less than 3 or equal to 7, or the result modulo the pattern index information plus 1 and 8 is less than or equal to 3, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 3, or the result of bitwise AND of the pattern index information plus 1 and 7 is less than or equal to 3;

[0510] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right shifted by 3 bits, and the result of taking the modulo of the pattern index information and 8 is less than 3 or equal to 7, or the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 3, or the result of bitwise AND of the pattern index information and 7 is less than 3 or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 3.

[0511] In some embodiments of the present application, the temporal motion information close type flag is a first preset value;

[0512] The non-tight type flag of the temporal motion information is a second preset value.

[0513] In some embodiments of the present application, the first determination unit 11 is further used to obtain the temporal motion information of a preset position corresponding to the current block and the spatial motion information of an adjacent reference block; set the first index value of the temporal motion information to be lower than at least one second index value of the spatial motion information; and construct the motion information list based on the temporal motion information, the first index value, the second index value and the spatial motion information.

[0514] In some embodiments of the present application, the spatial motion information and the corresponding second index value include a plurality of;

[0515] The first determination unit 11 is further used to set the first index value of the temporal motion information to be lower than one second index value of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than two second index values of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than three second index values and two second index values of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than three second index values and four second index values of the spatial motion information.

[0516] In some embodiments of the present application, the first determination unit 11 is further used to add the corresponding temporal motion information and the spatial motion information to the original bidirectional motion information list in order of the first index value and the second index value from small to large, to construct the motion information list.

[0517] In some embodiments of the present application, the first determination unit 11 is further used to obtain motion information of at least one reference block adjacent to the current block; determine available motion information of at least one reference block from the motion information of the at least one reference block; the available motion information is the spatial motion information; and obtain temporal motion information of a preset position corresponding to the current block.

[0518] In some embodiments of the present application, the first prediction unit 12 is further used to perform duplication checking based on the motion information list to construct a unidirectional motion information list; and determine the inter-frame prediction value of the current block according to the first motion information index value and the unidirectional motion information list.

[0519] In some embodiments of the present application, the preset inter-frame prediction mode includes: a geometric partitioning prediction mode or an angle-weighted prediction mode;

[0520] The first prediction unit 12 is further used to determine two partitions of the current block when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the preset inter-frame prediction mode; the two partitions include a first partition and a second partition; according to the first motion information index value, determine the first information corresponding to the first partition and the second information corresponding to the second partition from the unidirectional motion information list; the first motion information index value includes: a first index value corresponding to the first information, and a second index value corresponding to the second information; use the first information to calculate the first prediction value of the first partition, and use the second information to calculate the second prediction value of the second partition; determine the inter-frame prediction value of the current block according to the first prediction value and the second prediction value.

[0521] It can be understood that by classifying the partition model of the current block according to the closeness between the partition mode of the current block and the temporal motion information, the motion information list of the current block is determined based on the partition mode type, and the importance of temporal motion information is taken into account in the process of constructing the initial motion information list, rather than just considering the spatial motion information. Then, for a certain partition of the inter-frame prediction mode, when only the temporal adjacent motion information has the strongest correlation, the motion information list obtained in this way can rely on the temporal motion information to improve the decoding efficiency.

[0522] In practical applications, such as Figure 27 As shown, the embodiment of the present application further provides a decoder, including:

[0523] The first processor 13 and the first memory 14 storing instructions executable by the first processor 13 are configured such that when the instructions are executed, the first processor 13 implements the method executed by the decoder.

[0524] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0525] Based on the above embodiment, in yet another embodiment of the present application, Figure 28 Schematic diagram of the encoder structure Figure 1 ,like Figure 28 As shown, the embodiment of the present application provides an encoder 2, including:

[0526] The second determining unit 20 is configured to determine a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, determine a partition mode type of the current block according to the prediction mode parameter; the partition mode type represents a degree of closeness between the partition mode of the current block and temporal motion information; determine a motion information list of the current block based on the partition mode type; and determine motion information corresponding to a first motion information index value from the motion information list;

[0527] The second prediction unit 21 is configured to determine an inter-frame prediction value of the current block based on the motion information.

[0528] In some embodiments of the present application, the partition mode type of the current block includes: a temporal motion information compact type and a temporal motion information non-compact type;

[0529] The second determination unit 20 is further used to obtain the temporal motion information of the preset position corresponding to the current block and the spatial motion information of the adjacent reference block; when the division mode type is the tight type of the temporal motion information, the first index value of the temporal motion information is set to be lower than at least one second index value of the spatial motion information; based on the temporal motion information, the first index value, the second index value and the spatial motion information, the motion information list is constructed.

[0530] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0531] The second determining unit 20 is further configured to traverse a mapping table between preset modes and partitioning mode types, and determine the partitioning mode type of the current block corresponding to the mode index information.

[0532] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0533] The second determination unit 20 is also used to determine the angle index and weight step index corresponding to the current block based on the mode index information of the prediction mode; and determine the partition mode type of the current block based on the mode index information, the angle index and weight step index corresponding to the current block.

[0534] In some embodiments of the present application, the second determination unit 20 is further used to determine that the division pattern type of the current block is the time domain motion information tight type when the angle index and the weight step index satisfy a first preset distribution relationship; wherein the first preset distribution relationship represents a pattern distribution law that is close to the time domain motion information; when the angle index and the weight step index do not satisfy the first preset distribution relationship, determine that the division pattern type of the current block is the time domain motion information non-tight type.

[0535] In some embodiments of the present application, the first preset distribution relationship includes at least one of the following:

[0536] The angle index is less than 4, and the weight step index is greater than -2;

[0537] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -2;

[0538] The angle index is less than 4 or the angle index is equal to 7, and the weight step index is greater than -1;

[0539] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -2;

[0540] The angle index is less than 3 or the angle index is equal to 7, and the weight step index is greater than -1.

[0541] In some embodiments of the present application, the prediction mode parameters include: mode index information of the prediction mode;

[0542] The second determination unit 20 is also used to determine that the division pattern type of the current block is the tight type of the time domain motion information when the pattern index information satisfies a second preset distribution relationship; wherein the second preset distribution relationship represents a pattern distribution regularity that is close to the time domain motion information; when the pattern index information does not satisfy the second preset distribution relationship, determine that the division pattern type of the current block is the non-tight type of the time domain motion information.

[0543] In some embodiments of the present application, the second preset distribution relationship is obtained based on one of the result of dividing the pattern index information by 8, the result of right shifting the pattern index information by 3 bits, the result of modulo 8 of the pattern index information, the result of adding 1 to the pattern index information and then modulo 8, the result of bitwise AND of the pattern index information and 7, and the result of adding 1 to the pattern index information and then bitwise AND of 7.

[0544] In some embodiments of the present application, the second preset distribution relationship includes at least one of the following:

[0545] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result modulo 8 of the pattern index information is less than 4, or the result of bitwise AND of the pattern index information and 7 is less than 4;

[0546] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 4;

[0547] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right-shifted by 3 bits, and the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 4, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 4;

[0548] The result of dividing the pattern index information by 8 is greater than or equal to 2, or the pattern index information is greater than or equal to 2 after being right-shifted by 3 bits, and the result modulo the pattern index information and 8 is less than 3 or equal to 7, or the result modulo the pattern index information plus 1 and 8 is less than or equal to 3, or the result of bitwise AND of the pattern index information and 7 is less than or equal to 3, or the result of bitwise AND of the pattern index information plus 1 and 7 is less than or equal to 3;

[0549] The result of dividing the pattern index information by 8 is greater than or equal to 3, or the pattern index information is greater than or equal to 3 after being right shifted by 3 bits, and the result of taking the modulo of the pattern index information and 8 is less than 3 or equal to 7, or the result of adding 1 to the pattern index information and then taking the modulo of 8 is less than or equal to 3, or the result of bitwise AND of the pattern index information and 7 is less than 3 or equal to 7, or the result of adding 1 to the pattern index information and then taking the bitwise AND of 7 is less than or equal to 3.

[0550] In some embodiments of the present application, the temporal motion information close type flag is a first preset value;

[0551] The non-tight type flag of the temporal motion information is a second preset value.

[0552] In some embodiments of the present application, the second determination unit 20 is further used to obtain the temporal motion information of a preset position corresponding to the current block and the spatial motion information of an adjacent reference block; set the first index value of the temporal motion information to be lower than at least one second index value of the spatial motion information; and construct the motion information list based on the temporal motion information, the first index value, the second index value and the spatial motion information.

[0553] In some embodiments of the present application, the spatial motion information and the corresponding second index value include a plurality of;

[0554] The second determination unit 20 is further used to set the first index value of the temporal motion information to be lower than one second index value of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than two second index values of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than three second index values and two second index values of the spatial motion information; or, to set the first index value of the temporal motion information to be lower than three second index values and four second index values of the spatial motion information.

[0555] In some embodiments of the present application, the second determination unit 20 is further used to add the corresponding temporal motion information and the spatial motion information to the original bidirectional motion information list in order from small to large of the first index value and the second index value to construct the motion information list.

[0556] In some embodiments of the present application, the second determination unit 20 is further used to obtain motion information of at least one reference block adjacent to the current block; determine available motion information of at least one reference block from the motion information of the at least one reference block; the available motion information is the spatial motion information; and obtain temporal motion information of a preset position corresponding to the current block.

[0557] In some embodiments of the present application, the second determining unit 20 is further configured to perform duplicate checking based on the motion information list to construct a one-way motion information list;

[0558] The motion information corresponding to the first motion information index value is determined from the unidirectional motion information list.

[0559] In some embodiments of the present application, the preset inter-frame prediction mode includes: a geometric partition prediction mode or an angle weighted prediction mode; the motion information includes first information and second information;

[0560] The second prediction unit 21 is further used to determine two partitions of the current block when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the preset inter-frame prediction mode; the two partitions include a first partition and a second partition; use the first information to calculate the first prediction value of the first partition, and use the second information to calculate the second prediction value of the second partition; and determine the inter-frame prediction value of the current block based on the first prediction value and the second prediction value.

[0561] In some embodiments of the present application, the encoder 2 further includes: a writing unit 22, wherein the writing unit 22 is configured to write the first motion information index value into a bitstream.

[0562] It can be understood that by classifying the partition model of the current block according to the closeness between the partition mode of the current block and the temporal motion information, the motion information list of the current block is determined based on the partition mode type, and the importance of temporal motion information is taken into account in the process of constructing the initial motion information list, rather than just considering spatial motion information. Then, for a certain partition of the inter-frame prediction mode, when only the temporal adjacent motion information has the strongest correlation, the motion information list obtained in this way can rely on temporal motion information to improve coding efficiency.

[0563] In practical applications, such as Figure 29 As shown, the embodiment of the present application further provides an encoder, including:

[0564] The second processor 23 and the second memory 24 storing executable instructions of the second processor 23 are configured to implement the method executed by the encoder when the executable instructions are executed.

[0565] Specifically, the program instructions corresponding to an inter-frame prediction method in this embodiment can be stored on a storage medium such as an optical disk, a hard disk, or a USB flash drive.

[0566] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, which implement the method executed by the decoder when executed by a first processor, or implement the method executed by the encoder when executed by a second processor.

[0567] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0568] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0569] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0570] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0571] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.

Claims

1. An inter-frame prediction method, characterized in that: Applicable to decoders, including: Parsing the bitstream to obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block; When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, obtaining temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block; Determining a motion information list for the current block based on the temporal motion information and the spatial motion information, wherein the prediction mode parameters include: mode index information of the prediction mode; whether the partition mode type of the current block is a temporal motion information compact type is determined based on one of the following: a mapping table of preset modes and partition mode types; the mode index information of the prediction mode, an angle index and a weight step index corresponding to the current block; whether the mode index information of the prediction mode satisfies a preset distribution relationship; and if the partition mode type of the current block is the temporal motion information compact type, an index value of the temporal motion information in the motion information list is less than an index value of the spatial motion information; An inter-frame prediction value of the current block is determined based on the first motion information index value and the motion information list.

2. The method according to claim 1, characterized in that The index value of the temporal motion information includes at least 0.

3. The method according to claim 1, characterized in that The acquiring of temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block includes: Determining at least one adjacent block adjacent to the current block; In a case where the neighboring block is available, using the available motion information of the neighboring block as the spatial motion information; The temporal motion information of a preset position corresponding to the current block is obtained.

4. The method according to claim 3, characterized in that The at least one adjacent block includes one or more of a left block, an upper block, an upper left block, and an upper right block of the current block.

5. The method according to claim 1 or 3, characterized in that The preset position is the lower right position of the current block; wherein the lower right position of the current block includes one or more of a pixel point position within the current block and a pixel point position outside the current block.

6. The prediction method according to any one of claims 1 to 4, characterized in that: The motion information list also includes scaling motion information; in the motion information list, the index value of the scaling motion information is greater than the index values of the temporal motion information and the spatial motion information.

7. The method according to claim 1, characterized in that The determining, based on the first motion information index value and the motion information list, the inter-frame prediction value of the current block includes: Perform duplicate checking on the motion information in the motion information list to construct a one-way motion information list; An inter-frame prediction value of the current block is determined according to the first motion information index value and the unidirectional motion information list.

8. The method according to claim 1, characterized in that The preset inter-frame prediction mode includes: geometric partition prediction mode or angle weighted prediction mode; The determining, based on the first motion information index value and the motion information list, the inter-frame prediction value of the current block includes: When the prediction mode parameter indicates that the preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, determining two partitions of the current block; the two partitions include a first partition and a second partition; In the motion information list, determining first information corresponding to the first partition according to the first motion information index value, and determining second information corresponding to the second partition according to the first motion information index; determining a first prediction value for the first partition based on the first information, and determining a second prediction value for the second partition based on the second information; The inter-frame prediction value of the current block is determined according to the first prediction value and the second prediction value.

9. An inter-frame prediction method, characterized in that: Applications in encoders include: Determining prediction mode parameters for the current block; When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, obtaining temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block; Determining a motion information list for the current block based on the temporal motion information and the spatial motion information, wherein the prediction mode parameters include: mode index information of the prediction mode; whether the partition mode type of the current block is a temporal motion information compact type is determined based on one of the following: a mapping table of preset modes and partition mode types; the mode index information of the prediction mode, an angle index and a weight step index corresponding to the current block; whether the mode index information of the prediction mode satisfies a preset distribution relationship; and if the partition mode type of the current block is the temporal motion information compact type, an index value of the temporal motion information in the motion information list is less than an index value of the spatial motion information; Determining the motion information corresponding to the first motion information index value from the motion information list; An inter-frame prediction value of the current block is determined based on the motion information.

10. The method according to claim 9, characterized in that The index value of the temporal motion information includes at least 0.

11. The method according to claim 9, characterized in that The acquiring of temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block includes: Determining at least one adjacent block adjacent to the current block; In a case where the neighboring block is available, using the available motion information of the neighboring block as the spatial motion information; The temporal motion information of a preset position corresponding to the current block is obtained.

12. The method according to claim 11, characterized in that The at least one adjacent block includes one or more of a left block, an upper block, an upper left block, and an upper right block of the current block.

13. The method according to claim 9 or 11, characterized in that The preset position is the lower right position of the current block; wherein the lower right position of the current block includes one or more of a pixel point position within the current block and a pixel point position outside the current block.

14. The prediction method according to any one of claims 9 to 12, characterized in that: The motion information list also includes scaling motion information; in the motion information list, the index value of the scaling motion information is greater than the index values of the temporal motion information and the spatial motion information.

15. The method according to claim 9, characterized in that The determining, from the motion information list, the motion information corresponding to the first motion information index value includes: Perform duplicate checking on the motion information in the motion information list to construct a one-way motion information list; The motion information corresponding to the first motion information index value is determined from the unidirectional motion information list.

16. The method according to claim 9, characterized in that The preset inter-frame prediction mode includes: a geometric partition prediction mode or an angle weighted prediction mode; the motion information includes first information and second information; The determining, based on the motion information, the inter-frame prediction value of the current block includes: When the prediction mode parameter indicates that the preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, determining two partitions of the current block; the two partitions include a first partition and a second partition; determining a first prediction value for the first partition based on the first information, and determining a second prediction value for the second partition based on the second information; The inter-frame prediction value of the current block is determined according to the first prediction value and the second prediction value.

17. The method according to claim 9, characterized in that The method further comprises: The first motion information index value is written into the bitstream.

18. A decoder, characterized in that include: A decoding unit, configured to parse a bitstream and obtain a prediction mode parameter of a current block and a first motion information index value corresponding to the current block; a first determining unit, configured to, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, obtain temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block; Determining a motion information list for the current block based on the temporal motion information and the spatial motion information, wherein the prediction mode parameters include: mode index information of the prediction mode; whether the partition mode type of the current block is a temporal motion information compact type is determined based on one of the following: a mapping table of preset modes and partition mode types; the mode index information of the prediction mode, an angle index and a weight step index corresponding to the current block; whether the mode index information of the prediction mode satisfies a preset distribution relationship; and if the partition mode type of the current block is the temporal motion information compact type, an index value of the temporal motion information in the motion information list is less than an index value of the spatial motion information; The first prediction unit is configured to determine an inter-frame prediction value of the current block based on the first motion information index value and the motion information list.

19. The decoder according to claim 18, characterized in that The index value of the temporal motion information includes at least 0.

20. The decoder according to claim 18, wherein The first determining unit is further configured to determine at least one adjacent block adjacent to the current block; if the adjacent block is available, use motion information of the available adjacent block as the spatial motion information; The temporal motion information of a preset position corresponding to the current block is obtained.

21. The decoder according to claim 20, characterized in that The at least one adjacent block includes one or more of a left block, an upper block, an upper left block, and an upper right block of the current block.

22. The decoder according to claim 18 or 20, characterized in that The preset position is the lower right position of the current block; wherein the lower right position of the current block includes one or more of a pixel point position within the current block and a pixel point position outside the current block.

23. The decoder according to any one of claims 18 to 21, characterized in that The motion information list also includes scaling motion information; in the motion information list, the index value of the scaling motion information is greater than the index values of the temporal motion information and the spatial motion information.

24. The decoder according to claim 18, wherein The first determining unit is further configured to perform duplication checking on the motion information in the motion information list to construct a unidirectional motion information list; and determine the inter-frame prediction value of the current block according to the first motion information index value and the unidirectional motion information list.

25. The decoder according to claim 18, wherein The preset inter-frame prediction mode includes: geometric partition prediction mode or angle weighted prediction mode; The first prediction unit is further used to determine two partitions of the current block when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the preset inter-frame prediction mode; the two partitions include a first partition and a second partition; in the motion information list, determine the first information corresponding to the first partition according to the first motion information index value, and determine the second information corresponding to the second partition according to the first motion information index; determine the first prediction value of the first partition based on the first information, and determine the second prediction value of the second partition based on the second information; and determine the inter-frame prediction value of the current block based on the first prediction value and the second prediction value.

26. An encoder, characterized in that include: a second determining unit, configured to determine a prediction mode parameter of a current block; When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, obtaining temporal motion information of a preset position corresponding to the current block and spatial motion information corresponding to a neighboring block of the current block; determining, based on the temporal motion information and the spatial motion information, a motion information list for the current block, wherein the prediction mode parameters include: mode index information of the prediction mode; whether the partition mode type of the current block is a temporal motion information compact type is determined based on one of the following: a mapping table of preset modes and partition mode types; the mode index information of the prediction mode, an angle index and a weight step index corresponding to the current block; whether the mode index information of the prediction mode satisfies a preset distribution relationship; if the partition mode type of the current block is the temporal motion information compact type, an index value of the temporal motion information in the motion information list is less than an index value of the spatial motion information; and determining, from the motion information list, motion information corresponding to a first motion information index value; The second prediction unit is configured to determine an inter-frame prediction value of the current block based on the motion information.

27. The encoder according to claim 26, characterized in that The index value of the temporal motion information includes at least 0.

28. The encoder according to claim 26, wherein The second determining unit is further configured to determine at least one adjacent block adjacent to the current block; if the adjacent block is available, use the motion information of the available adjacent block as the spatial motion information; The temporal motion information of a preset position corresponding to the current block is obtained.

29. The encoder according to claim 28, wherein The at least one adjacent block includes one or more of a left block, an upper block, an upper left block, and an upper right block of the current block.

30. The encoder according to claim 26 or 28, characterized in that The preset position is the lower right position of the current block; wherein the lower right position of the current block includes one or more of a pixel point position within the current block and a pixel point position outside the current block.

31. The encoder according to any one of claims 26 to 29, characterized in that The motion information list also includes scaling motion information; in the motion information list, the index value of the scaling motion information is greater than the index values of the temporal motion information and the spatial motion information.

32. The encoder according to claim 26, wherein The second determining unit is further configured to perform duplication checking on the motion information in the motion information list to construct a one-way motion information list; and determine the motion information corresponding to the first motion information index value from the one-way motion information list.

33. The encoder according to claim 26, wherein The preset inter-frame prediction mode includes: a geometric partition prediction mode or an angle weighted prediction mode; the motion information includes first information and second information; The second prediction unit is further used to determine two partitions of the current block when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the preset inter-frame prediction mode; the two partitions include a first partition and a second partition; determine a first prediction value of the first partition based on the first information, and determine a second prediction value of the second partition based on the second information; and determine the inter-frame prediction value of the current block according to the first prediction value and the second prediction value.

34. The encoder according to claim 26, wherein The encoder further includes a writing unit; The writing unit is configured to write the first motion information index value into the bitstream.

35. A decoder, characterized in that include: A first processor and a first memory storing instructions executable by the first processor, wherein when the executable instructions are executed, the first processor implements the method according to any one of claims 1 to 8.

36. An encoder, characterized in that include: A second processor and a second memory storing instructions executable by the second processor, wherein when the executable instructions are executed, the second processor implements the method according to any one of claims 9 to 17.

37. A computer-readable storage medium, characterized in that Executable instructions are stored, and when the executable instructions are executed by a first processor, the method according to any one of claims 1 to 8 is implemented, or when the executable instructions are executed by a second processor, the method according to any one of claims 9 to 17 is implemented.

Citation Information

Patent Citations

  • Time domain motion vector acquisition method and device, inter-frame prediction method and device, and video coding method and device

    CN110213590A

  • Multiple merge lists and orders for inter prediction with geometric partitioning

    CN111418211A

  • Device and methods for merge list reordering in video coding

    US20130188715A1