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

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

Info

Publication number
CN113766244A
CN113766244A CN202010504292.8A CN202010504292A CN113766244A CN 113766244 A CN113766244 A CN 113766244A CN 202010504292 A CN202010504292 A CN 202010504292A CN 113766244 A CN113766244 A CN 113766244A
Authority
CN
China
Prior art keywords
information
reference frame
motion information
determining
motion
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.)
Pending
Application number
CN202010504292.8A
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 CN202010504292.8A priority Critical patent/CN113766244A/en
Priority to TW110118912A priority patent/TW202147851A/en
Publication of CN113766244A publication Critical patent/CN113766244A/en
Pending 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application discloses an inter-frame prediction method, an encoder, a decoder and a computer storage medium, wherein the decoder analyzes a code stream and acquires a prediction mode parameter of a current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; determining motion information from a motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information. The encoder determines a prediction mode parameter of the current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; determining motion information of the current block from a motion information candidate list; and determining the inter prediction value of the current block according to the motion information.

Description

Inter-frame prediction method, encoder, decoder, and computer storage medium
Technical Field
The present application relates to the field of video encoding and decoding technologies, and in particular, to an inter-frame prediction method, an encoder, a decoder, and a computer storage medium.
Background
In the field of video encoding and decoding, the process of encoding and 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.
At present, when the GPM or AWP is used for inter-frame prediction, it cannot be guaranteed that a motion information candidate list can be filled, and when the last valid motion information is used for copying and filling the motion information candidate list, duplicate checking detection needs to be performed on the motion information candidate list.
Disclosure of Invention
The application provides an inter-frame prediction method, an encoder, a decoder and a computer storage medium, which can increase the diversity of motion information in a motion information candidate list, thereby improving the encoding and decoding performance.
The technical scheme of the application is realized as follows:
in a first aspect, an embodiment of the present application provides an inter-frame prediction method applied to a decoder, where the method includes:
analyzing the code stream to obtain the prediction mode parameter of the current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block;
and determining the inter-frame prediction value of the current block according to the motion information.
In a second aspect, an embodiment of the present application provides an inter-frame prediction method applied to an encoder, where the method includes:
determining a prediction mode parameter of a current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information of a current block from the motion information candidate list;
and determining the inter-frame prediction value of the current block according to the motion information.
In a third aspect, an embodiment of the present application provides a decoder, where the decoder includes a parsing portion, a first building portion, and a first determining portion; wherein the content of the first and second substances,
the analysis part is configured to analyze the code stream and obtain the prediction mode parameter of the current block;
the first construction part is configured to construct a motion information candidate list of the current block according to a preset duplication checking strategy when the prediction mode parameter indicates that an inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the first determining part is configured to determine motion information from the motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information.
In a fourth aspect, embodiments of the present application provide a decoder comprising a first processor, a first memory storing first processor-executable instructions that, when executed, implement the inter prediction method as described above.
In a fifth aspect, an embodiment of the present application provides an encoder, where the encoder includes a second determining part and a second constructing part; wherein the content of the first and second substances,
the second determining part configured to determine a prediction mode parameter of the current block;
the second construction part is configured to construct a motion information candidate list of the current block according to a preset duplication checking strategy when the prediction mode parameter indicates that the inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the second determining section further configured to determine motion information of the current block from the motion information candidate list; and determining the inter-frame prediction value of the current block according to the motion information.
In a sixth aspect, embodiments of the present application provide an encoder comprising a second processor, a second memory storing instructions executable by the second processor, the instructions, when executed, implement the inter prediction method as described above.
In a seventh aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored, and when the computer program is executed by a first processor and a second processor, the inter-frame prediction method is implemented as described above.
According to the inter-frame prediction method, the encoder, the decoder and the computer storage medium, the decoder analyzes the code stream and obtains the prediction mode parameters of the current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information from a motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information. The encoder determines a prediction mode parameter of the current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information of the current block from a motion information candidate list; and determining the inter prediction value of the current block according to the motion information. That is to say, the inter-frame prediction method provided by the application can perform more rigorous de-duplication processing according to a preset duplication checking strategy when constructing the motion information candidate list, so that the problem of duplicate options in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of the structure of a group of images;
FIG. 2 is a first diagram illustrating weight assignment;
FIG. 3 is a second diagram illustrating weight assignment;
FIG. 4 is a schematic diagram of the spatial position relationship of a prediction block;
fig. 5 is a block diagram illustrating a video coding system according to an embodiment of the present application;
fig. 6 is a block diagram illustrating a video decoding system according to an embodiment of the present application;
FIG. 7 is a first flowchart illustrating an implementation of an inter-frame prediction method;
FIG. 8 is a flowchart illustrating a second implementation of the inter-frame prediction method;
FIG. 9 is a schematic illustration of unidirectional motion information;
FIG. 10 is a schematic illustration of bi-directional motion information;
FIG. 11 is a third flowchart illustrating an implementation of an inter-frame prediction method;
FIG. 12 is a fourth flowchart illustrating an implementation of the inter-frame prediction method;
FIG. 13 is a fifth flowchart illustrating an implementation of the inter-frame prediction method;
FIG. 14 is a sixth flowchart illustrating an implementation of the inter-frame prediction method;
FIG. 15 is a block diagram of a decoder;
FIG. 16 is a second block diagram of the decoder;
FIG. 17 is a first schematic diagram of the encoder;
fig. 18 is a schematic diagram of the composition structure of the encoder.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant application and are not limiting of the application. It should be noted that, for the convenience of description, only the parts related to the related applications are shown in the drawings.
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 coding efficiency. The following detailed description of the present application will be made in terms of inter prediction.
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.
A current frame which can be coded by using inter prediction has one or more reference frames, wherein, for the current block of the current frame which can be coded by using inter prediction, the current block can be a coding unit or a prediction unit, a pixel area with the same size as the current block of a certain reference frame can be indicated by using motion information containing a group of motion vectors MV and reference frame information, which is called a reference block, or two reference blocks of certain two reference frames which can be the same or different can be indicated by using motion information containing two groups of motion vectors MV and reference frame information. Motion Compensation (MC) derives a prediction value of the current coding unit from a 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). The current reference frame has only one List of reference frames, denoted as RefPicL0 (which may also be denoted as RefPicList0, or List0, or L0). The reference frame list RefPicL0 is the reference frame that POC precedes the current frame. The early B-Frame (Bi-directional predicted Frame) is a Frame that can be predicted using the POC reference Frame before the current Frame and the POC reference Frame after the current Frame. The B-frame has two reference frame lists, denoted by RefPicL0 and RefPicL1, respectively (RefPicL1 can also be denoted as RefPicList1, or List1, or L1). Where RefPicL0 are all POC reference frames before the current frame, and RefPicL1 are all POC reference frames after the current frame. For the current block, reference may be made to only a reference block of a certain frame in RefPicL0, which may be referred to as forward prediction; or only the reference block of a certain frame in RefPicL1 may be referred to, which may be called backward prediction; or may also refer to both a reference block of a frame in RefPicL0 and a reference block of a frame in RefPicL1, which may be referred to as bi-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 RefPicL0 and POC to be reference frames after the current frame in RefPicL 1. In other words, there may be reference frames with POC after the current frame in RefPicL0, and there may also be reference frames with POC before the current frame in RefPicL1, 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 at the same time. But the reference frames used when the current block is bi-directionally predicted must be one from RefPicL0 and one from RefPicL 1; such B frames are also referred to as generalized B frames.
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. Exemplarily, fig. 1 is a diagram Of a Group Of Pictures structure, and as shown in fig. 1, in a classic Group Of Pictures (GOP) structure Of RA, arrows indicate reference relationships, since an I frame does not need a reference frame, a P frame with POC 4 will be decoded after decoding an I frame with POC 0, and the I frame with POC 0 can be referred to when decoding a P frame with POC 4. 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. 4, 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 Low Delay 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. The 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. the current block can simultaneously reference a reference block of a certain frame in RefPicL0 and a reference block of a certain frame in RefPicL1, using two reference frame lists. 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 current frame, which reference frames are in RefPicL0 and RefPicL1 are determined by a predetermined configuration or algorithm, but the same reference frame may be present in both RefPicL0 and RefPicL1, i.e., the encoder or decoder allows the current block to reference two reference blocks in the same reference frame at the same time.
In the embodiments of the present application, an encoder or a decoder may generally use an index value (denoted by index) in a reference frame list to correspond to a reference frame. If one reference frame list length is 4, then index has four values of 0, 1, 2, 3, etc. For example, if RefPicL0 of the current frame has 4 reference frames with POC of 5, 4, 3, 0, then index 0 of RefPicL0 is a reference frame with POC 5, index 1 of RefPicL0 is a reference frame with POC 4, index 2 of RefPicL0 is a reference frame with POC 3, and index 3 of RefPicL0 is a reference frame with POC 0.
In the current multifunctional Video Coding (VVC) standard, the inter prediction mode may be a GPM mode. In the current AVS3 video codec standard, the inter prediction mode may be an AWP mode. The two prediction modes, although named differently and implemented differently, are in principle common, that is, both prediction modes can be applied to the inter prediction method in the present application.
It should be noted that, while the conventional unidirectional prediction only finds one reference block with the same size as the current block, the conventional bidirectional prediction uses two reference blocks with the same size as the current block, and the pixel value of each point in the prediction block is the average value of the corresponding positions of the two reference blocks, i.e. all the points of each reference block account for 50%. Bi-directional weighted prediction allows the ratio of two reference blocks to be different, e.g., 75% of all points in the first reference block and 25% of all points in the second reference block. But the proportions of all points in the same reference block are the same. Other optimization methods, such as decoding side Motion Vector correction (DMVR) technology, Bi-directional Optical Flow (BIO), etc., may cause some changes in reference pixels or predicted pixels, and GPM or AWP also uses two reference blocks with the same size as the current block, but some pixel positions use 100% of the pixel values at the corresponding position of the first reference block, some pixel positions use 100% of the pixel values at the corresponding position of the second reference block, and in the boundary area, the pixel values at the corresponding positions of the two reference blocks are used in a certain proportion. How these weights are specifically allocated is determined by the prediction mode of the GPM or the AWP, or the GPM or the AWP may be considered to use two reference blocks with different sizes from the current block, i.e. each of the two reference blocks takes a required part as a reference block.
Exemplarily, fig. 2 is a first diagram of weight allocation, as shown in fig. 2, which illustrates a first diagram of weight allocation of multiple partition modes of a GPM on a 64 × 64 current block according to an embodiment of the present application, where 64 partition modes exist in the GPM. Fig. 3 is a second diagram of weight allocation, as shown in fig. 3, which illustrates a diagram of weight allocation of multiple partition modes of an AWP on a 64 × 64 current block according to an embodiment of the present application, where 56 partition modes exist in the AWP. In either fig. 2 or fig. 3, in each of the division modes, the black area indicates that the weight value of the corresponding position of the first reference block is 0%, the white area indicates that the weight value of the corresponding position of the first reference block is 100%, the gray area indicates that the weight value of the corresponding position of the first reference block is greater than 0% and less than 100% according to the difference of color shades, and the weight value of the corresponding position of the second reference block is 100% minus the weight value of the corresponding position of the first reference block.
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, in the embodiment of the present application, the GPM or the AWP belongs to an inter-frame prediction technology, and the GPM or the AWP needs to transmit a flag (flag) whether the GPM or the AWP is used in a code stream, where the flag may indicate whether the GPM or the AWP is used by a current block. If GPM or AWP is used, the encoder needs to transmit a specifically used mode in the code stream, namely one of 64 division modes of GPM or one of 56 division modes of AWP; and index values of two unidirectional motion information. That is, for the current block, the decoder may obtain information about whether the GPM or the AWP is used by parsing the code stream, and if it is determined that the GPM or the AWP is used, the decoder may parse prediction mode parameters of the GPM or the AWP and two motion information index values, for example, the current block may be divided into two partitions, and may parse a first index value corresponding to the first partition and a second index value corresponding to the second partition.
Specifically, for the GPM 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 mode, if the AWP is used, the code stream will transmit the prediction mode parameters under the AWP, such as the specific division mode of the AWP; typically, the AWP includes 56 partition modes.
In inter prediction modes, such as GPM and AWP, both require the use of two unidirectional motion information to find two reference blocks. The current implementation is that an encoder side uses the related information of the encoded/decoded part before the current block to construct a unidirectional motion information candidate list, selects unidirectional motion information from the unidirectional motion information candidate list, and writes the index value (index) of the two unidirectional motion information in the unidirectional motion information candidate list into the code stream. The same way is used at the decoder side, i.e. a unidirectional 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 unidirectional motion information are analyzed from the code stream, and then the two unidirectional motion information, namely the two unidirectional motion information needed by the current block, are searched from the unidirectional motion information candidate list.
That is, the unidirectional motion information described herein 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 frame index values in the reference frame list. One way to represent the reference frame index values is to record the reference frame index values of two reference frame lists, where the reference frame index value corresponding to one reference frame list is valid, such as 0, 1, 2, etc.; the reference frame index value corresponding to the other reference frame list is invalid, i.e., -1. The reference frame list with the valid reference frame index value is the 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 frame 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 unidirectional 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.
For example, the AWP in AVS is taken as an example to describe the method for constructing the unidirectional motion information candidate list. Fig. 4 is a schematic diagram of the spatial position relationship of the prediction block, and as shown in fig. 4, the block E is a current block, and the block a, the block B, the block C, the block D, the block F, and the block 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.
Based on the above fig. 4, the "presence" of the 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".
Assume that the first uni-directional motion information of the AWP is denoted mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L 1. Wherein mvAwp0L0 represents the corresponding motion vector in the first reference frame list RefPicL0, and RefIdxAwp0L0 represents the reference frame index value of the corresponding reference frame in the first reference frame list RefPicL 0; mvAwp0L1 represents the corresponding motion vector in the second reference frame list RefPicL1, and RefIdxAwp0L1 represents the reference frame index value of the corresponding reference frame in the second reference frame list RefPicL 1. The second one-way motion information and so on.
Since the motion information is unidirectional, the values of RefIdxAwp0L0 and RefIdxAwp0L1 must be valid values, 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.
Specifically, the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1 are as follows:
in a first step, illustrated in FIG. 4, F, G, C, A, B and D are neighboring blocks of the current block E, the "availability" of F, G, C, A, B and D is determined:
(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 uni-directionally available motion information is put into a uni-directional motion information candidate list (denoted as an AwpUniArray) in the order of F, G, C, A, B and D until the length of the AwpUniArray is 3 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 List RefPicL0 and unidirectional motion information pointing to the reference frame List List1 according to the sequence of F, G, C, A, B and D, unidirectional motion information duplication operation is firstly carried out, and if the unidirectional motion information is not duplicated, the AfwUniarray is put in until the length is 3 or the traversal is finished.
Fourthly, the time-domain bidirectional motion information is split into unidirectional motion information pointing to a reference frame List RefPicL0 and unidirectional motion information pointing to a reference frame List List1, unidirectional motion information duplication checking operation is performed firstly, and if the unidirectional motion information duplication checking operation is not repeated, the unidirectional motion information duplication checking operation is put into an AwpUniArray until the length is 4 or the traversal is finished.
And fifthly, if the length of the AwpUniArray is less than 4, repeating the filling operation on the last one-way motion information in the AwpUniArray until the length of the AwpUniArray is 4.
Sixthly, 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.
It can be seen that two reference blocks can be found by using the two unidirectional motion information determined by the above method, a weight of each pixel position of the two reference blocks can be determined according to a specific prediction mode used by GPM or AWP, and finally the two reference blocks are weighted to obtain a prediction block of the current block.
Further, on the encoding side, if the current mode is the skip mode, the prediction block is both an encoding block, meaning that encoding of the current block is finished. If the current mode is not the skip mode, writing a quantization coefficient in the code stream; and the quantization coefficient is a residual block formed by subtracting a residual obtained by the interframe prediction value from the actual value of the current block, and the residual block is obtained by transforming and quantizing, and the encoding of the current block is finished at this time.
Further, at the decoding side, if the current mode is the skip mode, the predicted block is a decoded block, meaning that the decoding of the current block is finished. And if the current mode is not the skip mode, entropy decoding and analyzing the quantized coefficient, then carrying out inverse quantization, carrying out inverse transformation to obtain a residual block, adding the residual block and the prediction block to obtain a decoded block, and ending the decoding of the current block at this time.
It should be noted that, in deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1, a duplication check operation is required, that is, whether two pieces of unidirectional motion information are the same is checked. Since two identical reference blocks can be considered as one reference block regardless of weight division, there is no meaning for AWP, and therefore, AWP needs to use two pieces of unidirectional motion information to find two different reference blocks.
For example, the description of motion information duplication in the AVS3 text is mainly as follows: the two motion information are different if they satisfy one or more of the following conditions; otherwise the two motion information are the same:
1. InterPredRefMode is different;
2. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
3. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
4. each of the mtpredrefmodes is 2, and any one of a RefPicL0 motion vector, a RefPicL1 motion vector, a RefPicL0 reference frame index, or a RefPicL1 reference frame index is not equal.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
At present, when a duplicate checking operation is performed, when valid reference frame lists, reference frame indexes, and MVs corresponding to two pieces of unidirectional motion information are all the same, the two pieces of unidirectional motion information can be considered to be the same unidirectional motion information.
However, the standard allows the same reference frame, i.e. the reference frame of the same POC (or unique identification of Decoding Order Index (DOI)) to appear in two reference frame lists, and there is no duplicate reference frame in the same reference frame list, i.e. there is no reference frame of the same POC (or unique identification of DOI), i.e. if the reference frame lists of two pieces of unidirectional motion information are the same but the reference frame indexes are different, then their corresponding reference frames are definitely different, but there may be the same reference frame in each of the two reference frame lists, and their indexes in the respective lists may be the same or different, so even if the valid reference frame list and the reference frame index are different, the reference frame pointed to by them may be the same reference frame.
Therefore, the existing duplication checking method is not strict, the duplication checking effect is poor in a scene that the one-way motion information is required to be duplicated or whether the motion information is the same or not is judged, and further, when a next one-way motion information candidate list is constructed, repeated one-way motion information occupies too many positions, so that different next one-way motion information is abandoned due to the fact that the list is full, index values of other one-way motion information in the list are increased, more bit numbers are required for coding, and coding efficiency is reduced.
That is to say, when the GPM or AWP is used to perform inter-frame prediction at present, it cannot be guaranteed that the motion information candidate list can be filled, and when the last valid motion information is used to copy and fill the motion information candidate list, duplicate checking detection needs to be performed on the motion information candidate list.
In order to overcome the defects in the prior art, in the embodiment of the application, when the motion information candidate list is constructed, more rigorous de-duplication processing can be performed according to a preset duplication checking strategy, so that the problem that duplicate options appear in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Specifically, when a motion information candidate list is constructed, the motion information is subjected to duplicate checking detection according to a preset duplicate checking strategy, and a more rigorous duplicate checking standard is used, so that the duplicate checking effect can be obviously improved under the condition that the complexity is not obviously increased. Under the condition that the reference frame list exists, the reference frame indexes are different, but the reference frames are the same, repeated motion information under new definition can be eliminated, so that different motion information in the motion information candidate list is increased, the indexes of effective motion information are advanced, and the coding and decoding performance is improved.
It should be understood that the present application provides a video coding system, fig. 5 is a schematic block diagram illustrating a component of the video coding system provided by the present application, and as shown in fig. 5, the video coding system 11 may include: a transform unit 111, a quantization unit 112, a mode selection and coding control logic unit 113, an intra prediction unit 114, an inter prediction unit 115 (including: motion compensation and motion estimation), an inverse quantization unit 116, an inverse transform unit 117, a loop filtering unit 118, an encoding unit 119, and a decoded image 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 the process of generating motion vectors that can estimate the motion of the video reconstructed block, and then motion compensation is performed based on the motion vectors 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. 6 is a schematic block diagram illustrating a composition of a video decoding system provided in an embodiment of the present application, and as shown in fig. 6, the video decoding system 12 may include: a decoding unit 121, an inverse transform unit 127, and inverse quantization unit 122, intra prediction unit 123, motion compensation unit 124, loop filter unit 125, and decoded picture buffer unit 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 215 of the video coding system 11 and the inter-frame prediction unit, i.e., the motion compensation unit 124, of the video decoding system 12; 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.
Based on this, the technical solution of the present application is further elaborated below with reference to the drawings and the embodiments. Before the detailed description is given, it should be noted that "first", "second", "third", etc. are mentioned throughout the specification only for distinguishing different features, and do not have the functions of defining priority, precedence, size relationship, etc.
The embodiment of the application provides an inter-frame prediction method, which is applied to video decoding equipment, namely a decoder. The functions performed by the method may be implemented by the first processor in the decoder calling a computer program, which of course may be stored in the first memory, it being understood that the decoder comprises at least the first processor and the first memory.
Further, in an embodiment of the present application, fig. 7 is a first flowchart illustrating an implementation of an inter prediction method, and as shown in fig. 7, the method for a decoder to perform inter prediction may include the following steps:
step 101, analyzing the code stream to obtain the prediction mode parameter of the current block.
In an embodiment of the present application, a decoder may first parse a binary code stream to obtain the prediction mode parameters of the current block. Wherein the prediction mode parameter may be used to determine a prediction mode used by the current block.
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.
Further, in the embodiments of the present application, the prediction mode parameter may indicate not only the prediction mode adopted by the current block but also a parameter related to the prediction mode.
It is understood that, in the embodiments of the present application, the prediction modes may include inter prediction modes, conventional intra prediction modes, non-conventional intra prediction modes, and the like, wherein the inter prediction modes may include a normal inter prediction mode, a GPM mode, an AWP mode, and the like.
That is to say, on the encoding side, the encoder may select an optimal prediction mode to perform pre-encoding on the current block, and in this process, the prediction mode of the current block may be determined, and then a prediction mode parameter for indicating the prediction mode is determined, so that the corresponding prediction mode parameter is written into the code stream and transmitted to the decoder by the encoder.
Correspondingly, on the decoder side, the decoder can directly acquire the prediction mode parameters of the current block by analyzing the code stream, and determines the prediction mode used by the current block and the related parameters corresponding to the prediction mode according to the prediction mode parameters acquired by analyzing.
Further, in an embodiment of the present application, after parsing to obtain the prediction mode parameter, the decoder may determine whether the current block uses a preset inter prediction mode based on the prediction mode parameter. The preset inter prediction mode may include at least one inter prediction mode, for example, the preset inter prediction mode may be a GPM mode, an AWP mode, or another common inter prediction mode.
Step 102, when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing.
In an embodiment of the present application, after the decoder parses the obtained prediction mode parameter, if the parsed prediction mode parameter indicates that the current block determines the inter prediction value of the current block using a preset inter prediction mode, the decoder may construct a motion information candidate list of the current block according to a preset duplication checking policy.
It should be noted that, in the embodiment of the present application, a preset duplication checking policy is used for performing deduplication processing in the process of constructing the motion information candidate list. Specifically, the deduplication process is pruning (pruning), that is, the same motion information is removed in the process of constructing the motion information candidate list.
It can be understood that, in the embodiment of the present application, the inter prediction method provided in the embodiment of the present application may be adopted in a case that the decoder parses the code stream to obtain that the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block.
For example, in the embodiments of the present application, the preset inter prediction mode may be a GPM mode, an AWP mode, or another general inter prediction mode.
Further, in the embodiment of the present application, the preset duplicate checking policy may include multiple different duplicate checking detection manners, and specifically, the preset duplicate checking policy may be defined first.
For example, in the present application, the preset duplication checking policy may be divided into a first-level policy, a second-level policy, and a third-level policy. The following describes the preset duplication checking strategy by taking the unidirectional motion information as an example.
The first-level strategy is as follows: strict duplication checking should mean that two reference blocks found by two pieces of unidirectional motion information are not identical, i.e. the pixel values of the corresponding positions of the two reference blocks are not all the same. This is because if two reference blocks found by two unidirectional motion information are identical, then inter prediction using unidirectional motion information, such as AWP, is meaningless, strictly speaking, therefore, if two reference blocks found by two unidirectional motion information are exactly the same, even if the two pieces of unidirectional motion information look different, for example, the MVs of the two pieces of unidirectional motion information are different, that is, the values of (x, y) are different, or the reference frames of two unidirectional motion information are different, or the reference frame lists corresponding to two unidirectional motion information are different, or the reference frame indexes of the two pieces of unidirectional motion information in the reference frame list are different, as long as the two reference blocks found by the two pieces of unidirectional motion information are completely the same, the two pieces of unidirectional motion information can be considered to be repeated, and the preset duplication checking strategy is determined as a first-level strategy.
And (3) second-level strategy: the relaxation is that two pieces of unidirectional motion information are considered to be repeated only when pointing to the same reference block (at the same position), whereas two pieces of unidirectional motion information are considered not to be repeated if the two pieces of unidirectional motion information point to reference blocks at different positions. Wherein, the reference blocks of the two unidirectional motion information pointing to different positions are not equal to the reference frames or MVs of the two unidirectional motion information. That is, if the MVs of the two pieces of unidirectional motion information are the same but the reference frames are different, the reference blocks found by the two pieces of unidirectional motion information are not on the same reference frame and have different positions; if the two unidirectional motion information reference frames are the same but the MVs are different, the positions of the reference blocks found by the two unidirectional motion information are also different, and the preset repetition checking strategy is determined as a second-level strategy.
And a third-level strategy: the current common practice of the codec standard is to use two reference frame lists to manage the reference frames, and use the reference frame index to find the corresponding reference frame from the lists. The reference frame management method derives a looser duplication checking standard. It can be considered that only if the valid reference frame list, reference frame index and MV corresponding to two pieces of unidirectional motion information are the same, the two pieces of unidirectional motion information are considered to be repeated unidirectional motion information, and the preset repetition checking policy is determined as a third-level policy.
However, the standard allows the same reference frame, i.e. the reference frame of the same POC (or unique identifier such as DOI), to appear in two reference frame lists, and no duplicate reference frame can exist in the same reference frame list, i.e. no reference frame of the same POC (or unique identifier such as DOI) exists, so if the reference frame lists of two pieces of unidirectional motion information are the same but the reference frame indexes are different, their corresponding reference frames are definitely different; however, the two reference frame lists may have the same reference frame, and their indexes in the respective lists may be the same or different, which may further cause the situation that even if the valid reference frame lists and reference frame indexes of the two unidirectional motion information are different, the reference frames pointed to by them may be the same reference frame,
at present, the commonly used duplication checking method is the third-level policy in the preset duplication checking policy, and in some other technologies, the third-level policy is also used for duplication checking detection, such as ultra-motion vector expression (UMVE) and history-based motion vector prediction (HMVP). It should be noted that all the unidirectional motion information is used by AWP, and the unidirectional motion information and the bidirectional motion information may be used by UMVE and HMVP. The unidirectional motion information may consider a reference frame index corresponding to one reference frame list valid and a reference frame index corresponding to another reference frame list invalid. And the bidirectional motion information is that the reference frame indexes corresponding to the two reference frame lists are valid. The reference frame indexes corresponding to the two reference frame lists are considered to be the same, if the reference frame index corresponding to one reference frame list is valid, the x and y corresponding to the reference frame list are the same, and therefore the two pieces of bidirectional motion information are repeated.
It should be noted that, the same applies to VVC, which is the third level policy of the preset duplication checking policy.
It can be understood that, in the embodiment of the present application, the preset duplication checking policy for performing duplication checking detection on the unidirectional motion information or the definition for determining whether the unidirectional motion information is the same may be extended to the bidirectional motion information. Specifically, the duplicate detection of the first-level policy may be divided into 2 sub-levels, i.e., level 1.1 and level 1.2. Wherein, for level 1.1, if the reference blocks found by the two motion information are identical according to the prediction blocks made by their subsequent required algorithms, they are considered to be identical motion information, i.e. the two motion information are repeated; for level 1.2, if two sets of reference blocks are found by two motion information (one motion information can find at most two reference blocks, which are a set of reference blocks if two reference blocks are found, and which are a set of reference blocks if one reference block is found), they are considered to be the same motion information, i.e. two motion information repeats. When the duplicate checking detection is performed according to the second-level strategy, if two sets of reference block positions pointed by two pieces of motion information (one piece of motion information can determine the positions of two reference blocks at most, if there are two reference block positions, the positions of the two reference blocks are taken as a set of reference block positions, and if there is one reference block position, the position of the one reference block is taken as a set of reference block positions) are the same, the two pieces of motion information are considered to be the same motion information, namely, the two pieces of motion information are repeated. The third-level strategy is wide in duplication checking range, the duplication checking effect is poor compared with the first-level strategy and the second-level strategy, and the difference of the unidirectional motion information is obvious.
The construction method of the motion information list for checking the duplicate by applying the third-level strategy has the obvious proportion of the repeated motion information in the first-level strategy and the second-level strategy, which causes that the repeated unidirectional motion information added to the motion information candidate list in the sense of the first-level strategy and the second-level strategy can not be practically used, and the motion information can cause that other different motion information behind the same rank can be abandoned because the motion information candidate list is full. On the other hand, since the repeated motion information occupies one position, the index value index of the other motion information in the motion information list increases, and a larger number of bits are required when encoding the index value.
That is, at present, the duplicate checking detection effect most often using the third-level policy is relatively poor, and therefore, in the embodiment of the present application, it is preferable to use the first-level policy or the second-level policy defined in the preset duplicate checking policy, that is, to use a stricter duplicate checking detection method, so as to obtain a duplicate checking detection result with a higher effect. The second-level strategy is suitable for application scenarios with strict requirements on decoding complexity, and the first-level strategy is suitable for application scenarios with high requirements on compression performance but not particularly strict requirements on encoding and decoding complexity.
In an embodiment of the present application, further, fig. 8 is a schematic diagram illustrating an implementation flow of an inter prediction method, and as shown in fig. 8, when a prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of a current block, a method for a decoder to construct a motion information candidate list of the current block according to a preset repetition strategy may include the following steps:
step 102a, determining the relevant motion information of the current block.
And 102b, in the process of sequentially filling the relevant motion information into the motion information candidate list, performing duplicate checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list based on a preset duplicate checking strategy to obtain a duplicate checking detection result.
And 102c, completing the construction of the motion information candidate list based on the duplicate checking detection result.
In the embodiment of the present application, after the decoder parses the obtained prediction mode parameter, if the parsed prediction mode parameter indicates that the current block determines the inter prediction value of the current block using the preset inter prediction mode, the decoder may first determine the related motion information of the current block, and then sequentially fill the related motion information into the motion information candidate list. Specifically, in the process of filling the relevant motion information into the motion information candidate list, the decoder may perform duplicate checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list according to a preset duplicate checking policy, so that a duplicate checking detection result may be obtained, and after the duplicate checking result is obtained, the construction of the motion information candidate list may be further implemented based on the duplicate checking result.
It is understood that, in the embodiment of the present application, the relevant motion information of the current block may include, but is not limited to, at least one of the following motion information: spatial domain motion information, temporal domain motion information, motion information based on historical information. For example, the related motion information of the current block may be motion information of a neighboring block of the current block.
It should be noted that, in the present application, based on different inter prediction modes, the motion information candidate list constructed by the decoder may be a unidirectional motion information candidate list or a bidirectional motion information candidate list. For example, in the present application, a uni-directional motion information candidate List may be represented as RefPicL0, or may be represented as one of RefPicList0 or List0 or L0; the bi-directional motion information candidate List may be represented as RefPicL0 and RefPicL1, wherein RefPicL1 may also be represented using one of RefPicList1 or List1 or L1.
It is to be understood that in the embodiments of the present application, the unidirectional motion information may include a set of motion vectors and reference frame information, wherein the reference frame information may include a reference frame list and a reference frame index. Illustratively, the related motion information of the current block is motion information of a neighboring block a of the current block, and the uni-directional motion information of the neighboring block a may include a reference frame list a1, a reference frame index a2, and a motion vector a3 of the neighboring block a.
For example, fig. 9 is a schematic diagram of unidirectional motion information, and as shown in fig. 9, the unidirectional motion information of an image block may include a motion vector (0, 1), a reference frame list RefPicL0, and a reference frame index 1; when the reference frame index is-1, the corresponding reference frame list RefPicL1 is not valid, and the identifier (unique identifier such as POC or DOI) of the reference frame indicated by the reference frame index 1 in the reference frame list RefPicL0 is 2, that is, the reference frame identified by 2 in the reference frame list RefPicL0 is indicated by the unidirectional information of the image block.
Accordingly, in the present application, the bidirectional motion information may include two sets of motion vectors and reference frame information, wherein one reference frame information may include a reference frame list and a reference frame index. Illustratively, the bi-directional motion information of the neighboring block B may include sub information B1 and B2, wherein the B1 includes reference frames B1, reference frame indices B2, and motion vectors B3 of the neighboring block B; the sub information B2 includes a reference frame B4, a reference frame index B5, and a motion vector B6 of the neighboring block B.
For example, fig. 10 is a schematic diagram of bi-directional motion information, as shown in fig. 10, the bi-directional information of an image block may include two groups of sub-information, where one group of sub-information may include a motion vector (0, 1), a reference frame list RefPicL0, and a reference frame index 0, where the reference frame index 0 indicates that the identifier (unique identifier such as POC or DOI) of a reference frame indicated in the reference frame list RefPicL0 is 3, that is, the uni-directional information of the image block indicates a reference frame identified as 3 in the reference frame list RefPicL 0; another set of sub-information may include a motion vector (1, 0), a reference frame list RefPicL1, and a reference frame index 1, where the reference frame index 1 indicates that the reference frame indicated in the reference frame list RefPicL1 has a unique identifier (POC, DOI, etc.) of 2, i.e., the unidirectional information of the image block indicates the reference frame indicated by 2 in the reference frame list RefPicL 1.
It is understood that, in the embodiments of the present application, duplicate detection results may include the same or different results. Specifically, the duplicate checking detection result is used to determine whether the relevant motion information to be filled is the same as each motion information in the motion information candidate list.
Further, in the embodiment of the present application, if the preset inter-frame prediction mode uses unidirectional motion information, the decoder may first determine first reference frame information and a first motion vector included in the to-be-filled related motion information when performing a duplicate checking detection on the to-be-filled related motion information and the motion information in the motion information candidate list based on a preset duplicate checking policy and obtaining a duplicate checking detection result; wherein the first reference frame information comprises a first reference frame list and a first reference frame index; meanwhile, second reference frame information and a second motion vector included in the motion information candidate list can be determined; wherein the second reference frame information comprises a second reference frame list and a second reference frame index; then, the duplicate checking detection result can be determined according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector.
It should be noted that, in the embodiment of the present application, if the preset inter-frame prediction mode uses unidirectional motion information and the preset duplication policy is a first-level policy, when determining a duplication detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, the decoder may determine a first reference frame from the first reference frame list according to the first reference frame index and determine a first reference block in the first reference frame according to the first motion vector; determining a second reference frame from the second reference frame list according to the second reference frame index, and determining a second reference block in the second reference frame according to the second motion vector; then, the pixel information of the first reference block and the pixel information of the second reference block may be compared, and if the pixel information of the first reference block and the pixel information of the second reference block are the same, the decoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; if the pixel information of the first reference block and the pixel information of the second reference block are not the same, the decoder may determine that the duplicate detection result is that the associated motion information to be filled in is not the same as the motion information in the motion information candidate list.
That is, in the present application, when the decoder performs the duplicate checking according to the first-level policy, if the first reference block determined according to the relevant motion information to be filled and the second reference block determined according to the motion information in the motion information candidate list are identical image blocks with completely identical pixel information, the decoder may consider that the reference blocks indicated by the two motion information are identical, that is, the duplicate checking detection result is identical, that is, the relevant motion information to be filled and the motion information in the motion information candidate list are repeated; conversely, if the pixel information of the two reference blocks determined based on the two motion information is not exactly the same, it may be considered that the relevant motion information to be filled and the motion information in the motion information candidate list are not repeated.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses unidirectional motion information and the predetermined duplication policy is a second-level policy, when determining a duplication checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, the decoder may first determine a first reference frame from the first reference frame list according to the first reference frame index and obtain a first identifier of the first reference frame; meanwhile, a second reference frame can be determined from the second reference frame list according to the second reference frame index, and a second identifier of the second reference frame is obtained; then, the first identifier and the second identifier may be compared, the first motion vector and the second motion vector may be compared, and if the first identifier and the second identifier are the same and the first motion vector and the second motion vector are the same, the decoder may determine that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list; if the first identifier is not the same as the second identifier, or the first motion vector is not the same as the second motion vector, the decoder may determine that the duplicate detection result is that the associated motion information to be filled is not the same as the motion information in the motion information candidate list.
It is understood that in the embodiments of the present application, the identifier of one reference frame may be a unique identifier such as POC or DOI, for example, the first identifier may be a POC of the first reference frame in the first reference frame list; the second identification may be a POC of the second reference frame in the second reference frame list.
That is, in the present application, when the decoder performs the duplicate checking detection according to the second-level policy, if the first identifier and the first motion vector of the first reference frame determined according to the relevant motion information to be filled are the same as the second identifier and the second motion vector of the second reference frame determined according to the motion information in the motion information candidate list, the decoder may consider that the reference blocks indicated by the two motion information are the same, that is, the duplicate checking detection result is the same, that is, the relevant motion information to be filled and the motion information in the motion information candidate list are duplicated; conversely, if the identities and motion vectors of two reference frames determined based on two motion information are not the same, then the associated motion information to be populated and the motion information in the motion information candidate list may be considered not to be repeated.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses unidirectional motion information and the predetermined duplication policy is a third-level policy, the decoder may directly compare the first reference frame information with the second reference frame information and compare the first motion vector with the second motion vector when determining the duplication detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, and if the first reference frame information is the same as the second reference frame information and the first motion vector is the same as the second motion vector, the decoder regards the reference blocks indicated by the two pieces of motion information as the same, that is, it is determined that the duplication detection result is the same as the motion information in the motion information candidate list and the related motion information to be filled; if the first reference frame information is not the same as the second reference frame information, or the first motion vector is not the same as the second motion vector, the decoder may determine that the duplicate detection result is that the relevant motion information to be filled is not the same as the motion information in the motion information candidate list.
That is, in the present application, when performing the duplication checking according to the third-level policy, the decoder determines the duplication checking result only by the comparison result of comparing the two pieces of motion information.
It is understood that in the embodiment of the present application, comparing the third-level policy with the first-level policy and the second-level policy, since the same reference frame, i.e. the reference frame of the same POC (or unique identifier such as DOI), is allowed to appear in the two reference frame lists in the standard, even if the reference frame lists and reference frame indexes of the two pieces of unidirectional motion information are different, the reference frames pointed to by the two pieces of unidirectional motion information may be the same reference frame. It can be seen that two pieces of motion information that are detected as duplicates using the first-level strategy or the second-level strategy may be determined as not duplicates using the third-level strategy for duplicate detection.
Further, in an embodiment of the present application, if the preset inter-frame prediction mode uses bidirectional motion information, the decoder may first determine first sub-information and second sub-information included in the to-be-filled related motion information when performing a duplicate checking detection on the to-be-filled related motion information and the motion information in the motion information candidate list based on a preset duplicate checking policy and obtaining a duplicate checking detection result; the first sub-information comprises third reference frame information and a third motion vector, the third reference frame information comprises a third reference frame list and a third reference frame index, the second sub-information comprises fourth reference frame information and a fourth motion vector, and the fourth reference frame information comprises a fourth reference frame list and a fourth reference frame index; meanwhile, the third sub information and the fourth sub information included in the motion information candidate list can be determined; the third sub-information comprises fifth reference frame information and a fifth motion vector, the fifth reference frame information comprises a fifth reference frame list and a fifth reference frame index, the fourth sub-information comprises sixth reference frame information and a sixth motion vector, and the sixth reference frame information comprises a sixth reference frame list and a sixth reference frame index; then, a duplicate checking detection result can be determined according to the first sub information, the second sub information, the third sub information and the fourth sub information.
It should be noted that, in the embodiment of the present application, if the inter prediction mode uses bidirectional motion information and the predetermined duplication checking policy is a first-level policy, when determining a duplication checking detection result according to the first sub information, the second sub information, the third sub information, and the fourth sub information, the decoder may first determine a third reference block according to the first sub information and determine a fourth reference block according to the second sub information; meanwhile, a fifth reference block is determined according to the third sub-information, and a sixth reference block is determined according to the fourth sub-information; then comparing the third reference block and the fourth reference block with the fifth reference block and the sixth reference block respectively, if the pixel information of the third reference block is the same as that of the fifth reference block and the pixel information of the fourth reference block is the same as that of the sixth reference block, the decoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; if the pixel information of the third reference block is the same as the pixel information of the sixth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the fifth reference block, the decoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; otherwise, the decoder determines that the duplicate detection result is that the relevant motion information to be filled is not the same as the motion information in the motion information candidate list.
It is to be understood that, in the embodiment of the present application, when determining the third reference block according to the first sub-information and determining the fourth reference block according to the second sub-information, the decoder may determine the third reference frame from the third reference frame list according to the third reference frame index and determine the third reference block in the third reference frame according to the third motion vector; meanwhile, a fourth reference frame may be determined from the fourth reference frame list according to the fourth reference frame index, and a fourth reference block may be determined in the fourth reference frame according to the fourth motion vector.
It is to be understood that, in the embodiment of the present application, when determining the fifth reference block according to the third sub-information and determining the sixth reference block according to the fourth sub-information, the decoder may determine the fifth reference frame from the fifth reference frame list according to the fifth reference frame index and determine the fifth reference block in the fifth reference frame according to the fifth motion vector; meanwhile, a sixth reference frame may be determined from the sixth reference frame list according to the sixth reference frame index, and a sixth reference block may be determined in the sixth reference frame according to the sixth motion vector.
That is to say, in the present application, when the decoder performs duplicate checking detection according to the first-level policy, if the third reference block and the fourth reference block determined according to the relevant motion information to be filled, and the fifth reference block and the sixth reference block determined according to the motion information in the motion information candidate list are identical image blocks whose pixel information is the same in pairs, the decoder may consider that the reference blocks indicated by the two motion information are identical, that is, the duplicate checking detection result is identical, that is, the relevant motion information to be filled and the motion information in the motion information candidate list are duplicated; on the contrary, if the pixel information of the four reference blocks determined based on the two pieces of motion information is not the same two by two, it may be considered that the relevant motion information to be filled and the motion information in the motion information candidate list are not repeated.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses bidirectional motion information and the preset repetition policy is a second-level policy, when determining a result of the repetition detection according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information, the decoder may first determine a first information combination of the related information to be filled according to the first sub-information, and determine a second information combination of the related information to be filled according to the second sub-information; meanwhile, determining a third information combination of the motion information in the list according to the third sub-information, and determining a fourth information combination of the motion information in the list according to the fourth sub-information; then, the first information combination and the second information combination can be compared with the third information combination and the fourth information combination respectively, if the first information combination is the same as the third information combination and the second information combination is the same as the fourth information combination, the decoder can determine that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; if the first information combination is the same as the fourth information combination, and the second information combination is the same as the third information combination, the decoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
It can be understood that, in the embodiment of the present application, when determining the first information combination of the related information to be filled according to the first sub-information and determining the second information combination of the related information to be filled according to the second sub-information, the decoder may determine a third reference frame from the third reference frame list according to the third reference frame index and construct the first information combination with the third motion vector according to the third identifier of the third reference frame; meanwhile, a fourth reference frame may be determined from the fourth reference frame list according to the fourth reference frame index, and the second information combination may be constructed according to a fourth identification of the fourth reference frame and the fourth motion vector.
It is to be understood that, in the embodiment of the present application, when determining the third information combination of the motion information in the list according to the third sub-information and determining the fourth information combination of the motion information in the list according to the fourth sub-information, the decoder may determine a fifth reference frame from the fifth reference frame list according to the fifth reference frame index and construct the third information combination with the fifth motion vector according to the fifth identifier of the fifth reference frame; meanwhile, a sixth reference frame may be determined from the sixth reference frame list according to the sixth reference frame index, and the fourth information combination may be constructed according to a sixth identification of the sixth reference frame and the sixth motion vector.
It is understood that in the embodiments of the present application, the identifier of one reference frame may be a unique identifier such as POC or DOI, for example, the third identifier may be a POC of a third reference frame in a third reference frame list; the fifth identification may be a POC of the fifth reference frame in the fifth reference frame list.
That is, in the present application, when the decoder performs the duplication checking detection according to the second-level policy, if the third identifier and the third motion vector of the third reference frame, the fourth identifier and the fourth motion vector of the fourth reference frame, which are determined according to the relevant motion information to be filled, are pairwise the same as the fifth identifier and the fifth motion vector of the fifth reference frame, the sixth identifier and the sixth motion vector of the sixth reference frame, which are determined according to the motion information in the motion information candidate list, the decoder may consider that the reference blocks indicated by the two motion information are the same, that is, the duplication checking detection result is the same, that is, the relevant motion information to be filled and the motion information in the motion information candidate list are duplicated; conversely, if the identities and motion vectors of two reference frames determined based on two motion information are not the same, then the associated motion information to be populated and the motion information in the motion information candidate list may be considered not to be repeated.
It should be noted that, in the embodiment of the present application, if the preset inter-frame prediction mode uses bidirectional motion information and the preset repetition policy is a third-level policy, when determining a result of repetition detection according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information, the decoder may directly compare the first sub-information and the second sub-information with the third sub-information and the fourth sub-information, respectively, and if the first sub-information is the same as the third sub-information and the second sub-information is the same as the fourth sub-information, the decoder considers that the reference blocks indicated by the two motion information are the same; if the first sub information is identical to the fourth sub information and the second sub information is identical to the third sub information, the decoder considers the reference block indicated by the two motion information to be identical; otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
That is, in the present application, when performing the duplication checking according to the third-level policy, the decoder determines the duplication checking result only by the comparison result of comparing the two pieces of motion information.
It is understood that in the embodiment of the present application, comparing the third-level policy with the first-level policy and the second-level policy, since the same reference frame, i.e. the reference frame of the same POC (or unique identifier such as DOI), is allowed to appear in the two reference frame lists in the standard, even if the reference frame lists and reference frame indexes of the two pieces of unidirectional motion information are different, the reference frames pointed to by the two pieces of unidirectional motion information may be the same reference frame. It can be seen that two pieces of motion information that are detected as duplicates using the first-level strategy or the second-level strategy may be determined as not duplicates using the third-level strategy for duplicate detection.
It should be noted that, in the embodiment of the present application, if the prediction mode parameter obtained by parsing indicates that the current block determines the inter prediction value of the current block using GPM or AWP, the current block may be divided into a first partition and a second partition, and accordingly, the motion information of the current block may include first information corresponding to the first partition and second information corresponding to the second partition. The first information comprises a motion vector and reference frame information corresponding to the first partition, and the second information comprises a motion vector and reference frame information corresponding to the second partition.
Further, in the embodiment of the present application, when the decoder completes the construction of the motion information candidate list based on the duplicate checking detection result, if the duplicate checking detection result indicates that the relevant motion information to be filled in does not coincide with the motion information in the motion information candidate list, the decoder may fill the relevant motion information to be filled in the motion information candidate list; if the duplication checking result is that the relevant motion information to be filled coincides with the motion information in the motion information candidate list, the decoder may ignore the relevant motion information to be filled.
Therefore, for the preset duplication checking strategy provided by the embodiment of the application, the first-stage strategy is strictest in duplication checking, and the obtained compression performance is also optimal, but the first-stage strategy needs to take out a reference block for duplication checking to judge whether the motion information is the same or not, so that the complexity is high. For example, when a new motion information candidate is to be added to the motion information candidate list, the motion information needs to be checked (compared to determine whether the motion information is the same) with each piece of motion information in the motion information candidate list, so that a scene in which a new motion information candidate is to be added to the motion information candidate list needs to be checked in the memory for a plurality of times to obtain a reference block, and the implementation complexity is obviously increased compared with the third-level policy for checking the motion information. Therefore, the first-level strategy is suitable for application scenarios where the compression performance is very demanding, but the codec complexity requirement is not particularly strict.
The difference between the second-level policy and the third-level policy is that the third-level policy directly determines whether the reference frame list and the reference frame index are the same, and the second-level policy determines whether the reference frame (e.g., the unique identifier of the reference frame such as POC or DOI of the reference frame) is the same. Taking POC as an example, the increased complexity of second-level strategy re-check compared to third-level strategy re-check is to obtain the POC of the reference frame according to the reference frame list and the reference frame index, i.e. the POC of the reference frame where the reference frame index is located is found from the reference frame list. Because the reference frame list and the reference frame index are different but the reference frame POC is the same, the duplicate checking effect is obviously improved under the condition that the complexity is not obviously increased. Therefore, the second-stage strategy is suitable for application scenarios with strict requirements on decoding complexity.
It should be noted that the preset duplication checking strategy provided by the present application may be applicable to all scenes that require duplication checking of motion information or determine whether the motion information is the same, including but not limited to AWP. The AWP uses unidirectional motion information, so the performance difference is more obvious. Taking AWP in AVS as an example, when constructing a motion information candidate list, based on fig. 4 above, a neighboring block X (X denoted A, B, C, D, F or G) "exists" meaning 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".
Specifically, the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1 are as follows:
in the first step, the "availability" of F, G, C, A, B and D is determined.
In the second step, the unidirectionally available motion information is put into the unidirectional motion information candidate list, awwpunarray, in the order of F, G, C, A, B and D until the length of awwpunarray is 3 or the traversal is finished.
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 List RefPicL0 and unidirectional motion information pointing to the reference frame List List1 according to the sequence of F, G, C, A, B and D, unidirectional motion information duplication operation is firstly carried out, and if the unidirectional motion information is not duplicated, the AfwUniarray is put in until the length is 3 or the traversal is finished.
Fourthly, the time-domain bidirectional motion information is split into unidirectional motion information pointing to a reference frame List RefPicL0 and unidirectional motion information pointing to a reference frame List List1, unidirectional motion information duplication checking operation is performed firstly, and if the unidirectional motion information duplication checking operation is not repeated, the unidirectional motion information duplication checking operation is put into an AwpUniArray until the length is 4 or the traversal is finished.
And fifthly, if the length of the AwpUniArray is less than 4, repeating the filling operation on the last one-way motion information in the AwpUniArray until the length of the AwpUniArray is 4.
Sixthly, 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.
In the third step, the preset duplicate checking strategy provided by the present application may be used for duplicate checking detection. Preferably, a second level policy may be used for the duplicate detection operation.
It is understood that in the embodiment of the present application, the decoder may preset different prediction modes to use different preset duplication checking strategies, that is, the preset duplication checking strategies used for the different prediction modes may be different, for example, if the prediction mode parameter indicates that GPM is used to determine the inter prediction value of the current block, when constructing the motion information reference list, a second-level strategy in the preset duplication checking strategies is used to perform duplication checking detection; if the prediction mode parameter indicates that the AWP is used for determining the inter-frame prediction value of the current block, when a motion information reference list is constructed, performing duplicate checking detection by using a second-level strategy in a preset duplicate checking strategy; if the prediction mode parameter indicates that the inter prediction value of the current block is determined using other inter prediction modes except GPM and AWP, then duplicate checking detection is performed using a third-level strategy in the preset duplicate checking strategies when constructing the motion information reference list.
And 103, determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block.
In the embodiment of the application, after the decoder constructs the motion information candidate list of the current block according to the preset duplication checking strategy, the decoder can determine the motion information from the motion information candidate list according to the motion information index value corresponding to the current block.
In an embodiment of the present application, further, fig. 11 is a schematic view illustrating an implementation flow of an inter prediction method, as shown in fig. 11, after a decoder parses a code stream and obtains a prediction mode parameter of a current block, that is, after step 101, the method for the decoder to perform inter prediction may further include the following steps:
and 105, when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, analyzing the code stream to obtain a motion information index value.
In the embodiment of the application, after the decoder parses the code stream to obtain the prediction mode parameter of the current block, if the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, the decoder may also continue parsing the binary code stream, so that the motion information index value corresponding to the current block may be further obtained.
It should be noted that, in the embodiment of the present application, if the prediction mode parameter indicates that GPM or AWP is used for inter prediction, that is, the inter prediction mode is preset to be GPM or AWP, the decoder needs to analyze the code stream and obtain the mode type after analyzing the code stream and obtaining the prediction mode parameter of the current block.
For example, in the present application, after parsing the code stream, the decoder may determine whether the current block uses GPM or AWP for inter prediction by parsing the obtained prediction mode parameter, and after determining that the current block uses GPM or AWP for inter prediction, may also determine a mode specifically used by the current block by parsing a mode type obtained by parsing the code stream, for example, one of 64 modes of GPM or one of 56 modes of AWP; meanwhile, index values of two unidirectional motion information, namely a first index value corresponding to the first partition and a second index value corresponding to the second partition, can be obtained by analyzing the code stream.
Further, in the embodiment of the present application, if the preset inter prediction mode is GPM or AWP, after the decoder parses the mode type of the current block, the decoder may determine the first partition and the second partition corresponding to the current block based on the mode type; correspondingly, the motion information index value corresponding to the current block may also include a first index value corresponding to the first information and a second index value corresponding to the second information; accordingly, the motion information corresponding to the current block may also include first information corresponding to the first partition and second information corresponding to the second partition.
It is understood that the GPM or the AWP belongs to an inter prediction technology, and the GPM or the AWP needs to transmit a flag (flag) indicating whether the GPM or the AWP is used by the current block in the code stream. If GPM or AWP is used, the encoder needs to transmit a specifically used mode in the code stream, namely one of 64 division modes of GPM or one of 56 division modes of AWP; and index values of two unidirectional motion information. That is, for the current block, the decoder may obtain information about whether the GPM or the AWP is used by parsing the code stream, and if it is determined that the GPM or the AWP is used, the decoder may parse prediction mode parameters of the GPM or the AWP and two motion information index values, for example, the current block may be divided into two partitions, and may parse a first index value corresponding to the first partition and a second index value corresponding to the second partition.
It should be noted that, in the embodiment of the present application, when determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block, the decoder may determine the motion information indicated by the first index value in the motion information candidate list as the first information of the first partition; meanwhile, the motion information indicated by the second index value in the motion information candidate list may be determined as the second information of the second partition.
And step 104, determining the interframe prediction value of the current block according to the motion information.
In an embodiment of the present application, after determining motion information from the motion information candidate list according to a motion information index value corresponding to the current block, the decoder may further obtain an inter prediction value of the current block according to the motion information to complete inter prediction of the current block.
It should be noted that, in the embodiment of the present application, after determining the motion information of the current block, the decoder may determine, according to the motion information, a reference block corresponding to the current block; then, based on the reference block, a corresponding inter prediction value can be determined to complete inter prediction.
It can be understood that, in the embodiment of the present application, the decoder may determine, according to the parsed motion information index value of the current block, motion information corresponding to the current block from the motion information candidate list, then may determine, by using the motion information, a reference block corresponding to the current block, and perform inter prediction based on the reference block, to finally obtain the inter prediction value of the current block.
Further, in an embodiment of the present application, for GPM or AWP, the decoder determines the motion information indicated by the first index value in the motion information candidate list as the first information of the first partition; meanwhile, after determining the motion information indicated by the second index value in the motion information candidate list as the second information of the second partition, the first information may be used to calculate a first prediction value of the first partition, and the second information may be used to calculate a second prediction value of the second partition; an inter prediction value of the current block may then be determined according to the first prediction value and the second prediction value.
It should be noted that, in the embodiment of the present application, when determining the inter predictor of the current block according to the first predictor and the second predictor, the decoder may first determine a first weight of the first partition and a second weight of the second partition according to the mode type; then, the first predicted value and the second predicted value can be weighted and fused according to the first weight and the second weight, and finally the interframe predicted value can be obtained.
That is, in this application, after obtaining the motion information index value of the current block through parsing, that is, after obtaining the first index value of the first partition and the second index value of the second partition of the current block, the decoder may find two pieces of motion information, that is, the first information and the second information, of the current block from the constructed motion information candidate list according to the first index value and the second index value, respectively, then may find two reference blocks by using the two pieces of unidirectional motion information, determine the weight of the two reference blocks at each pixel position according to a specific mode used by GPM or AWP, that is, a mode type obtained through parsing, and finally perform weighted fusion on the two reference blocks based on the first weight and the second weight, so as to obtain a prediction block, that is, an inter prediction value, of the current block.
It should be noted that, in the present application, if the current mode is the skip mode, the predicted 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 coefficient, then carrying out inverse quantization, carrying out inverse transformation to obtain a residual block, adding the residual block and the prediction block to obtain a decoded block, and finishing decoding of the current block.
In summary, according to the inter-frame prediction method provided by the application, when a motion information candidate list is constructed, the motion information is subjected to duplicate checking detection according to a preset duplicate checking strategy, and a more rigorous duplicate checking standard is used, so that the duplicate checking effect can be obviously improved under the condition that the complexity is not obviously increased. Under the condition that the reference frame list exists, the reference frame indexes are different, but the reference frames are the same, repeated motion information under new definition can be eliminated, so that different motion information in the motion information candidate list is increased, the indexes of effective motion information are advanced, and the coding and decoding performance is improved.
The embodiment provides an inter-frame prediction method, wherein a decoder analyzes a code stream to obtain a prediction mode parameter of a current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information from a motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information. That is to say, the inter-frame prediction method provided by the application can perform more rigorous de-duplication processing according to a preset duplication checking strategy when constructing the motion information candidate list, so that the problem of duplicate options in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Based on the above embodiments, in the embodiments of the present application, the following describes in detail the duplication checking detection in the process of constructing the motion information candidate list in combination with several cases.
In one possible implementation, in determining whether the unidirectional motion information is the same, if two unidirectional motion information satisfy the following one or more conditions, the two unidirectional motion information are considered to be different, i.e., not repeated; otherwise, the two unidirectional motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, a reference frame determined by a RefPicL0 reference frame index of motion information with the mtredrefmode of 0 is different from a reference frame determined by a RefPicL1 reference frame index of motion information with the mtredrefmode of 1, or a RefPicL0 motion vector of motion information with the mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with the mtredrefrefrefrefmode of 1.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, and an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL 1.
In one possible implementation, in determining whether the unidirectional motion information is the same, if two unidirectional motion information satisfy the following one or more conditions, the two unidirectional motion information are considered to be different, i.e., not repeated; otherwise, the two unidirectional motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, POC (or DOI or other unique identifier) of a reference frame determined by RefPicL0 reference frame index of motion information with mtredrefmode of 0 is different from POC (or DOI or other unique identifier) of a reference frame determined by RefPicL1 reference frame index of motion information with mtredrefmode of 1, or a RefPicL0 motion vector of motion information with mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with mtredrefref mode of 1.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, and an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL 1.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, a reference frame determined by a RefPicL0 reference frame index of motion information with the mtredrefmode of 0 is different from a reference frame determined by a RefPicL1 reference frame index of motion information with the mtredrefmode of 1, or a RefPicL0 motion vector of motion information with the mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with the mtredrefrefrefrefmode of 1.
4. Each of the mtpredrefmodes is 2, and any one of a RefPicL0 motion vector, a RefPicL1 motion vector, a RefPicL0 reference frame index, or a RefPicL1 reference frame index is not equal.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
It can be known from the condition 4 that whether the bidirectional motion information is the same can be determined by continuously using the third-level policy in the preset duplication checking policy, that is, the third-level policy in the preset duplication checking policy is used in all of the conditions 1 to 4.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, POC (or DOI or other unique identifier) of a reference frame determined by RefPicL0 reference frame index of motion information with mtredrefmode of 0 is different from POC (or DOI or other unique identifier) of a reference frame determined by RefPicL1 reference frame index of motion information with mtredrefmode of 1, or a RefPicL0 motion vector of motion information with mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with mtredrefref mode of 1.
4. Each of the mtpredrefmodes is 2, and any one of a RefPicL0 motion vector, a RefPicL1 motion vector, a RefPicL0 reference frame index, or a RefPicL1 reference frame index is not equal.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
As can be seen from the foregoing condition 4, it may be determined whether the bidirectional motion information is the same by using the third-level policy in the preset duplication checking policy, that is, the foregoing conditions 1 to 4 combine the second-level policy and the third-level policy in the preset duplication checking policy.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, a reference frame determined by a RefPicL0 reference frame index of motion information with the mtredrefmode of 0 is different from a reference frame determined by a RefPicL1 reference frame index of motion information with the mtredrefmode of 1, or a RefPicL0 motion vector of motion information with the mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with the mtredrefrefrefrefmode of 1.
4. Each of mtredrefmode is 2, condition 1: any one of the motion vector RefPicL0, the motion vector RefPicL1, the reference frame determined by the reference frame index of RefPicL0, or the reference frame determined by the reference frame index of RefPicL1 is not equal; condition 2: any one of the reference frame determined by RefPicL0 of the first motion information with reference to the frame index and the reference frame determined by RefPicL1 of the second motion information, the reference frame determined by RefPicL1 of the first motion information with reference to the frame index and the reference frame determined by RefPicL0 of the second motion information, the RefPicL0 motion vector of the first motion information with reference to RefPicL1 motion vector of the second motion information, and the RefPicL1 motion vector of the first motion information with reference to RefPicL0 motion vector of the second motion information is unequal. Condition 1 and condition 2 are satisfied simultaneously.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
As can be seen from the above condition 4, it may be determined whether the bidirectional motion information is the same by using the second-level policy in the preset duplication checking policy, that is, the above conditions 1 to 4 combine the second-level policy and the third-level policy in the preset duplication checking policy.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, POC (or DOI or other unique identifier) of a reference frame determined by RefPicL0 reference frame index of motion information with mtredrefmode of 0 is different from POC (or DOI or other unique identifier) of a reference frame determined by RefPicL1 reference frame index of motion information with mtredrefmode of 1, or a RefPicL0 motion vector of motion information with mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with mtredrefref mode of 1.
4. Each of mtredrefmode is 2, condition 1: any one of the motion vector RefPicL0, the motion vector RefPicL1, the reference frame determined by the reference frame index of RefPicL0, or the reference frame determined by the reference frame index of RefPicL1 is not equal; condition 2: any one of the reference frame determined by RefPicL0 of the first motion information with reference to the frame index and the reference frame determined by RefPicL1 of the second motion information, the reference frame determined by RefPicL1 of the first motion information with reference to the frame index and the reference frame determined by RefPicL0 of the second motion information, the RefPicL0 motion vector of the first motion information with reference to RefPicL1 motion vector of the second motion information, and the RefPicL1 motion vector of the first motion information with reference to RefPicL0 motion vector of the second motion information is unequal. Condition 1 and condition 2 are satisfied simultaneously.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
As can be seen from the foregoing condition 4, it may be determined whether the bidirectional motion information is the same by using a second-level policy in the preset duplication checking policies, that is, the foregoing conditions 1 to 4 all use the second-level policy in the preset duplication checking policies.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, a reference frame determined by a RefPicL0 reference frame index of motion information with the mtredrefmode of 0 is different from a reference frame determined by a RefPicL1 reference frame index of motion information with the mtredrefmode of 1, or a RefPicL0 motion vector of motion information with the mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with the mtredrefrefrefrefmode of 1.
4. Each of mtredrefmode is 2, condition 1: any of the motion vectors RefPicL0, RefPicL1, POC (or DOI or other unique identifier) determined by RefPicL0 reference frame indices, or POC (or DOI or other unique identifier) determined by RefPicL1 reference frame indices are not equal; condition 2: any of the reference frame determined by RefPicL0 for the first motion information with reference to the frame index and the reference frame determined by RefPicL1 for the second motion information, the POC (or DOI or other unique identifier) determined by RefPicL1 for the first motion information with reference to the frame index and the POC (or DOI or other unique identifier) determined by RefPicL0 for the second motion information, the RefPicL0 motion vector for the first motion information with the RefPicL1 motion vector for the second motion information, the RefPicL1 motion vector for the first motion information with the RefPicL0 motion vector for the second motion information is unequal. Condition 1 and condition 2 are satisfied simultaneously.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
In one possible implementation, in determining whether the motion information is the same, if two pieces of motion information satisfy one or more of the following conditions, the two pieces of motion information are considered to be different, i.e., not repeated; otherwise, the two motion information are considered to be the same, i.e. repeated:
1. InterPredRefmode is 0, RefPicL0 motion vectors are not equal or RefPicL0 reference frame indexes are not equal;
2. InterPredRefmode is 1, RefPicL1 motion vectors are not equal or RefPicL1 reference frame indexes are not equal;
3. one of the mtredrefmode is 0, the other mtredrefmode is 1, POC (or DOI or other unique identifier) of a reference frame determined by RefPicL0 reference frame index of motion information with mtredrefmode of 0 is different from POC (or DOI or other unique identifier) of a reference frame determined by RefPicL1 reference frame index of motion information with mtredrefmode of 1, or a RefPicL0 motion vector of motion information with mtredrefmode of 0 is not equal to a RefPicL1 motion vector of motion information with mtredrefref mode of 1.
4. Each of mtredrefmode is 2, condition 1: any of the motion vectors RefPicL0, RefPicL1, POC (or DOI or other unique identifier) determined by RefPicL0 reference frame indices, or POC (or DOI or other unique identifier) determined by RefPicL1 reference frame indices are not equal; condition 2: any of the reference frame determined by RefPicL0 for the first motion information with reference to the frame index and the reference frame determined by RefPicL1 for the second motion information, the POC (or DOI or other unique identifier) determined by RefPicL1 for the first motion information with reference to the frame index and the POC (or DOI or other unique identifier) determined by RefPicL0 for the second motion information, the RefPicL0 motion vector for the first motion information with the RefPicL1 motion vector for the second motion information, the RefPicL1 motion vector for the first motion information with the RefPicL0 motion vector for the second motion information is unequal. Condition 1 and condition 2 are satisfied simultaneously.
Wherein, an InterPredRefMode of 0 indicates forward prediction, i.e., the reference frame list is RefPicL0, an InterPredRefMode of 1 indicates backward prediction, i.e., the reference frame list is RefPicL1, and an InterPredRefMode of 2 indicates bi-directional prediction, i.e., the reference frame lists are RefPicL0 and RefPicL 1.
In one possible implementation, in determining whether the motion information is the same, if the sets of positions of the reference blocks pointed to by the two motion information are the same, i.e., are repeated; otherwise the two motion information are not identical, i.e. not repeated. The location of the reference block includes the POC (or DOI or other unique identifier) of the reference frame and the location of the reference block in the reference frame.
In one possible embodiment, in determining whether the motion information is the same, if two motion information have the same set of reference frames POC (or DOI or other unique identifier) plus motion vector combinations, then the two motion information are the same, i.e., duplicate; otherwise the two motion information are not identical, i.e. not repeated.
It should be noted that, in the embodiment of the present application, the motion information candidate list in the embodiment of the present application generally refers to a unidirectional motion information candidate list, but the construction manner of unidirectional motion information in the embodiment of the present application may be extended to the construction of bidirectional motion information, so that the construction of the unidirectional motion information candidate list may also be extended to the construction of a bidirectional motion information candidate list.
Illustratively, in the present application, table 1 is a reference frame list one, which includes the identifier (unique identifier such as POC or DOI) of each of two different reference frames in reference frame lists RefPicL0 and RefPicL 1. Based on table 1 above, table 2 is a representation of reference frame indexes and motion vectors, where RefIdxL0 is an index on a reference frame list RefPicL0, and mvL0 is a corresponding motion vector on the reference frame list RefPicL 0; RefIdxL1 is an index on the reference frame list RefPicL1, and mvL1 is the corresponding motion vector on the reference frame list RefPicL 1.
TABLE 1
Figure BDA0002525956690000171
TABLE 2
RefPicL0 RefIdxL0 mvL0
RefPicL1 RefIdxL1 mvL1
The related motion information to be filled may be represented as table 3 below, and the motion information in the motion information candidate list may be represented as table 4 below, where the unidirectional motion information may consider that the reference frame index corresponding to one reference frame list is valid, and the reference frame index corresponding to another reference frame list is invalid. If the preset inter prediction mode uses uni-directional motion information, in tables 3 and 4, the reference frame index is-1, which indicates invalidity, i.e., RefPicL0 in table 3 is invalid, RefPicL1 is valid, RefPicL1 in table 4 is invalid, and RefPicL0 is valid.
TABLE 3
RefPicL0 -1 (0,0)
RefPicL1 1 (1,0)
TABLE 4
RefPicL0 0 (1,0)
RefPicL1 -1 (0,0)
Based on the above tables 1 to 4, when the decoder performs the duplicate checking detection according to the third-level policy, since at least one of the RefIdxL0, the mvL0, the RefIdxL1, and the mvL1 is different, that is, not completely the same, the decoder may determine that the motion information shown in table 3 is different from the motion information shown in table 4, and further, the obtained duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
However, when the decoder performs the duplicate checking detection according to the second-level policy, the motion information in table 3 indicates the reference frame with the identifier (unique identifier such as POC or DOI) of 4, and the motion vector on the reference frame is (1, 0), the motion information in table 4 also indicates the reference frame with the identifier (unique identifier such as POC or DOI) of 4, and the motion vector on the reference frame is (1, 0), so the decoder can determine that the motion information in table 3 and the reference block indicated by the motion information in table 4 are the same, and further, the obtained duplicate checking detection result is that the relevant motion information to be filled in is the same as the motion information in the motion information candidate list.
Illustratively, in the present application, table 5 is a reference frame list two, which includes the identifier (unique identifier such as POC or DOI) of each of two different reference frames in reference frame lists RefPicL0 and RefPicL 1.
TABLE 5
Figure BDA0002525956690000172
Based on table 2 above, the associated motion information to be filled may be represented as table 6 below, and the motion information in the motion information candidate list may be represented as table 7 below, wherein, if the preset inter prediction mode uses bi-directional motion information, in table 6 and table 7, the reference frame index may be taken to have a value that characterizes both RefPicL0 and RefPicL1 in table 6 and table 7 to be valid.
TABLE 6
RefPicL0 0 (0,0)
RefPicL1 1 (1,0)
TABLE 7
RefPicL0 0 (1,0)
RefPicL1 1 (0,0)
Based on the above tables 5 to 7, when the decoder performs the duplicate checking detection according to the third-level policy, since at least one of the RefIdxL0, the mvL0, the RefIdxL1, and the mvL1 is different, that is, not completely the same, the decoder may determine that the motion information shown in table 6 is different from the motion information shown in table 7, and further, the obtained duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
However, when the decoder performs the duplicate checking according to the second-level policy, the motion information in table 6 indicates that the reference frame with identifier (unique identifier such as POC or DOI) is 0 and the reference frame with identifier 16, and the motion vector on the reference frame with identifier 0 is (0, 0), the motion vector on the reference frame identified as 16 is (1, 0), the motion information in table 7 indicates that also the reference frame identified as 0 and the reference frame identified as 16, and the motion vector on the reference frame identified as 0 is (0, 0), the motion vector on the reference frame identified as 16 is (1, 0), so the decoder can determine that the motion information of table 6 and the reference block indicated by the motion information of table 7 are the same, and the obtained duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list.
The embodiment provides an inter-frame prediction method, when a motion information candidate list is constructed, more rigorous de-duplication processing can be performed according to a preset duplication checking strategy, the problem that duplicate options appear in the motion information candidate list is solved, the duplication checking effect is obviously improved, and therefore coding and decoding efficiency is improved.
The embodiment of the application provides an inter-frame prediction method, which is applied to a video coding device, namely an encoder. The functions implemented by the method may be implemented by the second processor in the encoder calling the computer program, although the computer program may be stored in the second memory, it is understood that the encoder comprises at least the second processor and the second memory.
Fig. 12 is a flowchart illustrating a fourth implementation of the inter prediction method, and as shown in fig. 12, the method for performing inter prediction by the encoder may include the following steps:
step 201, determining a prediction mode parameter of the current block.
In an embodiment of the present application, an encoder may first determine a prediction mode parameter of a current block. Specifically, the encoder may first determine a prediction mode used by the current block and then determine corresponding prediction mode parameters based on the prediction mode. Wherein the prediction mode parameter may be used to determine a prediction mode used by the current block.
It should be noted that, in the embodiment of the present application, an image to be encoded may be divided into a plurality of image blocks, the image block to be encoded currently may be referred to as a current block, and an image block adjacent to the current block may be referred to as an adjacent block; i.e. in the image to be encoded, 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 is an image block to be subjected to prediction of a first image component, a second image component or a third image component in the image to be coded.
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, in the embodiment of the present application, the prediction mode parameter indicates the prediction mode adopted by the current block and a parameter related to the prediction mode. Here, for the determination of the prediction mode parameter, a simple decision strategy may be adopted, such as determining according to the magnitude of the distortion value; a complex decision strategy, such as determination based on the result of Rate Distortion Optimization (RDO), may also be adopted, and the embodiment of the present application is not limited in any way. Generally, the prediction mode parameter of the current block may be determined in an RDO manner.
Specifically, in some embodiments, when determining the prediction mode parameter of the current block, the encoder may perform pre-coding processing on the current block by using multiple prediction modes to obtain a rate-distortion cost value corresponding to each prediction mode; and then selecting the minimum rate distortion cost value from the obtained multiple rate distortion cost values, and determining the prediction mode parameters of the current block according to the prediction mode corresponding to the minimum rate distortion cost value.
That is, on the encoder side, the current block may be pre-encoded in a plurality of prediction modes for the current block. Here, the plurality of prediction modes generally include an inter prediction mode, a conventional intra prediction mode, and a non-conventional intra prediction mode; the conventional Intra Prediction mode may include a Direct-Current (DC) mode, a PLANAR (PLANAR) mode, an angular mode, and the like, the non-conventional Intra Prediction mode may include a Matrix-based Intra Prediction (MIP) mode, a Cross-component Linear Model Prediction (CCLM) mode, an Intra Block Copy (IBC) mode, a plt (pattern) mode, and the like, and the inter Prediction mode may include a general inter Prediction mode, a GPM mode, an AWP mode, and the like.
Therefore, after the current block is pre-coded by utilizing a plurality of prediction modes, the rate distortion cost value corresponding to each prediction mode can be obtained; and then selecting the minimum rate distortion cost value from the obtained multiple rate distortion cost values, and determining the prediction mode corresponding to the minimum rate distortion cost value as the prediction mode parameter of the current block. In addition, after the current block is pre-coded by utilizing a plurality of prediction modes, a distortion value corresponding to each prediction mode can be obtained; then, the minimum distortion value is selected from the obtained distortion values, the prediction mode corresponding to the minimum distortion value is determined as the prediction mode used by the current block, and the corresponding prediction mode parameters are set according to the prediction mode. In this way, the determined prediction mode parameters are finally used for encoding the current block, and in the prediction mode, the prediction residual error can be smaller, and the encoding efficiency can be improved.
That is to say, on the encoding side, the encoder may select an optimal prediction mode to perform pre-encoding on the current block, and in this process, the prediction mode of the current block may be determined, and then a prediction mode parameter for indicating the prediction mode is determined, so that the corresponding prediction mode parameter is written into the code stream and transmitted to the decoder by the encoder.
Correspondingly, on the decoder side, the decoder can directly acquire the prediction mode parameters of the current block by analyzing the code stream, and determines the prediction mode used by the current block and the related parameters corresponding to the prediction mode according to the prediction mode parameters acquired by analyzing.
Step 202, when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing. Specifically, the deduplication process is pruning (pruning), that is, the same motion information is removed in the process of constructing the motion information candidate list.
In an embodiment of the present application, after determining the prediction mode parameter, if the prediction mode parameter indicates that the current block determines the inter prediction value of the current block using a preset inter prediction mode, the encoder may construct a motion information candidate list of the current block according to a preset duplication checking policy.
It should be noted that, in the embodiment of the present application, a preset duplication checking policy is used for performing deduplication processing in the process of constructing the motion information candidate list.
It can be understood that, in the embodiments of the present application, in the case that the encoder determines that the prediction mode parameter indicates that the inter prediction value of the current block is determined using the preset inter prediction mode, the inter prediction method provided by the embodiments of the present application may be employed.
For example, in the embodiments of the present application, the preset inter prediction mode may be a GPM mode, an AWP mode, or another inter prediction mode.
Further, in the embodiment of the present application, the preset duplicate checking policy may include multiple different duplicate checking detection manners, and specifically, the preset duplicate checking policy may be defined first.
For example, in the present application, the preset duplication checking policy may be divided into a first-level policy, a second-level policy, and a third-level policy. The following describes the preset duplication checking strategy by taking the unidirectional motion information as an example.
The first-level strategy is as follows: strict duplication checking should mean that two reference blocks found by two pieces of unidirectional motion information are not identical, i.e. the pixel values of the corresponding positions of the two reference blocks are not all the same. This is because if two reference blocks found by two unidirectional motion information are identical, then inter prediction using unidirectional motion information, such as AWP, is meaningless, strictly speaking, therefore, if two reference blocks found by two unidirectional motion information are exactly the same, even if the two pieces of unidirectional motion information look different, for example, the MVs of the two pieces of unidirectional motion information are different, that is, the values of (x, y) are different, or the reference frames of two unidirectional motion information are different, or the reference frame lists corresponding to two unidirectional motion information are different, or the reference frame indexes of the two pieces of unidirectional motion information in the reference frame list are different, as long as the two reference blocks found by the two pieces of unidirectional motion information are completely the same, the two pieces of unidirectional motion information can be considered to be repeated, and the preset duplication checking strategy is determined as a first-level strategy.
And (3) second-level strategy: the relaxation is that two pieces of unidirectional motion information are considered to be repeated only when pointing to the same reference block (at the same position), whereas two pieces of unidirectional motion information are considered not to be repeated if the two pieces of unidirectional motion information point to reference blocks at different positions. Wherein, the reference blocks of the two unidirectional motion information pointing to different positions are not equal to the reference frames or MVs of the two unidirectional motion information. That is, if the MVs of the two pieces of unidirectional motion information are the same but the reference frames are different, the reference blocks found by the two pieces of unidirectional motion information are not on the same reference frame and have different positions; if the two unidirectional motion information reference frames are the same but the MVs are different, the positions of the reference blocks found by the two unidirectional motion information are also different, and the preset repetition checking strategy is determined as a second-level strategy.
And a third-level strategy: the current common practice of the codec standard is to use two reference frame lists to manage the reference frames, and use the reference frame index to find the corresponding reference frame from the lists. The reference frame management method derives a looser duplication checking standard. It can be considered that only if the valid reference frame list, reference frame index and MV corresponding to two pieces of unidirectional motion information are the same, the two pieces of unidirectional motion information are considered to be repeated unidirectional motion information, and the preset repetition checking policy is determined as a third-level policy.
However, the standard allows the same reference frame, i.e. the reference frame of the same POC (or unique identifier such as DOI), to appear in two reference frame lists, and no duplicate reference frame can exist in the same reference frame list, i.e. no reference frame of the same POC (or unique identifier such as DOI) exists, so if the reference frame lists of two pieces of unidirectional motion information are the same but the reference frame indexes are different, their corresponding reference frames are definitely different; however, the two reference frame lists may have the same reference frame, and their indexes in the respective lists may be the same or different, which may further cause the situation that even if the valid reference frame lists and reference frame indexes of the two unidirectional motion information are different, the reference frames pointed to by them may be the same reference frame,
at present, the commonly used duplication checking method is the third-level policy in the preset duplication checking policy, and in some other technologies, the third-level policy is also used for duplication checking detection, such as ultra-motion vector expression (UMVE) and history-based motion vector prediction (HMVP). It should be noted that all the unidirectional motion information is used by AWP, and the unidirectional motion information and the bidirectional motion information may be used by UMVE and HMVP. The unidirectional motion information may consider a reference frame index corresponding to one reference frame list valid and a reference frame index corresponding to another reference frame list invalid. And the bidirectional motion information is that the reference frame indexes corresponding to the two reference frame lists are valid. The reference frame indexes corresponding to the two reference frame lists are considered to be the same, if the reference frame index corresponding to one reference frame list is valid, the x and y corresponding to the reference frame list are the same, and therefore the two pieces of bidirectional motion information are repeated.
It should be noted that, the same applies to VVC, which is the third level policy of the preset duplication checking policy.
It can be understood that, in the embodiment of the present application, the preset duplication checking policy for performing duplication checking detection on the unidirectional motion information or the definition for determining whether the unidirectional motion information is the same may be extended to the bidirectional motion information. Specifically, the duplicate detection of the first-level policy may be divided into 2 sub-levels, i.e., level 1.1 and level 1.2. Wherein, for level 1.1, if the reference blocks found by the two motion information are identical according to the prediction blocks made by their subsequent required algorithms, they are considered to be identical motion information, i.e. the two motion information are repeated; for level 1.2, if two sets of reference blocks are found by two motion information (one motion information can find at most two reference blocks, which are a set of reference blocks if two reference blocks are found, and which are a set of reference blocks if one reference block is found), they are considered to be the same motion information, i.e. two motion information repeats. When the duplicate checking detection is performed according to the second-level strategy, if two sets of reference block positions pointed by two pieces of motion information (one piece of motion information can determine the positions of two reference blocks at most, if there are two reference block positions, the positions of the two reference blocks are taken as a set of reference block positions, and if there is one reference block position, the position of the one reference block is taken as a set of reference block positions) are the same, the two pieces of motion information are considered to be the same motion information, namely, the two pieces of motion information are repeated. The third-level strategy is wide in duplication checking range, the duplication checking effect is poor compared with the first-level strategy and the second-level strategy, and the difference of the unidirectional motion information is obvious.
The construction method of the motion information list for checking the duplicate by applying the third-level strategy has the obvious proportion of the repeated motion information in the first-level strategy and the second-level strategy, which causes that the repeated unidirectional motion information added to the motion information candidate list in the sense of the first-level strategy and the second-level strategy can not be practically used, and the motion information can cause that other different motion information behind the same rank can be abandoned because the motion information candidate list is full. On the other hand, since the repeated motion information occupies one position, the index value index of the other motion information in the motion information list increases, and a larger number of bits are required when encoding the index value.
That is, at present, the duplicate checking detection effect most often using the third-level policy is relatively poor, and therefore, in the embodiment of the present application, it is preferable to use the first-level policy or the second-level policy defined in the preset duplicate checking policy, that is, to use a stricter duplicate checking detection method, so as to obtain a duplicate checking detection result with a higher effect. The second-level strategy is suitable for application scenarios with strict requirements on decoding complexity, and the first-level strategy is suitable for application scenarios with high requirements on compression performance but not particularly strict requirements on encoding and decoding complexity.
In an embodiment of the present application, further, fig. 13 is a flowchart illustrating a fifth implementation flow of an inter prediction method, and as shown in fig. 13, when a prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of a current block, a method for an encoder to construct a motion information candidate list of the current block according to a preset repetition checking policy may include the following steps:
step 202a, determining the relevant motion information of the current block.
Step 202b, in the process of sequentially filling the relevant motion information into the motion information candidate list, based on a preset duplication checking strategy, carrying out duplication checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list, and obtaining a duplication checking detection result.
And step 202c, completing the construction of the motion information candidate list based on the duplicate checking detection result.
In an embodiment of the present application, after determining the prediction mode parameter, if the prediction mode parameter indicates that the current block determines the inter prediction value of the current block using the preset inter prediction mode, the encoder may determine the related motion information of the current block first and then sequentially fill the related motion information into the motion information candidate list. Specifically, in the process of filling the relevant motion information into the motion information candidate list, the encoder may perform duplicate checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list according to a preset duplicate checking policy, so that a duplicate checking detection result may be obtained, and after the duplicate checking result is obtained, the construction of the motion information candidate list may be further implemented based on the duplicate checking result.
It is understood that, in the embodiment of the present application, the relevant motion information of the current block may include, but is not limited to, at least one of the following motion information: spatial domain motion information, temporal domain motion information, motion information based on historical information. For example, the related motion information of the current block may be motion information of a neighboring block of the current block.
It should be noted that, in the present application, based on different inter prediction modes, the motion information candidate list constructed by the encoder may be a unidirectional motion information candidate list or a bidirectional motion information candidate list. For example, in the present application, a uni-directional motion information candidate List may be represented as RefPicL0, or may be represented as one of RefPicList0 or List0 or L0; the bi-directional motion information candidate List may be represented as RefPicL0 and RefPicL1, wherein RefPicL1 may also be represented using one of RefPicList1 or List1 or L1.
It is understood that in the embodiments of the present application, the unidirectional motion information may include a set of motion vectors and reference frame information, and accordingly, in the present application, the bidirectional motion information may include a set of motion vectors and reference frame information, wherein one reference frame information may include a reference frame list and a reference frame index.
It is understood that, in the embodiments of the present application, duplicate detection results may include the same or different results. Specifically, the duplicate checking detection result is used to determine whether the relevant motion information to be filled is the same as each motion information in the motion information candidate list.
Further, in an embodiment of the present application, if the preset inter-frame prediction mode uses unidirectional motion information, the encoder may first determine first reference frame information and a first motion vector included in the to-be-filled related motion information when performing a duplicate checking detection on the to-be-filled related motion information and the motion information in the motion information candidate list based on a preset duplicate checking policy and obtaining a duplicate checking detection result; wherein the first reference frame information comprises a first reference frame list and a first reference frame index; meanwhile, second reference frame information and a second motion vector included in the motion information candidate list can be determined; wherein the second reference frame information comprises a second reference frame list and a second reference frame index; then, the duplicate checking detection result can be determined according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses unidirectional motion information and the predetermined duplication policy is a first-level policy, when determining a duplication detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, the encoder may determine a first reference frame from the first reference frame list according to the first reference frame index and determine a first reference block in the first reference frame according to the first motion vector; determining a second reference frame from the second reference frame list according to the second reference frame index, and determining a second reference block in the second reference frame according to the second motion vector; then, the pixel information of the first reference block and the pixel information of the second reference block may be compared, and if the pixel information of the first reference block and the pixel information of the second reference block are the same, the encoder may determine that the duplicate detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list; if the pixel information of the first reference block and the pixel information of the second reference block are not the same, the encoder may determine that the duplicate detection result is that the associated motion information to be filled in is not the same as the motion information in the motion information candidate list.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses unidirectional motion information and the predetermined duplication policy is a second-level policy, when determining a duplication checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, the encoder may first determine a first reference frame from the first reference frame list according to the first reference frame index and obtain a first identifier of the first reference frame; meanwhile, a second reference frame can be determined from the second reference frame list according to the second reference frame index, and a second identifier of the second reference frame is obtained; then, the first identifier and the second identifier may be compared, the first motion vector and the second motion vector may be compared, and if the first identifier and the second identifier are the same and the first motion vector and the second motion vector are the same, the encoder may determine that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list; if the first identifier is not the same as the second identifier, or the first motion vector is not the same as the second motion vector, the encoder may determine that the duplicate detection result is that the associated motion information to be filled is not the same as the motion information in the motion information candidate list.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses unidirectional motion information and the predetermined duplication policy is a third-level policy, the encoder may directly compare the first reference frame information with the second reference frame information and compare the first motion vector with the second motion vector when determining the duplication detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, and if the first reference frame information is the same as the second reference frame information and the first motion vector is the same as the second motion vector, the encoder considers that the reference blocks indicated by the two pieces of motion information are the same, that is, it is determined that the duplication detection result is the same as the motion information in the motion information candidate list and the related motion information to be filled; if the first reference frame information is not the same as the second reference frame information, or the first motion vector is not the same as the second motion vector, the encoder may determine that the duplicate detection result is that the relevant motion information to be filled is not the same as the motion information in the motion information candidate list.
Further, in an embodiment of the present application, if the preset inter-frame prediction mode uses bidirectional motion information, the encoder may first determine first sub-information and second sub-information included in the to-be-filled related motion information when performing a duplicate checking detection on the to-be-filled related motion information and the motion information in the motion information candidate list based on a preset duplicate checking policy and obtaining a duplicate checking detection result; the first sub-information comprises third reference frame information and a third motion vector, the third reference frame information comprises a third reference frame list and a third reference frame index, the second sub-information comprises fourth reference frame information and a fourth motion vector, and the fourth reference frame information comprises a fourth reference frame list and a fourth reference frame index; meanwhile, the third sub information and the fourth sub information included in the motion information candidate list can be determined; the third sub-information comprises fifth reference frame information and a fifth motion vector, the fifth reference frame information comprises a fifth reference frame list and a fifth reference frame index, the fourth sub-information comprises sixth reference frame information and a sixth motion vector, and the sixth reference frame information comprises a sixth reference frame list and a sixth reference frame index; then, a duplicate checking detection result can be determined according to the first sub information, the second sub information, the third sub information and the fourth sub information.
It should be noted that, in the embodiment of the present application, if the inter prediction mode uses bidirectional motion information and the predetermined duplication checking policy is a first-level policy, when determining a duplication checking detection result according to the first sub information, the second sub information, the third sub information, and the fourth sub information, the encoder may first determine a third reference block according to the first sub information and determine a fourth reference block according to the second sub information; meanwhile, a fifth reference block is determined according to the third sub-information, and a sixth reference block is determined according to the fourth sub-information; then comparing the third reference block and the fourth reference block with the fifth reference block and the sixth reference block respectively, if the pixel information of the third reference block is the same as that of the fifth reference block and the pixel information of the fourth reference block is the same as that of the sixth reference block, the encoder may determine that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; if the pixel information of the third reference block is the same as the pixel information of the sixth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the fifth reference block, the encoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; otherwise, the encoder determines that the duplicate detection result is that the relevant motion information to be filled is not the same as the motion information in the motion information candidate list.
It is to be understood that, in the embodiment of the present application, when determining the third reference block according to the first sub-information and determining the fourth reference block according to the second sub-information, the encoder may determine the third reference frame from the third reference frame list according to the third reference frame index and determine the third reference block in the third reference frame according to the third motion vector; meanwhile, a fourth reference frame may be determined from the fourth reference frame list according to the fourth reference frame index, and a fourth reference block may be determined in the fourth reference frame according to the fourth motion vector.
It is to be understood that, in the embodiment of the present application, when determining the fifth reference block according to the third sub-information and determining the sixth reference block according to the fourth sub-information, the encoder may determine the fifth reference frame from the fifth reference frame list according to the fifth reference frame index and determine the fifth reference block in the fifth reference frame according to the fifth motion vector; meanwhile, a sixth reference frame may be determined from the sixth reference frame list according to the sixth reference frame index, and a sixth reference block may be determined in the sixth reference frame according to the sixth motion vector.
It should be noted that, in the embodiment of the present application, if the inter-frame prediction mode uses bidirectional motion information and the preset repetition policy is a second-level policy, when determining a repetition detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information, the encoder may first determine a first information combination of the related information to be filled according to the first sub-information, and determine a second information combination of the related information to be filled according to the second sub-information; meanwhile, determining a third information combination of the motion information in the list according to the third sub-information, and determining a fourth information combination of the motion information in the list according to the fourth sub-information; then, the first information combination and the second information combination can be compared with the third information combination and the fourth information combination respectively, if the first information combination is the same as the third information combination and the second information combination is the same as the fourth information combination, the encoder can determine that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list; if the first information combination is the same as the fourth information combination, and the second information combination is the same as the third information combination, the encoder may determine that the duplicate detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list; otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
It can be understood that, in the embodiment of the present application, when determining the first information combination of the related information to be filled according to the first sub-information and determining the second information combination of the related information to be filled according to the second sub-information, the encoder may determine a third reference frame from the third reference frame list according to the third reference frame index and construct the first information combination with the third motion vector according to the third identifier of the third reference frame; meanwhile, a fourth reference frame may be determined from the fourth reference frame list according to the fourth reference frame index, and the second information combination may be constructed according to a fourth identification of the fourth reference frame and the fourth motion vector.
It is to be understood that, in the embodiment of the present application, when determining the third information combination of the motion information in the list according to the third sub information and determining the fourth information combination of the motion information in the list according to the fourth sub information, the encoder may determine a fifth reference frame from the fifth reference frame list according to the fifth reference frame index and construct the third information combination with the fifth motion vector according to the fifth identifier of the fifth reference frame; meanwhile, a sixth reference frame may be determined from the sixth reference frame list according to the sixth reference frame index, and the fourth information combination may be constructed according to a sixth identification of the sixth reference frame and the sixth motion vector.
It is understood that in the embodiments of the present application, the identifier of one reference frame may be a unique identifier such as POC or DOI.
It should be noted that, in the embodiment of the present application, if the preset inter-frame prediction mode uses bidirectional motion information and the preset repetition policy is a third-level policy, when determining a repetition detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information, the encoder may directly compare the first sub-information and the second sub-information with the third sub-information and the fourth sub-information, respectively, and if the first sub-information is the same as the third sub-information and the second sub-information is the same as the fourth sub-information, the encoder considers that the reference blocks indicated by the two motion information are the same; if the first sub information is identical to the fourth sub information and the second sub information is identical to the third sub information, the encoder considers that the reference blocks indicated by the two motion information are identical; otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
It is understood that in the embodiment of the present application, comparing the third-level policy with the first-level policy and the second-level policy, since the same reference frame, i.e. the reference frame of the same POC (or unique identifier such as DOI), is allowed to appear in the two reference frame lists in the standard, even if the reference frame lists and reference frame indexes of the two pieces of unidirectional motion information are different, the reference frames pointed to by the two pieces of unidirectional motion information may be the same reference frame. It can be seen that two pieces of motion information that are detected as duplicates using the first-level strategy or the second-level strategy may be determined as not duplicates using the third-level strategy for duplicate detection.
It should be noted that, in the embodiment of the present application, if the prediction mode parameter obtained by parsing indicates that the current block determines the inter prediction value of the current block using GPM or AWP, the current block may be divided into a first partition and a second partition, and accordingly, the motion information of the current block may include first information corresponding to the first partition and second information corresponding to the second partition. The first information comprises a motion vector and reference frame information corresponding to the first partition, and the second information comprises a motion vector and reference frame information corresponding to the second partition.
Further, in the embodiment of the present application, when the encoder completes the construction of the motion information candidate list based on the duplicate checking detection result, if the duplicate checking detection result indicates that the relevant motion information to be filled in does not coincide with the motion information in the motion information candidate list, the encoder may fill the relevant motion information to be filled in the motion information candidate list; if the duplication checking result is that the relevant motion information to be filled coincides with the motion information in the motion information candidate list, the encoder may ignore the relevant motion information to be filled.
Therefore, for the preset duplication checking strategy provided by the embodiment of the application, the first-stage strategy is strictest in duplication checking, and the obtained compression performance is also optimal, but the first-stage strategy needs to take out a reference block for duplication checking to judge whether the motion information is the same or not, so that the complexity is high. For example, when a new motion information candidate is to be added to the motion information candidate list, the motion information needs to be checked (compared to determine whether the motion information is the same) with each piece of motion information in the motion information candidate list, so that a scene in which a new motion information candidate is to be added to the motion information candidate list needs to be checked in the memory for a plurality of times to obtain a reference block, and the implementation complexity is obviously increased compared with the third-level policy for checking the motion information. Therefore, the first-level strategy is suitable for application scenarios where the compression performance is very demanding, but the codec complexity requirement is not particularly strict.
The difference between the second-level policy and the third-level policy is that the third-level policy directly determines whether the reference frame list and the reference frame index are the same, and the second-level policy determines whether the reference frame (e.g., the unique identifier of the reference frame such as POC or DOI of the reference frame) is the same. Taking POC as an example, the increased complexity of second-level strategy re-check compared to third-level strategy re-check is to obtain the POC of the reference frame according to the reference frame list and the reference frame index, i.e. the POC of the reference frame where the reference frame index is located is found from the reference frame list. Because the reference frame list and the reference frame index are different but the reference frame POC is the same, the duplicate checking effect is obviously improved under the condition that the complexity is not obviously increased. Therefore, the second-stage strategy is suitable for application scenarios with strict requirements on decoding complexity.
It is understood that in the embodiment of the present application, the decoder may preset different prediction modes to use different preset duplication checking strategies, that is, the preset duplication checking strategies used for the different prediction modes may be different, for example, if the prediction mode parameter indicates that GPM is used to determine the inter prediction value of the current block, when constructing the motion information reference list, a second-level strategy in the preset duplication checking strategies is used to perform duplication checking detection; if the prediction mode parameter indicates that the AWP is used for determining the inter-frame prediction value of the current block, when a motion information reference list is constructed, performing duplicate checking detection by using a second-level strategy in a preset duplicate checking strategy; if the prediction mode parameter indicates that the inter prediction value of the current block is determined using other inter prediction modes except GPM and AWP, then duplicate checking detection is performed using a third-level strategy in the preset duplicate checking strategies when constructing the motion information reference list.
Step 203, determining motion information of the current block from the motion information candidate list.
In an embodiment of the present application, after the encoder constructs a motion information candidate list of the current block according to a preset duplication checking strategy, the encoder may determine motion information from the motion information candidate list.
In an embodiment of the present application, further, fig. 14 is a flowchart illustrating a sixth implementation flow of the inter prediction method, as shown in fig. 14, after the encoder determines the motion information of the current block from the motion information candidate list, that is, after step 203, the method for the encoder to perform inter prediction may further include the following steps:
step 205, setting the index value of the motion information corresponding to the current block as the index sequence number value of the motion information in the motion information candidate list.
In the embodiment of the present application, further, if the preset inter prediction mode is GPM or AWP, after determining the prediction mode parameter, if the prediction mode parameter indicates that the current block determines the inter prediction value of the current block using the preset inter prediction mode, the encoder may first select a mode type in the prediction mode, and then may determine the first partition and the second partition corresponding to the current block according to the mode type.
For example, in the present application, after determining that the current block uses GPM or AWP for inter prediction according to the prediction mode parameter, the encoder may further determine a mode type specifically used by the current block, for example, one of 64 modes of GPM or one of 56 modes of AWP. Therefore, the first partition and the second partition corresponding to the current block can be determined according to the mode type specifically used by the current block.
It is understood that, in the embodiment of the present application, when the encoder determines the motion information of the current block from the motion information candidate list, the encoder may determine the first information corresponding to the first partition from the motion information candidate list; and determining second information corresponding to the second partition from the motion information candidate list.
Further, in an embodiment of the present application, if the preset inter prediction mode is GPM or AWP, the encoder may set the first index value to an index number value of the first information in the motion information candidate list while setting the second index value to an index number value of the second information in the motion information candidate list after determining the motion information of the current block from the motion information candidate list; wherein the first index value and the second index value constitute a motion information index value of the current block.
That is, the motion information index value of the current block may include a first reference frame index corresponding to the first information and a second reference frame index corresponding to the second information.
It should be noted that, in the embodiment of the present application, the encoder may write the mode type and the motion information index value of the current block into the code stream, so as to transmit the current block to the decoding side. Further, not only the decoder may determine whether the current block uses GPM or AWP for inter prediction by parsing the obtained prediction mode parameter after parsing the code stream, but also the decoder may determine a mode specifically used by the current block, for example, one of 64 modes of GPM or one of 56 modes of AWP, by parsing a mode type obtained by parsing the code stream after determining that the current block uses GPM or AWP for inter prediction; meanwhile, the decoder can obtain the index values of the two unidirectional motion information by analyzing the code stream, namely a first index value corresponding to the first partition and a second index value corresponding to the second partition.
Further, in an embodiment of the present application, the preset inter prediction mode may include GPM or AWP, and the encoder may determine the first partition and the second partition corresponding to the current block based on the mode type; correspondingly, the motion information index value corresponding to the current block may also include a first index value corresponding to the first information and a second index value corresponding to the second information; accordingly, the motion information corresponding to the current block may also include first information corresponding to the first partition and second information corresponding to the second partition.
And step 204, determining the interframe prediction value of the current block according to the motion information.
In an embodiment of the present application, after determining motion information from the motion information candidate list, the encoder may further obtain an inter prediction value of the current block according to the motion information to complete inter prediction of the current block.
It should be noted that, in the embodiment of the present application, after determining the motion information of the current block, the encoder may first determine, according to the motion information, a reference block corresponding to the current block; an inter prediction value may then be determined based on the mode type and the reference block.
It can be understood that, in the embodiment of the present application, the encoder may determine motion information corresponding to the current block from the motion information candidate list, then may determine a reference block corresponding to the current block by using the motion information, and perform inter prediction based on the reference block, to finally obtain the inter prediction value of the current block.
Further, in an embodiment of the present application, for GPM or AWP, the encoder may calculate a first predictor of the first partition using the first information while calculating a second predictor of the second partition using the second information after determining the first information of the first partition and the second information of the second partition from the motion information candidate list; an inter prediction value of the current block may then be determined according to the first prediction value and the second prediction value.
It should be noted that, in the embodiment of the present application, when determining the inter prediction value of the current block according to the first prediction value and the second prediction value, the encoder may first determine a first weight of the first partition and a second weight of the second partition according to the mode type; then, the first predicted value and the second predicted value can be weighted and fused according to the first weight and the second weight, and finally the interframe predicted value can be obtained.
That is, in the present application, after finding two motion information, i.e., the first information and the second information, of the current block from the constructed motion information candidate list, the encoder may then find two reference blocks using the two unidirectional motion information, determine a weight of the two reference blocks at each pixel position according to a specific mode used by GPM or AWP, i.e., a mode type obtained by parsing, and finally perform weighted fusion on the two reference blocks based on the first weight and the second weight, so as to obtain a prediction block, i.e., an inter prediction value, of the current block.
It should be noted that, in the present application, if the current mode is the skip mode, the predicted block is the encoded block, and the encoding of the current block is finished. If the current mode is not the skip mode, entropy coding analyzes the quantization coefficient, then inverse quantization and inverse transformation are carried out to obtain a residual block, the residual block and the prediction block are added to obtain a coding block, and the coding of the current block is finished.
It should be noted that, in the embodiment of the present application, the motion information candidate list in the embodiment of the present application generally refers to a unidirectional motion information candidate list, but the construction manner of unidirectional motion information in the embodiment of the present application may be extended to the construction of bidirectional motion information, so that the construction of the unidirectional motion information candidate list may also be extended to the construction of a bidirectional motion information candidate list.
In summary, according to the inter-frame prediction method provided by the application, when a motion information candidate list is constructed, the motion information is subjected to duplicate checking detection according to a preset duplicate checking strategy, and a more rigorous duplicate checking standard is used, so that the duplicate checking effect can be obviously improved under the condition that the complexity is not obviously increased. Under the condition that the reference frame list exists, the reference frame indexes are different, but the reference frames are the same, repeated motion information under new definition can be eliminated, so that different motion information in the motion information candidate list is increased, the indexes of effective motion information are advanced, and the coding and decoding performance is improved.
The embodiment provides an inter-frame prediction method, wherein an encoder determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information of the current block from a motion information candidate list; and determining the inter prediction value of the current block according to the motion information. That is to say, the inter-frame prediction method provided by the application can perform more rigorous de-duplication processing according to a preset duplication checking strategy when constructing the motion information candidate list, so that the problem of duplicate options in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Based on the foregoing embodiments, in yet another embodiment of the present application, fig. 15 is a schematic structural diagram of a decoder, and as shown in fig. 15, a decoder 300 according to an embodiment of the present application may include an parsing portion 301, a first constructing portion 302, and a first determining portion 303; wherein the content of the first and second substances,
the analysis part 301 is configured to analyze the code stream and obtain the prediction mode parameter of the current block;
the first constructing part 302 is configured to construct a motion information candidate list of the current block according to a preset duplication checking policy when the prediction mode parameter indicates that an inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the first determining part 303 is configured to determine motion information from the motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information.
Fig. 16 is a schematic diagram illustrating a second constituent structure of the decoder, and as shown in fig. 16, the decoder 300 according to the embodiment of the present application may further include a first processor 304, a first memory 305 storing an executable instruction of the first processor 304, a first communication interface 306, and a first bus 307 for connecting the first processor 304, the first memory 305, and the first communication interface 306.
Further, in an embodiment of the present application, the first processor 304 is configured to parse a code stream to obtain a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing; determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block; and determining the inter-frame prediction value of the current block according to the motion information.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. 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 Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the application provides a decoder, which analyzes a code stream to obtain a prediction mode parameter of a current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information from a motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information. That is to say, the inter-frame prediction method provided by the application can perform more rigorous de-duplication processing according to a preset duplication checking strategy when constructing the motion information candidate list, so that the problem of duplicate options in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Fig. 17 is a first schematic structural diagram of an encoder, and as shown in fig. 17, an encoder 400 according to an embodiment of the present application may include a second determining portion 401, a second constructing portion 402, and a setting portion 403; wherein the content of the first and second substances,
the second determining part 401 configured to determine a prediction mode parameter of the current block;
the second constructing part 402 is configured to construct a motion information candidate list of the current block according to a preset duplication checking policy when the prediction mode parameter indicates that the inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the second determining part 401, further configured to determine the motion information of the current block from the motion information candidate list; and determining the inter-frame prediction value of the current block according to the motion information.
Fig. 18 is a schematic diagram of a composition structure of an encoder, and as shown in fig. 18, the encoder 400 according to the embodiment of the present application may further include a second processor 404, a second memory 405 storing an executable instruction of the second processor 404, a second communication interface 406, and a second bus 407 for connecting the second processor 404, the second memory 405, and the second communication interface 406.
Further, in an embodiment of the present application, the second processor 404 is configured to determine a prediction mode parameter of the current block; when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing; determining motion information of a current block from the motion information candidate list; and determining the inter-frame prediction value of the current block according to the motion information.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. 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 Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the application provides an encoder, which determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that the inter prediction value of the current block is determined by using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; wherein, the preset duplication checking strategy is used for carrying out duplication elimination processing; determining motion information of the current block from a motion information candidate list; and determining the inter prediction value of the current block according to the motion information. That is to say, the inter-frame prediction method provided by the application can perform more rigorous de-duplication processing according to a preset duplication checking strategy when constructing the motion information candidate list, so that the problem of duplicate options in the motion information candidate list is solved, the duplication checking effect is obviously improved, and the coding and decoding efficiency is improved.
Embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, which when executed by a processor implements the method as described in the above embodiments.
Specifically, the program instructions corresponding to an inter-frame prediction method in the present embodiment may be stored on a storage medium such as an optical disc, a hard disc, a usb disk, or the like, and when the program instructions corresponding to an inter-frame prediction method in the storage medium are read or executed by an electronic device, the method includes the following steps:
analyzing the code stream to obtain the prediction mode parameter of the current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block;
and determining the inter-frame prediction value of the current block according to the motion information.
Specifically, the program instructions corresponding to an inter-frame prediction method in the present embodiment may be stored on a storage medium such as an optical disc, a hard disc, a usb disk, or the like, and when the program instructions corresponding to an inter-frame prediction method in the storage medium are read or executed by an electronic device, the method includes the following steps:
determining a prediction mode parameter of a current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information of a current block from the motion information candidate list;
and determining the inter-frame prediction value of the current block according to the motion information.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks in the flowchart and/or block diagram block or blocks.
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 apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific 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 the 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 (51)

1. An inter-prediction method applied to a decoder, the method comprising:
analyzing the code stream to obtain the prediction mode parameter of the current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block;
and determining the inter-frame prediction value of the current block according to the motion information.
2. The method of claim 1, wherein when the prediction mode parameter indicates that a preset inter prediction mode is used to determine the inter prediction value of the current block, constructing the motion information candidate list of the current block according to a preset repetition strategy comprises:
determining relevant motion information for the current block;
in the process of sequentially filling the relevant motion information into the motion information candidate list, based on the preset duplication checking strategy, carrying out duplication checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list to obtain duplication checking detection results;
and finishing the construction of the motion information candidate list based on the duplicate checking detection result.
3. The method of claim 2, wherein the related motion information comprises: spatial motion information, and/or temporal motion information, and/or motion information based on historical information.
4. The method of claim 3, wherein the predetermined duplication checking policies include a first-level policy, a second-level policy, and a third-level policy.
5. The method according to claim 4, wherein if the inter-frame prediction mode uses uni-directional motion information, performing duplicate checking detection on the motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate checking policy to obtain a duplicate checking detection result, comprising:
determining first reference frame information and a first motion vector included in the related motion information to be filled; wherein the first reference frame information comprises a first reference frame list and a first reference frame index;
determining second reference frame information and a second motion vector included in the motion information candidate list; wherein the second reference frame information comprises a second reference frame list and a second reference frame index;
and determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector.
6. The method according to claim 5, wherein if the predetermined duplicate checking policy is the first-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
determining a first reference frame from the first reference frame list according to the first reference frame index, and determining a first reference block in the first reference frame according to the first motion vector;
determining a second reference frame from the second reference frame list according to the second reference frame index, and determining a second reference block in the second reference frame according to the second motion vector;
if the pixel information of the first reference block is the same as the pixel information of the second reference block, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the pixel information of the first reference block is different from the pixel information of the second reference block, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
7. The method according to claim 5, wherein if the predetermined duplicate checking policy is the second-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
determining a first reference frame from the first reference frame list according to the first reference frame index, and acquiring a first identifier of the first reference frame;
determining a second reference frame from the second reference frame list according to the second reference frame index, and acquiring a second identifier of the second reference frame;
if the first identifier is the same as the second identifier and the first motion vector is the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the first identifier is not the same as the second identifier, or the first motion vector is not the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is not the same as the motion information in the motion information candidate list.
8. The method according to claim 5, wherein if the predetermined duplicate checking policy is the third-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
if the first reference frame information is the same as the second reference frame information and the first motion vector is the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the first reference frame information is not the same as the second reference frame information or the first motion vector is not the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is not the same as the motion information in the motion information candidate list.
9. The method according to claim 4, wherein if the inter-frame prediction mode uses bidirectional motion information, performing duplicate checking detection on the motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate checking policy to obtain a duplicate checking detection result, comprising:
determining first sub information and second sub information included in the related motion information to be filled; wherein the first sub information includes third reference frame information and a third motion vector; the third reference frame information comprises a third reference frame list and a third reference frame index, the second sub-information comprises fourth reference frame information and a fourth motion vector, and the fourth reference frame information comprises a fourth reference frame list and a fourth reference frame index;
determining third sub information and fourth sub information included in the motion information candidate list; the third sub-information comprises fifth reference frame information and a fifth motion vector, the fifth reference frame information comprises a fifth reference frame list and a fifth reference frame index, the fourth sub-information comprises sixth reference frame information and a sixth motion vector, and the sixth reference frame information comprises a sixth reference frame list and a sixth reference frame index;
and determining the duplicate checking detection result according to the first sub information, the second sub information, the third sub information and the fourth sub information.
10. The method according to claim 9, wherein if the predetermined duplicate checking policy is the first-level policy, the determining the duplicate checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information includes:
determining a third reference block according to the first sub-information, and determining a fourth reference block according to the second sub-information;
determining a fifth reference block according to the third sub-information, and determining a sixth reference block according to the fourth sub-information;
if the pixel information of the third reference block is the same as the pixel information of the fifth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the sixth reference block, determining that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list;
if the pixel information of the third reference block is the same as the pixel information of the sixth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the fifth reference block, determining that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
11. The method of claim 10, wherein determining a third reference block according to the first sub-information and determining a fourth reference block according to the second sub-information comprises:
determining a third reference frame from the third reference frame list according to the third reference frame index, and determining a third reference block in the third reference frame according to the third motion vector;
determining a fourth reference frame from the fourth reference frame list according to the fourth reference frame index, and determining a fourth reference block in the fourth reference frame according to the fourth motion vector.
12. The method of claim 10, wherein determining a fifth reference block according to the third sub-information and determining a sixth reference block according to the fourth sub-information comprises:
determining a fifth reference frame from the fifth reference frame list according to the fifth reference frame index, and determining a fifth reference block in the fifth reference frame according to the fifth motion vector;
determining a sixth reference frame from the sixth reference frame list according to the sixth reference frame index, and determining a sixth reference block in the sixth reference frame according to the sixth motion vector.
13. The method according to claim 9, wherein if the predetermined duplicate checking policy is the second-level policy, the determining the duplicate checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information includes:
determining a first information combination of the related information to be filled according to the first sub-information, and determining a second information combination of the related information to be filled according to the second sub-information;
determining a third information combination of the motion information in the list according to the third sub-information, and determining a fourth information combination of the motion information in the list according to the fourth sub-information;
if the first information combination is the same as the third information combination, and the second information combination is the same as the fourth information combination, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
if the first information combination is the same as the fourth information combination, and the second information combination is the same as the third information combination, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
14. The method of claim 13, wherein the determining a first information combination of the related information to be filled in according to the first sub information and determining a second information combination of the related information to be filled in according to the second sub information comprises:
determining a third reference frame from the third reference frame list according to the third reference frame index, and constructing the first information combination according to a third identifier of the third reference frame and the third motion vector;
and determining a fourth reference frame from the fourth reference frame list according to the fourth reference frame index, and constructing the second information combination according to a fourth identifier of the fourth reference frame and the fourth motion vector.
15. The method of claim 13, wherein determining a third information combination of the motion information in the list according to the third sub-information and determining a fourth information combination of the motion information in the list according to the fourth sub-information comprises:
determining a fifth reference frame from the fifth reference frame list according to the fifth reference frame index, and constructing the third information combination according to a fifth identifier of the fifth reference frame and the fifth motion vector;
determining a sixth reference frame from the sixth reference frame list according to the sixth reference frame index, and constructing the fourth information combination according to a sixth identification of the sixth reference frame and the sixth motion vector.
16. The method according to claim 9, wherein if the preset duplication checking policy is the third-level policy, the determining the duplication checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information includes:
if the first sub-information is the same as the third sub-information and the second sub-information is the same as the fourth sub-information, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
if the first sub-information is the same as the fourth sub-information and the second sub-information is the same as the third sub-information, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
17. The method of claim 1, wherein after parsing the code stream and obtaining the prediction mode parameter of the current block, the method further comprises:
when the prediction mode parameter indicates that the preset interframe prediction mode is used for determining the interframe prediction value of the current block, analyzing the code stream and acquiring the motion information index value.
18. The method of claim 1, wherein if the predetermined inter prediction mode is a geometric partition prediction mode (GPM) or an angle weighted prediction mode (AWP), the method further comprises, after analyzing the code stream and obtaining the prediction mode parameters of the current block:
and when the prediction mode parameter indicates that the preset interframe prediction mode is used for determining the interframe prediction value of the current block, analyzing the code stream to obtain the mode type.
19. The method of claim 18, further comprising:
determining a first partition and a second partition corresponding to the current block based on the mode type;
accordingly, the motion information includes: first information corresponding to the first partition and second information corresponding to the second partition; the motion information index value includes: a first index value corresponding to the first information, and a second index value corresponding to the second information.
20. The method of claim 19, wherein determining motion information from the motion information candidate list according to the motion information index value corresponding to the current block comprises:
determining motion information indicated by the first index value in the motion information candidate list as the first information of the first partition;
determining motion information indicated by the second index value in the motion information candidate list as the second information of the second partition.
21. The method of claim 20, wherein the determining the inter prediction value of the current block according to the motion information comprises:
calculating a first prediction value of the first partition by using the first information, and calculating a second prediction value of the second partition by using the second information;
determining the inter prediction value of the current block according to the first prediction value and the second prediction value.
22. The method of claim 21, wherein determining the inter predictor of the current block based on the first predictor and the second predictor comprises:
determining a first weight of a first partition and a second weight of a second partition according to the mode type;
and performing weighted fusion processing on the first predicted value and the second predicted value according to the first weight and the second weight to obtain the interframe predicted value.
23. An inter-prediction method applied to an encoder, the method comprising:
determining a prediction mode parameter of a current block;
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplication checking strategy; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
determining motion information of a current block from the motion information candidate list;
and determining the inter-frame prediction value of the current block according to the motion information.
24. The method of claim 23, wherein determining the prediction mode parameter for the current block 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 the minimum rate distortion cost value from the obtained multiple rate distortion cost values, and determining the prediction mode parameters of the current block according to the prediction mode corresponding to the minimum rate distortion cost value.
25. The method of claim 23, wherein when the prediction mode parameter indicates that a preset inter prediction mode is used to determine the inter prediction value of the current block, constructing the motion information candidate list of the current block according to a preset repetition strategy comprises:
determining relevant motion information for the current block;
in the process of sequentially filling the relevant motion information into the motion information candidate list, based on the preset duplication checking strategy, carrying out duplication checking detection on the relevant motion information to be filled and the motion information in the motion information candidate list to obtain duplication checking detection results;
and finishing the construction of the motion information candidate list based on the duplicate checking detection result.
26. The method of claim 25, wherein the related motion information comprises: spatial motion information, and/or temporal motion information, and/or motion information based on historical information.
27. The method of claim 26, wherein the predetermined duplication checking strategies comprise a first-level strategy, a second-level strategy, and a third-level strategy.
28. The method of claim 27, wherein if the inter-frame prediction mode uses uni-directional motion information, performing duplicate checking detection on the motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate checking policy to obtain a duplicate checking detection result, comprising:
determining first reference frame information and a first motion vector included in the related motion information to be filled; wherein the first reference frame information comprises a first reference frame list and a first reference frame index;
determining second reference frame information and a second motion vector included in the motion information candidate list; wherein the second reference frame information comprises a second reference frame list and a second reference frame index;
and determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector.
29. The method of claim 28, wherein if the predetermined duplicate checking policy is the first-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
determining a first reference frame from the first reference frame list according to the first reference frame index, and determining a first reference block in the first reference frame according to the first motion vector;
determining a second reference frame from the second reference frame list according to the second reference frame index, and determining a second reference block in the second reference frame according to the second motion vector;
if the pixel information of the first reference block is the same as the pixel information of the second reference block, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the pixel information of the first reference block is different from the pixel information of the second reference block, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
30. The method of claim 28, wherein if the predetermined duplicate checking policy is the second-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
determining a first reference frame from the first reference frame list according to the first reference frame index, and acquiring a first identifier of the first reference frame;
determining a second reference frame from the second reference frame list according to the second reference frame index, and acquiring a second identifier of the second reference frame;
if the first identifier is the same as the second identifier and the first motion vector is the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the first identifier is not the same as the second identifier, or the first motion vector is not the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is not the same as the motion information in the motion information candidate list.
31. The method of claim 28, wherein if the predetermined duplicate checking policy is the third-level policy, the determining the duplicate checking detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector comprises:
if the first reference frame information is the same as the second reference frame information and the first motion vector is the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
and if the first reference frame information is not the same as the second reference frame information or the first motion vector is not the same as the second motion vector, determining that the duplicate checking detection result is that the related motion information to be filled is not the same as the motion information in the motion information candidate list.
32. The method of claim 27, wherein if the inter-frame prediction mode uses bi-directional motion information, performing duplicate checking detection on the motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate checking policy to obtain a duplicate checking detection result, comprising:
determining first sub information and second sub information included in the related motion information to be filled; the first sub-information comprises third reference frame information and a third motion vector, the third reference frame information comprises a third reference frame list and a third reference frame index, the second sub-information comprises fourth reference frame information and a fourth motion vector, and the fourth reference frame information comprises a fourth reference frame list and a fourth reference frame index;
determining third sub information and fourth sub information included in the motion information candidate list; the third sub-information comprises fifth reference frame information and a fifth motion vector, the fifth reference frame information comprises a fifth reference frame list and a fifth reference frame index, the fourth sub-information comprises sixth reference frame information and a sixth motion vector, and the sixth reference frame information comprises a sixth reference frame list and a sixth reference frame index;
and determining the duplicate checking detection result according to the first sub information, the second sub information, the third sub information and the fourth sub information.
33. The method of claim 32, wherein if the predetermined duplicate checking policy is the first-level policy, the determining the duplicate checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information comprises:
determining a third reference block according to the first sub-information, and determining a fourth reference block according to the second sub-information;
determining a fifth reference block according to the third sub-information, and determining a sixth reference block according to the fourth sub-information;
if the pixel information of the third reference block is the same as the pixel information of the fifth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the sixth reference block, determining that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list;
if the pixel information of the third reference block is the same as the pixel information of the sixth reference block, and the pixel information of the fourth reference block is the same as the pixel information of the fifth reference block, determining that the duplicate checking detection result is that the relevant motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
34. The method of claim 33, wherein determining a third reference block according to the first sub-information and determining a fourth reference block according to the second sub-information comprises:
determining a third reference frame from the third reference frame list according to the third reference frame index, and determining a third reference block in the third reference frame according to the third motion vector;
determining a fourth reference frame from the fourth reference frame list according to the fourth reference frame index, and determining a fourth reference block in the fourth reference frame according to the fourth motion vector.
35. The method of claim 33, wherein determining a fifth reference block according to the third sub-information and determining a sixth reference block according to the fourth sub-information comprises:
determining a fifth reference frame from the fifth reference frame list according to the fifth reference frame index, and determining a fifth reference block in the fifth reference frame according to the fifth motion vector;
determining a sixth reference frame from the sixth reference frame list according to the sixth reference frame index, and determining a sixth reference block in the sixth reference frame according to the sixth motion vector.
36. The method of claim 32, wherein if the predetermined duplicate checking policy is the second-level policy, the determining the duplicate checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information comprises:
determining a first information combination of the related information to be filled according to the first sub-information, and determining a second information combination of the related information to be filled according to the second sub-information;
determining a third information combination of the motion information in the list according to the third sub-information, and determining a fourth information combination of the motion information in the list according to the fourth sub-information;
if the first information combination is the same as the third information combination, and the second information combination is the same as the fourth information combination, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
if the first information combination is the same as the fourth information combination, and the second information combination is the same as the third information combination, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
37. The method of claim 36, wherein the determining a first information combination of the related information to be filled in according to the first sub-information and determining a second information combination of the related information to be filled in according to the second sub-information comprises:
determining a third reference frame from the third reference frame list according to the third reference frame index, and constructing the first information combination according to a third identifier of the third reference frame and the third motion vector;
and determining a fourth reference frame from the fourth reference frame list according to the fourth reference frame index, and constructing the second information combination according to a fourth identifier of the fourth reference frame and the fourth motion vector.
38. The method of claim 36, wherein determining a third information combination of the motion information in the list according to the third sub-information and determining a fourth information combination of the motion information in the list according to the fourth sub-information comprises:
determining a fifth reference frame from the fifth reference frame list according to the fifth reference frame index, and constructing the third information combination according to a fifth identifier of the fifth reference frame and the fifth motion vector;
determining a sixth reference frame from the sixth reference frame list according to the sixth reference frame index, and constructing the fourth information combination according to a sixth identification of the sixth reference frame and the sixth motion vector.
39. The method of claim 32, wherein if the predetermined duplicate checking policy is the third-level policy, the determining the duplicate checking detection result according to the first sub-information, the second sub-information, the third sub-information, and the fourth sub-information comprises:
if the first sub-information is the same as the third sub-information and the second sub-information is the same as the fourth sub-information, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
if the first sub-information is the same as the fourth sub-information and the second sub-information is the same as the third sub-information, determining that the duplicate checking detection result is that the related motion information to be filled is the same as the motion information in the motion information candidate list;
otherwise, determining that the duplicate checking detection result is that the related motion information to be filled is different from the motion information in the motion information candidate list.
40. The method of claim 23, wherein after determining the motion information for the current block from the motion information candidate list, the method further comprises:
and setting the index value of the motion information corresponding to the current block as the index sequence number value of the motion information in the motion information candidate list.
41. The method of claim 23, wherein if the predetermined inter prediction mode is GPM or AWP, after determining the prediction mode parameters of the current block, the method further comprises:
when the prediction mode parameter indicates that a preset inter prediction mode is used for determining the inter prediction value of the current block, determining a mode type, and determining a first partition and a second partition corresponding to the current block according to the mode type.
42. The method of claim 41, wherein determining the motion information of the current block from the motion information candidate list comprises:
determining first information corresponding to the first partition from the motion information candidate list;
and determining second information corresponding to the second partition from the motion information candidate list.
43. The method of claim 42, wherein after determining the motion information for the current block from the motion information candidate list, the method further comprises;
setting a first index value as an index sequence number value of the first information in the motion information candidate list;
setting a second index value as an index sequence number value of the second information in the motion information candidate list; wherein the first index value and the second index value constitute a motion information index value of the current block.
44. The method of claim 43, wherein the determining the inter prediction value of the current block according to the motion information comprises:
calculating a first prediction value of the first partition by using the first information, and calculating a second prediction value of the second partition by using the second information;
determining the inter prediction value of the current block according to the first prediction value and the second prediction value.
45. The method of claim 44, wherein determining the inter predictor of the current block based on the first predictor and the second predictor comprises:
determining a first weight of a first partition and a second weight of a second partition according to the mode type;
and performing weighted fusion processing on the first predicted value and the second predicted value according to the first weight and the second weight to obtain the interframe predicted value.
46. The method of any one of claims 23 to 45, further comprising:
and writing the prediction mode parameter, the motion information index value and the mode type into a code stream.
47. A decoder, characterized in that the decoder comprises a parsing part, a first building part, a first determining part; wherein the content of the first and second substances,
the analysis part is configured to analyze the code stream and obtain the prediction mode parameter of the current block;
the first construction part is configured to construct a motion information candidate list of the current block according to a preset duplication checking strategy when the prediction mode parameter indicates that an inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the first determining part is configured to determine motion information from the motion information candidate list according to a motion information index value corresponding to the current block; and determining the inter prediction value of the current block according to the motion information.
48. A decoder, comprising a first processor, a first memory having stored thereon first processor-executable instructions that, when executed, implement the method of any of claims 1-22.
49. An encoder, characterized in that the encoder comprises a second determining part, a second building part; wherein the content of the first and second substances,
the second determining part configured to determine a prediction mode parameter of the current block;
the second construction part is configured to construct a motion information candidate list of the current block according to a preset duplication checking strategy when the prediction mode parameter indicates that the inter prediction value of the current block is determined using a preset inter prediction mode; the preset duplication checking strategy is used for carrying out duplication eliminating processing;
the second determining section further configured to determine motion information of the current block from the motion information candidate list; and determining the inter-frame prediction value of the current block according to the motion information.
50. An encoder, comprising a second processor, a second memory storing instructions executable by the second processor, the second processor when executing implementing the method of any of claims 23-46.
51. A computer storage medium, characterized in that it stores a computer program which, when executed by a first processor, implements the method of any one of claims 1-22, or which, when executed by a second processor, implements the method of any one of claims 23-46.
CN202010504292.8A 2020-06-05 2020-06-05 Inter-frame prediction method, encoder, decoder, and computer storage medium Pending CN113766244A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010504292.8A CN113766244A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, encoder, decoder, and computer storage medium
TW110118912A TW202147851A (en) 2020-06-05 2021-05-25 Inter-frame prediction method, encoder, decoder and computer storage medium characterized by increasing the diversity of the motion information in the motion information candidate list, so as to improve the encoding and decoding performances

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010504292.8A CN113766244A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, encoder, decoder, and computer storage medium

Publications (1)

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

Family

ID=78783958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010504292.8A Pending CN113766244A (en) 2020-06-05 2020-06-05 Inter-frame prediction method, encoder, decoder, and computer storage medium

Country Status (2)

Country Link
CN (1) CN113766244A (en)
TW (1) TW202147851A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023198144A1 (en) * 2022-04-15 2023-10-19 维沃移动通信有限公司 Inter-frame prediction method and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272410A1 (en) * 2012-04-11 2013-10-17 Qualcomm Incorporated Motion vector rounding
CN110611820A (en) * 2019-09-11 2019-12-24 北京达佳互联信息技术有限公司 Video coding method and device, electronic equipment and storage medium
CN110858905A (en) * 2018-08-26 2020-03-03 北京字节跳动网络技术有限公司 Pruning in multi-motion model based skip and direct mode coded video blocks
CN110870313A (en) * 2017-05-31 2020-03-06 交互数字Vc控股公司 Method and apparatus for candidate list pruning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272410A1 (en) * 2012-04-11 2013-10-17 Qualcomm Incorporated Motion vector rounding
CN110870313A (en) * 2017-05-31 2020-03-06 交互数字Vc控股公司 Method and apparatus for candidate list pruning
CN110858905A (en) * 2018-08-26 2020-03-03 北京字节跳动网络技术有限公司 Pruning in multi-motion model based skip and direct mode coded video blocks
CN110611820A (en) * 2019-09-11 2019-12-24 北京达佳互联信息技术有限公司 Video coding method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023198144A1 (en) * 2022-04-15 2023-10-19 维沃移动通信有限公司 Inter-frame prediction method and terminal

Also Published As

Publication number Publication date
TW202147851A (en) 2021-12-16

Similar Documents

Publication Publication Date Title
US11190795B2 (en) Method and an apparatus for processing a video signal
CN107071414B (en) Method and apparatus for video encoding and decoding
KR102070431B1 (en) Method and apparatus for encoding video with restricting bi-directional prediction and block merging, method and apparatus for decoding video
GB2492778A (en) Motion compensated image coding by combining motion information predictors
US11871034B2 (en) Intra block copy for screen content coding
BR112021002335A2 (en) Image decoding method based on affine motion prediction and device using affine fusion candidate list in image encoding system
CN116193139A (en) Inter prediction method, decoder, encoder, and computer storage medium
CN115315953A (en) Inter-frame prediction method, encoder, decoder and storage medium
CN115052161A (en) Inter-frame prediction method, encoder, decoder, and computer storage medium
CN113709498B (en) Inter prediction method, encoder, decoder, and computer storage medium
CN116471418A (en) Inter prediction method, encoder, decoder, and computer storage medium
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
CN114079785A (en) Inter-frame prediction method, encoder, decoder, and storage medium

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