CN113766245A - Inter-frame prediction method, decoder, encoder, and computer storage medium - Google Patents

Inter-frame prediction method, decoder, encoder, and computer storage medium Download PDF

Info

Publication number
CN113766245A
CN113766245A CN202010507268.XA CN202010507268A CN113766245A CN 113766245 A CN113766245 A CN 113766245A CN 202010507268 A CN202010507268 A CN 202010507268A CN 113766245 A CN113766245 A CN 113766245A
Authority
CN
China
Prior art keywords
motion information
information
derived
current block
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010507268.XA
Other languages
Chinese (zh)
Inventor
杨宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010507268.XA priority Critical patent/CN113766245A/en
Priority to CN202180008731.9A priority patent/CN114930839A/en
Priority to PCT/CN2021/085454 priority patent/WO2021244125A1/en
Priority to MX2022010726A priority patent/MX2022010726A/en
Priority to CN202310111464.9A priority patent/CN116193139A/en
Priority to TW110118914A priority patent/TW202147837A/en
Publication of CN113766245A publication Critical patent/CN113766245A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Abstract

The embodiment of the application discloses an inter-frame prediction method which is applied to a decoder and comprises the following steps: analyzing the code stream, and acquiring a weight derivation mode of the current block; constructing a new motion information candidate list based on the weight derivation mode of the current block; determining an inter prediction value of the current block based on the new motion information candidate list. The embodiment of the application also discloses a decoder, an encoder and a computer storage medium.

Description

Inter-frame prediction method, decoder, encoder, and computer storage medium
Technical Field
Embodiments of the present disclosure relate to, but not limited to, the field of video encoding and decoding technologies, and in particular, to an inter-frame prediction method, a decoder, an encoder, and a computer storage medium.
Background
In the field of video encoding and decoding, the process of decoding the current block can adopt an intra-frame prediction mode and an inter-frame prediction mode. The inter Prediction may include a Geometric Partitioning Prediction Mode (GPM) and an Angular Weighted Prediction Mode (AWP), and the Prediction value of the current block may be obtained by dividing the current block between frames into two non-rectangular partitions (or two blocks) and performing Prediction and then weighting and fusing.
However, there is a problem in the related art in that decoding efficiency is low due to an unreasonable construction of a motion information candidate list.
Disclosure of Invention
The embodiment of the application provides an inter-frame prediction method, a decoder, an encoder and a computer storage medium.
In a first aspect, an inter-prediction method is provided, which is applied to a decoder, and the method includes:
analyzing the code stream, and acquiring a weight derivation mode of the current block;
constructing a new motion information candidate list based on the weight derivation mode of the current block;
determining an inter prediction value of the current block based on the new motion information candidate list.
In a second aspect, there is provided an inter-prediction method applied to an encoder, the method including:
determining a weight derivation mode of the current block;
constructing a new motion information candidate list based on the weight derivation mode of the current block;
determining an inter prediction value of the current block based on the new motion information candidate list.
In a third aspect, there is provided an inter prediction method applied to a decoder, the method including:
analyzing the code stream to obtain the motion vector information of the original motion information related to the current block;
determining motion vector information of M derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1;
Constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
determining an inter prediction value of the current block based on the new motion information candidate list.
In a fourth aspect, there is provided an inter prediction method applied to an encoder, the method including:
determining motion vector information of original motion information related to the current block;
determining motion vector information of M derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
determining an inter prediction value of the current block based on the new motion information candidate list.
In a fifth aspect, a decoder is provided, comprising:
the acquisition unit is used for analyzing the code stream and acquiring the weight derivation mode of the current block;
a construction unit for constructing a new motion information candidate list based on the weight derivation mode of the current block;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
In a sixth aspect, there is provided an encoder comprising:
a mode determination unit for determining a weight derivation mode of the current block;
a construction unit for constructing a new motion information candidate list based on the weight derivation mode of the current block;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
In a seventh aspect, a decoder is provided, including:
the acquisition unit is used for analyzing the code stream and acquiring the weight derivation mode of the current block;
a derived motion information determining unit configured to determine motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
a construction unit configured to construct a new motion information candidate list based on motion vector information of the original motion information and motion vector information of the derived motion information;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
In an eighth aspect, there is provided an encoder comprising:
an original motion information determining unit for determining motion vector information of original motion information related to the current block;
A derived motion information determining unit configured to determine motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
a construction unit configured to construct a new motion information candidate list based on motion vector information of the original motion information and motion vector information of the derived motion information;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
In a ninth aspect, there is provided a decoder comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In a tenth aspect, there is provided an encoder, a memory and a processor,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In an eleventh aspect, there is provided a computer storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the above-described method.
In the embodiment of the application, a decoder analyzes a code stream to obtain a weight derivation mode of a current block; constructing a new motion information candidate list based on the weight derivation mode of the current block; determining an inter prediction value of the current block based on the new motion information candidate list. Therefore, the decoder can construct different new motion information candidate lists according to different weight derivation modes because the new motion information candidate list constructed by the decoder is based on the weight derivation mode of the current block, so that the construction of the motion information candidate list accords with the weight derivation mode of the current block, and the decoding efficiency of the decoder can be improved.
Drawings
Fig. 1 is a block diagram illustrating a video coding system according to an embodiment of the present disclosure;
fig. 2 is a block diagram illustrating a video decoding system according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an exemplary image group according to an embodiment of the present disclosure;
FIG. 4a is a schematic diagram illustrating weight distribution of GPM in multiple partition modes on a 64 × 64 current block according to an embodiment of the present application;
fig. 4b is a schematic diagram of weight distribution of multiple partition modes of AWP on a 64 × 64 current block according to an embodiment of the present application;
Fig. 4c is a schematic diagram of weight distribution of AWP in multiple partition modes on a 64 × 32 current block according to an embodiment of the present application;
fig. 4d is a schematic diagram of weight distribution of multiple partition modes of AWP on a 32 × 64 current block according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a spatial position relationship between a current block and an adjacent block according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating a spatial position relationship between a current block and a neighboring block according to an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating an inter-frame prediction method according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a spatial position relationship between a current block and a neighboring block according to an embodiment of the present application;
fig. 9 is a flowchart illustrating another inter-frame prediction method according to an embodiment of the present application;
fig. 10 is a flowchart illustrating another inter-frame prediction method according to an embodiment of the present application;
fig. 11 is a flowchart illustrating another inter-frame prediction method according to an embodiment of the present application;
fig. 12 is a schematic diagram illustrating a spatial position relationship between a current block, an adjacent block, and a corresponding block according to an embodiment of the present application;
fig. 13 is a flowchart illustrating an inter-frame prediction method according to another embodiment of the present application;
Fig. 14 is a flowchart illustrating an inter-frame prediction method according to another embodiment of the present application;
FIG. 15 is a flowchart illustrating an inter-frame prediction method according to yet another embodiment of the present application;
fig. 16 is a schematic structural diagram of a decoder according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of an encoder according to an embodiment of the present disclosure;
fig. 18 is a schematic structural diagram of another decoder according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of another encoder according to an embodiment of the present disclosure;
fig. 20 is a hardware entity diagram of a decoder according to an embodiment of the present application;
fig. 21 is a hardware entity diagram of an encoder according to an embodiment of the present disclosure.
Detailed Description
The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that: in the present examples, "first", "second", etc. are used for distinguishing similar objects and are not necessarily used for describing a particular order or sequence.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
In a video image, a first image component, a second image component and a third image component are generally adopted to characterize a current Block (Coding Block, CB); wherein the three image components are respectively a luminance component, a blue chrominance component and a red chrominance component, and specifically, the luminance component is generally represented by a symbol Y, the blue chrominance component is generally represented by a symbol Cb or U, and the red chrominance component is generally represented by a symbol Cr or V; thus, the video image can be represented in YCbCr format, and also in YUV format.
Currently, the common video codec standard is based on the adoption of a block-based hybrid coding framework. Each frame in a video image is divided into square Largest Coding Units (LCUs) with the same size (e.g., 128 × 128, 64 × 64, etc.), and each Largest Coding Unit may be further divided into rectangular Coding Units (CUs) according to rules; and the coding Unit may be further divided into smaller Prediction Units (PUs). Specifically, the hybrid Coding framework may include modules such as prediction, Transform (Transform), Quantization (Quantization), Entropy Coding (Entropy Coding), Loop Filter (In Loop Filter), and the like; the prediction module may include intra prediction (intra prediction) and inter prediction (inter prediction), and the inter prediction may include motion estimation (motion estimation) and motion compensation (motion compensation). Because strong correlation exists between adjacent pixels in one frame of the video image, the spatial redundancy between the adjacent pixels can be eliminated by using an intra-frame prediction mode in the video coding and decoding technology; however, because there is strong similarity between adjacent frames in the video image, the inter-frame prediction method is used in the video coding and decoding technology to eliminate the time redundancy between adjacent frames, thereby improving the decoding efficiency. The following detailed description of the present application will be made in terms of inter prediction.
Fig. 1 is a schematic block diagram illustrating a video coding system according to an embodiment of the present disclosure, and as shown in fig. 1, the video coding system 11 may include: transform unit 111, quantization unit 112, mode selection and coding control logic unit 113, intra prediction unit 114, inter prediction unit 115 (including: motion compensation and motion estimation), inverse quantization unit 116, inverse transform unit 117, loop filter unit 118, coding unit 119, and decoded picture buffer unit 110.
For an input original video signal, a video reconstruction block can be obtained by dividing a Coding Tree Unit (CTU), a Coding mode is determined by a mode selection and Coding control logic Unit 113, and then residual pixel information obtained by intra-frame or inter-frame prediction is transformed by a transformation Unit 111 and a quantization Unit 112, including transforming the residual information from a pixel domain to a transformation domain and quantizing the obtained transformation coefficient, so as to further reduce the bit rate; the intra-prediction unit 114 is configured to perform intra-prediction on the video reconstructed block; wherein, the intra prediction unit 114 is configured to determine an optimal intra prediction mode (i.e. a target prediction mode) of the video reconstructed block; inter-prediction unit 115 is to perform inter-prediction encoding 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 a process of generating a motion vector that can estimate the motion of the video reconstructed block, and then motion compensation is performed based on the motion vector determined by motion estimation; after determining the inter prediction mode, the inter prediction unit 115 is also configured to supply the selected inter prediction data to the encoding unit 119, and also to send the calculated determined motion vector data to the encoding unit 119; furthermore, the inverse quantization unit 116 and the inverse transformation unit 117 are used for reconstruction of the video reconstruction block, reconstructing a residual block in the pixel domain, which removes blocking artifacts through the loop filtering unit 118, and then adding the reconstructed residual block to a predictive block in the frame of the decoded picture buffer unit 110 to generate a reconstructed video reconstruction block; coding section 119 is for coding various coding parameters and quantized transform coefficients. And the decoded picture buffer unit 110 is used to store reconstructed video reconstructed blocks for prediction reference. As the video coding proceeds, new reconstructed video blocks are generated, and these reconstructed video blocks are stored in the decoded picture buffer unit 110.
Fig. 2 is a schematic block diagram illustrating a video decoding system according to an embodiment of the present disclosure, and as shown in fig. 2, the video decoding system 12 may include: decoding section 121, inverse transform section 127, and inverse quantization section 122, intra prediction section 123, motion compensation section 124, loop filter section 125, and decoded picture buffer section 126.
After the input video signal is coded by the video coding system 11, the code stream of the video signal is output; the code stream is input into the video decoding system 12, and first passes through the decoding unit 121 to obtain a decoded transform coefficient; the transform coefficients are processed by an inverse transform unit 127 and an inverse quantization unit 122 to produce a residual block in the pixel domain; intra-prediction unit 123 may be used to generate prediction data for a current video decoded block based on the determined intra-prediction direction and data from previously decoded blocks of the current frame or picture; motion compensation unit 124 is a predictive block that determines prediction information for a video decoded block by parsing motion vectors and other associated syntax elements and uses the prediction information to generate the video decoded block being decoded; forming a decoded video block by summing the residual block from inverse transform unit 127 and inverse quantization unit 122 with the corresponding predictive block generated by intra prediction unit 123 or motion compensation unit 124; the decoded video signal passes through the loop filtering unit 125 to remove blocking artifacts, which may improve video quality; the decoded video blocks are then stored in the decoded picture buffer unit 126, and the decoded picture buffer unit 126 stores reference pictures for subsequent intra prediction or motion compensation, and also for the output of the video signal, resulting in a restored original video signal.
The inter-frame prediction method provided by the embodiment of the present application mainly acts on the inter-frame prediction unit 115 of the video coding system 11 and the inter-frame prediction unit of the video decoding system 12, that is, the motion compensation unit 124; that is, if the video encoding system 11 can obtain a better prediction effect by the inter-frame prediction method provided in the embodiment of the present application, the video decoding system 12 can also improve the video decoding recovery quality accordingly.
Before describing the embodiments of the present application, a description will be first given of some technologies related to the embodiments of the present application, and it should be noted that the following technologies are supplementary descriptions of the embodiments of the present application and are part of the embodiments of the present application, and those skilled in the art can understand that the technologies can be arbitrarily combined with the embodiments of the present application without conflict.
It should be noted that the Motion information may include Motion Vector (MV) information and reference frame information. Specifically, for a current block using inter prediction, the current frame where the current block is located has one or more reference frames, and the current block may be a coding unit or a prediction unit, and a pixel region having the same size as the current block in a certain reference frame, referred to as a reference block herein, may be indicated by using a motion information containing a set of motion vectors and reference frame information, or two reference blocks in certain two reference frames, which may be the same or different, may be indicated by using a motion information containing two sets of motion vectors and reference frame information; the motion compensation may then derive an inter prediction value for the current block based on the reference block indicated by the motion information.
It should be understood that a P Frame (Predictive Frame) is a Frame that can only be predicted using a reference Frame that precedes the current Frame in Picture Order Count (POC). At this time, the current reference frame has only one reference frame list, which is represented by RefPicList 0; and all references frames in RefPicList0 that POC precedes the current frame. The early B-Frame (Bi-directional Interpolated Prediction Frame) is a Frame that can be predicted using a reference Frame with POC before the current Frame and a reference Frame with POC after the current Frame. The B-frame has two reference frame lists, denoted by RefPicList0 and RefPicList1, respectively; wherein, the POC is the reference frame before the current frame in RefPicList0, and the POC is the reference frame after the current frame in RefPicList 1. For the current block, only the reference block of a certain frame in RefPicList0 may be referred to, which may be referred to as forward prediction; or only reference blocks of a certain frame in RefPicList1 may be referred to, which may be called backward prediction; or may also reference a reference block of a frame in RefPicList0 and a reference block of a frame in RefPicList1 at the same time, which may be referred to as bi-directional prediction. One simple way to reference both reference blocks at the same time is to average the pixels at each corresponding location within both reference blocks to obtain an inter prediction value (or may be referred to as a prediction block) for each pixel within the current block. Late B frames no longer restrict POC to be reference frames before the current frame in RefPicList0 and POC to be reference frames after the current frame in RefPicList 1. In other words, there may be reference frames with POC after the current frame in RefPicList0, and there may also be reference frames with POC before the current frame in RefPicList1, that is, the current frame may refer to the reference frame with POC before the current frame or the reference frame with POC after the current frame. But the reference frames used when the current block is bi-directionally predicted must be one from RefPicList0 and one from RefPicList 1; such B frames are also referred to as generalized B frames.
It should be noted that, as the RefPicList0 and RefPicList1 are expressed differently according to different standard versions or different technical materials, there are other expressions of RefPicList0 and RefPicList 1. At least in the embodiments of the present application, RefPicList0, List0, and L0 are synonymous, and RefPicList1, List1, and L1 are synonymous.
Since the coding and decoding order configured by Random Access (RA) is different from the POC order, the B frame can simultaneously refer to the information before the current frame and the information after the current frame, which can significantly improve the coding performance.
Fig. 3 is a schematic diagram Of a typical Group Of Pictures (GOP) structure Of RA, as shown in fig. 3, and as shown in fig. 3, arrows indicate reference relationships, and since an I frame does not need to be referred to, after decoding an I frame with POC Of 0, a P frame with POC Of 4 will be decoded, and when decoding a P frame with POC Of 4, an I frame with POC Of 0 can be referred to. After decoding a P frame with POC 4, then decoding a B frame with POC 2, while decoding a B frame with POC 2, I frame with POC 0 and P frame with POC 4 may be referred to, and so on. Thus, as can be seen from FIG. 3, in the case of the POC order of { 012345678 }, the corresponding decoding order is { 032417685 }.
In addition, the codec order of the Low Delay (LD) configuration is the same as the POC order, at which time the current frame can only refer to information before the current frame. Wherein, the Low Delay configuration is divided into a Low Delay P and a Low Delay B. Low Delay P is the conventional LowDelay configuration. The typical structure is IPPP, i.e. an I-frame is first coded and decoded, and then the decoded frames are all P-frames. A typical structure of Low Delay B is IBBB, which differs from Low Delay P in that each inter frame is a B frame, i.e. two reference frame lists are used, and the current block can simultaneously refer to a reference block of a certain frame in RefPicList0 and a reference block of a certain frame in RefPicList 1. Here, a reference frame list of the current frame may have at most several reference frames, such as 2, 3, or 4. When encoding or decoding a certain current frame, which several reference frames are within RefPicList0 and RefPicList1 are determined by a preset configuration or algorithm, but the same reference frame may be present in RefPicList0 and RefPicList1 at the same time, i.e., the encoder or decoder allows the current block to reference two reference blocks in the same reference frame at the same time.
The encoder or decoder may typically use an index value (denoted by index) in the reference frame list to correspond to the reference frame. If one reference frame list length is 4, then index has four values of 0, 1, 2, 3, etc. For example, if RefPicList0 of the current frame has 4 reference frames with POC 5, 4, 3, 0, then index 0 of RefPicList0 is the reference frame of POC 5, index 1 of RefPicList0 is the reference frame of POC 4, index 2 of RefPicList0 is the reference frame of POC 3, and index 3 of RefPicList0 is the reference frame of POC 0.
In the current VVC video coding and decoding standard, the preset inter prediction mode may be a GPM prediction mode. In the current AVS3 video codec standard, the preset inter prediction mode can be an AWP prediction mode. The two prediction modes have different names and different specific implementation forms, but are common in principle, that is, the inter prediction method according to the embodiment of the present application can be applied to both of the two prediction modes.
For the GPM prediction mode, if the GPM is used, prediction mode parameters under the GPM, such as a specific partition mode of the GPM, are transmitted in the code stream; generally, the GPM includes 64 partition modes. For the AWP prediction mode, if the AWP is used, the prediction mode parameters under the AWP, such as the specific partition mode of the AWP, will be transmitted in the code stream; typically, the AWP includes 56 partition modes.
Fig. 4a is a schematic diagram illustrating weight assignment of multiple partition modes of a GPM on a 64 × 64 current block according to an embodiment of the present disclosure, where in fig. 4a, 64 partition modes exist in the GPM.
Fig. 4b is a schematic diagram of weight assignment of multiple partition modes of AWP on a 64 × 64 current block according to an embodiment of the present application, where in fig. 4b, there are 56 partition modes of AWP.
Fig. 4c is a schematic diagram of weight assignment of multiple partition modes of AWP on a 64 × 32 current block according to an embodiment of the present application, where in fig. 4c, 56 partition modes exist in the AWP.
Fig. 4d is a schematic diagram of weight assignment of multiple partition modes of an AWP on a current block 32 × 64 according to an embodiment of the present application, where in fig. 4d, there are 56 partition modes of the AWP.
In one embodiment, one partition mode may correspond to one weight derivation mode, that is, the partition mode and the weight derivation mode have a correspondence relationship. In fig. 4a, the size of the current block is 64 × 64, and the unit may be a pixel size.
In fig. 4a to 4d, black indicates that the weight value of the position corresponding to the first reference block is 0%, white indicates that the weight value of the position corresponding to the first reference block is 100%, and the gray area indicates that the weight value of the position corresponding to the first reference block is greater than 0% and less than 100% according to the difference of color shades. The weight value of the position corresponding to the second reference block is subtracted from the weight value of the position corresponding to the first reference block by 100%.
It should be understood that although the embodiments of the present application provide that the size of the current block is 64 × 64, 64 × 32, or 32 × 64 as described above, the art should understand that in other scenarios, the size of the current block may have other options. The aspect ratio of the current block is illustrated by 64 × 64, 64 × 32, or 32 × 64, for example, 64 × 64 may represent the current block with an aspect ratio of 1:1, 64 × 32 may represent the current block with an aspect ratio of 2:1, and 32 × 64 may represent the current block with an aspect ratio of 1: 2.
In one embodiment, the aspect ratio of the current block may be 1:1, 2:1, 4:1, 1:2, or 1:4, and so on. In another embodiment, the aspect ratio of the current block may also be other values, for example, 1:1.5 or 1.5:1, etc. In yet another embodiment, the aspect ratio of the current block may be determined according to the size of the video.
The GPM or AWP needs to transmit a flag (flag) whether the GPM or AWP is used or not in the code stream. If the GPM or the AWP is used, a specifically used mode, namely one of 64 modes of the GPM or one of 56 modes of the AWP, is transmitted in the code stream, and index values of two pieces of motion information can be transmitted in the code stream. flag flags whether the current block uses GPM or AWP. This flag may also be combined with other patterns.
In a preset prediction mode, for example, both GPM and AWP need to use two motion information to find two reference blocks. The current implementation is to construct a motion information candidate list on the encoder side by using the information related to the encoded/decoded part before the current block, select motion information from the motion information candidate list, and write the index values (index) of the two motion information in the motion information candidate list into the code stream. The same way is used at the decoder side, i.e. a motion information candidate list is constructed using information about previously decoded parts of the current block, which must be identical to the candidate list constructed at the encoder side. Thus, the index values of the two pieces of motion information are analyzed from the code stream, and then the two pieces of motion information, namely the two pieces of motion information needed by the current block, are searched from the motion information candidate list.
That is, the motion information described in the embodiment of the present application may include: motion vector information, i.e., the value of (x, y), and corresponding reference frame information, i.e., the reference frame list and reference index values in the reference frame list. One way to represent the reference frame list is to record the reference index values of two reference frame lists, where the reference index value corresponding to one reference frame list is valid, such as 0, 1, 2, etc.; the reference index value corresponding to the other reference frame list is invalid, i.e., -1. The reference frame list with the valid reference index value is a reference frame list used by the motion information of the current block, and the corresponding reference frame can be searched from the reference frame list according to the reference index value. Each reference frame list has a corresponding motion vector, the motion vector corresponding to a valid reference frame list is valid, and the motion vector corresponding to an invalid reference frame list is invalid. The decoder can find a required reference frame through reference frame information in the motion information, and can find a reference block in the reference frame according to the position of the current block and the motion vector, namely the value of (x, y), so as to determine the inter-frame prediction value of the current block.
Fig. 5 is a schematic diagram of a spatial position relationship between a current block and adjacent blocks according to an embodiment of the present disclosure, and as shown in fig. 5, a block E is the current block, and blocks a, B, C, D, F, and G are all adjacent blocks of the block E. Where the neighboring block A of block E is sample (x) 0-1,y0) At the block, neighboring block B of block E is sample (x)0,y0-1) block, block E neighboring block C being sample (x)0+1,y0-1) block, block E neighboring block D being sample (x)0-1,y0-1) block, block E neighboring block F being sample (x)0-1,y1) The block in which the neighboring block G of block E is a sample (x)1,y0-1) the block in which it is located. Wherein (x)0,y0) Is the coordinate of the top left sample of block E in the image, (x)1,y0) Is the coordinate of the top right sample of block E in the image, (x)0,y1) Is the coordinate in the image of the sample in the lower left corner of block E. That is, block E and its adjacent blocks A, B, C, D, F andthe spatial position relationship of G is shown in detail in FIG. 5.
For fig. 5, the "presence" of a neighboring block X (X denoted A, B, C, D, F or G) means that the block should be within the image to be decoded and that the block should belong to the same spatial region as block E; otherwise the neighboring block is "not present". It can be derived that a block is "unavailable" if it is "not present" or has not yet been decoded; otherwise this block is "available". Alternatively, an image sample to be decoded is "unavailable" if the block in which this sample is located is "not present" or if this sample has not yet been decoded; otherwise this sample is "available".
A method for providing derived motion information in the related art is described herein, comprising the following four steps:
First, 1) if the reference frame index stored in the temporal motion information storage unit where the luma sample corresponding to the top-left luma sample position of the current prediction unit in the picture with the reference index value of 0 in the reference picture queue 1 is-1, the L0 reference index and the 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 taken as the size and position of the current prediction unit, then the L0 motion vector prediction value and the L1 motion vector prediction value obtained according to the method for providing derived motion information in the related art are taken as the L0 motion vector MvE0 and the L1 motion vector MvE1 of the current prediction unit respectively, the L0 reference index RefIdxL0 and the L1 reference index RefIdxL1 of the current prediction unit are both equal to 0, and the motion information derivation process is ended.
2) Otherwise, both the L0 reference index and the L1 reference index of the current prediction unit are equal to 0. Distance indexes of pictures corresponding to the L0 reference index and the L1 reference index of the current prediction unit are respectively recorded as distanceindexexl 0 and distanceindexexl 1; the BlockDistance of the picture corresponding to the L0 reference index and the L1 reference index of the current prediction unit are denoted as BlockDistance L0 and BlockDistance L1, respectively.
In the image with reference index 0 in the reference image queue 1, the L0 motion vector of the temporal motion information storage unit in which the luminance sample corresponding to the top-left luminance sample position of the current prediction unit is located is recorded as mvRef (mvRef _ x, mvRef _ y), the distance index of the image in which the motion information storage unit is located is recorded as DistanceIndexCol, and the distance index of the image in which the reference unit to which the motion vector points is recorded as distanceindexexref.
A second step of blocking DistanceRef ═ DistanceIndexCol-DistanceIndexRef
Third, let L0 reference index RefIdxL0 of the current prediction unit be equal to 0, calculate L0 motion vector mvE0(mvE0_ x, mvE0_ y) of the current prediction unit:
mvE0_x=Clip3(-32768,32767,Sign(mvRef_x*BlockDistanceL0*BlockDistanceRef)*(((Abs(mvRef_x*BlockDistanceL0*(16384/BlockDistanceRef)))+8192)>>14));
mvE0_y=Clip3(-32768,32767,Sign(mvRef_y*BlockDistanceL0*BlockDistanceRef)*(((Abs(mvRef_y*BlockDistanceL0*(16384/BlockDistanceRef)))+8192)>>14));
at this time, mvX is mvRef and MVX is mvE 0.
Let L1 reference index RefIdxL1 of the current prediction unit be equal to 0, calculate L1 motion vector mvE1(mvE1_ x, mvE1_ y) of the current prediction unit:
mvE0_x=Clip3(-32768,32767,Sign(mvRef_x*BlockDistanceL1*BlockDistanceRef)*(((Abs(mvRef_x*BlockDistanceL1*(16384/BlockDistanceRef)))+8192)>>14));
mvE0_y=Clip3(-32768,32767,Sign(mvRef_y*BlockDistanceL1*BlockDistanceRef)*(((Abs(mvRef_y*BlockDistanceL1*(16384/BlockDistanceRef)))+8192)>>14));
at this time, mvX is mvRef and MVX is mvE 1.
In a fourth step, the value of InterPredRefMode is equal to 'PRED _ List 01'.
In practical application, the motion information candidate list is constructed in a manner of using not only spatial motion information but also temporal motion information. When a merge candidate list (merge list) is constructed in the VVC, temporal motion information and spatial motion information are also used.
Fig. 6 is a schematic diagram of another spatial position relationship between a current block and a neighboring block according to an embodiment of the present application, as shown in fig. 6, which illustrates motion information of a relevant position used in building a merge list, where candidate positions with padding elements of 1, 2, 3, 4, and 5 represent spatial relevant positions, that is, motion information used by these position blocks adjacent to the current block in the current frame; the candidate positions with the fill elements 6 and 7 represent the temporal relative positions, i.e. the motion information used by the corresponding positions in a certain reference frame, which may also be scaled (scaling). Here, for temporal motion information, if the candidate position 6 is available, motion information corresponding to the 6 position may be used; otherwise, the motion information corresponding to the 7-position can be used. It should be noted that, the construction of the candidate list of motion information in the Triangulation Prediction Mode (TPM) and the GPM prediction Mode also involves the use of these several positions; also, the size of the blocks herein is not an actual size, but is illustrated as an example.
Assume that the first motion information is represented as mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L 1. Wherein mvAwp0L0 represents the corresponding motion vector in the first reference frame list RefPicList0, and RefIdxAwp0L0 represents the reference index value of the corresponding reference frame in the first reference frame list RefPicList 0; mvAwp0L1 represents the corresponding motion vector in the second reference frame list RefPicList1, and RefIdxAwp0L1 represents the reference index value of the corresponding reference frame in the second reference frame list RefPicList 1. The second motion information and so on.
In the case where both motion information are unidirectional, therefore, both RefIdxAwp0L0 and RefIdxAwp0L1 must have one valid value, such as 0, 1, 2, etc.; the other is an invalid value, such as-1. If RefIdxAwp0L0 is a valid value, RefIdxAwp0L1 is-1; at this time, the corresponding mvAwp0L0 is the required motion vector, i.e., (x, y), and the mvAwp0L1 does not need to be considered. And vice versa.
In the embodiment of the application, two reference blocks are found by determining two pieces of motion information, the weight value of each pixel position of the two reference blocks is determined according to a specific mode used by GPM or AWP, and the two reference blocks are weighted to obtain the prediction block of the current block.
The treatment after obtaining the prediction block is the same as the original method. At the encoding side, if the current mode is the skip mode, the encoding of the current block is ended. If the current mode is not the skip mode, subtracting the current block from the prediction block to obtain a residual block, and transforming, quantizing and entropy-coding the residual block. At the decoding end, if the current mode is the skip mode, the prediction block is a decoded block, and the decoding of the current block ends. And if the current mode is not the skip mode, entropy decoding and analyzing the quantized coefficients, then carrying out inverse quantization, carrying out inverse transformation to obtain a residual block, and adding the residual block and the prediction block to obtain a decoded block.
The motion information candidate list construction method of the AWP and the GPM adopts the traditional motion information candidate list construction method or the screening based on the original merge motion information candidate list, and the same list construction method is used for all the AWP or GPM division modes. For those prediction methods prior to AWP or GPM, i.e. by default processing the current block as a whole, such a method is not trivial, and when processing AWP or GPM, the current block is actually processed in two parts, or more strictly speaking, the two parts of the current block use different motion information, so that whether motion information for the position with the strongest correlation to it can be found for the two parts respectively, and whether the position of the motion information for this position in the list is earlier, will affect the coding or decoding efficiency.
The basic idea of constructing the merge motion information candidate list or the motion information candidate list of the AWP or the GPM is to put the motion information with high probability of being selected in front of the motion information with low probability of being selected, and use variable length coding, that is, the front motion information in the list uses shorter code words, and the back motion information in the list uses longer code words, thereby improving the coding efficiency.
The probability that the motion information is selected has a certain relation to the correlation of the position used to derive it with the current block. We refer to this relationship as correlation. The closer to the current block the stronger the correlation is, the more the number of pixels adjacent to the current block, the stronger the correlation is.
For AWP or GPM, the correlation of the relevant position with the two parts of the AWP or GPM score, respectively, needs to be considered, why it is not straightforward to construct one list for each of the two parts, i.e. two lists for AWP or GPM. This is presumably because the increase in complexity and performance that would result from building two lists is not cost effective. Part of the added complexity comes from pruning (duplication). There is also a small skill in the method using a list. Since two pieces of motion information may not be identical, the index value of the motion information to be post-coded may not be identical to the index value of the motion information to be pre-coded, and assuming that the index value of the motion information to be post-coded is greater than the index value of the motion information to be pre-coded, the index value of the motion information to be post-coded is decreased by one, so that a shorter codeword may be used. This is also an advantage with one list over two lists.
The different modes of the AWP or GPM are different in two parts, as shown in fig. 4a and 4b above. According to the principle of correlation as described above, using the list construction method of the related art, some patterns have motion information with strong correlation with the first block in the front of the list in order, but some patterns have motion information with strong correlation with the first block in the back of the list in order. Some modes have motion information with strong correlation to the second block later in the list order, but some modes have motion information with strong correlation to the second block earlier in the list order. Some modes have motion information with strong correlation with the first block before the motion information with strong correlation with the second block in the order of the list, but some modes have motion information with strong correlation with the first block after the motion information with strong correlation with the second block in the order of the list. The related art construction method may be most suitable for some modes but not necessarily for some modes.
In the inter-frame prediction method in the embodiment of the present application, the method for constructing the motion information candidate list may be a method for constructing an adaptive motion information candidate list, or a method for determining a motion information candidate list of an AWP or a GPM according to a mode of the AWP or the GPM.
In the embodiment of the present application, more than one motion information candidate list may be constructed, and if the AWP or the GPM uses a certain mode(s), one motion information candidate list may be used, and if the AWP or the GPM uses a mode(s) different from the above, one motion information candidate list different from the above may be used.
For a decoder, after determining the mode of the AWP or GPM, determining a construction method of a motion information candidate list according to the mode of the AWP or GPM. Only a certain motion information candidate list construction method is used for the current block, and thus, the complexity of calculation is not increased.
Fig. 7 is a flowchart illustrating an inter-frame prediction method according to an embodiment of the present application, and as shown in fig. 7, the method is applied to a decoder, and the method may include:
s701, analyzing the code stream, and acquiring the weight derivation mode of the current block.
In some embodiments, the decoder may parse the code stream, determine a prediction mode parameter of the current block, where the prediction mode parameter of the current block may include a weight derivation mode of the current block, and in a case where the prediction mode parameter indicates that the inter prediction value of the current block is determined using a preset inter prediction mode, obtain the weight derivation mode of the current block from the prediction mode parameter of the current block. The preset inter prediction mode may be an AWP mode or a GPM mode.
In some embodiments, the weight-derived mode of the current block is used to characterize one or both reference blocks, the weight mode or weight distribution region when generating the prediction block for the current block.
The weight derivation mode of the current block may also be one of a lower-left upper-right weight derivation mode, an upper-left lower-right weight derivation mode, a left-right weight derivation mode, an upper-lower weight derivation mode. The left-bottom-right-top weight derivation mode is used to characterize the lower-left position of the prediction block from the first reference block, the upper-right position from the second reference block, the left-right weight derivation mode is used to characterize the left position of the prediction block from the first reference block, the right position from the second reference block, and so on, which are not further listed here.
The weight derivation mode of the current block may also be a division mode of the current block, which may be dividing the current block into two partitions, for example, by triangulating the current block into two partitions; for another example, the current block is divided into two parts by means of rectangular division; as another example, the current block is divided into two portions by an arc or other regular or irregular shape; also for example, the partition boundary may be determined based on the contour of the object in the current block such that the partition boundary fits the contour of the object as closely as possible. Wherein, when the triangle is divided, the current block is divided into at least one triangle and/or at least one trapezoid, and when the rectangle is divided, the current block is divided into at least one rectangle. In other embodiments, the division mode of the current block may be to divide the current block into three or more partitions.
64 weight derivation modes in the GPM prediction mode and 56 weight derivation modes in the AWP prediction mode are given in the protocol. The weight derivation mode of the current block is one of a plurality of weight derivation modes in a geometrically partitioned prediction mode, or the weight derivation mode of the current block is one of a plurality of weight derivation modes in an angularly weighted prediction mode. For example, the weight derivation mode of the current block may be any one of 64 weight derivation modes in the GPM prediction mode, or the weight derivation mode of the current block may be any one of 56 weight derivation modes in the AWP prediction mode.
It should be understood that there are only rectangular partitions in the early codec techniques, whether partitions of CUs, PUs, or Transform Units (TUs). The GPM or the AWP realizes non-rectangular division, namely, a rectangular block can be divided into two partitions by using a straight line, and the two partitioned partitions can be triangular, trapezoidal, rectangular and the like according to the difference of the position and the angle of the straight line, so that the division can be closer to the edge of an object or the edges of two areas with different motions. It should be noted that the partition described herein is not a true partition, but rather a partition that is more of a predictive effect. Since this partitioning simply divides the weights of the two reference blocks when generating the prediction block, or can be simply understood as a part of the positions of the prediction block coming from the first reference block and the other part of the positions coming from the second reference block, the current block is not really divided into two CUs or PUs or TUs by the partition line. In this way, transformation, quantization, inverse transformation, inverse quantization, etc. of the residual after prediction also process the current block as a whole.
It should be noted that an image to be decoded may be divided into a plurality of image blocks, and an image block to be decoded currently may be referred to as a current block (which may be represented by a CU), and an image block adjacent to the current block may be referred to as a neighboring block; that is, in the image to be decoded, the current block has a neighboring relationship with the neighboring block. Here, each current block may include a first image component, a second image component, and a third image component, that is, the current block represents an image block to be currently subjected to prediction of the first image component, the second image component, or the third image component in an image to be decoded.
Wherein, assuming that the current block performs the 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 may also be called a luminance block; alternatively, assuming that the current block performs the second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, the current block may also be referred to as a chroma block.
It should be noted that the prediction mode parameter indicates the prediction mode adopted by the current block and the parameter related to the prediction mode. The prediction modes generally include an inter-frame prediction mode, a conventional intra-frame prediction mode, a non-conventional intra-frame prediction mode, and the like, and the inter-frame prediction modes include a normal inter-frame prediction mode, a GPM prediction mode, an AWP prediction mode, and the like. That is, the encoder selects the optimal prediction mode to pre-code the current block, and the prediction mode of the current block can be determined in the process, so that the corresponding prediction mode parameters are written into the code stream and transmitted to the decoder by the encoder.
Therefore, on the decoder side, the prediction mode parameter of the current block can be directly acquired by analyzing the code stream, and whether the current block uses a preset inter-frame prediction mode, such as a GPM prediction mode or an AWP prediction mode, is determined according to the acquired prediction mode parameter.
S703, constructing a new motion information candidate list based on the weight derivation mode of the current block.
The classes of the weight derivation modes of the current block are different, and the constructed new motion information candidate list is different. The class of the weight derivation mode of the current block may be preset.
In one embodiment, the new motion information candidate list constructed may be different in case that the class of the weight derivation mode of the current block is different. In one embodiment, since the new motion information candidate list has a limited length, the constructed new motion information candidate list may be the same in the case that the weight derivation mode of the current block is different in category. Or, it can be said that the weight derivation mode of the current block has a plurality of different categories, and when some of the plurality of different categories are utilized, the new motion information candidate list constructed may be the same or different.
However, it is worth noting in the art that the decoder may construct a new motion information candidate list in a different way or logically even if the new motion information candidate list is constructed the same when some category is used.
In one embodiment, the decoder may determine an ordering manner corresponding to the weight derivation mode of the current block based on the weight derivation mode of the current block, and the decoder may determine a different ordering manner based on the weight derivation mode of a different current block, so that the decoder may construct all or part of the known motion information related to the current block into a new motion information candidate list based on the ordering manner. One way to construct a new motion information candidate list may be to write motion information to the initial motion information candidate list. In this manner, the motion information in the new motion information candidate list may be sorted differently from a particular sorting scheme that exists in the current art.
In the process of constructing a new motion information candidate list, the decoder may determine the first motion information to be filled into the initial motion information candidate list, and fill the first motion information into the position where the index value in the initial motion information candidate list is 0; the decoder may then determine a second motion information to be filled into the initial motion information candidate list, determine whether the second motion information and the already filled motion information are repeated (a repetition step), and fill the second motion information into the initial motion information candidate list with an index value of 1 position under the condition that the second motion information and the already filled motion information are not repeated until a predetermined number of motion information are filled into the initial motion information candidate list, and fill a certain motion information into the index of the predetermined number minus one to the corresponding position, and the new motion information candidate list is constructed.
The decoder may determine the first motion information, the second motion information, etc. from the known motion information associated with the current block based on the ordering.
In some embodiments, the ordering may be a known motion information ordering associated with the current block.
The new motion information candidate list in the embodiment of the present application is a candidate list in which bidirectional motion information is allowed to exist. In other embodiments, the new motion information candidate list may be referred to as a bi-directional motion information candidate list.
In another embodiment, the decoder may determine motion information to be filled corresponding to the weight derivation mode of the current block based on the weight derivation mode of the current block, where each motion information to be filled may be one-way motion information, two-way motion information, or one or two pieces of one-way motion information obtained by splitting the two-way motion information, and then, the decoder may construct a new motion information candidate list based on the motion information to be filled. In this way, the new motion information candidate list may be sorted differently from the current technique, which only fills in one-way motion information.
In still another embodiment, the decoder may determine an ordering manner corresponding to the weight derivation mode of the current block and motion information to be filled corresponding to the weight derivation mode of the current block based on the weight derivation mode of the current block, thereby constructing a new motion information candidate list based on the ordering manner and the motion information to be filled. In this way, the ranking of the motion information in the new motion information candidate list may not only be different from a specific ranking in the current technology, but also different from the method of filling only one-way motion information in the current technology.
S705, determining the inter prediction value of the current block based on the new motion information candidate list.
The decoder may determine two motion information from the new motion information candidate list, for example, may find two motion information in the constructed motion information candidate list according to the analyzed indexes of the two motion information, obtain two inter-prediction blocks by using a unidirectional or bidirectional prediction method based on the two motion information, then determine the weight of each pixel position of the two inter-prediction blocks according to the weight derivation mode of the current block, and weight the two inter-prediction blocks to obtain the prediction block of the current block.
The decoder, upon determining that certain motion information is bi-directional, uses bi-directional prediction to obtain an inter-prediction block, wherein the inter-prediction block can be obtained using BIO or DMVR or other methods. If the motion information is unidirectional, an inter prediction block is obtained using a unidirectional prediction method.
In the embodiment of the application, the new motion information candidate list constructed by the decoder is based on the weight derivation mode of the current block, so that the decoder can construct different new motion information candidate lists according to different weight derivation modes, the construction of the motion information candidate list is in accordance with the weight derivation mode of the current block, and the decoding efficiency of the decoder can be improved.
In some embodiments of the present application, the above S703 may be implemented by: determining the sorting mode of the known motion information related to the current block based on the weight derivation mode of the current block; and constructing a new motion information candidate list based on the sorting mode.
The known motion information related to the current block may be motion information of a decoded block temporally or spatially related to the current block. The motion information in the embodiment of the present application may be unidirectional motion information, bidirectional motion information, or one or two pieces of unidirectional motion information obtained by splitting bidirectional motion information.
The known motion information related to the current block includes a preset number of motion information, and the preset number may be any one of 2 to 6, for example, 2, 3, 4, 5, or 6. The amount of motion information included in the known motion information associated with the current block may be a trade-off based on both decoding accuracy and performance of the decoder.
The known motion information associated with the current block is either available motion information or existing motion information.
In different weight derivation modes, the ordering may be the same or different. In some embodiments, if the current block is divided into two partitions, one partition near the left side, the upper side, or the upper left side may be selected from the two partitions, and blocks adjacent to the one partition are sorted as a higher sorting priority.
Taking a weight derivation mode in a GPM prediction mode and an AWP prediction mode as an example, under the condition that the weight derivation mode of the current block is a weight derivation mode of upper left and lower right, the known motion information sorting mode is a sorting mode that the motion information of an upper left adjacent block of the current block is sorted in a front order; when the weight derivation mode of the current block is an upper weight derivation mode and a lower weight derivation mode, the known sorting mode of the motion information is a sorting mode in which the motion information of the upper block of the current block is sorted in a front order; when the weight derivation mode of the current block is a lower-left weight derivation mode and an upper-right weight derivation mode, the known sorting mode of the motion information is a sorting mode that the motion information of a lower-left adjacent block of the current block is sorted in a front sorting mode; when the weight derivation mode of the current block is the left and right weight derivation modes, the ranking mode of the motion information is known as the ranking mode in which the motion information of the left block of the current block is ranked earlier.
In some embodiments of the present application, the known motion information associated with the current block may include N pieces of motion information associated with the current block; n is an integer greater than or equal to 1; the N pieces of motion information related to the current block may include: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain.
In some embodiments, the N motion information related to the current block may include only neighboring block motion information. In some embodiments, the N motion information associated with the current block may include only the motion information of the corresponding block, and in some embodiments, the N motion information associated with the current block may include not only the motion information of the neighboring block but also the motion information of the corresponding block.
In the embodiment of the present application, each of the N pieces of motion information includes original motion information, and the original motion information includes motion vector information and reference frame information.
The motion vector information may include x-axis motion component information and y-axis motion component information, the reference frame information may include a reference frame list and an index in the reference frame list, and the decoder may determine the reference frame information from the reference frame list through the index.
In this embodiment of the present application, the original motion information may be unidirectional original motion information, or may be bidirectional original motion information, or may be one or two pieces of unidirectional original motion information obtained by splitting bidirectional original motion information.
In some embodiments of the present application, the motion information of at least one neighboring block may be ordered in a manner determined based on a weight derivation mode of the current block.
In some embodiments of the present application, in the case that N is greater than or equal to 2, determining an ordering manner of the known motion information related to the current block based on the weight derivation mode of the current block may include: in case that the weight derivation mode of the current block is the first type of weight derivation mode, the motion information of at least one corresponding block is arranged before the motion information of at least one neighboring block.
It should be noted that, in some embodiments, the motion information in the embodiment of the present application may refer to unidirectional original motion information parsed by a decoder, or bidirectional original motion information, or one or two unidirectional original motion information obtained by splitting bidirectional original motion information, without being particularly described. The motion information in the embodiment of the present application may refer to not only the unidirectional original motion information or the bidirectional original motion information obtained by the decoder through parsing, or one or two unidirectional motion information obtained by splitting the bidirectional original motion information, but also the unidirectional derivative motion information or the bidirectional derivative motion information, or one or two unidirectional derivative motion information obtained by splitting the bidirectional derivative motion information, without any specific description.
The original motion information (including the unidirectional original motion information or the bidirectional original motion information) in the embodiment of the application may be motion information obtained by a decoder by analyzing a code stream, and the derived motion information may be obtained by performing mathematical calculation on the original motion information.
In other embodiments of the present application, in the case that N is greater than or equal to 2, determining an ordering manner of the known motion information related to the current block based on the weight derivation mode of the current block may include: and in the case that the weight derivation mode of the current block is the second-type weight derivation mode, interspersing the motion information of at least one corresponding block within the motion information of at least one adjacent block. Thus, the decoder may fill in a portion of the spatial motion information, then fill in a portion or all of the temporal motion information, then fill in non-repeating spatial motion information, and so on, until a predetermined number of motion information are filled.
In some further embodiments of the present application, in the case that N is greater than or equal to 2, determining an ordering manner of the known motion information related to the current block based on the weight derivation mode of the current block may include: in case that the weight derivation mode of the current block is the third type of weight derivation mode, the motion information of the at least one corresponding block is arranged after the motion information of the at least one neighboring block.
Taking the preset number as 5 for example, where the number of motion information in the new motion information candidate list is 5, it can be understood that the length of the new motion information candidate list is 5.
In some embodiments, the decoder may first fill 1 temporal motion information into the initial motion information candidate list and then fill 4 spatial motion information into the initial motion information candidate list.
In other embodiments, the decoder may first fill 1 or 2 or 3 spatial motion information into the initial motion information candidate list, then fill 1 temporal motion information into the initial motion information candidate list, and then fill 3 or 2 or 1 spatial motion information into the initial motion information candidate list.
In some embodiments, the decoder may fill the initial motion information candidate list with 4 spatial motion information and then fill the initial motion information candidate list with 1 temporal motion information.
In one embodiment, the initial motion information candidate list is a list including a preset number of padding positions, and each padding position is used for padding motion information (including one of original motion information, derived motion information, one-way motion information, and two-way motion information). In another embodiment, the initial motion information candidate list may be an empty list. In yet another embodiment, a new motion information candidate list may be generated based on at least one motion information after obtaining at least one generation of filled-in motion information, in which case there may be no initial motion information candidate list.
It should be understood that, in the embodiment of the present application, no matter which filling method is adopted, the step of checking the duplicate may be performed before filling. It should also be understood that the embodiment of the present application is only exemplified by the fact that the new motion information candidate list only has motion information in one time domain, and in other embodiments, at least two pieces of motion information in the time domain may exist in the new motion information candidate list.
It should be noted that, in the above-mentioned first-type weight derivation mode, second-type weight derivation mode, and third-type weight derivation mode, and in the below-mentioned fourth-type weight derivation mode, fifth-type weight derivation mode, and so on, different weight derivation modes are ordered differently.
The different weight derivation modes may be combined with each other without conflict, e.g. the weight of the current block may belong to both the second or third class of weight derivation modes and the fourth class of weight derivation modes. Therefore, the decoder can not only insert the motion information of at least one corresponding block into or behind the motion information of at least one adjacent block, but also sort the motion information of the lower left adjacent block of the current block, the motion information of the upper right adjacent block of the current block, the motion information of the upper left adjacent block of the current block, and the motion information of the lower right block of the current block in the time domain. The present application does not describe one weight derivation mode that can be combined.
It can be understood that the new motion information candidate list constructed may be the same or different in different weighting patterns.
It should be understood that a variety of sorting manners are provided in the embodiments of the present application, and these sorting manners only provide a sorting idea or define sorting priorities of different pieces of motion information in the sorting manners, and when the motion information is sorted according to a certain sorting manner, it does not mean that at least two pieces of motion information provided in these sorting manners are used up, but only when the length of the motion information candidate list reaches a preset number (may be a preset length), it may be determined that the construction of a new motion information candidate list is completed.
For example, in a certain class of weight derivation modes, the ranking mode is P, Q, R, S sequential ranking, and when the rank Q is reached based on the ranking mode, the length of the list reaches a preset length, the new motion information candidate list is built, and the subsequent ranking is not performed.
Another way of ordering the N motion information is described here:
in some embodiments of the present application, in the case that N is greater than or equal to 2, determining an ordering manner of the known motion information related to the current block based on the weight derivation mode of the current block may include: the sorting mode of the known motion information related to the current block is determined from a sorting mode set, and the sorting mode set comprises the following steps: and fully arranging the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block and the motion information of the lower right related block of the current block to obtain a plurality of sequencing modes.
And under the condition that the weight derivation modes of the current block are different, the sorting modes determined from the sorting mode set are different.
Wherein any one of the motion information of the lower-left related block of the current block, the motion information of the upper-right related block of the current block, the motion information of the upper-left related block of the current block, and the motion information of the lower-right related block of the current block is: motion information of the current block in a spatial domain or motion information of the current block in a temporal domain.
The sorting manner set may include 24 sorting manners, where the 24 sorting manners are sorting manners obtained by fully sorting motion information of a lower-left related block of the current block, motion information of an upper-right related block of the current block, motion information of an upper-left related block of the current block, and motion information of a lower-right related block of the current block, for example, one sorting manner is sorting motion information of a lower-left related block of the current block, motion information of an upper-right related block of the current block, motion information of an upper-left related block of the current block, and motion information of a lower-right related block of the current block in sequence.
The motion information of the current block in the temporal domain may be one or at least two of all or part of motion information of a lower-left related block of the current block, all or part of motion information of an upper-right related block of the current block, all or part of motion information of an upper-left related block of the current block, and all or part of motion information of a lower-right related block of the current block.
In an implementation, the motion information of the lower-left neighboring block of the current block includes: motion information of all blocks or partial blocks at the lower left of the current block.
The motion information of the upper right neighboring block of the current block includes: motion information of all or part of blocks on the upper right of the current block.
The motion information of the upper left neighboring block of the current block includes: motion information of all blocks or partial blocks at the upper left of the current block.
The motion information of the lower right block of the current block in the temporal domain includes: motion information of blocks in a temporal domain outside the current block, or motion information of blocks in a temporal domain inside the current block.
Fig. 8 is a schematic diagram illustrating a spatial position relationship between a current block and neighboring blocks according to an embodiment of the present disclosure, as shown in fig. 8, a lower-left neighboring block of the current block 801 may be located in a lower-left area 802 of the current block, and the lower-left neighboring block of the current block 801 may include at least one neighboring block. The upper left neighboring block of the current block 801 may be located in the upper left region 803 of the current block, and the upper left neighboring block of the current block 801 may include at least one neighboring block. The upper-right neighboring block of the current block 801 may be located in an upper-right region 804 of the current block, and the upper-right neighboring block of the current block 801 may include at least one neighboring block. Each neighboring block may be adjacent to the current block 801.
It should be noted that the sorting according to the sequence J, K, L in the embodiments of the present application may be performed as follows:
(1) it is determined whether J is present.
If J exists, fill J into the initial motion information candidate list, jump to (2).
If J does not exist, jump to (3)
(2) And judging whether the number of the filled motion information is a preset number minus one.
If not, jump to (3)
If yes, the motion information on the spatial domain of the related block is filled.
(3) And judging whether K exists.
If K exists, filling K into the initial motion information candidate list, and jumping to (4).
If K does not exist, jump to (5)
(4) And judging whether the number of the filled motion information is a preset number minus one.
If not, jump to (5)
If yes, the motion information on the spatial domain of the related block is filled.
(5) It is determined whether L is present.
And if the L exists, filling the L into the initial motion information candidate list, and completing the filling of the motion information on the space domain of the related block.
If L does not exist, the motion information filling on the spatial domain of the relevant block is completed.
In case the filling of motion information in spatial domain of the relevant block is completed, the decoder may then proceed with the step of filling motion information in temporal domain of the current block.
It is described here that, in the case where N is greater than or equal to 2, the known motion information associated with the current block is determined in an order based on the weight derivation mode of the current block:
in some embodiments, in the case that the weight derivation mode of the current block is the fourth type weight derivation mode, the decoder may arrange all or part of the unidirectional original motion information of the N pieces of motion information before splitting the bidirectional motion information of the N pieces of motion information to obtain all or part of one or two unidirectional original motion information.
It should be noted that each piece of motion information in the N pieces of motion information in the embodiment of the present application may be unidirectional motion information, or each piece of motion information in the N pieces of motion information may be bidirectional motion information, or a part of the N pieces of motion information is unidirectional motion information, and another part of the N pieces of motion information is bidirectional motion information.
In this embodiment, the decoder always fills the unidirectional original motion information, and when the number of the unidirectional original motion information is smaller than the preset number, the one or two bidirectional original motion information obtained by splitting the bidirectional motion information is considered to be filled.
Here, it should be noted that, in the present application, the definition of "all" and "part" is used, and all of one object is the one object and part of the one object is the one object. For example, when the number of the one-way original motion information in the N pieces of motion information is one, all of the one-way original motion information is the one-way original motion information, and part of the one-way original motion information is the one-way original motion information; when the number of the one-directional original motion information among the N motion information is at least two, all or part of the one-directional original motion information may be generally understood in the art.
In still other embodiments, the decoder may arrange all or part of the unidirectional original motion information of the N motion information before all or part of the bidirectional motion information of the N motion information in case that the weight derivation mode of the current block is the fifth type weight derivation mode.
In this embodiment, the decoder also fills the unidirectional original motion information, and then considers filling the bidirectional motion information when the number of the unidirectional original motion information is smaller than the preset number.
In still other embodiments, the decoder may determine an ordering priority of the N pieces of motion information in a case where the weight derivation mode of the current block is the sixth type of weight derivation mode, and order the N pieces of motion information based on the ordering priority.
In this embodiment, the decoder does not need to consider the uni-bi-directional problem of the N pieces of motion information, but fills the N pieces of motion information according to the preset sorting priority of the N pieces of motion information.
For example, the decoder may first fill in the first unidirectional original motion information, then fill in the second bidirectional original motion information, or then fill in one or two unidirectional motion information obtained by splitting the second bidirectional original motion information.
For another example, in the presence of derived motion information, the decoder may first fill in the first unidirectional original motion information, then fill in the first unidirectional derived motion information, and then fill in the second bidirectional original motion information and the second bidirectional derived motion information, or further fill in one or two unidirectional motion information obtained by splitting the second bidirectional original motion information, and the unidirectional derived motion information or the bidirectional derived motion information corresponding to the one or two unidirectional motion information.
In still another embodiment, the decoder may determine uni-directional information for each of the N pieces of motion information and an ordering priority of the N pieces of motion information in case that the weight derivation mode of the current block is the seventh type weight derivation mode, and order the N pieces of motion information based on the uni-directional information and the ordering priority of each piece of motion information.
In this embodiment, the decoder needs to take comprehensive consideration of the uni-bi-directional problem of the N pieces of motion information and the sorting priority of the N pieces of motion information, so as to sort the N pieces of motion information based on the two.
The way in which motion information for a corresponding block is obtained is described here. First, the decoder may determine an image frame other than a current frame and a frame where a corresponding block is located as a first specific frame; then, motion information of a first target block corresponding to the current block may be determined on the first specific frame; finally, the motion information of the first target block may be scaled to obtain the motion information of the corresponding block.
In the implementation, the scaling is performed on the motion information of the first target block to obtain the motion information of the corresponding block, and the scaling may include one of the following:
scaling the bidirectional motion information of the first target block to obtain bidirectional motion information of a corresponding block;
and scaling the unidirectional motion information of the first target block to obtain the bidirectional motion information of the corresponding block.
In one embodiment, the scaling of the motion information of the first target block may be mapping the motion information of the first target block onto the corresponding block, thereby obtaining the motion information of the corresponding block.
In the embodiment of the present application, the concept of deriving motion information is also creatively proposed, and the following description is made on the ranking of the derived motion information and the derived motion information in the new motion information candidate list:
in the embodiment of the present application, each piece of motion information in the N pieces of motion information further includes derived motion information, and the derived motion information is determined based on the original motion information; the derived motion information includes motion vector information and reference frame information. Wherein, the derived motion information corresponding to different motion information may be the same or different.
The derived motion information is one-way derived motion information, or two-way derived motion information, or one or two pieces of one-way derived motion information obtained by splitting the two-way derived motion information. Wherein the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
Here, the sorting manner of N pieces of motion information is described in the case where N is greater than or equal to 2:
in some embodiments, the decoder may rank all or part of the N original motion information before all or part of the N derived motion information.
For the original motion information and the ordering of the original motion information, reference may be made to the above description, which will not be repeated herein.
In this embodiment, the decoder always fills in the original motion information first, and then considers filling in the derived motion information in case the number of filling in the original motion information is smaller than the preset number.
In other embodiments, the decoder may determine at least one of uni-directional information for each of the N original motion information, an ordering priority for the N original motion information, uni-directional information for each of the N derived motion information, and an ordering priority for the N derived motion information, and order the N motion information based on the at least one information.
In this embodiment, the decoder may rank the N motion information according to at least one type of information, so that the obtained new motion information candidate list can make a balance between the top of the unidirectional information, the default ranking mode, and the ranking mode of the derived information, thereby making the ranking more in line with the actual situation.
The manner in which the decoder determines the derived motion information based on the original motion information is described herein:
In the embodiment of the present application, the manner of determining the derived motion information based on the original motion information may be roughly divided into two manners, the first manner is to perform mathematical calculation on each original motion information to obtain derived motion information corresponding to each original motion information, and the second manner is to perform average or weighted average on the original motion information of at least two neighboring blocks to obtain derived motion information corresponding to the original motion information of at least two neighboring blocks.
A first way of implementing this is described, namely by computing the raw motion information one by one, in which:
the prediction direction of the derived motion information is the same as the prediction direction of the original motion information. Wherein the prediction direction may be unidirectional prediction or bidirectional prediction.
The reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
In implementation, the decoder may determine a motion vector of the derived motion information based on a motion vector of the original motion information.
The motion vector information includes first axis component information and second axis component information. The first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis. For example, if the first axis is the x-axis, the second axis is the y-axis, and if the first axis is the y-axis, the second axis is the x-axis.
The manner of determining motion vector information of the derived motion from the motion vector information of the original motion information may be: determining first axis component information and second axis component information of each derived motion information in the M derived motion information based on the first axis component information and the second axis component information in the original motion information, and taking the first axis component information and the second axis component information of each derived motion information as motion vector information of each derived motion information; m is an integer greater than or equal to 1.
One original motion information may generate one or at least two derived motion information. For example, one original motion information may generate one, two, four derived motion information, and so on.
In one implementation, the sign of the x-axis component information in the motion vector information of the original motion information is the same as the sign of the x-axis component information of each of the M derived motion information. The sign of the y-axis component information in the motion vector information of the original motion information is the same as the sign of the y-axis component information of each of the M derived motion information.
In implementation, the determination of the motion vector information from which the motion information is derived may include two general ways, the first way being by addition and the other way being by scaling.
The first mode is to perform addition calculation on one axis in the original motion information to obtain derivative motion information, and the motion information of the other axis of the original information is used as the motion information of the other axis of the derivative motion information. The second way is to add both axes in the original motion information.
The first mode is as follows: determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information in the original motion information may include: adding M third values to the first axis component information in the original motion information to obtain M first axis addition results, and determining the first axis component information of each derived motion information based on each result in the M first axis addition results; and taking the second axis component information of the original motion information as the second axis component information of each derived motion information in the M derived motion information.
The second mode is as follows: determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information in the original motion information may include: adding M third values to the first axis component information in the original motion information to obtain M first axis addition results, and determining the first axis component information of each derived motion information based on each result in the M first axis addition results; and adding M third values to the second axis component information in the original motion information to obtain M second axis addition results, and determining the second axis component information of each derived motion information based on each result in the M second axis addition results.
In one embodiment, determining the first axis component information of each derived motion information based on each of the M first axis addition results may include: each of the M first-axis addition results is taken as first-axis component information of each derived motion information.
The first mode is to perform scaling calculation on one axis in the original motion information to obtain derived motion information, and the motion information of the other axis of the original information is used as the motion information of the other axis of the derived motion information. The second way is to perform scaling calculations on both axes in the original motion information.
The first mode is as follows: determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information in the original motion information may include: determining second axis component information of each derived motion information in the M derived motion information based on a result of scaling the first axis component information of the original motion information; and taking the second axis component information of the original motion information as the second axis component information of each derived motion information in the M derived motion information.
The second mode is as follows: determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information in the original motion information may include: determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; second axis component information for each of the M derived motion information is determined based on a result of scaling the second axis component information of the original motion information.
In the embodiment of the present application, the scaling calculation is to scale the first axis and/or the second axis in the original motion information, and the scaling may be to enlarge or reduce, in an embodiment, the scaling calculation is to enlarge or reduce the first axis and/or the second axis, so as to directly obtain the motion vector of the derived motion information; in another embodiment, the scaling calculation is to determine the motion vector of the derived motion information based on the result of the enlargement or reduction of the first axis and/or the second axis, for example, when the first axis and/or the second axis is enlarged or reduced, and other related calculations are performed to obtain the motion vector of the derived motion information.
It can be understood in the art that the scaling calculation and the addition calculation are different types of calculations, and different calculation methods generate different derived motion information, so that the correlation of the derived motion information is different, and tests prove that the correlation obtained by using the scaling calculation is high.
The following description is made on an implementation of scaling calculation, and it should be understood that although the embodiment of the present application takes the first axis as an example to make a description of the correlation, the field should understand that, since the first axis is the x axis or the y axis, the flow of scaling the x axis and scaling the y axis in the embodiment of the present application can be easily known through the description of the first axis.
The scaling calculation may include a calculation of multiplication or a calculation of division, both of which are scaling calculations, as explained below:
in some embodiments, determining the second axis component information for each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises: the first axis component information of the original motion information is multiplied by the M first values to obtain M first results, and the first axis component information of each derived motion information is determined based on each of the M first results.
In other embodiments, determining the second axis component information of each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises: and dividing the first axis component information of the original motion information by the M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
In some embodiments, determining the first axis component information for each derived motion information based on each of the M first results comprises: each of the M first results is taken as the first axis component information of each derived motion information.
In other embodiments, determining the first axis component information for each derived motion information based on each of the M first results comprises: determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
In some embodiments, determining the first axis component information for each derived motion information based on each of the M second results comprises: each of the M second results is taken as the first axis component information of each derived motion information.
In other embodiments, each of the M second results is right-shifted by a particular number of bits to obtain M third results, and the first-axis component information for each of the derived motion information is determined based on each of the M third results.
Wherein the third value is obtained by shifting the target bit to the left, and the target bit is the specific bit minus one.
In some embodiments, an absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold; the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
In some embodiments, the method further comprises: determining a first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold; under the condition that the absolute value of first axis component information in the motion vector information of the original motion information is larger than a second threshold and smaller than or equal to a third threshold, determining a first specific value as a second coefficient; under the condition that the absolute value of the first axis component information in the motion vector information of the original motion information is larger than a third threshold value, determining a first specific value as a third coefficient; wherein the first coefficient is smaller than the second coefficient, and the second coefficient is smaller than the third coefficient.
In one embodiment, the second threshold is 64, the first coefficient is 0.75, the third threshold is 128, the second coefficient is 0.875, and the third coefficient is 0.9375. It can be understood in the art that these values may have other values based on actual situations, and the embodiment of the present application does not limit this.
In some embodiments, the method further comprises: taking the first target value as the first axis component information of the derived motion information under the condition that the absolute value of the first axis component information of the original motion information is less than or equal to a first threshold value and the first axis component information in the motion vector information of the original motion information is a positive number; and in the case that the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold value and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
In one embodiment, the first target value is 4 to 10, for example, the first target value is 4, 6, 8, 10. In the embodiment of the present application, the first target value is 8.
The first threshold may be a number greater than 0, and the first threshold is closer to 0, for example, the first threshold may be 1, 2, or 3, and the number greater than the first threshold may be understood as a number farther from 0.
In some embodiments, the M first divisors include a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to a maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
determining, based on each of the M first divisors, first axis component information for each derived motion information, including at least one of:
taking the maximum threshold value as the first axis component information of each derived motion information corresponding to the first group of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
In other embodiments, determining the first axis component information for each derived motion information based on each of the M first divisors comprises: and calculating by adopting a specific function based on each divisor in the M first divisors, and determining the first axis component information of each derived motion information, wherein the specific function is a CLIP function, min in the CLIP function can correspond to a minimum threshold value, and max in the CLIP function can correspond to a maximum threshold value.
The first value, the second value, the third value, the fourth value, the first specific value, the second specific value, and the like, which are present in the embodiments of the present application, may be an integer or a decimal (which may be referred to as a floating point number), and may also be an integer or a negative number, which is not limited in the embodiments of the present application.
The first specific value may be: 0.5, 0.75, 0.8, 0.9, 1.1, 1.2, 1.25, 1.5.
In one embodiment, the number of bits to shift right may be a fixed setting.
In another embodiment, at least two of the first value, the third value, and the right-shifted number of bits may have a correspondence.
In one embodiment, the third value may be determined based on a number of bits to shift right, e.g., the third value is a number one left shifted target bit, which may be a number of bits to shift right minus one. The value is expressed by a mathematical formula as 1< (shift-1), the shift is the number of bits to be right-shifted, and the value is a third value. As another example, value is other values of 1< < (shift-1), and is not limited herein.
In some embodiments, in the case that the original motion information is bidirectional original motion information, the decoder may further perform the following steps:
splitting original motion information into first one-way original motion information and second one-way original motion information; taking the result of multiplying the first value by the first axis component information or the second axis component information in the motion vector information of the first one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the first one-way derivative motion information; taking the result of multiplying the fourth value by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the second one-way derivative motion information; wherein the first value and the fourth value are both greater than 0; wherein the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
A second way of implementing this is described, namely by computing at least two original motion information, in which:
the N pieces of motion information may include: original motion information of at least two adjacent blocks of a current block on a spatial domain; at least two adjacent blocks are adjacent, or at least two adjacent blocks are at the lower left corner or the upper right corner or the upper left corner of the current block.
The decoder determines derived motion information based on the original motion information, which may include: the decoder may determine a second target block from the at least two adjacent blocks, and take a frame where the second target block is located as a second specific frame; then, the motion vector information in the original motion information of the adjacent blocks except the second target block in the at least two adjacent blocks can be scaled to a second specific frame to obtain the motion vector information of the at least two blocks to be averaged; wherein the at least two blocks to be averaged comprise a second target block; then, averaging or weighted averaging can be carried out on the motion vector information of at least two blocks to be averaged to obtain the motion vector information of the corresponding derived motion information; finally, the motion vector information of the derived motion information corresponding to the motion vector information may be used as the motion vector information of the derived motion information of each of the at least two neighboring blocks.
The prediction direction of the derived motion information is the same as the prediction direction of the original motion information, and the reference frame information of the derived motion information is a second specific frame.
Fig. 9 is a flowchart illustrating another inter-frame prediction method according to an embodiment of the present application, and as shown in fig. 9, the method is applied to a decoder, and the method may include:
s901, the decoder analyzes the code stream to obtain the weight derivation mode of the current block.
S903, based on the weight derivation mode of the current block, determining the sorting mode of the known motion information related to the current block.
Wherein the known motion information related to the current block comprises N pieces of motion information related to the current block; n is an integer greater than or equal to 1. The N pieces of motion information related to the current block include: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain. Each of the N pieces of motion information includes original motion information.
S905, determining an initial motion information candidate list.
In one embodiment, the initial motion information candidate list may be an empty list, and the length of the initial motion information candidate list may be a preset number, so that a preset number of motion information may be able to be put in.
S907, based on the sorting manner, sequentially or alternatively filling all or part of the original motion information of at least one neighboring block and/or all or part of the original motion information of at least one corresponding block into the initial motion information candidate list to obtain a new motion information candidate list.
In some embodiments, the decoder may only consider filling in the original motion information, e.g., the decoder may fill in the original motion information in 4 spatial domains and 1 temporal domain sequentially or alternatively.
In other embodiments, each of the N motion information includes derived motion information, and then there may be a scene in which the derived motion information is filled into the initial motion information candidate list, in which case, the decoder may sequentially or alternately fill at least one of all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of the at least one corresponding block, all or part of the derived motion information of the at least one neighboring block, and all or part of the derived motion information of the at least one corresponding block into the initial motion information candidate list based on the ordering manner.
In the embodiment of the application, under the condition that the derived motion information to be filled is bidirectional derived motion information, the bidirectional derived motion information is split into two unidirectional derived motion information; filling at least one of the two unidirectional derived motion information into an initial motion information candidate list; and/or splitting the two-way original motion information into two one-way original motion information under the condition that the original motion information to be filled is the two-way original motion information, and filling at least one of the two one-way original motion information into the initial motion information candidate list, or filling the two-way original motion information into the initial motion information candidate list.
It should be noted that, no matter in what sort order the motion information is filled in the initial motion information candidate list, when the number of the filled motion information is a preset number, or the initial motion information candidate list is filled, the motion information is not filled in the initial motion information candidate list.
In some embodiments, the initial motion information candidate list may be populated with a preset number of motion information; each piece of motion information in the preset number of pieces of motion information is original motion information or derived motion information; the preset number is 2-6.
In some embodiments, the method may further comprise: after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled; and filling the derived motion information to be filled into the initial motion information candidate list.
In other embodiments, the method may further comprise: after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled; and filling the derived motion information to be filled into the initial motion information candidate list under the condition that the derived motion information to be filled is determined to be different from the filled original motion information corresponding to the derived motion information to be filled.
In further embodiments, the method may further comprise: after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled; and filling the derived motion information to be filled into the initial motion information candidate list under the condition that the derived motion information to be filled is different from the original motion information already filled.
And S909, determining the interframe prediction value of the current block based on the new motion information candidate list.
In the embodiment of the application, a method for constructing a new motion information candidate list based on a sorting mode is provided, so that the method for constructing the new motion information candidate list can be flexibly constructed according to different sorting modes, and the new motion information candidate list can arrange motion information according to the sequence from strong to weak of the correlation with a current block, thereby improving the decoding efficiency of the current block.
Fig. 10 is a flowchart illustrating a further inter prediction method according to an embodiment of the present application, and as shown in fig. 10, the method is applied to a decoder, and the method may include:
s1001, the decoder analyzes the code stream to obtain the weight derivation mode of the current block.
S1003, acquiring the original motion information of at least one adjacent block and the original motion information of at least one corresponding block based on the code stream analyzed by the decoder.
S1005, generating a certain number of derived motion information based on all or part of the original motion information of the at least one neighboring block and/or based on all or part of the original motion information of the at least one corresponding block.
Wherein the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of neighboring blocks and/or derived motion information of corresponding blocks.
S1007, based on the weight derivation mode of the current block, determining the sorting mode of the known motion information related to the current block.
S1009, constructing a new motion information candidate list based on the sorting mode.
In one embodiment, the decoder may populate the initial motion information candidate list with all or part of the obtained original motion information of the at least one neighboring block, all or part of the original motion information of the at least one corresponding block, and the generated derived motion information of a certain number based on the sorting manner, thereby constructing a new motion information candidate list.
And S1011, determining the inter prediction value of the current block based on the new motion information candidate list.
In this embodiment, the decoder may obtain all motion information that can be filled into the initial motion information candidate list, and then sequentially fill all the obtained motion information based on the sorting manner until the number of the filled motion information is the preset number.
Another way to obtain a new motion information candidate list provided by the embodiments of the present application is described here:
in some embodiments, the decoder may obtain original motion information of at least one neighboring block and one-way motion information or two-way motion information of a corresponding block based on a code stream parsed by the decoder; filling one unidirectional original motion information or at least two mutually different unidirectional original motion information in the original motion information of at least one adjacent block into an initial motion information candidate list; and under the condition that the first total number of the unidirectional original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In some embodiments, when a first total number of the unidirectional original motion information filled into the initial motion information candidate list is smaller than a preset number minus one, sequentially splitting the bidirectional original motion information of at least one neighboring block to obtain two unidirectional original motion information corresponding to the bidirectional original motion information, and sequentially filling two unidirectional original motion information corresponding to the unidirectional motion information that is different from the one that has been filled into the initial motion information candidate list; and under the condition that the second total number of the original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In this embodiment, only the unidirectional motion information of the neighboring blocks is filled in.
In another embodiment, when a first total number of uni-directional original motion information filled into the initial motion information candidate list is smaller than a preset number minus one, bi-directional original motion information of at least one neighboring block is sequentially filled into the initial motion information candidate list; and under the condition that the second total number of the original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In this embodiment, bi-directional motion information for neighboring blocks is also filled in.
In some embodiments, in a case that a second total number of the unidirectional original motion information filled into the initial motion information candidate list is smaller than a preset number minus one, acquiring first two unidirectional original motion information filled into the initial motion information candidate list; determining four corresponding one-way derivative motion information based on the first two one-way original motion information; sequentially filling four derived motion information different from the filled one-way motion information into an initial motion information candidate list; and under the condition that the third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In some embodiments, when a third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is less than the preset number minus one, the unidirectional motion information or the bidirectional motion information of one corresponding block is continuously filled into the initial motion information candidate list; and copying and filling the filled unidirectional motion information or bidirectional motion information of the corresponding block until the total number of the filled motion information is a preset number.
In the method for obtaining a new motion information candidate list according to the embodiment of the present application, a decoder may write and fill a part of motion information with higher correlation, and after the motion information with higher correlation is filled, if the number of the filled motion information does not reach a preset number, the decoder may calculate motion information with lower correlation, and then continuously fill the calculated motion information with lower correlation into an initial motion information candidate list, so that the calculation amount of the decoder can be reduced.
It should be noted that, in the embodiment of the present application, no matter how the motion information is filled, when the total number of the filled motion information is a preset number, the filling process is completed, that is, the filling process is not performed, and the filling process is terminated, so that a new motion information candidate list is obtained.
Fig. 11 is a flowchart illustrating a further inter-frame prediction method according to an embodiment of the present application, where as shown in fig. 11, the method is applied to a decoder, and the method may include:
s1101, analyzing the code stream, and determining the prediction mode parameter of the current block.
The prediction mode parameter is used to indicate that an inter prediction value of the current block is determined using a geometric partition prediction mode GPM or an angle weighted prediction mode AWP.
S1103, determining the weight derivation mode of the current block from the prediction mode parameters of the current block.
Wherein, in a weight derivation mode of the current block, the current block is divided into a first partition and a second partition.
S1105, based on the weight derivation mode of the current block, determining the sorting mode of the known motion information related to the current block.
Wherein the known motion information related to the current block includes N pieces of motion information related to the current block, and the N pieces of motion information related to the current block include: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain.
Fig. 12 is a schematic diagram of a spatial position relationship between a current block, a neighboring block, and a corresponding block according to an embodiment of the present application, as shown in fig. 12, wherein:
the at least one neighboring block of the current block E may include at least one of an outer lower left block F, an inner upper right block G, an outer upper right block C, an inner upper outer left block B, an inner upper left outer upper block a, an outer upper left block D. The at least one corresponding block includes: at least one of a block H corresponding to an upper left corner of the inside of the current block E, a block I2 corresponding to a lower right corner of the inside of the current block, and a block I1 corresponding to a lower right corner of the outside of the current block.
Not shown in the figures of the embodiments of the present application, the embodiments of the present application may also provide another position relationship among the current block, the neighboring block, and the corresponding block: the at least one neighboring block includes: at least one of an inner left outer lower block, an inner upper outer right block, an outer upper right block, an outer left lower block, an outer upper left block. The at least one corresponding block includes: at least one of a block corresponding to an upper left corner of an interior of the current block, a block corresponding to a lower right corner of the interior of the current block, and a block corresponding to a lower right corner of an exterior of the current block.
It should be understood that the positional relationship among the current block, the adjacent block and the corresponding block may have other relationships, which is not limited in the present application.
In one embodiment, for example, the position of at least one neighboring block may refer to a to F shown in fig. 12. In another embodiment, the at least one neighboring block may include: at least one of an inner left outer lower block, an inner upper outer right block, an outer upper right block, an outer left lower block, an outer upper left block. In the embodiment of the present application, the decoder may perform grouping of multiple weight derivation modes in the geometric partition prediction mode or multiple weight derivation modes in the angular weighted prediction mode to obtain at least two types of weight derivation modes; different classes of weight derivation modes correspond to different sorting modes.
In some embodiments, the eighth class of weight derivation modes, the weight derivation modes for characterizing the current block are upper-left and lower-right weight derivation modes; a ninth type of weight derivation mode, which is used for representing that the weight derivation mode of the current block is an upper weight derivation mode and a lower weight derivation mode; a tenth weight derivation mode, which is used for representing that the weight derivation mode of the current block is a lower left weight derivation mode and an upper right weight derivation mode; and the eleventh class of weight derivation mode is used for representing that the weight derivation mode of the current block is a left and right weight derivation mode.
The manner of determining the ordering of the known motion information is described by taking fig. 12 as an example:
in some embodiments of the present application, in a case that the weight derivation mode of the current block belongs to the eighth class of weight derivation modes, the ranking of the known motion information is determined to be a ranking in which the motion information of the upper left neighboring block of the current block is ranked earlier.
In an implementation process, in a case that the weight derivation mode of the current block belongs to the eighth class of weight derivation modes, the known motion information is determined to be sorted in a manner that the motion information of the upper left neighboring block of the current block and the motion information of the corresponding block of the current block in the time domain are sorted in an order of the previous order.
It can be understood that the upper-left neighboring block of the current block includes one or at least two of an outer upper-left, inner upper outer left neighboring block, and inner left outer upper neighboring block. Other descriptions of the current block are similar.
In an implementation process, the sorting manner may be that the motion information of the upper left block of the current block, the motion information of the block corresponding to the current block in the time domain, the motion information of the lower left block of the current block, and the motion information of the upper right adjacent block of the current block are sorted in sequence.
In other embodiments of the present application, in a case that the weight derivation mode of the current block belongs to the ninth class weight derivation mode, the decoder may determine that the known motion information is sorted in a manner that the motion information of the upper block of the current block is sorted in the top.
In one implementation, in the case that the weight derivation mode of the current block belongs to the ninth class of weight derivation modes, the decoder may determine that the known motion information is sorted in a manner that the motion information of the upper block of the current block and the motion information of the inner, left-outer, lower block of the current block are sequentially sorted in an earlier manner.
In an implementation, the upper block of the current block may include an outer upper block and an inner upper block of the current block, or the upper block of the current block may include an inner upper block of the current block and not include an outer upper block of the current block. Other descriptions of the current block are similar.
In one implementation, the sorting manner may be that the motion information of the upper block of the current block, the motion information of the inner left outer lower block of the current block, the motion information of the corresponding block of the current block in the time domain, the motion information of the outer left upper block of the current block, the motion information of the outer right upper block of the current block, and the motion information of the inner left outer of the current block are sorted in sequence.
In still other embodiments of the present application, in a case where the weight derivation mode of the current block belongs to the tenth type of weight derivation mode, the decoder may determine that the known motion information is sorted in a manner in which the motion information of the lower left block of the current block is sorted in the top order.
In one embodiment, in the case that the weight derivation mode of the current block belongs to the tenth weight derivation mode, the decoder may determine the known motion information to be sorted in a manner that the motion information of the lower left block of the current block and the motion information of the inner right outer portion of the current block are sequentially sorted in the front.
In one implementation, the sorting manner may be that the motion information of the lower block inside and outside the current block, the motion information of the upper right and outside inside the current block, the motion information of the upper right and outside the current block, the motion information of the upper left and outside inside the current block, the motion information of the upper left and outside the current block, and the motion information of the corresponding block in the time domain of the current block are sequentially sorted.
In still other embodiments of the present application, in a case where the weight derivation mode of the current block belongs to the eleventh class of weight derivation mode, the decoder may determine that the known motion information is sorted in a manner that the motion information of the left block of the current block is sorted in the top.
In one embodiment, in the case that the weight derivation mode of the current block belongs to the eleventh type of weight derivation mode, the decoder may determine that the known motion information is sorted in a manner in which the motion information of the left block of the current block and the motion information of the outer upper-right block of the current block are sorted in the top order.
For example, the left block of the current block may include an inner left block of the current block and/or an outer left block of the current block.
In one implementation, the sorting manner may be that the motion information of the inside left outside lower block of the current block, the motion information of the inside left outside upper block of the current block, the motion information of the outside right upper block of the current block, the motion information of the corresponding block of the current block in the time domain, the motion information of the outside left upper block of the current block, the motion information of the inside upper outside left block of the current block, and the motion information of the inside upper outside right block of the current block are sequentially sorted.
S1107, a new motion information candidate list is constructed based on the sorting mode.
S1109, determining motion information of the first partition and motion information of the second partition from the new motion information candidate list.
In one embodiment, the decoder may first determine an index value of the first partition and an index value of the second partition from the parsed code stream; then, based on the new motion information candidate list, determining the motion information in the new motion information candidate list indicated by the index value of the first partition as the motion information of the first partition; and finally, based on the new motion information candidate list, determining the motion information in the new motion information candidate list indicated by the index value of the second partition as the motion information of the second partition.
And S1111, determining a first prediction value of the first partition based on the motion information of the first partition, and determining a second prediction value of the second partition based on the motion information of the second partition.
In some embodiments, in the case that the motion information of the first partition is bidirectional motion information, processing the motion information of the first partition according to a bidirectional prediction method, thereby determining a first prediction value of the first partition; and/or, when the motion information of the second partition is bidirectional motion information, processing the motion information of the second partition according to a bidirectional prediction method so as to determine a second predicted value of the second partition.
Among them, the bidirectional prediction method is a method that does not use Bi-directional Optical Flow (BIO) or a method that uses Decoder-side Motion Vector reference (DMVR). In other embodiments, the bi-directional prediction method may also be a method using bi-directional optical flow BIO or a method for optimizing DMVR by decoding end motion vector, which is not limited in this application.
Based on the size of the computational load of the decoder,
s1113, carrying out weighted fusion on the first predicted value and the second predicted value to obtain the interframe predicted value of the current block.
In the embodiment of the application, the decoder can construct different candidate lists of motion information according to different weight derivation modes of the current block, so that the sorting mode of the motion information in the candidate lists of the motion information can be matched with the weight derivation modes, and the new candidate lists of the motion information can sort the motion information according to the sequence from strong to weak of the correlation with the current block, thereby improving the decoding efficiency of the current block.
In some embodiments, the decoder may derive the mode based on a weight of the current block, determine at least one of a size of the current block, a shape of the current block, and an aspect ratio of the current block, and determine an ordering of known motion information associated with the current block based on the at least one.
For example, the decoder derives the mode based on the weight of the current block, determines the aspect ratio of the current block, and determines the ordering of the known motion information associated with the current block based on the aspect ratio of the current block.
And under the condition that the aspect ratio of the current block is different, the determined known motion information is different in sorting mode. For example, taking 11 in fig. 4c and 11 in fig. 4d as examples, the black part in 11 in fig. 4c covers the upper right corner of the current block, but the black part in 11 in fig. 4d covers not only the upper right corner of the current block but also the upper left corner of the current block, and therefore, the decoder may set the sorting manner of the known motion information determined based on 11 in fig. 4c to a different manner from the sorting manner of the known motion information determined based on 11 in fig. 4 c. Therefore, the decoding efficiency can be improved, and the compression performance can be improved.
In other embodiments, the decoder may determine not only a certain grouping of the plurality of weight derivation modes belonging to the geometrically partitioned prediction mode or a certain grouping of the plurality of weight derivation modes belonging to the angularly weighted prediction mode based on the weight derivation mode of the current block, but also at least one of a size of the current block, a shape of the current block, and an aspect ratio of the current block based on the weight derivation mode of the current block; the ordering of the known motion information is determined based on a certain grouping and the at least one.
In implementation, the decoder may determine a packet belonging to one of four packets in GPM or a packet belonging to one of four packets in AWP based on the weight derivation mode of the current block, determine an aspect ratio of the current block, and then determine an ordering manner of the known motion information based on the aspect ratio of the packet to which the weight derivation mode belongs and the current block.
For example, in some embodiments, the decoder determines that, in the case that the weight derivation mode for the current block belongs to the eighth class of weight derivation modes, and the aspect ratio of the current block is 1: 2, determining the sequencing mode of the known motion information as a first sequencing mode; the decoder determines that if the weight derivation mode for the current block belongs to the eighth class of weight derivation modes, and the aspect ratio for the current block is 2: 1, determining the sequencing mode of the known motion information as a second sequencing mode; the decoder determines that if the weight derivation mode for the current block belongs to the eighth class of weight derivation modes, and the aspect ratio of the current block is 1: 1, determining the sequencing mode of the known motion information as a third sequencing mode; any two sorting modes in the first sorting mode, the second sorting mode and the third sorting mode are different. The third sorting mode is that the motion information of the upper left block of the current block, the motion information of the corresponding block of the current block in the time domain, the motion information of the lower left block of the current block and the motion information of the upper right adjacent block of the current block are sequentially sorted. In other embodiments, there may be two identical orderings in the first, second, and third orderings. In some embodiments, the first sorting method, the second sorting method, and the third sorting method may be the same.
In a possible embodiment, in the case that the weight derivation modes of the current block belong to the same class of weight derivation modes but have different aspect ratios, whether the ordering is the same or not may be determined according to the shape of the black parts, and when both black parts are triangles, the ordering may be the same, and when one black part is a triangle and the other black part is a trapezoid, the ordering is different.
In the embodiment of the present application, a construction method for determining a motion information candidate list of an AWP or a GPM according to a mode of the AWP or the GPM and a shape of a current block may also be provided, and it may also be considered that different current block shapes in the same AWP or GPM use different motion information candidate list construction methods. For example, as shown in the weight map of 56 patterns of AWP on a 64x64 block, the weight map of 56 patterns of AWP on a 64x32 block, and the weight map of 56 patterns of AWP on a 32x64 block, the black part of the pattern 11 on the 64x64, 64x32 block is covered only to the upper right corner, the upper left corner is a white area, and the black part on the 32x64 block is covered to the upper left corner and the upper right corner, so that the positions of the two parts of the pattern 11 in the 64x64, 64x32, and 32x64 blocks in close proximity are different, and the compression performance is also improved using different motion information candidate list construction methods. One possible approach here is that the shape of the current block can be represented by an aspect ratio, i.e. an aspect ratio of 1: 1, aspect ratio of 2: 1, aspect ratio of 4: 1, with an aspect ratio of 1: 2, aspect ratio of 1: 4, etc.
For a decoder, after determining the mode of the AWP or GPM and the shape of the current block, determining a construction method of a motion information candidate list according to the mode of the AWP or GPM and the shape of the current block. Only a certain motion information candidate list construction method is used for the current block, and thus, the complexity of calculation is not increased.
With reference to fig. 12, the embodiment of the present application will be described with reference to fig. 12 as an example:
different motion information candidate list construction methods may differ in multiple dimensions. As will be described below.
As shown in the above figure, F, G, C, A, B and D are neighboring prediction blocks of the current prediction unit E in the same frame, and the motion information derived from F, G, C, A, B and D is spatial motion information, H and I are blocks in a reference frame having a relationship with the current prediction unit E as shown in the figure, and the motion information derived from H and I is temporal motion information. The current method examines spatial motion information in the order of F- > G- > C- > A- > B- > D, first adds F, G, C, A, B and the non-identical unidirectional motion information in D into a list, then adds F, G, C, A, B and each unidirectional motion information of the bidirectional motion information in D into a list which is not identical to the list, and finally adds the temporal motion information of the H position. Spatial motion information adds at most one list length minus one, i.e., at least one position is reserved for temporal motion information.
The correlation method is added in the order of spatial motion information followed by temporal motion information. This makes sense in the prediction method that considers the current block as a whole, because spatial motion information is from neighboring blocks of the same frame, while temporal motion information is from a different frame, so to speak, spatial motion information is more strongly correlated. However, it is not fully applicable in AWP and GPM, and in some modes of AWP or GPM, a part (e.g. the lower right corner of E) may not be connected to the above-mentioned spatially neighboring position, but rather, it may be connected to the position of I, so that spatial motion information may have stronger correlation than temporal motion information for this part.
Therefore, the first dimension: some methods of the present invention break the order of spatial domain motion information followed by temporal domain motion information. Some methods may use an order of temporal motion information followed by spatial motion information, or an interspersed order of spatial temporal motion information.
In the related art AWP method, the order of use of spatial motion information can be summarized as left (lower left) - > up (inner right outer up- > outer right up) - > upper left (outer left inner up- > inner left outer up- > outer left upper left). In the conventional merge method, the usage order of spatial motion information can be summarized as outer left inner lower- > inner right outer upper- > outer left lower- > outer left upper. If the spatial motion information is set at the relevant position in the lower right corner, the spatial motion information is considered to be lower right. The lower graph may roughly represent the order of 1- >2- >3- >4 of the existing method, i.e. broadly left-lower- > right-upper- > left-upper- > right-lower.
The second dimension: some methods of the present invention will break the order of the relevant locations. That is, some methods will use a broad sequence of lower left- > upper right- > upper left- > lower right, and some methods will use a sequence different from lower left- > upper right- > upper left- > lower right.
The setting of this correlation sequence is dependent on the mode of the AWP or GPM. Modes that are divided up left, right, and down (e.g., 33, 41, 49, etc. in the AWP mode of the above figures) use an order of top left- > bottom right- > otherwise (or a sequence of bottom right- > top left- > otherwise); modes that are divided as left bottom right top (5, 13, 21, etc. in the AWP mode of the above figures) use the left bottom- > right top- > other order (or the right top- > left bottom- > other order); the pattern divided up and down (e.g., 3, 11, 19, etc. in the AWP pattern of the above figure) uses the order of up- > down (or down- > up), up as upper left and upper right, and down as lower left and lower right; a pattern divided left and right (e.g., 7, 15, 23, etc. in the AWP pattern of the above figures) uses an order of left- > right (or right- > left), left as top left, bottom left, right as top right, bottom right.
In more detail, one possible method is to process the positions indicated in the above sequence (e.g. wide upper left) completely and then process the next position, e.g. lower left- > upper right- > other sequences, where a, B, D are processed before the lower right.
Another possible method is to process the next position after processing the part at the position indicated in the above sequence (e.g. upper left broadly), and then process the unprocessed part at the position indicated in the next round of processing, e.g. lower left- > upper right- > other sequences, where after a is processed, the other positions such as lower right are processed, and then B and D are processed in the second round. One possible approach is to try to ensure that certain positions in the list are assigned to certain respective assigned relevant positions. In other sequences, the first position (index 0) in the list is the motion information related to the lower left, i.e., the motion information related to the F position in the AWP, the second position (index1) in the list is the motion information related to the upper right, i.e., the motion information related to the G, C in the AWP, as far as possible. If the motion information of G can fill the second position (index1) in the list, then C is skipped to process the "other" positions in the sequence. If the motion information of G cannot fill the second position in the list (index1), then an attempt is made to fill the motion information of C in the second position in the list (index 1). The object is to make the index values of the 2 pieces of motion information small and the index value of the motion information coded later larger than the index value of the motion information coded earlier as much as possible.
The third dimension: some methods of the present invention break the one-way first and two-way second order of processing. In the existing method, the unidirectional motion information is preferentially processed no matter the position, or the motion information with only one prediction direction effective is processed. The present invention may prioritize location or combine location and uni-directional.
The fourth dimension: some methods of the present invention construct a bi-directional motion information candidate list. All the AWP and GPM construct unidirectional motion information candidate lists, that is, each motion information in the list is unidirectional motion information or only one prediction direction or only one index of a reference frame list is valid, and the index of the other reference frame list is invalid. In some methods of the present invention, some motion information of the list is bi-directional motion information or has 2 prediction directions or indexes of 2 reference frame lists.
If bi-directional motion information is selected for a portion of the AWP or GPM, then motion compensation for that portion is handled as bi-predictive. Since Bi-directional Optical Flow (Bi-directional Optical Flow) and decoding-side Motion Vector optimization (DMVR) technologies exist in the Bi-directional prediction method, when Motion compensation of a certain part by an AWP or a GPM is processed by the Bi-directional prediction method, a possible method is to turn on the Bi-directional Optical Flow (Bi-directional Optical Flow) and DMVR technologies by default. One possible approach is to turn off BIO, DMVR, etc. techniques by default. One possible approach is to turn on certain technology(s) by default while turning off certain technology(s) by default.
If the motion information candidate list allows bi-directional motion information, different processing methods are possible for the processing of the temporal motion information. Since the temporal motion information, denoted MIT, is derived from the motion information of a block other than the current frame, denoted MIA, which includes at most two prediction directions, each valid prediction direction L0 or L1 points to a reference frame and has a corresponding motion vector. This motion information needs to be scaled to the current block, the scaled MIT has at most two prediction directions, each valid prediction direction points to a reference frame, and the corresponding motion vector needs to be scaled from the motion vector between that non-current frame and the reference frame of the prediction direction used to the current block and the reference frame of the current prediction direction specified. The predicted frames before and after scaling are different and the reference frames are (possibly) different. In the time domain motion information derivation, the motion vector of L0 at MIT may be derived from the motion vector of L0 at MIA, the motion vector of L1 at MIT may be derived from the motion vector of L1 at MIA, the motion vector of L0 at MIT may be derived from the motion vector of L0 at MIA, the motion vector of L1 at MIT may be derived from the motion vector of L0 at MIA, the motion vector of L0 at MIT may be derived from the motion vector of L1 at MIA, and the motion vector of L1 at MIT may be derived from the motion vector of L1 at MIA.
When processing the temporal motion information MIT, one possible method is to process it as a bi-directional motion information. One possible method is to process its motion information of L0 and motion information of L1 as two pieces of unidirectional motion information, respectively. In the method in which unidirectional motion information precedes bidirectional motion information, spatial motion information may be processed as two unidirectional motion information prior to bidirectional motion information.
In the fifth dimension, the present invention may use motion information that is directly available or available through conversion plus motion information derived from such motion information as candidates. The derived motion information may be lower in priority than the motion information available directly or through translation. One possible approach is to process the derived motion information after all the motion information available directly or through conversion has been processed. One possible approach is to process the derived motion information for an approximate location (e.g., top left) after all the motion information available directly or through translation for that approximate location has been processed. If a certain position in the list needs to use certain approximate position such as the motion information at the upper left as much as possible, but the motion information of A, B and D is overlapped with the motion information existing in the list, the derived motion information of A, B and D is tried. And then processes the motion information for other approximate locations.
The motion information directly available includes spatial motion information, and the motion information available through conversion includes temporal motion information.
In some embodiments, the derived motion information includes scaled motion information of the motion information directly available or available by conversion, and if the motion information MIO directly available or available by scaling is unidirectional motion information, the prediction direction and reference frame information of the derived motion information MID are the same as the MIO, and the motion vector of the effective LX (X is 0 or 1) of the motion information MIO directly available or available by scaling is (X _ LX, Y _ LX), the motion vector of LX (X is 0 or 1) of the MID is (X _ LX SCALE, Y _ LX SCALE), and the SCALE is 0.5, 0.75, 0.8, 0.9, 1.1, 1.2, 1.25, 1.5, and so on. The motion vector of LX (X is 0 or 1) of the MID may also be (X _ LX × SCALE, Y _ LX) or (X _ LX, Y _ LX × SCALE).
In practice, for the unidirectional motion information MIO, one possible method is to generate 4 derivative information, which are scaled up and down in x and y directions, respectively. The motion information of the LX is (X _ LX × SCALE _ L, Y _ LX), X _ LX, Y _ LX × SCALE _ L), (X _ LX × SCALE _ S, Y _ LX), X _ LX, and Y _ LX SCALE _ S), respectively. Where SCALE _ L is greater than 1 and SCALE _ S is less than 1, one possible method is SCALE _ L plus SCALE _ S equal to 2.
Scaling may not work if the value of X LX or Y LX is 0, or the absolute value is too small, in which case X LX SCALE or Y LX SCALE can be directly substituted with a fixed value. If the value of X _ LX or Y _ LX is equal to 0, replacing X _ LX SCALE or Y _ LX SCALE with 8, or-8. Or if the absolute value of X _ LX or Y _ LX is less than 8, replacing X _ LX SCALE or Y _ LX SCALE with 8, or-8, and if the absolute value of X _ LX or Y _ LX is not equal to 0, replacing with 8 or-8 can be the same as the original sign.
One possible approach is that the scaled SCALE SCALE is related to a range of values for X _ LX or Y _ LX, and is 0.75 (i.e., 3/4) if the value of X _ LX or Y _ LX is equal to or less than 64, 0.875 (i.e., 7/8) if the value of X _ LX or Y _ LX is greater than 64 and equal to or less than 128, and 0.9375 (i.e., 15/16) if the value of X _ LX or Y _ LX is greater than 128.
If the motion information MIO, which is directly available or available by scaling as described above, is bidirectional motion information, the motion vector of L0 and the motion vector of L1 are respectively scaled. Let the motion vector of L0 use SCALE0, the motion vector of L1 use SCALE1, one possible way is that SCALE0 equals SCALE1, one possible way is that SCALE0 does not equal SCALE1 and SCALE0 plus SCALE1 equals 2.
The scaling calculation can be written as X _ LX or Y _ LX multiplied by a fraction (floating point number); it can also be written as X _ LX or Y _ LX multiplied by an integer plus a fixed value and then right shifted; or the absolute value of X _ LX or Y _ LX is multiplied by an integer plus a fixed value, and the resulting value is right-shifted and finally added with the sign. Let the number of right-shifted bits be shift and the fixed value be value. One possible method is value 1< (shift-1), one possible other value with value 1< (shift-1).
In other embodiments, the derived motion information includes the motion information obtained directly or by converting the OFFSET of the motion information obtained directly or by scaling, and if the motion vector of LX (X is 0 or 1) of the motion information MIO obtained directly or by scaling is (X _ LX, Y _ LX), the prediction direction and the reference frame information of the derived motion information MID are the same as MIO, and the motion vector of LX (X is 0 or 1) of MID is (X _ LX + OFFSET, Y _ LX + OFFSET), and the motion vector of LX (X is 0 or 1) of MID may also be (X _ LX + OFFSET, Y _ LX), or (X _ LX, Y _ LX + OFFSET). OFFSET is 2, 4, 8, 16, etc. Or the OFFSET is CLIP (MAX, MIN, X _ LX/N) or CLIP (MAX, MIN, Y _ LX/N), and N may be 2, 4, 8, 16, etc. If X _ LX/N or Y _ LX/N is greater than MAX, the result of CLIP is MAX. If X _ LX/N or Y _ LX/N is less than MIN, the result of CLIP is MIN, otherwise the result of CLIP equals the value of X _ LX/N or Y _ LX/N.
In still other embodiments, the derived motion information includes two or more of the above motion information that are directly available or calculated by translating the scaled motion information of the available motion information. One method of selecting two or more of the above-described motion information available directly or through translation is to select the motion information for the same broad location, such as the motion information for a, B, D on the upper left of the graph X above. Motion information of C, G, right top. One possible calculation method is to scale the selected two or more motion information to the same reference frame and then perform an averaging or weighted averaging.
In some embodiments, the number of times the derived motion information is generated may be limited in building the motion information candidate list, thereby ensuring worst-case complexity.
One possible approach is to add the derived motion information to the motion information candidate list without performing a duplication check operation, i.e. without comparing the derived motion information with each motion information in the motion information candidate list. One possible approach is to add the motion information candidate list only if the derived motion information is different from the motion information used to generate it. Thereby guaranteeing worst-case complexity.
In this way, the step of repeatability checking performed by the decoder can be at least partially avoided, thereby reducing the computational complexity of the decoder.
With continuing reference to fig. 12, the present embodiment provides two embodiments of decoding end.
Decoding side embodiment 1:
for the current block, the decoder parses information whether the AWP is used, and if it is determined that the AWP is used, the decoder parses a mode of the AWP and indexes of two motion information. The decoder constructs a motion information candidate list used by the current block AWP. Specifically, the following are:
the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefIdxAwp1L1 are as follows:
first step, F, G, C, A, B and D are the neighboring prediction blocks of the current prediction unit E (see FIG. 12), determine F, G, C, A and the "availability" of D:
a) f is "available" if F exists and inter prediction mode is employed; otherwise, F is "unavailable".
b) G is "available" if it exists and inter prediction mode is employed; otherwise, G is "unavailable".
c) C is "available" if C exists and inter prediction mode is employed; otherwise, C is "unavailable".
d) If A is present and inter prediction mode is employed, then A is "available"; otherwise, a is "unavailable".
e) B is "available" if B is present and inter prediction mode is employed; otherwise, B is "unavailable".
f) D is "available" if D is present and inter prediction mode is employed; otherwise, D is "unavailable".
The temporal bi-directional motion information derived by the method of providing derived motion information in the related art is denoted as T.
Second, no more than 8 derived motion information are generated according to one of the methods of generating derived motion information described in the above embodiments.
Thirdly, determining the scanning sequence of the relevant positions:
a) if the result of the mode modulo (mod)8 of AWP is 0 or 1 or 7, the scan order is A- > B- > D- > T- > F- > G- > C.
b) If the result of the pattern modulo 8 for AWP is 2, the scan order is B- > G- > F- > T- > D- > C- > A.
c) If the result of the pattern modulo 8 of AWP is 3 or 4 or 5, the scan order is F- > G- > C- > A- > B- > D- > T.
d) If the result of the AWP mode modulo 8 is 6, the scan order is F- > A- > C- > T- > D- > B- > G.
And fourthly, sequencing the motion information, namely firstly unidirectionally available original motion information according to the scanning sequence of the relevant positions, then bidirectionally available original motion information according to the scanning sequence of the relevant positions, then unidirectionally available derivative motion information according to the scanning sequence of the relevant positions, and then bidirectionally available derivative motion information according to the scanning sequence of the relevant positions. Here, the temporal motion information and its derivative motion information are split into unidirectional motion information pointing to the reference frame List0 and unidirectional motion information pointing to the reference frame List1, which are processed as unidirectional motion information.
And fifthly, adding the sorted motion information into the Awparray. And (5) firstly, carrying out motion information duplication checking operation, and if the motion information duplication checking operation is not repeated, putting the motion information into the Awparray until the length is 5 or the traversal is finished.
And sixthly, if the length of the Awparray is less than 5, repeating the filling operation on the last motion information in the Awparray until the length of the Awparray is 5.
Seventhly, assigning the AwpCandIdx0+1 motion information in the Awparray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0 and RefIdxAwp0L 1; the AwpCandIdx1+1 motion information in the AwpUniArray is assigned to mvAwp1L0, mvAwp1L1, RefIdxAWp1L0 and RefIdxAWp1L 1.
And finding out the two pieces of motion information in the constructed motion information candidate list according to the indexes of the two pieces of motion information. If the motion information is bi-directional, obtaining an inter-prediction block using a bi-directional prediction method, wherein the BIO and DMVR are not used; if the motion information is unidirectional, an inter prediction block is obtained using a unidirectional prediction method. And determining the weight of each pixel position of the two intermediate prediction blocks according to a specific mode used by the AWP, and weighting the two intermediate prediction blocks to obtain the prediction block of the current block.
If the current mode is the skip mode, the prediction block is a decoded block and the decoding of the current block is finished. And if the current mode is not the skip mode, entropy decoding and analyzing the quantized coefficients, then carrying out inverse quantization, carrying out inverse transformation to obtain a residual block, and adding the residual block and the prediction block to obtain a decoded block. The decoding of the current block ends.
It should be noted that the length of the awwparray (the length of the new motion information candidate list) in the embodiment of the present application may be a preset number, for example, the length is 1, which means that the preset number is 1, the length is 2, which means that the preset number is 2, and so on.
Decoding side embodiment 2:
for the current block, the decoder parses information whether the AWP is used, and if it is determined that the AWP is used, the decoder parses a mode of the AWP and indexes of two motion information.
The decoder constructs a motion information candidate list used by the current block AWP. Specifically, the following are:
the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefIdxAwp1L1 are as follows:
first step, F, G, C, A, B and D are the neighboring prediction blocks of the current prediction unit E (see FIG. 12), determine F, G, C, A and the "availability" of D:
a) f is "available" if F exists and inter prediction mode is employed; otherwise, F is "unavailable".
b) G is "available" if it exists and inter prediction mode is employed; otherwise, G is "unavailable".
c) C is "available" if C exists and inter prediction mode is employed; otherwise, C is "unavailable".
d) If A is present and inter prediction mode is employed, then A is "available"; otherwise, a is "unavailable".
e) B is "available" if B is present and inter prediction mode is employed; otherwise, B is "unavailable".
f) D is "available" if D is present and inter prediction mode is employed; otherwise, D is "unavailable".
Second, the unidirectionally available motion information is put into the unidirectional motion information candidate list, awwpunarray, in the order of F, G, C, A and D until the length of awwpunarray is 4 or the traversal ends.
Thirdly, if the length of the AfwUniarray is less than 3, the bidirectionally available motion information is split into unidirectional motion information pointing to the reference frame List0 and unidirectional motion information pointing to the reference frame List1 according to the sequence of F, G, C, A, B and D, the unidirectional motion information is checked and repeated, and the AfwUniarray is put into the memory if the unidirectional motion information is not repeated until the length is 4 or the traversal is finished.
Fourthly, splitting the time-domain bidirectional motion information derived by the method for providing the derived motion information in the related art into unidirectional motion information pointing to the reference frame List0 and unidirectional motion information pointing to the reference frame List1, firstly performing unidirectional motion information duplication checking operation, and if not repeated, putting the motion information into the AwpUniarray until the length is 5 or the traversal is finished.
And fifthly, if the length of the AwpUniArray is less than 5, generating derived motion information by sequentially using the 0 th unidirectional motion information and the 1 st unidirectional motion information in the AwpUniArray. For the one-way motion information MIO in each of the awwpunarray, the effective prediction direction is denoted as LX (X is 0 or 1), and the motion vector corresponding to LX is denoted as (X _ LX, Y _ LX). The 4 derived motion information were generated and recorded as MID0, MID1, MID2, MID3, respectively. Their reference frame information is the same as for MIOs.
The LX of the MID0 corresponds to a motion vector of (X _ LX _0, Y _ LX _0), where:
X_LX_0=(abs(X_LX)>128)?((abs(X_LX)*17+8)>>4):((abs(X_LX)>64)?((abs(X_LX)*9+4)>>3):((abs(X_LX)>=8)?(abs(X_LX)*5+2)>>2)):8))。
the expression is explained as follows:
(1) judging whether abs (X _ LX) is greater than 128, if yes, determining (abs (X _ LX) × 17+8) > >4), namely, right shifting abs (X _ LX) × 17+8) by 4 bits, and if not, executing (2);
(2) judging whether (abs (X _ LX) is greater than 64), if so, determining ((abs (X _ LX) × 9+4) > >3), and if not, executing (3);
(3) (whether abs (X _ LX) > is 8, if yes, (abs (X _ LX) × 5+2) > >2)), otherwise, assign 8 to X _ LX _ 0.
X_LX_0=(X_LX<0)?-X_LX_0:X_LX_0。
The expression is explained as follows:
and judging whether the X _ LX is smaller than 0, if so, assigning-X _ LX _0 to X _ LX _0, and if so, assigning X _ LX _0 to X _ LX _ 0.
Y_LX_0=Y_LX。
The LX of the MID1 corresponds to a motion vector of (X _ LX _1, Y _ LX _1), where:
X_LX_1=X_LX。
Y_LX_1=(abs(Y_LX)>128)?((abs(Y_LX)*17+8)>>4):((abs(Y_LX)>64)?((abs(Y_LX)*9+4)>>3):((abs(Y_LX)>=8)?(abs(X_LX)*5+2)>>2)):8))。
Y_LX_1=(Y_LX<0)?-Y_LX_1:Y_LX_1。
the LX of the MID2 corresponds to a motion vector of (X _ LX _2, Y _ LX _2), where:
X_LX_2=(abs(X_LX)>128)?((abs(X_LX)*15+8)>>4):((abs(X_LX)>64)?((abs(X_LX)*7+4)>>3):((abs(X_LX)>=8)?(abs(X_LX)*3+2)>>2)):8))。
X_LX_2=(X_LX<=0)?-X_LX_2:X_LX_2。
Y_LX_2=Y_LX。
the LX of the MID3 corresponds to a motion vector of (X _ LX _3, Y _ LX _3), where:
X_LX_3=X_LX。
Y_LX_3=(abs(Y_LX)>128)?((abs(Y_LX)*15+8)>>4):((abs(Y_LX)>64)?((abs(Y_LX)*7+4)>>3):((abs(Y_LX)>=8)?(abs(X_LX)*3+2)>>2)):8))。
Y_LX_3=(Y_LX<=0)?-Y_LX_3:Y_LX_3。
if the derived motion information (MID0 or MID1 or MID2 or MID3) is not the same as MIO, it is added to the AwpUniArray until the length of the AwpUniArray is 5 or the treatment is finished.
And sixthly, if the length of the AwpUniArray is less than 5, repeating the filling operation on the last one-way motion information in the AwpUniArray until the length of the AwpUniArray is 5.
Seventhly, assigning the AwpCandIdx0+1 motion information in the AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0 and RefIdxAwp0L 1; the AwpCandIdx1+1 motion information in the AwpUniArray is assigned to mvAwp1L0, mvAwp1L1, RefIdxAWp1L0 and RefIdxAWp1L 1.
And finding out the two pieces of motion information in the constructed motion information candidate list according to the indexes of the two pieces of motion information. If the motion information is bi-directional, obtaining an inter-prediction block using a bi-directional prediction method, wherein the BIO and DMVR are not used; if the motion information is unidirectional, an inter prediction block is obtained using a unidirectional prediction method. And determining the weight of each pixel position of the two intermediate prediction blocks according to a specific mode used by the AWP, and weighting the two intermediate prediction blocks to obtain the prediction block of the current block.
If the current mode is the skip mode, the prediction block is a decoded block and the decoding of the current block is finished. And if the current mode is not the skip mode, entropy decoding and analyzing the quantized coefficients, then carrying out inverse quantization, carrying out inverse transformation to obtain a residual block, and adding the residual block and the prediction block to obtain a decoded block. The decoding of the current block ends.
Fig. 13 is a flowchart illustrating an inter-frame prediction method according to another embodiment of the present application, as shown in fig. 13, the method is applied to an encoder, and the method may include:
S1301, determining a weight derivation mode of the current block.
S1303, a new motion information candidate list is constructed based on the weight derivation mode of the current block.
And S1305, determining the inter prediction value of the current block based on the new motion information candidate list.
In the embodiment of the application, because the new motion information candidate list constructed by the encoder is derived according to the weight of the current block, the encoder can construct different new motion information candidate lists according to different weight derived modes, so that the construction of the motion information candidate list conforms to the weight derived mode of the current block, the new motion information candidate list can arrange the motion information according to the sequence from strong to weak of the correlation with the current block, and the encoder can easily find the motion information with strong correlation with the current block, thereby improving the encoding efficiency of the current block.
In some embodiments, the weight derivation mode of the current block is one of a plurality of weight derivation modes in a geometrically partitioned prediction mode, or the weight derivation mode of the current block is one of a plurality of weight derivation modes in an angularly weighted prediction mode.
In some embodiments, the class of the weight derivation mode of the current block is different, and the new motion information candidate list is constructed differently.
In some embodiments, constructing a new motion information candidate list based on the weight derivation mode for the current block comprises:
determining the sorting mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing a new motion information candidate list based on the sorting mode.
In some embodiments, the known motion information associated with the current block includes N motion information associated with the current block; n is an integer greater than or equal to 1;
the N pieces of motion information related to the current block include: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain.
In some embodiments, each of the N motion information includes original motion information including motion vector information and reference frame information.
In some embodiments, the original motion information is one-way original motion information, or two-way original motion information, or one or two pieces of one-way original motion information obtained by splitting the two-way original motion information.
In some embodiments, determining the known motion information associated with the current block based on the weight derivation mode for the current block comprises one of:
In case that the weight derivation mode of the current block is the first type of weight derivation mode, arranging motion information of at least one corresponding block before motion information of at least one neighboring block;
under the condition that the weight derivation mode of the current block is the second type weight derivation mode, inserting the motion information of at least one corresponding block into the motion information of at least one adjacent block;
in case that the weight derivation mode of the current block is the third type of weight derivation mode, the motion information of the at least one corresponding block is arranged after the motion information of the at least one neighboring block.
In some embodiments, in the case that N is greater than or equal to 2, and in the case that N is greater than or equal to 2, the determining, based on the weight derivation mode of the current block, an ordering manner of the known motion information related to the current block includes one of:
the sorting mode of the known motion information related to the current block is determined from a sorting mode set, and the sorting mode set comprises: performing full arrangement on the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block, and the motion information of the lower right related block of the current block to obtain a plurality of sorting modes;
Wherein, when the weight derivation modes of the current block are different, the sorting modes determined from the sorting mode set are different;
wherein any one of the motion information of the lower-left related block of the current block, the motion information of the upper-right related block of the current block, the motion information of the upper-left related block of the current block, and the motion information of the lower-right related block of the current block is: motion information of the current block in a spatial domain or motion information of the current block in a temporal domain.
In some embodiments, the motion information of the lower-left neighboring block of the current block includes: motion information of all blocks or partial blocks at the lower left of the current block;
the motion information of the upper right neighboring block of the current block includes: motion information of all blocks or partial blocks at the upper right of the current block;
the motion information of the upper left neighboring block of the current block includes: motion information of all blocks or partial blocks at the upper left of the current block;
the motion information of the lower right block of the current block in the temporal domain includes: motion information of blocks in a temporal domain outside the current block, or motion information of blocks in a temporal domain inside the current block.
In some embodiments, in the case that N is greater than or equal to 2, determining an ordering of the known motion information associated with the current block based on the weight derivation mode of the current block includes one of:
Under the condition that the weight derivation mode of the current block is a fourth type weight derivation mode, arranging all or part of one-way original motion information in the N pieces of motion information before splitting two-way motion information in the N pieces of motion information to obtain all or part of one or two pieces of one-way original motion information;
arranging all or part of the unidirectional original motion information in the N pieces of motion information before all or part of the bidirectional motion information in the N pieces of motion information under the condition that the weight derivation mode of the current block is a fifth type weight derivation mode;
determining the sorting priority of the N pieces of motion information under the condition that the weight derivation mode of the current block is a sixth type weight derivation mode, and sorting the N pieces of motion information based on the sorting priority;
and in the case that the weight derivation mode of the current block is the seventh-class weight derivation mode, determining one-way and two-way information of each of the N pieces of motion information and the sorting priority of the N pieces of motion information, and sorting the N pieces of motion information based on the one-way and two-way information and the sorting priority of each piece of motion information.
In some embodiments, the method further comprises:
determining the image frames except the current frame and the frame where the corresponding block is located as a first specific frame;
Determining motion information of a first target block corresponding to a current block on a first specific frame;
zooming the motion information of the first target block to obtain the motion information of the corresponding block;
wherein, scaling the motion information of the first target block to obtain the motion information of the corresponding block, including one of:
scaling the bidirectional motion information of the first target block to obtain bidirectional motion information of a corresponding block;
and scaling the unidirectional motion information of the first target block to obtain the bidirectional motion information of the corresponding block.
In some embodiments, each of the N motion information further includes derived motion information, the derived motion information determined based on the original motion information;
the derived motion information includes motion vector information and reference frame information.
In some embodiments, the derived motion information is one-way derived motion information, or two-way derived motion information, or one or two pieces of one-way derived motion information obtained by splitting the two-way derived motion information;
the one-way derived motion information is determined based on one-way original motion information or two-way motion information, and the two-way derived motion information is determined based on one-way original motion information or two-way motion information.
In some embodiments, in the case that N is greater than or equal to 2, determining the ordering of the N pieces of motion information includes one of:
arranging all or part of the N original motion information before all or part of the N derived motion information;
determining at least one of the one-way and two-way information of each original motion information in the N original motion information, the sorting priority of the N original motion information, the one-way and two-way information of each derived motion information in the N derived motion information, and the sorting priority of the N derived motion information, and sorting the N motion information based on at least one information.
In some embodiments, the prediction direction of the derived motion information is the same as the prediction direction of the original motion information;
the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
In some embodiments, the motion vector information comprises first axis component information and second axis component information; the method further comprises the following steps:
determining first axis component information and second axis component information of each derived motion information in M derived motion information based on the first axis component information and the second axis component information in the original motion information, and taking the first axis component information and the second axis component information of each derived motion information as motion vector information of each derived motion information; m is an integer greater than or equal to 1;
The first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
In some embodiments, the determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information in the original motion information comprises one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information for each of the M derived motion information based on a result of scaling the second axis component information of the original motion information.
In some embodiments, the determining the first axis component information of each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises one of:
Multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
In some embodiments, the determining, based on each result of the M first results, first axis component information of the each derived motion information comprises one of:
taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
In some embodiments, the determining the first axis component information of each derived motion information based on each result of the M second results comprises one of:
Determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each result of the M second results by a specific number of bits to obtain M third results, and determining first axis component information of each derived motion information based on each result of the M third results;
wherein the third value is obtained by shifting a target bit to the left, and the target bit is obtained by subtracting one from the specific bit.
In some embodiments, an absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
In some embodiments, the method further comprises:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
Determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
In some embodiments, the method further comprises:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
and when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
In some embodiments, the M first divisors include a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
Each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
In some embodiments, in the case that the original motion information is bidirectional original motion information, the method further comprises:
splitting the original motion information into first one-way original motion information and second one-way original motion information;
Taking a result of multiplying a first value by first axis component information or second axis component information in motion vector information of the first one-way original motion information as the first axis component information or the second axis component information in motion vector information of the first one-way derivative motion information;
taking the result of multiplying the fourth value by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the second one-way derivative motion information;
wherein the first value and the fourth value are both greater than 0;
wherein the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
In some embodiments, the N motion information comprises: original motion information of at least two adjacent blocks of a current block on a spatial domain; at least two adjacent blocks are adjacent, or the at least two adjacent blocks are at the lower left corner, the upper right corner or the upper left corner of the current block;
determining derived motion information based on the raw motion information, comprising:
Determining a second target block from at least two adjacent blocks, and taking a frame where the second target block is located as a second specific frame;
scaling the motion vector information in the original motion information of the adjacent blocks except the second target block in the at least two adjacent blocks to a second specific frame to obtain the motion vector information of the at least two blocks to be averaged; the at least two blocks to be averaged comprise a second target block;
averaging or weighted averaging is carried out on the motion vector information of at least two blocks to be averaged to obtain the motion vector information of corresponding derived motion information;
taking the motion vector information of the corresponding derived motion information as the motion vector information of the derived motion information of each adjacent block in at least two adjacent blocks;
the prediction direction of the derived motion information is the same as the prediction direction of the original motion information, and the reference frame information of the derived motion information is a second specific frame.
In some embodiments, each of the N motion information includes original motion information;
based on the sorting mode, a new motion information candidate list is constructed, which comprises the following steps:
determining an initial motion information candidate list;
based on the sorting mode, all or part of the original motion information of at least one adjacent block and/or all or part of the original motion information of at least one corresponding block are filled in the initial motion information candidate list in sequence or in a staggered mode, and a new motion information candidate list is obtained.
In some embodiments, each of the N motion information comprises derived motion information;
based on the sorting mode, sequentially or alternatively filling all or part of the original motion information of at least one neighboring block and/or all or part of the original motion information of at least one corresponding block into the initial motion information candidate list to obtain a new motion information candidate list, including:
at least one of all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of the at least one corresponding block, all or part of the derived motion information of the at least one neighboring block, and all or part of the derived motion information of the at least one corresponding block is sequentially or alternatively filled in the initial motion information candidate list based on the sorting manner.
In some embodiments, the initial motion information candidate list may be populated with a preset number of motion information; each piece of motion information in the preset number of pieces of motion information is original motion information or derived motion information; the preset number is 2-6.
In some embodiments, the method further comprises:
after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled;
Filling the derived motion information to be filled into an initial motion information candidate list;
or, under the condition that the derived motion information to be filled is determined to be different from the filled original motion information corresponding to the derived motion information to be filled, filling the derived motion information to be filled into the initial motion information candidate list;
or, in case it is determined that the derived motion information to be filled is different from the original motion information already filled, filling the derived motion information to be filled into the initial motion information candidate list.
In some embodiments, before determining the ranking of the known motion information associated with the current block based on the weight derivation mode of the current block, the method further includes:
acquiring original motion information of at least one adjacent block and original motion information of at least one corresponding block;
generating a certain number of derived motion information based on all or part of the original motion information of at least one neighboring block and/or based on all or part of the original motion information of at least one corresponding block;
wherein the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of neighboring blocks and/or derived motion information of corresponding blocks.
In some embodiments, the method further comprises:
acquiring original motion information of at least one adjacent block and unidirectional motion information or bidirectional motion information of a corresponding block;
filling one unidirectional original motion information or at least two mutually different unidirectional original motion information in the original motion information of at least one adjacent block into an initial motion information candidate list;
and under the condition that the first total number of the unidirectional original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In some embodiments, in the case that the first total number of unidirectional original motion information populated into the initial motion information candidate list is less than a preset number minus one, the method further comprises:
splitting the two-way original motion information of at least one adjacent block in sequence to obtain two one-way original motion information corresponding to the two-way original motion information, and continuously filling the two one-way original motion information which is different from the filled one-way motion information into an initial motion information candidate list in sequence; or, sequentially filling the bidirectional original motion information of at least one adjacent block into the initial motion information candidate list;
And under the condition that the second total number of the original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In some embodiments, the method further comprises:
under the condition that the second total number of the unidirectional original motion information filled into the initial motion information candidate list is less than the preset number minus one, acquiring the first two unidirectional original motion information filled into the initial motion information candidate list;
determining four corresponding one-way derivative motion information based on the first two one-way original motion information;
sequentially filling four derived motion information different from the filled one-way motion information into an initial motion information candidate list;
and under the condition that the third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of a corresponding block into the initial motion information candidate list.
In some embodiments, in the case that the derived motion information to be populated is bi-directional derived motion information, splitting the bi-directional derived motion information into two uni-directional derived motion information; filling at least one of the two unidirectional derived motion information into an initial motion information candidate list;
And/or splitting the two-way original motion information into two one-way original motion information under the condition that the original motion information to be filled is the two-way original motion information, and filling at least one of the two one-way original motion information into the initial motion information candidate list, or filling the two-way original motion information into the initial motion information candidate list.
In some embodiments, the method further comprises:
grouping a plurality of weight derivation modes in the geometric partition prediction mode or a plurality of weight derivation modes in the angle weighting prediction mode to obtain at least two types of weight derivation modes; different classes of weight derivation modes correspond to different sorting modes.
In some embodiments, at least two sets of partitioning patterns comprise:
the eighth class of weight derivation modes are used for representing that the weight derivation modes of the current block are upper left and lower right weight derivation modes;
a ninth class of weight derivation mode, configured to characterize a weight derivation mode of the current block as an upper and lower weight derivation mode;
a tenth type of weight derivation mode, configured to characterize a weight derivation mode of the current block as a lower-left and upper-right weight derivation mode;
And the eleventh class of weight derivation mode is used for characterizing the weight derivation modes of the current block as the left and right weight derivation modes.
In some embodiments, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
when the weight derivation mode of the current block belongs to an eighth class of weight derivation mode, determining the ordering mode of the known motion information as the ordering mode in which the motion information of the upper left adjacent block of the current block is ordered in the front;
when the weight derivation mode of the current block belongs to a ninth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the upper block of the current block is sequenced in the front;
when the weight derivation mode of the current block belongs to a tenth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the left lower adjacent block of the current block is sequenced in the front;
and when the weight derivation mode of the current block belongs to an eleventh class of weight derivation mode, determining the sequencing mode of the known motion information as the sequencing mode in which the motion information of the left block of the current block is sequenced in the front.
In some embodiments, the at least one neighboring block comprises: at least one of an outer lower left block, an inner upper right block, an outer upper right block, an inner upper outer left block, an inner upper left outer block, an outer upper left block, or at least one adjacent block comprising: at least one of an inner left outer lower block, an inner upper outer right block, an outer right upper block, an outer left lower block, an outer left upper block;
the at least one corresponding block includes: at least one of a block corresponding to an upper left corner of an interior of the current block, a block corresponding to a lower right corner of the interior of the current block, and a block corresponding to a lower right corner of an exterior of the current block.
In some embodiments, in a weight derivation mode of the current block, the current block is divided into a first partition and a second partition;
determining an inter prediction value of the current block based on the new motion information candidate list, including:
determining motion information of the first partition and motion information of the second partition from the new motion information candidate list;
determining a first prediction value of the first partition based on the motion information of the first partition, and determining a second prediction value of the second partition based on the motion information of the second partition;
and performing weighted fusion on the first predicted value and the second predicted value to obtain the interframe predicted value of the current block.
In some embodiments, in the case that the motion information of the first partition is bidirectional motion information, the motion information of the first partition is processed according to a bidirectional prediction method;
and/or processing the motion information of the second partition according to a bidirectional prediction method when the motion information of the second partition is bidirectional motion information.
In some embodiments, the method of bi-directional prediction is a method that does not use bi-directional optical flow or a method of decoding-side motion vector optimization.
In some embodiments, determining motion information for the first partition and motion information for the second partition from the new motion information candidate list comprises:
determining an index value of the first partition and an index value of the second partition;
determining motion information in the new motion information candidate list indicated by the index value of the first partition as motion information of the first partition based on the new motion information candidate list;
and determining the motion information in the new motion information candidate list indicated by the index value of the second partition as the motion information of the second partition based on the new motion information candidate list.
In some embodiments, determining the index value of the first partition and the index value of the second partition comprises:
Carrying out pre-coding processing on the current block by utilizing multiple prediction modes to obtain rate distortion cost values corresponding to each prediction mode;
and selecting a minimum rate distortion cost value from the obtained multiple rate distortion cost values, and respectively determining two pieces of motion information corresponding to the minimum rate distortion cost value as the index value of the first partition and the index value of the second partition.
In some embodiments, obtaining the weight derivation mode for the current block comprises:
determining a prediction mode parameter of a current block; the prediction mode parameter is used for indicating that the inter prediction value of the current block is determined by using a geometric partition prediction mode or an angle weighted prediction mode;
determining a weight derivation mode of the current block from the prediction mode parameters of the current block.
In some embodiments, the new motion information candidate list is a candidate list that allows bi-directional motion information to exist.
An embodiment of an encoding side is introduced herein, which attempts to encode a current block using AWP and other available modes to determine whether to use AWP. If the cost of AWP is optimal, AWP is used.
When the AWP is tried, a mode is selected from the modes of the AWP for coding to determine the cost of the AWP. One possible approach is to try all the AWP modes to select the one with the smallest cost as the AWP cost.
The motion information candidate list is constructed according to the AWP mode, and the construction method is the same as that of the embodiment of the decoding end. One possible approach is to determine the cost for all possible combinations of motion information candidates, the mode of all possible AWPs determining the cost, and replacing the combination of the two motion information with the smallest cost and the mode of the AWP to the finally determined one-way motion information and the mode of the AWP.
And writing information whether the AWP is used in the code stream. If the AWP is determined to be used, writing the mode of the AWP and the indexes of the two pieces of motion information in the code stream. If the current mode is the skip mode, the decoding of the current block ends. And if the current mode is not the skip mode, writing the quantization coefficient in the code stream. And the quantized coefficient is obtained by subtracting the prediction block from the actual value of the current block to obtain a residual block, and transforming and quantizing the residual block. The decoding of the current block ends.
It should be noted that, in the encoder side, reference may be made to the description made on the decoder side, for example, for a part which is not described in detail.
The embodiment of the application provides a method for constructing an adaptive motion information candidate list, namely a method for determining a motion information candidate list of an AWP (active wavelet packet) or a GPM (general packet buffer) according to a mode of the AWP or the GPM, so that each type of mode of the AWP or the GPM, namely each type of division method, has a motion information candidate list matched with the mode, thereby improving the coding efficiency, and adding no extra computational complexity to a decoder, because a block using the AWP or the GPM only needs to construct the motion information candidate list of the AWP or the GPM once.
Two other inter-frame prediction methods are described below, and it should be noted that the parts not mentioned in the following methods can be referred to the description of the above embodiments. And, it is noted that one or at least two of the following embodiments may be combined with any one or at least two of the above embodiments without conflict.
Fig. 14 is a flowchart illustrating an inter-frame prediction method according to another embodiment of the present application, as shown in fig. 14, the method is applied to a decoder, and the method may include:
s1401, analyzing the code stream, and obtaining the motion vector information of the original motion information related to the current block.
In an embodiment, the original motion information that can be obtained by the decoder during the process of parsing the code stream can be obtained by the decoder because the original motion information includes the motion vector information and the reference frame information.
In one implementation, the decoder may obtain known motion information associated with the current block. The known motion information related to the current block includes a preset number of pieces of motion information, and for the description of the known motion information related to the current block, reference may be made to the above-mentioned embodiment, which is not described herein again.
Each of the preset number of pieces of motion information may include original motion information or derived motion information, wherein the derived motion information is determined based on the original motion information.
The manner of determining the derived motion information based on the original motion information may refer to the description in the above-described embodiments, and may also refer to the description in the following embodiments.
It should be understood that what the decoder can obtain by parsing the code stream is the original motion information related to the current block, and for the derived motion information related to the current block, it needs to be calculated from the original motion information.
S1403, determining motion vector information of M derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1.
Scaling the motion vector information of the original motion information may refer to obtaining motion vector information of derived motion information based on a result of multiplying or dividing the original motion information.
S1405, constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information.
In one case, the decoder obtains at least two original motion information associated with the current block by parsing the code stream, and may obtain one or at least two derived motion information based on each original motion information, and may use all or part of the original motion information in the at least two original motion information and all or part of the motion vector information in the M derived motion information in constructing a new motion information candidate list. The amount of raw motion information used may be greater than, less than, or equal to the derived motion information. That is, the new motion information candidate list may include all or part of at least two original motion information and all or part of the motion vector information of the M derived motion information.
In the implementation, constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information may include: and determining derived motion information based on the motion vector information of the derived motion information, and constructing a new motion information candidate list based on the original motion information and the derived motion information.
Wherein determining the derived motion information based on the motion vector information of the derived motion information may include: and determining reference frame information of the derived motion information, and determining the derived motion information based on the motion vector information of the derived motion information and the reference frame information of the derived motion information. For determining the reference frame information from which the motion information is derived, reference may be made to the description of the above embodiments.
It can be understood that included in the new motion information candidate list are at least two pieces of filled motion information, each of which is original motion information or derived motion information.
When constructing a new motion information candidate list based on the original motion information and the derived motion information, the obtained original motion information may be placed all before the obtained derived motion information, or the original motion information and the derived motion information may be staggered.
The original motion information and the derived motion information may be sorted according to the description of the related embodiments, which is not described herein again.
S1407, determining the inter prediction value of the current block based on the new motion information candidate list.
In the embodiment of the present application, a new motion information candidate list is constructed based on the motion vector information of the original motion information and the motion vector information of the derived motion information, so as to obtain a new motion information candidate list, and therefore, the obtained new motion information candidate list can fully utilize the motion vector information of the already obtained original motion information, so that the construction of the motion information candidate list conforms to the weight derivation mode of the current block, and thus, the new motion information candidate list can arrange the motion information in the order from strong to weak according to the correlation with the current block, and therefore, the decoding efficiency of the current block can be improved.
In one embodiment, the motion vector information includes first axis component information and second axis component information;
determining motion vector information for M derived motion information based on a result of scaling motion vector information for the original motion information, including one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
Determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information of each derived motion information of the M derived motion information based on a result of scaling the second axis component information of the original motion information;
the first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
In one embodiment, the determining the first axis component information of each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M first results comprises one of:
taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M second results includes one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each of the M second results by a particular number of bits to obtain M third results, and determining first-axis component information of each derived motion information based on each of the M third results.
In one embodiment, the third value is a left shift target bit, the target bit being the specified number of bits minus one.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M third results comprises:
taking each result in the M third results as the first axis component information of each derived motion information under the condition that the first axis component information of the original motion information is a positive value;
multiplying each result of the M third results by a negative one if the first axis component information of the original motion information is a negative value as the first axis component information of the each derived motion information.
In one embodiment, the absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
In one embodiment, the method further comprises:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
Determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
In one embodiment, the method further comprises:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
and when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
In one embodiment, the M first divisors include a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
In one embodiment, the original motion information is unidirectional original motion information, or bidirectional original motion information, or one or two unidirectional original motion information obtained by splitting bidirectional original motion information;
The derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting the two-way derived motion information;
the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
In an embodiment, the parsing the code stream to obtain motion vector information of original motion information associated with the current block includes:
analyzing the code stream, and acquiring motion vector information of original motion information related to a current block and a weight derivation mode of the current block;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information, comprising:
constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
In one embodiment, the constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information includes:
Determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode, the motion vector information of the original motion information and the motion vector information of the derived motion information.
In one embodiment, before determining the ordering of the known motion information related to the current block based on the weight derivation mode of the current block, the method further includes:
acquiring original motion information of at least one adjacent block and original motion information of at least one corresponding block based on the code stream analyzed by the decoder;
generating a certain number of derived motion information based on all or part of the original motion information of the at least one neighboring block and/or based on all or part of the original motion information of the at least one corresponding block;
wherein the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of neighboring blocks and/or derived motion information of corresponding blocks.
In one embodiment, the method further comprises:
acquiring the first two unidirectional original motion information filled into the initial motion information candidate list under the condition that the second total number of the unidirectional original motion information filled into the initial motion information candidate list is less than the preset number minus one;
Determining four corresponding one-way derivative motion information based on the first two one-way original motion information;
sequentially filling the four derived motion information different from the filled unidirectional motion information into the initial motion information candidate list;
and under the condition that the third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
In one embodiment, when the derived motion information to be filled is bidirectional derived motion information, splitting the bidirectional derived motion information into two unidirectional derived motion information; filling at least one of the two uni-directionally derived motion information into the initial motion information candidate list;
and/or splitting the two-way original motion information into two pieces of one-way original motion information under the condition that the original motion information to be filled is the two-way original motion information, and filling at least one of the two pieces of one-way original motion information into the initial motion information candidate list, or filling the two-way original motion information into the initial motion information candidate list.
In one embodiment, in a case that the original motion information is bidirectional original motion information, the method further includes:
splitting the original motion information into first one-way original motion information and second one-way original motion information;
taking a result of multiplying a first value by first axis component information or second axis component information in motion vector information of the first one-way original motion information as the first axis component information or the second axis component information in motion vector information of the first one-way derivative motion information;
taking the result of multiplying the fourth value by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the second one-way derivative motion information;
wherein the first value and the fourth value are both greater than 0;
wherein the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
In one embodiment, the decoder sequentially or alternatively fills at least one of all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of at least one corresponding block, all or part of the derived motion information of the at least one neighboring block, and all or part of the derived motion information of at least one corresponding block into the initial motion information candidate list based on the ordering.
In one embodiment, the method further comprises:
after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled;
filling the derived motion information to be filled into the initial motion information candidate list;
or, in the case that it is determined that the derived motion information to be filled is different from the already-filled original motion information corresponding to the derived motion information to be filled, filling the derived motion information to be filled into the initial motion information candidate list;
or, in the case that it is determined that the derived motion information to be filled is different from the already filled original motion information, filling the derived motion information to be filled into the initial motion information candidate list.
It should be understood that, when the derived motion information is obtained by scaling the first axis/second axis component information of the original motion information, the prediction direction of the derived motion information is the same as the prediction direction of the original motion information; the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
Fig. 15 is a flowchart illustrating an inter-frame prediction method according to still another embodiment of the present application, as shown in fig. 15, the method is applied to an encoder, and the method may include:
s1501, determining the motion vector information of the original motion information related to the current block.
S1503, determining motion vector information of M pieces of derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1.
S1505, constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information.
S1507, determining an inter prediction value of the current block based on the new motion information candidate list.
In the embodiment of the present application, a new motion information candidate list is constructed based on the motion vector information of the original motion information and the motion vector information of the derived motion information, so as to obtain a new motion information candidate list, and therefore, the obtained new motion information candidate list can fully utilize the motion vector information of the already obtained original motion information, so that the construction of the motion information candidate list conforms to the weight derivation mode of the current block, and thus, the new motion information candidate list can arrange the motion information in the order from strong to weak according to the correlation with the current block, and therefore, the encoding efficiency of the current block can be improved.
In one embodiment, the motion vector information includes first axis component information and second axis component information;
determining motion vector information for M derived motion information based on a result of scaling motion vector information for the original motion information, including one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information of each derived motion information of the M derived motion information based on a result of scaling the second axis component information of the original motion information;
the first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
In one embodiment, the determining the first axis component information of each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M first results comprises one of:
taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M second results includes one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each of the M second results by a particular number of bits to obtain M third results, and determining first-axis component information of each derived motion information based on each of the M third results.
In one embodiment, the third value is a left shift target bit, the target bit being the specified number of bits minus one.
In one embodiment, the determining the first axis component information of each derived motion information based on each result of the M third results comprises:
taking each result in the M third results as the first axis component information of each derived motion information under the condition that the first axis component information of the original motion information is a positive value;
multiplying each result of the M third results by a negative one if the first axis component information of the original motion information is a negative value as the first axis component information of the each derived motion information.
In one embodiment, the absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
In one embodiment, the method further comprises:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
In one embodiment, the method further comprises:
Taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
and when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
In one embodiment, the M first divisors include a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
Taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
In one embodiment, the original motion information is unidirectional original motion information, or bidirectional original motion information, or one or two unidirectional original motion information obtained by splitting bidirectional original motion information;
the derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting the two-way derived motion information;
the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
In one embodiment, the obtaining motion vector information of original motion information related to a current block includes:
acquiring motion vector information of original motion information related to a current block and a weight derivation mode of the current block;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information, comprising:
constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
In one embodiment, the constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information includes:
determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode, the motion vector information of the original motion information and the motion vector information of the derived motion information.
In one embodiment, in a weight derivation mode of the current block, the current block is divided into a first partition and a second partition;
the determining an inter prediction value of the current block based on the new motion information candidate list includes:
determining motion information of a first partition and motion information of a second partition from the new motion information candidate list;
determining a first prediction value of the first partition based on the motion information of the first partition, and determining a second prediction value of the second partition based on the motion information of the second partition;
and performing weighted fusion on the first predicted value and the second predicted value to obtain the interframe predicted value of the current block.
In one embodiment, the determining motion information of the first partition and motion information of the second partition from the new motion information candidate list includes:
determining an index value of the first partition and an index value of the second partition;
determining motion information in the new motion information candidate list indicated by the index value of the first partition as motion information of the first partition based on the new motion information candidate list;
Determining, based on the new motion information candidate list, motion information in the new motion information candidate list indicated by the index value of the second partition as motion information of the second partition.
In one embodiment, the determining the index value of the first partition and the index value of the second partition comprises:
carrying out pre-coding processing on the current block by utilizing multiple prediction modes to obtain rate distortion cost values corresponding to each prediction mode;
and selecting a minimum rate distortion cost value from the obtained multiple rate distortion cost values, and respectively determining two pieces of motion information corresponding to the minimum rate distortion cost value as the index value of the first partition and the index value of the second partition.
Based on the foregoing embodiments, the embodiments of the present application provide a decoder/encoder, where each unit included in the decoder/encoder and each module included in each unit may be implemented by a processor in the decoder/encoder; of course, the implementation can also be realized through a specific logic circuit; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 16 is a schematic diagram of a constituent structure of a decoder according to an embodiment of the present application, where the decoder 1600 may be disposed in the decoder, as shown in fig. 16, the decoder 1600 may include:
the obtaining unit 1601 is configured to parse the code stream and obtain a weight derivation mode of the current block.
A constructing unit 1602, configured to construct a new motion information candidate list based on the weight derivation mode of the current block.
A prediction unit 1603 for determining an inter prediction value of the current block based on the new motion information candidate list.
Fig. 17 is a schematic diagram of a constituent structure of an encoder according to an embodiment of the present disclosure, where the encoder 1700 may be disposed in the encoder, and as shown in fig. 17, the encoder 1700 may include:
a mode determination unit 1701 for determining a weight derivation mode for the current block.
A constructing unit 1702, configured to construct a new motion information candidate list based on the weight derivation mode of the current block.
A prediction unit 1703, configured to determine an inter prediction value of the current block based on the new motion information candidate list.
Fig. 18 is a schematic diagram of a composition structure of another decoder according to an embodiment of the present application, where the decoder 1800 may be disposed in the decoder, and as shown in fig. 18, the decoder 1800 may include:
An obtaining unit 1801, configured to parse the code stream, and obtain a weight derivation mode of the current block;
a derived motion information determination unit 1802 for determining motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
a constructing unit 1803, configured to construct a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
a prediction unit 1804 configured to determine an inter prediction value of the current block based on the new motion information candidate list.
Fig. 19 is a schematic diagram of a composition structure of another encoder according to an embodiment of the present application, where the encoder 1900 may be disposed in a decoder, and as shown in fig. 19, the encoder 1900 may include:
an original motion information determining unit 1901 for determining motion vector information of original motion information related to the current block;
a derived motion information determining unit 1902 configured to determine motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
A constructing unit 1903, configured to construct a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
a prediction unit 1904, configured to determine an inter prediction value of the current block based on the new motion information candidate list.
It should be noted that although the present embodiment is only a schematic illustration of one constituent structure of the decoder 1600, the encoder 1700, the decoder 1800, and the encoder 1900, it can be understood by those skilled in the art that any one of the decoder 1600, the encoder 1700, the decoder 1800, and the encoder 1900 may further include other units capable of implementing the steps of any of the above embodiments, and those units already described in the present embodiment may also implement other steps of any of the above embodiments.
The above description of the decoder/encoder embodiment is similar to the description of the method embodiment described above, with similar beneficial effects as the method embodiment. For technical details not disclosed in the decoder/encoder embodiments of the present application, reference is made to the description of the method embodiments of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction method is implemented in the form of a software functional module and sold or used as a stand-alone product, the inter-frame prediction method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a decoder/encoder to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Fig. 20 is a schematic diagram of a hardware entity of a decoder according to an embodiment of the present application, and as shown in fig. 20, the hardware entity of the decoder 2000 includes: a processor 2001 and a memory 2002, wherein the memory 2002 stores a computer program operable on the processor 2001, and the processor 2001 executes the program to implement the steps in the method performed by the decoder of any of the above embodiments.
Fig. 21 is a schematic diagram of a hardware entity of an encoder according to an embodiment of the present application, and as shown in fig. 21, the hardware entity of the encoder 2100 includes: a processor 2101 and a memory 2102, wherein the memory 2102 stores a computer program operable on the processor 2101, and the processor 2101 executes the program to implement the steps in the method performed by the encoder of any of the embodiments described above.
Embodiments of the present application provide a computer storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the method performed by the decoder in the above-mentioned method.
Embodiments of the present application provide a computer storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the method performed by the encoder in the above-mentioned method.
Decoder 2000 may be the same decoder as decoder 1600, decoder 2000 may be the same decoder as decoder 1800, encoder 2100 may be the same encoder as encoder 1700, and encoder 2100 may be the same encoder as encoder 1900
It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the above memories are exemplary but not limiting illustrations, for example, the memories in the embodiments of the present application may also be Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM, ESDRAM), Synchronous Link DRAM (SLDRAM), Direct Rambus RAM (DR RAM), and the like. That is, the memory in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
Here, it should be noted that: the above description of the decoder, computer storage medium embodiments is similar to the description of the method embodiments described above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment of the present application" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the case where no specific description is given, the decoder/encoder performs any one of the steps in the embodiments of the present application, and the processor of the decoder/encoder may perform the step. Unless otherwise specified, the embodiments of the present application do not limit the order in which the decoder/encoder performs the following steps. In addition, the data may be processed in the same way or in different ways in different embodiments. It should be further noted that any step in the embodiments of the present application may be performed independently by the decoder/encoder, that is, when the decoder/encoder performs any step in the following embodiments, the decoder/encoder may not depend on the performance of other steps.
In the several embodiments provided in the present application, it should be understood that the disclosed decoder/encoder and method may be implemented in other ways. The above described decoder/encoder embodiments are merely illustrative, for example, the division of the unit is only a logical division, and there may be other divisions in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the resource devices or units may be electrical, mechanical or other forms.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or decoder/encoder embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or decoder/encoder embodiments.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage resource device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a decoder/encoder to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage resource device, a ROM, a magnetic or optical disk, or other various media that can store program code.
In the embodiments of the present application, the descriptions of the same steps and the same contents in different embodiments may be mutually referred to. In the embodiment of the present application, the term "and" does not affect the order of the steps, for example, the decoder/encoder performs P and performs Q, where the decoder/encoder performs P first and then performs Q, or the decoder/encoder performs Q first and then performs P, or the decoder/encoder performs Q simultaneously with P.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (128)

1. An inter-prediction method applied to a decoder, the method comprising:
analyzing the code stream, and acquiring a weight derivation mode of the current block;
constructing a new motion information candidate list based on the weight derivation mode of the current block;
determining an inter prediction value of the current block based on the new motion information candidate list.
2. The method of claim 1, wherein the weight derivation mode for the current block is one of a plurality of weight derivation modes in a geometrically partitioned prediction mode, or wherein the weight derivation mode for the current block is one of a plurality of weight derivation modes in an angularly weighted prediction mode.
3. The method of claim 1, wherein the weighting derivation modes of the current block are different in category, and wherein the new motion information candidate list is constructed differently.
4. The method of claim 1, wherein the constructing a new motion information candidate list based on the weight derivation mode for the current block comprises:
determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode.
5. The method of claim 4, wherein the known motion information associated with the current block comprises N pieces of motion information associated with the current block; n is an integer greater than or equal to 1;
the N motion information associated with the current block includes: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain.
6. The method of claim 5, wherein each of the N motion information comprises original motion information, and wherein the original motion information comprises motion vector information and reference frame information.
7. The method of claim 6, wherein the original motion information is one-way original motion information, or two-way original motion information, or one or two-way original motion information obtained by splitting two-way original motion information.
8. The method of claim 5, wherein in the case that N is greater than or equal to 2, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
in case that the weight derivation mode of the current block is the first type of weight derivation mode, arranging the motion information of the at least one corresponding block before the motion information of the at least one neighboring block;
under the condition that the weight derivation mode of the current block is the second type weight derivation mode, inserting the motion information of the at least one corresponding block into the motion information of the at least one adjacent block;
In case that the weight derivation mode of the current block is the third type of weight derivation mode, the motion information of the at least one corresponding block is arranged after the motion information of the at least one neighboring block.
9. The method of claim 4, wherein in the case that N is greater than or equal to 2, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
the sorting mode of the known motion information related to the current block is determined from a sorting mode set, and the sorting mode set comprises: performing full arrangement on the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block, and the motion information of the lower right related block of the current block to obtain a plurality of sorting modes;
wherein, when the weight derivation modes of the current block are different, the sorting modes determined from the sorting mode set are different;
wherein any one of the motion information of the lower-left related block of the current block, the motion information of the upper-right related block of the current block, the motion information of the upper-left related block of the current block, and the motion information of the lower-right related block of the current block is: motion information of the current block in a spatial domain or motion information of the current block in a temporal domain.
10. The method of claim 9, wherein the motion information of the lower-left neighboring block of the current block comprises: motion information of all blocks or partial blocks at the lower left of the current block;
the motion information of the upper-right neighboring block of the current block includes: motion information of all or part of blocks to the upper right of the current block;
the motion information of the upper left neighboring block of the current block includes: motion information of all or a part of blocks on the upper left of the current block;
the motion information of the lower right block of the current block in the temporal domain includes: motion information of blocks in a temporal domain outside the current block, or motion information of blocks in a temporal domain inside the current block.
11. The method of claim 5, wherein in the case that N is greater than or equal to 2, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
under the condition that the weight derivation mode of the current block is a fourth type weight derivation mode, arranging all or part of one-way original motion information in the N pieces of motion information before splitting two-way motion information in the N pieces of motion information to obtain all or part of one or two pieces of one-way original motion information;
Arranging all or part of the unidirectional original motion information in the N pieces of motion information before all or part of bidirectional motion information in the N pieces of motion information under the condition that the weight derivation mode of the current block is a fifth type weight derivation mode;
determining the sorting priority of the N pieces of motion information under the condition that the weight derivation mode of the current block is a sixth type weight derivation mode, and sorting the N pieces of motion information based on the sorting priority;
and in the case that the weight derivation mode of the current block is a seventh-class weight derivation mode, determining uni-directional information of each piece of the N pieces of motion information and an ordering priority of the N pieces of motion information, and ordering the N pieces of motion information based on the uni-directional information of each piece of motion information and the ordering priority.
12. The method of claim 5, further comprising:
determining the image frames except the current frame and the frame where the corresponding block is located as a first specific frame;
determining motion information of a first target block corresponding to the current block on the first specific frame;
zooming the motion information of the first target block to obtain the motion information of the corresponding block;
Wherein the scaling the motion information of the first target block to obtain the motion information of the corresponding block includes one of:
scaling the bidirectional motion information of the first target block to obtain bidirectional motion information of the corresponding block;
and scaling the unidirectional motion information of the first target block to obtain the bidirectional motion information of the corresponding block.
13. The method of claim 6, wherein each of the N motion information further comprises derived motion information, the derived motion information being determined based on the original motion information;
the derived motion information includes motion vector information and reference frame information.
14. The method according to claim 13, wherein the derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting two-way derived motion information;
the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
15. The method of claim 13, wherein in the case that N is greater than or equal to 2, determining the ordering of the N pieces of motion information comprises one of:
arranging all or part of the N original motion information before all or part of the N derived motion information;
determining at least one of uni-directional information of each original motion information in the N original motion information, a sorting priority of the N original motion information, uni-directional information of each derived motion information in the N derived motion information, and a sorting priority of the N derived motion information, and sorting the N motion information based on the at least one information.
16. The method of claim 13, wherein the prediction direction of the derived motion information is the same as the prediction direction of the original motion information;
the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
17. The method of claim 13, wherein the motion vector information comprises first axis component information and second axis component information; the method further comprises the following steps:
Determining first axis component information and second axis component information of each derived motion information in M derived motion information based on the first axis component information and the second axis component information in the original motion information, and taking the first axis component information and the second axis component information of each derived motion information as motion vector information of each derived motion information; m is an integer greater than or equal to 1;
the first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
18. The method of claim 17, wherein determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information of the original motion information comprises one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
Determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information for each of the M derived motion information based on a result of scaling the second axis component information of the original motion information.
19. The method of claim 18, wherein determining the first axis component information of each of the M derived motion information based on a result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
20. The method of claim 19, wherein determining the first axis component information of each derived motion information based on each of the M first results comprises one of:
Taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
21. The method of claim 20, wherein determining the first axis component information of each derived motion information based on each of the M second results comprises one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each result of the M second results by a specific number of bits to obtain M third results, and determining first axis component information of each derived motion information based on each result of the M third results;
wherein the third value is obtained by shifting a target bit to the left, and the target bit is obtained by subtracting one from the specific bit.
22. The method according to any one of claims 17 to 21, wherein an absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
The M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
23. The method of claim 22, further comprising:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
24. The method of claim 22, further comprising:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
And when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
25. The method of claim 19, wherein the M first divisors comprise a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
And taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
26. The method according to any of claims 17 to 21, wherein in case the original motion information is bi-directional original motion information, the method further comprises:
splitting the original motion information into first one-way original motion information and second one-way original motion information;
taking a result of multiplying a first value by first axis component information or second axis component information in motion vector information of the first one-way original motion information as the first axis component information or the second axis component information in motion vector information of the first one-way derivative motion information;
taking the result of multiplying the fourth value by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the second one-way derivative motion information;
wherein the first value and the fourth value are both greater than 0;
wherein the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
27. The method of claim 13, wherein the N motion information comprises: original motion information of at least two adjacent blocks of the current block on a spatial domain; the at least two adjacent blocks are adjacent, or the at least two adjacent blocks are at the lower left corner or the upper right corner or the upper left corner of the current block;
determining the derived motion information based on the raw motion information, including:
determining a second target block from the at least two adjacent blocks, and taking a frame where the second target block is located as a second specific frame;
scaling the motion vector information in the original motion information of the adjacent blocks except the second target block in the at least two adjacent blocks to the second specific frame to obtain the motion vector information of the at least two blocks to be averaged; the at least two blocks to be averaged comprise the second target block;
averaging or weighted averaging is carried out on the motion vector information of the at least two blocks to be averaged to obtain the motion vector information of the corresponding derived motion information;
using the motion vector information of the corresponding derived motion information as the motion vector information of the derived motion information of each of the at least two neighboring blocks;
Wherein a prediction direction of the derived motion information is the same as a prediction direction of the original motion information, and reference frame information of the derived motion information is the second specific frame.
28. The method according to any one of claims 5 to 20, wherein each of the N motion information comprises original motion information;
the constructing the new motion information candidate list based on the sorting mode comprises:
determining an initial motion information candidate list;
and based on the sorting mode, filling all or part of the original motion information of the at least one adjacent block and/or all or part of the original motion information of the at least one corresponding block into the initial motion information candidate list in sequence or in a staggered manner to obtain the new motion information candidate list.
29. The method of claim 28, wherein each of the N motion information comprises derived motion information;
the sequentially or alternately filling all or part of the original motion information of the at least one neighboring block and/or all or part of the original motion information of the at least one corresponding block into the initial motion information candidate list based on the sorting manner to obtain the new motion information candidate list, including:
Based on the sorting, sequentially or alternatively filling all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of at least one corresponding block, all or part of the derived motion information of the at least one neighboring block, and all or part of the derived motion information of at least one corresponding block into the initial motion information candidate list.
30. The method of claim 29, wherein the initial motion information candidate list is populated with a predetermined number of motion information; each piece of motion information in the preset number of pieces of motion information is the original motion information or the derivative motion information; the preset number is 2-6.
31. The method of claim 29, further comprising:
after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled;
filling the derived motion information to be filled into the initial motion information candidate list;
or, in the case that it is determined that the derived motion information to be filled is different from the already-filled original motion information corresponding to the derived motion information to be filled, filling the derived motion information to be filled into the initial motion information candidate list;
Or, in the case that it is determined that the derived motion information to be filled is different from the already filled original motion information, filling the derived motion information to be filled into the initial motion information candidate list.
32. The method of any of claims 29 to 31, wherein before determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block, the method further comprises:
acquiring original motion information of at least one adjacent block and original motion information of at least one corresponding block based on the code stream analyzed by the decoder;
generating a certain number of derived motion information based on all or part of the original motion information of the at least one neighboring block and/or based on all or part of the original motion information of the at least one corresponding block;
wherein the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of neighboring blocks and/or derived motion information of corresponding blocks.
33. The method of claim 26, further comprising:
acquiring original motion information of at least one adjacent block and unidirectional motion information or bidirectional motion information of a corresponding block based on the code stream analyzed by the decoder;
Filling one unidirectional original motion information or at least two mutually different unidirectional original motion information in the original motion information of the at least one adjacent block into the initial motion information candidate list;
and under the condition that the first total number of the unidirectional original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
34. The method of claim 33, wherein in case that a first total number of uni-directional original motion information populated into the initial motion information candidate list is less than the preset number minus one, the method further comprises:
sequentially splitting the bidirectional original motion information of the at least one adjacent block to obtain two pieces of unidirectional original motion information corresponding to the bidirectional original motion information, and sequentially filling the two pieces of unidirectional original motion information which are different from the filled unidirectional motion information into the initial motion information candidate list; or, sequentially filling the bidirectional original motion information of the at least one neighboring block into the initial motion information candidate list;
And under the condition that the second total number of the original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
35. The method of claim 34, further comprising:
acquiring the first two unidirectional original motion information filled into the initial motion information candidate list under the condition that the second total number of the unidirectional original motion information filled into the initial motion information candidate list is less than the preset number minus one;
determining four corresponding one-way derivative motion information based on the first two one-way original motion information;
sequentially filling the four derived motion information different from the filled unidirectional motion information into the initial motion information candidate list;
and under the condition that the third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
36. The method according to any one of claims 29 to 31, wherein in case the derived motion information to be populated is bi-directionally derived motion information, splitting the bi-directionally derived motion information into two uni-directionally derived motion information; filling at least one of the two uni-directionally derived motion information into the initial motion information candidate list;
and/or splitting the two-way original motion information into two pieces of one-way original motion information under the condition that the original motion information to be filled is the two-way original motion information, and filling at least one of the two pieces of one-way original motion information into the initial motion information candidate list, or filling the two-way original motion information into the initial motion information candidate list.
37. The method according to any one of claims 4 to 20, further comprising:
grouping a plurality of weight derivation modes in the geometric partition prediction mode or a plurality of weight derivation modes in the angle weighting prediction mode to obtain at least two types of weight derivation modes; different classes of weight derivation modes correspond to different sorting modes.
38. The method of claim 37, wherein the at least two classes of weight derivation patterns comprise:
The eighth class of weight derivation modes are used for representing that the weight derivation modes of the current block are upper left and lower right weight derivation modes;
a ninth class of weight derivation mode, configured to characterize a weight derivation mode of the current block as an upper and lower weight derivation mode;
a tenth type of weight derivation mode, configured to characterize a weight derivation mode of the current block as a lower-left and upper-right weight derivation mode;
and the eleventh class of weight derivation mode is used for characterizing the weight derivation modes of the current block as the left and right weight derivation modes.
39. The method of claim 38, wherein determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode for the current block comprises one of:
when the weight derivation mode of the current block belongs to an eighth class of weight derivation mode, determining the ordering mode of the known motion information as the ordering mode in which the motion information of the upper left adjacent block of the current block is ordered in the front;
when the weight derivation mode of the current block belongs to a ninth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the upper block of the current block is sequenced in the front;
When the weight derivation mode of the current block belongs to a tenth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the left lower adjacent block of the current block is sequenced in the front;
and when the weight derivation mode of the current block belongs to an eleventh class of weight derivation mode, determining the sequencing mode of the known motion information as the sequencing mode in which the motion information of the left block of the current block is sequenced in the front.
40. The method according to any of claims 5 to 20, wherein the at least one neighboring block comprises: at least one of an outer lower left block, an inner upper right block, an outer upper right block, an inner upper outer left block, an inner upper left outer block, an outer upper left block, or the at least one neighboring block comprises: at least one of an inner left outer lower block, an inner upper outer right block, an outer right upper block, an outer left lower block, an outer left upper block;
the at least one corresponding block includes: at least one of a block corresponding to an upper left corner of an interior of the current block, a block corresponding to a lower right corner of the interior of the current block, and a block corresponding to a lower right corner of an exterior of the current block.
41. The method of any of claims 1 to 20, wherein in the weight derivation mode for the current block, the current block is partitioned into a first partition and a second partition;
the determining an inter prediction value of the current block based on the new motion information candidate list includes:
determining motion information of a first partition and motion information of a second partition from the new motion information candidate list;
determining a first prediction value of the first partition based on the motion information of the first partition, and determining a second prediction value of the second partition based on the motion information of the second partition;
and performing weighted fusion on the first predicted value and the second predicted value to obtain the interframe predicted value of the current block.
42. The method of claim 41, wherein if the motion information of the first partition is bidirectional motion information, the motion information of the first partition is processed according to a bidirectional prediction method;
and/or processing the motion information of the second partition according to a bidirectional prediction method under the condition that the motion information of the second partition is bidirectional motion information.
43. The method of claim 42, wherein the bi-directional prediction method is a method that does not use bi-directional optical flow or a method that uses decoding-side motion vector optimization.
44. The method of claim 41, wherein determining the motion information of the first partition and the motion information of the second partition from the new candidate list of motion information comprises:
determining an index value of the first partition and an index value of the second partition from the analyzed code stream;
determining motion information in the new motion information candidate list indicated by the index value of the first partition as motion information of the first partition based on the new motion information candidate list;
determining, based on the new motion information candidate list, motion information in the new motion information candidate list indicated by the index value of the second partition as motion information of the second partition.
45. The method according to any one of claims 1 to 20, wherein the parsing the code stream to obtain the weight derivation mode of the current block comprises:
analyzing the code stream, and determining the prediction mode parameter of the current block; the prediction mode parameter is used for indicating that an inter prediction value of the current block is determined by using a geometric partition prediction mode or an angle weighted prediction mode;
Determining a weight-derived mode for the current block from prediction mode parameters for the current block.
46. The method according to any of claims 1 to 20, wherein the new motion information candidate list is a candidate list allowing bi-directional motion information to exist.
47. An inter-prediction method applied to an encoder, the method comprising:
determining a weight derivation mode of the current block;
constructing a new motion information candidate list based on the weight derivation mode of the current block;
determining an inter prediction value of the current block based on the new motion information candidate list.
48. The method of claim 47, wherein the weight derivation mode for the current block is one of a plurality of weight derivation modes in a geometrically partitioned prediction mode, or wherein the weight derivation mode for the current block is one of a plurality of weight derivation modes in an angularly weighted prediction mode.
49. The method of claim 47 wherein the weighting derivation modes for the current block differ in class and the new motion information candidate list is constructed differently.
50. The method of claim 47, wherein the constructing a new motion information candidate list based on the weight derivation mode for the current block comprises:
Determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode.
51. The method of claim 50 wherein the known motion information associated with the current block comprises N motion information associated with the current block; n is an integer greater than or equal to 1;
the N motion information associated with the current block includes: motion information of at least one neighboring block of the current block in spatial domain, and/or motion information of at least one corresponding block of the current block in temporal domain.
52. The method of claim 51, wherein each of the N motion information comprises original motion information, and wherein the original motion information comprises motion vector information and reference frame information.
53. The method of claim 52, wherein the original motion information is one-way original motion information, or two-way original motion information, or one or two-way original motion information obtained by splitting two-way original motion information.
54. The method of claim 51, wherein in the case that N is greater than or equal to 2, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
In case that the weight derivation mode of the current block is the first type of weight derivation mode, arranging the motion information of the at least one corresponding block before the motion information of the at least one neighboring block;
under the condition that the weight derivation mode of the current block is the second type weight derivation mode, inserting the motion information of the at least one corresponding block into the motion information of the at least one adjacent block;
in case that the weight derivation mode of the current block is the third type of weight derivation mode, the motion information of the at least one corresponding block is arranged after the motion information of the at least one neighboring block.
55. The method of claim 50, wherein in the case that N is greater than or equal to 2, determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
the sorting mode of the known motion information related to the current block is determined from a sorting mode set, and the sorting mode set comprises: performing full arrangement on the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block, and the motion information of the lower right related block of the current block to obtain a plurality of sorting modes;
Wherein, when the weight derivation modes of the current block are different, the sorting modes determined from the sorting mode set are different;
wherein any one of the motion information of the lower-left related block of the current block, the motion information of the upper-right related block of the current block, the motion information of the upper-left related block of the current block, and the motion information of the lower-right related block of the current block is: motion information of the current block in a spatial domain or motion information of the current block in a temporal domain.
56. The method of claim 55, wherein the motion information of the bottom-left neighboring block of the current block comprises: motion information of all blocks or partial blocks at the lower left of the current block;
the motion information of the upper-right neighboring block of the current block includes: motion information of all or part of blocks to the upper right of the current block;
the motion information of the upper left neighboring block of the current block includes: motion information of all or a part of blocks on the upper left of the current block;
the motion information of the lower right block of the current block in the temporal domain includes: motion information of blocks in a temporal domain outside the current block, or motion information of blocks in a temporal domain inside the current block.
57. The method of claim 51, wherein in the case that N is greater than or equal to 2, the determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode of the current block comprises one of:
under the condition that the weight derivation mode of the current block is a fourth type weight derivation mode, arranging all or part of one-way original motion information in the N pieces of motion information before splitting two-way motion information in the N pieces of motion information to obtain all or part of one or two pieces of one-way original motion information;
arranging all or part of the unidirectional original motion information in the N pieces of motion information before all or part of bidirectional motion information in the N pieces of motion information under the condition that the weight derivation mode of the current block is a fifth type weight derivation mode;
determining the sorting priority of the N pieces of motion information under the condition that the weight derivation mode of the current block is a sixth type weight derivation mode, and sorting the N pieces of motion information based on the sorting priority;
and in the case that the weight derivation mode of the current block is a seventh-class weight derivation mode, determining uni-directional information of each piece of the N pieces of motion information and an ordering priority of the N pieces of motion information, and ordering the N pieces of motion information based on the uni-directional information of each piece of motion information and the ordering priority.
58. The method of claim 51, further comprising:
determining the image frames except the current frame and the frame where the corresponding block is located as a first specific frame;
determining motion information of a first target block corresponding to the current block on the first specific frame;
zooming the motion information of the first target block to obtain the motion information of the corresponding block;
wherein the scaling the motion information of the first target block to obtain the motion information of the corresponding block includes one of:
scaling the bidirectional motion information of the first target block to obtain bidirectional motion information of the corresponding block;
and scaling the unidirectional motion information of the first target block to obtain the bidirectional motion information of the corresponding block.
59. The method of claim 52, wherein each of the N motion information further comprises derived motion information, the derived motion information determined based on the original motion information;
the derived motion information includes motion vector information and reference frame information.
60. The method according to claim 59, wherein the derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting two-way derived motion information;
The one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
61. The method of claim 59, wherein in the case that N is greater than or equal to 2, determining the N pieces of motion information in an ordered manner comprises one of:
arranging all or part of the N original motion information before all or part of the N derived motion information;
determining at least one of uni-directional information of each original motion information in the N original motion information, a sorting priority of the N original motion information, uni-directional information of each derived motion information in the N derived motion information, and a sorting priority of the N derived motion information, and sorting the N motion information based on the at least one information.
62. The method of claim 59, wherein the derived motion information has a same prediction direction as the original motion information;
the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
63. The method of claim 59, wherein the motion vector information comprises first axis component information and second axis component information; the method further comprises the following steps:
determining first axis component information and second axis component information of each derived motion information in M derived motion information based on the first axis component information and the second axis component information in the original motion information, and taking the first axis component information and the second axis component information of each derived motion information as motion vector information of each derived motion information; m is an integer greater than or equal to 1;
the first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
64. The method of claim 63, wherein said determining the first axis component information and the second axis component information of each of the M derived motion information based on the first axis component information and the second axis component information of the original motion information comprises one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
Determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information for each of the M derived motion information based on a result of scaling the second axis component information of the original motion information.
65. The method of claim 64, wherein determining the first axis component information of each of the M derived motion information based on a result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
66. The method of claim 65, wherein said determining, based on each of said M first results, first axis component information for said each derived motion information comprises one of:
Taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
67. The method of claim 66, wherein said determining, based on each of said M second results, first axis component information for said each derived motion information comprises one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each result of the M second results by a specific number of bits to obtain M third results, and determining first axis component information of each derived motion information based on each result of the M third results;
wherein the third value is obtained by shifting a target bit to the left, and the target bit is obtained by subtracting one from the specific bit.
68. The method according to any one of claims 63 to 67, wherein the absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
The M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
69. The method of claim 68, further comprising:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
70. The method of claim 68, further comprising:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
And when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
71. The method of claim 65, wherein the M first divisors comprise a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
And taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
72. The method according to any of claims 63 to 67, wherein in case the original motion information is bi-directional original motion information, the method further comprises:
splitting the original motion information into first one-way original motion information and second one-way original motion information;
taking a result of multiplying a first value by first axis component information or second axis component information in motion vector information of the first one-way original motion information as the first axis component information or the second axis component information in motion vector information of the first one-way derivative motion information;
taking the result of multiplying the fourth value by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the first axis component information or the second axis component information in the motion vector information of the second one-way derivative motion information;
wherein the first value and the fourth value are both greater than 0;
wherein the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
73. The method of claim 59, wherein the N motion information comprises: original motion information of at least two adjacent blocks of the current block on a spatial domain; the at least two adjacent blocks are adjacent, or the at least two adjacent blocks are at the lower left corner or the upper right corner or the upper left corner of the current block;
determining the derived motion information based on the raw motion information, including:
determining a second target block from the at least two adjacent blocks, and taking a frame where the second target block is located as a second specific frame;
scaling the motion vector information in the original motion information of the adjacent blocks except the second target block in the at least two adjacent blocks to the second specific frame to obtain the motion vector information of the at least two blocks to be averaged; the at least two blocks to be averaged comprise the second target block;
averaging or weighted averaging is carried out on the motion vector information of the at least two blocks to be averaged to obtain the motion vector information of the corresponding derived motion information;
using the motion vector information of the corresponding derived motion information as the motion vector information of the derived motion information of each of the at least two neighboring blocks;
Wherein a prediction direction of the derived motion information is the same as a prediction direction of the original motion information, and reference frame information of the derived motion information is the second specific frame.
74. The method according to any of claims 51-66, wherein each of the N motion information comprises original motion information;
the constructing the new motion information candidate list based on the sorting mode comprises:
determining an initial motion information candidate list;
and based on the sorting mode, filling all or part of the original motion information of the at least one adjacent block and/or all or part of the original motion information of the at least one corresponding block into the initial motion information candidate list in sequence or in a staggered manner to obtain the new motion information candidate list.
75. The method of claim 74 wherein each of the N motion information comprises derived motion information;
the sequentially or alternately filling all or part of the original motion information of the at least one neighboring block and/or all or part of the original motion information of the at least one corresponding block into the initial motion information candidate list based on the sorting manner to obtain the new motion information candidate list, including:
Based on the sorting, sequentially or alternatively filling all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of at least one corresponding block, all or part of the derived motion information of the at least one neighboring block, and all or part of the derived motion information of at least one corresponding block into the initial motion information candidate list.
76. The method of claim 75, wherein the initial motion information candidate list is filled with a predetermined number of motion information; each piece of motion information in the preset number of pieces of motion information is the original motion information or the derivative motion information; the preset number is 2-6.
77. The method of claim 75, further comprising:
after filling at least one piece of original motion information into the initial motion information candidate list, determining derived motion information to be filled;
filling the derived motion information to be filled into the initial motion information candidate list;
or, in the case that it is determined that the derived motion information to be filled is different from the already-filled original motion information corresponding to the derived motion information to be filled, filling the derived motion information to be filled into the initial motion information candidate list;
Or, in the case that it is determined that the derived motion information to be filled is different from the already filled original motion information, filling the derived motion information to be filled into the initial motion information candidate list.
78. The method of any one of claims 75-77, wherein prior to determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode for the current block, further comprising:
acquiring original motion information of at least one adjacent block and original motion information of at least one corresponding block;
generating a certain number of derived motion information based on all or part of the original motion information of the at least one neighboring block and/or based on all or part of the original motion information of the at least one corresponding block;
wherein the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of neighboring blocks and/or derived motion information of corresponding blocks.
79. The method of claim 74, further comprising:
acquiring original motion information of at least one adjacent block and unidirectional motion information or bidirectional motion information of a corresponding block;
Filling one unidirectional original motion information or at least two mutually different unidirectional original motion information in the original motion information of the at least one adjacent block into the initial motion information candidate list;
and under the condition that the first total number of the unidirectional original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
80. The method of claim 79, wherein in case that the first total number of uni-directional original motion information populated into the initial motion information candidate list is less than the preset number minus one, the method further comprises:
sequentially splitting the bidirectional original motion information of the at least one adjacent block to obtain two pieces of unidirectional original motion information corresponding to the bidirectional original motion information, and sequentially filling the two pieces of unidirectional original motion information which are different from the filled unidirectional motion information into the initial motion information candidate list; or, sequentially filling the bidirectional original motion information of the at least one neighboring block into the initial motion information candidate list;
And under the condition that the second total number of the original motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
81. The method of claim 80, further comprising:
acquiring the first two unidirectional original motion information filled into the initial motion information candidate list under the condition that the second total number of the unidirectional original motion information filled into the initial motion information candidate list is less than the preset number minus one;
determining four corresponding one-way derivative motion information based on the first two one-way original motion information;
sequentially filling the four derived motion information different from the filled unidirectional motion information into the initial motion information candidate list;
and under the condition that the third total number of the unidirectional original motion information and the unidirectional derivative motion information filled into the initial motion information candidate list is equal to the preset number minus one, continuously filling the unidirectional motion information or the bidirectional motion information of the corresponding block into the initial motion information candidate list.
82. The method according to any of claims 75 to 77, wherein in case the derived motion information to be populated is bi-directionally derived motion information, splitting the bi-directionally derived motion information into two uni-directionally derived motion information; filling at least one of the two uni-directionally derived motion information into the initial motion information candidate list;
and/or splitting the two-way original motion information into two pieces of one-way original motion information under the condition that the original motion information to be filled is the two-way original motion information, and filling at least one of the two pieces of one-way original motion information into the initial motion information candidate list, or filling the two-way original motion information into the initial motion information candidate list.
83. The method of any one of claims 50 to 66, further comprising:
grouping a plurality of weight derivation modes in the geometric partition prediction mode or a plurality of weight derivation modes in the angle weighting prediction mode to obtain at least two types of weight derivation modes; different classes of weight derivation modes correspond to different sorting modes.
84. The method according to claim 83, wherein said at least two sets of partitioning patterns comprise:
The eighth class of weight derivation modes are used for representing that the weight derivation modes of the current block are upper left and lower right weight derivation modes;
a ninth class of weight derivation mode, configured to characterize a weight derivation mode of the current block as an upper and lower weight derivation mode;
a tenth type of weight derivation mode, configured to characterize a weight derivation mode of the current block as a lower-left and upper-right weight derivation mode;
and the eleventh class of weight derivation mode is used for characterizing the weight derivation modes of the current block as the left and right weight derivation modes.
85. The method of claim 84, wherein determining the known motion information associated with the current block in an ordered manner based on the weight-derived mode for the current block comprises one of:
when the weight derivation mode of the current block belongs to an eighth class of weight derivation mode, determining the ordering mode of the known motion information as the ordering mode in which the motion information of the upper left adjacent block of the current block is ordered in the front;
when the weight derivation mode of the current block belongs to a ninth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the upper block of the current block is sequenced in the front;
When the weight derivation mode of the current block belongs to a tenth weight derivation mode, determining that the sequencing mode of the known motion information is a sequencing mode in which the motion information of the left lower adjacent block of the current block is sequenced in the front;
and when the weight derivation mode of the current block belongs to an eleventh class of weight derivation mode, determining the sequencing mode of the known motion information as the sequencing mode in which the motion information of the left block of the current block is sequenced in the front.
86. The method of any of claims 51 to 66, wherein the at least one neighboring block comprises: at least one of an outer lower left block, an inner upper right block, an outer upper right block, an inner upper outer left block, an inner upper left outer block, an outer upper left block, or the at least one neighboring block comprises: at least one of an inner left outer lower block, an inner upper outer right block, an outer right upper block, an outer left lower block, an outer left upper block;
the at least one corresponding block includes: at least one of a block corresponding to an upper left corner of an interior of the current block, a block corresponding to a lower right corner of the interior of the current block, and a block corresponding to a lower right corner of an exterior of the current block.
87. The method of any one of claims 47 to 66, wherein in the weight derivation mode for the current block, the current block is partitioned into a first partition and a second partition;
the determining an inter prediction value of the current block based on the new motion information candidate list includes:
determining motion information of a first partition and motion information of a second partition from the new motion information candidate list;
determining a first prediction value of the first partition based on the motion information of the first partition, and determining a second prediction value of the second partition based on the motion information of the second partition;
and performing weighted fusion on the first predicted value and the second predicted value to obtain the interframe predicted value of the current block.
88. The method of claim 87, wherein if the motion information of the first partition is bi-directional motion information, the motion information of the first partition is processed according to a bi-directional prediction method;
and/or processing the motion information of the second partition according to a bidirectional prediction method under the condition that the motion information of the second partition is bidirectional motion information.
89. The method of claim 88, wherein the bi-directional prediction method is a method that does not use bi-directional optical flow or a method that uses decoding-side motion vector optimization.
90. The method of claim 87, wherein determining motion information for a first partition and motion information for a second partition from the new candidate list of motion information comprises:
determining an index value of the first partition and an index value of the second partition;
determining motion information in the new motion information candidate list indicated by the index value of the first partition as motion information of the first partition based on the new motion information candidate list;
determining, based on the new motion information candidate list, motion information in the new motion information candidate list indicated by the index value of the second partition as motion information of the second partition.
91. The method of claim 90, wherein determining the index value of the first partition and the index value of the second partition comprises:
carrying out pre-coding processing on the current block by utilizing multiple prediction modes to obtain rate distortion cost values corresponding to each prediction mode;
And selecting a minimum rate distortion cost value from the obtained multiple rate distortion cost values, and respectively determining two pieces of motion information corresponding to the minimum rate distortion cost value as the index value of the first partition and the index value of the second partition.
92. The method of any one of claims 47 to 66, wherein the determining the weight derivation mode for the current block comprises:
determining a prediction mode parameter of a current block; the prediction mode parameter is used for indicating that an inter prediction value of the current block is determined by using a geometric partition prediction mode or an angle weighted prediction mode;
determining a weight-derived mode for the current block from prediction mode parameters for the current block.
93. The method according to any of claims 47-66, wherein the new motion information candidate list is a candidate list allowing bi-directional motion information to exist.
94. An inter-prediction method applied to a decoder, the method comprising:
analyzing the code stream to obtain the motion vector information of the original motion information related to the current block;
determining motion vector information of M derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1;
Constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
determining an inter prediction value of the current block based on the new motion information candidate list.
95. The method of claim 94, wherein the motion vector information comprises first axis component information and second axis component information;
determining motion vector information for M derived motion information based on a result of scaling motion vector information for the original motion information, including one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information of each derived motion information of the M derived motion information based on a result of scaling the second axis component information of the original motion information;
The first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
96. The method of claim 95, wherein the determining the first axis component information of each of the M derived motion information based on the result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
97. The method of claim 96, wherein said determining, based on each of said M first results, first axis component information for said each derived motion information comprises one of:
taking each result of the M first results as first axis component information of the each derived motion information;
Determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
98. The method of claim 97, wherein determining the first axis component information of each derived motion information based on each of the M second results comprises one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each of the M second results by a particular number of bits to obtain M third results, and determining first-axis component information of each derived motion information based on each of the M third results.
99. The method of claim 98 wherein the third value is a left-shifted target bit, the target bit being the specified number of bits minus one.
100. The method of claim 98, wherein said determining first axis component information for each derived motion information based on each of said M third results comprises:
Taking each result in the M third results as the first axis component information of each derived motion information under the condition that the first axis component information of the original motion information is a positive value;
multiplying each result of the M third results by a negative one if the first axis component information of the original motion information is a negative value as the first axis component information of the each derived motion information.
101. The method according to any one of claims 96 to 100, wherein an absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
102. The method of claim 101, further comprising:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
Determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
103. The method of claim 101, further comprising:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
and when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
104. The method of claim 96, wherein the M first divisors comprise a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
Each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
105. The method according to any one of claims 94 to 100, wherein the original motion information is unidirectional original motion information, or bidirectional original motion information, or one or two unidirectional original motion information obtained by splitting bidirectional original motion information;
The derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting the two-way derived motion information;
the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
106. The method according to any one of claims 94 to 100, wherein said parsing the codestream to obtain motion vector information of original motion information associated with the current block comprises:
analyzing the code stream, and acquiring motion vector information of original motion information related to a current block and a weight derivation mode of the current block;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information, comprising:
constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
107. The method of any of claims 106, wherein said constructing the new motion information candidate list based on the weight derivation mode for the current block, the motion vector information for the original motion information, and the motion vector information for the derived motion information comprises:
determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode, the motion vector information of the original motion information and the motion vector information of the derived motion information.
108. An inter-prediction method applied to an encoder, the method comprising:
determining motion vector information of original motion information related to the current block;
determining motion vector information of M derived motion information based on a result of scaling the motion vector information of the original motion information; m is an integer greater than or equal to 1;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
determining an inter prediction value of the current block based on the new motion information candidate list.
109. The method of claim 108, wherein the motion vector information comprises first axis component information and second axis component information;
determining motion vector information for M derived motion information based on a result of scaling motion vector information for the original motion information, including one of:
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; taking second axis component information of the original motion information as second axis component information of each derived motion information in the M derived motion information;
determining first axis component information of each derived motion information of the M derived motion information based on a result of scaling the first axis component information of the original motion information; determining second axis component information of each derived motion information of the M derived motion information based on a result of scaling the second axis component information of the original motion information;
the first axis is an x axis or a y axis, the second axis is a y axis or an x axis, and the first axis is different from the second axis.
110. The method of claim 109, wherein determining the first axis component information of each of the M derived motion information based on a result of scaling the first axis component information of the original motion information comprises one of:
multiplying first axis component information of the original motion information by M first values to obtain M first results, and determining first axis component information of each derived motion information based on each result of the M first results;
dividing the first axis component information of the original motion information by M second values to obtain M first divisors, and determining the first axis component information of each derived motion information based on each divisor in the M first divisors.
111. The method of claim 110, wherein determining the first axis component information of each derived motion information based on each of the M first results comprises one of:
taking each result of the M first results as first axis component information of the each derived motion information;
determining M third values corresponding to the M first results one by one, adding the M first results and the M third values one by one to obtain M second results, and determining first axis component information of each derived motion information based on each result in the M second results.
112. The method of claim 111, wherein said determining, based on each of said M second results, first axis component information for said each derived motion information comprises one of:
determining a first motion vector for each of the M second results as a first motion vector for each of the derived motion information;
right-shifting each of the M second results by a particular number of bits to obtain M third results, and determining first-axis component information of each derived motion information based on each of the M third results.
113. The method of claim 112, wherein said third value is a left-shifted target bit, and wherein said target bit is the specified number of bits minus one.
114. The method of claim 112, wherein said determining the first axis component information of each derived motion information based on each of the M third results comprises:
taking each result in the M third results as the first axis component information of each derived motion information under the condition that the first axis component information of the original motion information is a positive value;
Multiplying each result of the M third results by a negative one if the first axis component information of the original motion information is a negative value as the first axis component information of the each derived motion information.
115. The method according to any one of claims 110 to 114, wherein an absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
116. The method of claim 115, further comprising:
determining the first specific value as a first coefficient in the case that the absolute value of the first axis component information of the original motion information is less than or equal to a second threshold;
determining the first specific value as a second coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the second threshold and less than or equal to a third threshold;
Determining the first specific value as a third coefficient when the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the third threshold;
wherein the first coefficient is less than the second coefficient, which is less than the third coefficient.
117. The method of claim 115, further comprising:
taking a first target value as the first axis component information of the derived motion information when the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold and the first axis component information in the motion vector information of the original motion information is a positive number;
and when the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to a first threshold and the first axis component information in the motion vector information of the original motion information is a negative number, taking the negative first target value as the first axis component information of the derived motion information.
118. The method of claim 110, wherein the M first divisors comprise a first set of divisors, and/or, a second set of divisors, and/or, a third set of divisors;
Each divisor of the first set of divisors is greater than a maximum threshold;
each divisor of the second set of divisors is greater than or equal to a minimum threshold and less than or equal to the maximum threshold;
each divisor of the third set of divisors is less than a minimum threshold;
the determining, based on each divisor of the M first divisors, first axis component information for the each derived motion information includes at least one of:
taking the maximum threshold as the first axis component information of each derived motion information corresponding to the first set of divisors in the M derived motion information;
taking each divisor in the second set of divisors as first axis component information of each derived motion information corresponding to the second set of divisors in the M derived motion information;
and taking the minimum threshold as the first axis component information of each derived motion information corresponding to the third group of divisors in the M derived motion information.
119. The method of any one of claims 108 to 114, wherein the original motion information is unidirectional original motion information, or bidirectional original motion information, or one or two unidirectional original motion information obtained by splitting bidirectional original motion information;
The derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting the two-way derived motion information;
the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
120. The method of any one of claims 108 to 114, wherein said obtaining motion vector information of original motion information associated with the current block comprises:
acquiring motion vector information of original motion information related to a current block and a weight derivation mode of the current block;
constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information, comprising:
constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
121. The method of claim 120, wherein the constructing the new motion information candidate list based on the weight-derived mode for the current block, the motion vector information for the original motion information, and the motion vector information for the derived motion information comprises:
Determining an ordering mode of the known motion information related to the current block based on the weight derivation mode of the current block;
and constructing the new motion information candidate list based on the sorting mode, the motion vector information of the original motion information and the motion vector information of the derived motion information.
122. A decoder, comprising:
the acquisition unit is used for analyzing the code stream and acquiring the weight derivation mode of the current block;
a construction unit for constructing a new motion information candidate list based on the weight derivation mode of the current block;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
123. An encoder, comprising:
a mode determination unit for determining a weight derivation mode of the current block;
a construction unit for constructing a new motion information candidate list based on the weight derivation mode of the current block;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
124. A decoder, comprising:
the acquisition unit is used for analyzing the code stream and acquiring the weight derivation mode of the current block;
A derived motion information determining unit configured to determine motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
a construction unit configured to construct a new motion information candidate list based on motion vector information of the original motion information and motion vector information of the derived motion information;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
125. An encoder, comprising:
an original motion information determining unit for determining motion vector information of original motion information related to the current block;
a derived motion information determining unit configured to determine motion vector information of M derived motion information based on a result of scaling motion vector information of the original motion information; m is an integer greater than or equal to 1;
a construction unit configured to construct a new motion information candidate list based on motion vector information of the original motion information and motion vector information of the derived motion information;
a prediction unit for determining an inter prediction value of the current block based on the new motion information candidate list.
126. A decoder, comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implementing the steps of the method of any one of claims 1 to 46 when executing the program;
alternatively, the processor, when executing the program, performs the steps in the method of any of claims 94-107.
127. An encoder, comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor, when executing the program, implementing the steps in the method of any one of claims 47 to 93;
alternatively, the processor, when executing the program, performs the steps of the method of any of claims 108 to 121.
128. A computer storage medium, having one or more programs stored thereon, the one or more programs being executable by one or more processors to perform the steps of the method of any one of claims 1 to 46;
alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any one of claims 47-93;
Alternatively, the one or more programs may be executable by one or more processors to perform the steps in the method of any of claims 94 to 107;
alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any of claims 108 to 121.
CN202010507268.XA 2020-06-05 2020-06-05 Inter-frame prediction method, decoder, encoder, and computer storage medium Withdrawn CN113766245A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN202010507268.XA CN113766245A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, decoder, encoder, and computer storage medium
CN202180008731.9A CN114930839A (en) 2020-06-05 2021-04-02 Inter-frame prediction method, decoder, encoder, and computer storage medium
PCT/CN2021/085454 WO2021244125A1 (en) 2020-06-05 2021-04-02 Interframe prediction method, decoder, encoder, and computer storage medium
MX2022010726A MX2022010726A (en) 2020-06-05 2021-04-02 Interframe prediction method, decoder, encoder, and computer storage medium.
CN202310111464.9A CN116193139A (en) 2020-06-05 2021-04-02 Inter prediction method, decoder, encoder, and computer storage medium
TW110118914A TW202147837A (en) 2020-06-05 2021-05-25 Inter prediction method, decoder, encoder, and computer storage medium capable of increasing the diversity of motion information in a motion information candidate list, thereby improving encoding and decoding performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010507268.XA CN113766245A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, decoder, encoder, and computer storage medium

Publications (1)

Publication Number Publication Date
CN113766245A true CN113766245A (en) 2021-12-07

Family

ID=78785177

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202010507268.XA Withdrawn CN113766245A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, decoder, encoder, and computer storage medium
CN202180008731.9A Pending CN114930839A (en) 2020-06-05 2021-04-02 Inter-frame prediction method, decoder, encoder, and computer storage medium
CN202310111464.9A Pending CN116193139A (en) 2020-06-05 2021-04-02 Inter prediction method, decoder, encoder, and computer storage medium

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202180008731.9A Pending CN114930839A (en) 2020-06-05 2021-04-02 Inter-frame prediction method, decoder, encoder, and computer storage medium
CN202310111464.9A Pending CN116193139A (en) 2020-06-05 2021-04-02 Inter prediction method, decoder, encoder, and computer storage medium

Country Status (4)

Country Link
CN (3) CN113766245A (en)
MX (1) MX2022010726A (en)
TW (1) TW202147837A (en)
WO (1) WO2021244125A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023123736A1 (en) * 2021-12-31 2023-07-06 Oppo广东移动通信有限公司 Communication method, apparatus, device, system, and storage medium
WO2024077553A1 (en) * 2022-10-13 2024-04-18 Oppo广东移动通信有限公司 Video encoding method and apparatus, video decoding method and apparatus, device, system, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9349192B2 (en) * 2012-04-24 2016-05-24 Lg Electronics Inc. Method and apparatus for processing video signal
KR102438181B1 (en) * 2017-06-09 2022-08-30 한국전자통신연구원 Method and apparatus for encoding/decoding image and recording medium for storing bitstream
US10757420B2 (en) * 2017-06-23 2020-08-25 Qualcomm Incorporated Combination of inter-prediction and intra-prediction in video coding
CN109963155B (en) * 2017-12-23 2023-06-06 华为技术有限公司 Prediction method and device for motion information of image block and coder-decoder

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023123736A1 (en) * 2021-12-31 2023-07-06 Oppo广东移动通信有限公司 Communication method, apparatus, device, system, and storage medium
WO2023123495A1 (en) * 2021-12-31 2023-07-06 Oppo广东移动通信有限公司 Prediction method and apparatus, device, system, and storage medium
WO2024077553A1 (en) * 2022-10-13 2024-04-18 Oppo广东移动通信有限公司 Video encoding method and apparatus, video decoding method and apparatus, device, system, and storage medium

Also Published As

Publication number Publication date
CN116193139A (en) 2023-05-30
TW202147837A (en) 2021-12-16
MX2022010726A (en) 2022-09-23
WO2021244125A1 (en) 2021-12-09
CN114930839A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
JP7417670B2 (en) Partial cost calculation
KR102062696B1 (en) Effective prediction using partition coding
JP5490823B2 (en) Method for decoding a stream representing a sequence of images, method for encoding a sequence of images and encoded data structure
KR20170084055A (en) Video encoding method and apparatus, video decoding method and apparatus
US20210120266A1 (en) Method and device for intra-prediction
CN112369021A (en) Image encoding/decoding method and apparatus for throughput enhancement and recording medium storing bitstream
KR20200033331A (en) Methods and apparatus for encoding and decoding video images
CN112840645B (en) Method and apparatus for combining multiple predictors for block prediction in a video coding system
US20150085933A1 (en) Method and apparatus for encoding multi-view images, and method and apparatus for decoding multi-view images
WO2022117089A1 (en) Prediction method, encoder, decoder and storage medium
US11706449B2 (en) Method and device for intra-prediction
CN114830651A (en) Intra prediction method, encoder, decoder, and computer storage medium
CN114930839A (en) Inter-frame prediction method, decoder, encoder, and computer storage medium
WO2021238396A1 (en) Inter-frame prediction methods, encoder, decoder, and computer storage medium
CN113709498B (en) Inter prediction method, encoder, decoder, and computer storage medium
TW202201958A (en) Inter prediction method, coder, encoder, and computer storage medium without increasing additional bandwidth while hardware implementation, and ensuring the performance of encoding and decoding at the same time
TWI749297B (en) Composed prediction and restricted merge
CN113766244A (en) Inter-frame prediction method, encoder, decoder, and computer storage medium
CN113727119B (en) Inter-frame prediction method, encoder, decoder, and computer storage medium
CN114071159B (en) Inter prediction method, encoder, decoder, and computer-readable storage medium
RU2809619C1 (en) Method, equipment and device for encoding and decoding
CN113039802B (en) Use of history-based affine parameters
CN113039800B (en) Pruning method for history-based affine parameters
WO2024000768A1 (en) Video encoding method and apparatus, video decoding method and apparatus, and code stream, decoder, encoder and storage medium
CN111083487B (en) Storage of affine mode motion information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211207