Inter prediction method, encoder, decoder and computer storage medium
By employing a pre-defined deduplication strategy in the inter-frame prediction method to construct a candidate list of motion information, the problem of poor deduplication performance in existing technologies is solved, and the encoding and decoding efficiency is improved.
Patent Information
- Application Number
- CN202010504292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-05
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2040-12-11
AI Technical Summary
Existing inter-frame prediction methods have poor deduplication performance when constructing motion information candidate lists, resulting in frequent duplicate options and affecting encoding and decoding efficiency.
A candidate list of motion information is constructed using a preset deduplication strategy. Through rigorous deduplication processing, the diversity and uniqueness of the motion information in the list are ensured.
The encoding and decoding efficiency of the inter-frame prediction method is improved. The deduplication effect of the motion information candidate list is enhanced through a rigorous deduplication strategy, which reduces duplicate options and improves encoding efficiency.
Smart Images

Figure CN113766244B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of video coding, in particular to an inter-prediction method, an encoder, a decoder and a computer storage medium. BACKGROUND
[0002] In the field of video coding, in addition to using an intra-prediction mode, an inter-prediction mode can also be used in the process of coding a current block. The inter-prediction mode can include a geometric partitioning mode (GPM) and an angular weighted prediction mode (AWP), etc. By dividing the current block into two non-rectangular partitions (or two blocks) for prediction and then performing weighted fusion, a prediction value of the current block can be obtained.
[0003] Currently, when using GPM or AWP for inter-prediction, it cannot be guaranteed that the motion information candidate list can be filled. When the last valid motion information is used to copy and fill the motion information candidate list, a duplicate detection needs to be performed on the motion information candidate list. However, the existing duplicate detection method is not rigorous, and there is still a high probability that duplicate options will appear in the constructed motion information candidate list, which results in poor duplicate detection effect, seriously affects the expression efficiency of motion information, and thus reduces the coding efficiency. SUMMARY
[0004] The present application provides an inter-prediction method, an encoder, a decoder and a computer storage medium, which can increase the diversity of motion information in the motion information candidate list, thereby improving the coding performance.
[0005] The technical solution of the present application is implemented as follows:
[0006] In a first aspect, an inter-prediction method is provided by the embodiments of the present application, which is applied to a decoder, and the method comprises the following steps:
[0007] parsing a code stream to obtain a prediction mode parameter of a current block;
[0008] when the prediction mode parameter indicates that a preset inter-prediction mode is used to determine an inter-prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy;
[0009] determining motion information from the motion information candidate list according to a motion information index value corresponding to the current block;
[0010] determining the inter-prediction value of the current block according to the motion information.
[0011] In a second aspect, an inter prediction method is provided. The method is applied to an encoder and includes:
[0012] determining a prediction mode parameter of a current block;
[0013] when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate search strategy;
[0014] determining motion information of the current block from the motion information candidate list;
[0015] determining the inter prediction value of the current block according to the motion information.
[0016] In a third aspect, an encoder is provided. The encoder includes a parsing part, a first constructing part, and a first determining part. The parsing part is configured to parse a bitstream and obtain a prediction mode parameter of a current block. The first constructing part is configured to, when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, construct a motion information candidate list of the current block according to a preset duplicate search strategy. 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 determine the inter prediction value of the current block according to the motion information.
[0017]
[0018]
[0019]
[0020] In a fourth aspect, an encoder is provided. The encoder includes a first processor and a first memory storing executable instructions of the first processor. When the instructions are executed, the first processor performs the inter prediction method as described above.
[0021] In a fifth aspect, an encoder is provided. The encoder includes a second determining part and a second constructing part. The second determining part is configured to determine a prediction mode parameter of a current block. The second constructing part is configured to, when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, construct a motion information candidate list of the current block according to a preset duplicate search strategy.
[0022]
[0023]
[0024] The second determining part is further configured to determine the motion information of the current block from the motion information candidate list, and determine the inter-frame prediction value of the current block according to the motion information.
[0025] In a sixth aspect, an encoder is provided, which comprises a second processor and a second memory storing instructions executable by the second processor, and when the instructions are executed, the second processor performs the inter-frame prediction method as described above.
[0026] In a seventh aspect, a computer storage medium is provided, which stores a computer program, and when the computer program is executed by a first processor and a second processor, the inter-frame prediction method as described above is implemented.
[0027] The inter-frame prediction method, the encoder, the decoder and the computer storage medium provided by the embodiments of the present application can solve the problem of repeated options in the motion information candidate list, and improve the coding efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 FIG. 1 is a schematic diagram of a picture group structure;
[0029] Figure 2 FIG. 4 is a schematic diagram of weight allocation; Figure 1 ;
[0030] Figure 3 FIG. 6 is a schematic diagram of weight allocation; Figure 2 ;
[0031] Figure 4 FIG. 8 is a schematic diagram of the spatial position relationship of a prediction block;
[0032] Figure 5A component block diagram of a video encoding system according to an embodiment of the present application is shown in FIG. 1.
[0033] Figure 6 A component block diagram of a video decoding system according to an embodiment of the present application is shown in FIG. 2.
[0034] Figure 7 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 3. Figure 1
[0035] Figure 8 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 4. Figure 2
[0036] Figure 9 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 5.
[0037] Figure 10 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 6.
[0038] Figure 11 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 7. Figure 3
[0039] Figure 12 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 8. Figure 4
[0040] Figure 13 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 9. Figure 5
[0041] Figure 14 An implementation flowchart of the inter prediction method according to an embodiment of the present application is shown in FIG. 10. Figure 6
[0042] Figure 15 A component structure of a decoder according to an embodiment of the present application is shown in FIG. 11. Figure 1
[0043] A component structure of a decoder according to an embodiment of the present application is shown in FIG. 12. Figure 16 Figure 2 A component structure of an encoder according to an embodiment of the present application is shown in FIG. 13.
[0044] Figure 17 Figure 1 A component structure of an encoder according to an embodiment of the present application is shown in FIG. 14.
[0045] Figure 18 A component structure of an encoder according to an embodiment of the present application is shown in FIG. 15. Figure 2 DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that, for the convenience of description, only the parts related to the application are shown in the drawings.
[0047] In a video image, a current block (Coding Block, CB) is generally represented by a first image component, a second image component and a third image component; wherein the three image components are a luminance component, a blue chroma component and a red chroma component respectively, specifically, the luminance component is usually represented by a symbol Y, the blue chroma component is usually represented by a symbol Cb or U, and the red chroma component is usually represented by a symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0048] At present, the general video coding standard is based on a block-based hybrid coding framework. Each frame in a video image is divided into square maximum coding units (LCU) of the same size (such as 128x128, 64x64, etc.), and each maximum coding unit can also be divided into rectangular coding units (CU) according to a rule; and the coding unit can also be divided into smaller prediction units (PU). Specifically, the hybrid coding framework can include prediction, transform, quantization, entropy coding, in-loop filtering and the like; wherein the prediction module can include intra prediction and inter prediction, and the inter prediction can include motion estimation and motion compensation. Since there is a strong correlation between adjacent pixels in a frame of a video image, using an intra prediction mode in a video coding technology can eliminate the spatial redundancy between adjacent pixels; but since there is also a strong similarity between adjacent frames in a video image, using an inter prediction mode in a video coding technology can eliminate the temporal redundancy between adjacent frames, thereby improving the coding efficiency. The following application will be described in detail with respect to inter prediction.
[0049] The motion information can include motion vector (MV) information and reference frame information. Specifically, for a current block using inter prediction, the current block is in a current frame having one or more reference frames, and the current block can be a coding unit or a prediction unit. One motion information including a set of motion vectors and reference frame information can be used to indicate a pixel region in a reference frame having the same size as the current block, referred to as a reference block, and two motion information including two sets of motion vectors and reference frame information can be used to indicate two reference blocks in two reference frames which can be the same or different. Then, motion compensation can obtain an inter prediction value of the current block according to the reference blocks indicated by the motion information.
[0050] A current frame that can be encoded using inter prediction has one or more reference frames. For a current block of the current frame that can be encoded using inter prediction, the current block can be a coding unit or a prediction unit. One motion information including a set of motion vectors and reference frame information can be used to indicate a pixel region in a reference frame having the same size as the current block, referred to as a reference block, and two motion information including two sets of motion vectors and reference frame information can be used to indicate two reference blocks in two reference frames which can be the same or different. Motion compensation (MC) obtains a prediction value of the current coding unit according to the reference blocks indicated by the motion information.
[0051] It should be understood that a P frame (Predictive Frame) is a frame that can only be predicted using reference frames that have a Picture Order Count (POC) before the current frame. The current reference frame has only one reference frame list, denoted as RefPicL0 (also denoted as RefPicList0, or List0, or L0). All the reference frames in the reference frame list RefPicL0 have a POC before the current frame. A B frame (Bi-directional interpolated prediction Frame) is a frame that can be predicted using reference frames that have a POC before the current frame and reference frames that have a POC after the current frame. A B frame has two reference frame lists, denoted as RefPicL0 and RefPicL1 (RefPicL1 can also be denoted as RefPicList1, or List1, or L1). All the reference frames in RefPicL0 have a POC before the current frame, and all the reference frames in RefPicL1 have a POC after the current frame. For a current block, it can only refer to a reference block in a certain frame in RefPicL0, which can be referred to as forward prediction; or it can only refer to a reference block in a certain frame in RefPicL1, which can be referred to as backward prediction; or it can refer to a reference block in a certain frame in RefPicL0 and a reference block in a certain frame in RefPicL1, which can be referred to as bi-prediction. A simple way to refer to two reference blocks is to average the pixels at corresponding positions in the two reference blocks to obtain the inter-prediction value (or can be referred to as a prediction block) of each pixel in the current block. In a later stage, the B frame is no longer limited to having all the reference frames in RefPicL0 have a POC before the current frame and all the reference frames in RefPicL1 have a POC after the current frame. In other words, there can be reference frames in RefPicL0 that have a POC after the current frame, and there can be reference frames in RefPicL1 that have a POC before the current frame, i.e., the current block can refer to reference frames that have a POC before the current frame or refer to reference frames that have a POC after the current frame. However, when the current block is bi-predicted, the reference frames must come from RefPicL0 and RefPicL1 respectively; such a B frame is also referred to as a generalized B frame.
[0052] Because the coding order is different from the POC order in the random access (RA) configuration, the B frame can refer to information before the current frame and information after the current frame, which can significantly improve the coding performance. Exemplarily, Figure 1 An example of a picture group structure is shown in FIG. 1. As shown in FIG. 1, the picture group structure includes a group of pictures (GOP), which includes a plurality of pictures. Each picture includes a plurality of slices. Each slice includes a plurality of blocks. Each block includes a plurality of pixels. Figure 1As shown in a classic GOP structure of RA, arrows represent reference relationship. Since I frame does not need to refer to frame, after decoding I frame with POC 0, P frame with POC 4 will be decoded, and when decoding P frame with POC 4, I frame with POC 0 can be referred to. After decoding P frame with POC 4, B frame with POC 2 will be decoded, and when decoding B frame with POC 2, I frame with POC 0 and P frame with POC 4 can be referred to, and so on. In this way, according to Figure 4 It can be obtained that when POC order is {0 1 2 3 4 5 6 7 8}, corresponding decoding order is {0 3 2 4 1 7 6 8 5}.
[0053] In addition, the coding order of Low Delay (LD) configuration is the same as the POC order, and at this time, the current frame can only refer to information before the current frame. The Low Delay configuration is divided into Low Delay P and Low Delay B. Low Delay P is a traditional Low Delay configuration. The typical structure is IPPP…, that is, an I frame is coded first, and then all the frames decoded are P frames. The typical structure of Low Delay B is IBBB…, which is different from Low Delay P in that each interframe is a B frame, that is, two reference frame lists are used, and the current block can simultaneously refer to a reference block in a frame in RefPicL0 and a reference block in a frame in RefPicL1. Here, a reference frame list of the current frame can have several reference frames at most, such as 2, 3, or 4. When a current frame is coded or decoded, how many reference frames in RefPicL0 and RefPicL1 are determined by a preset configuration or algorithm, but the same reference frame can be simultaneously present in RefPicL0 and RefPicL1, that is, the encoder or decoder allows the current block to simultaneously refer to two reference blocks in the same reference frame.
[0054] In the embodiments of the present application, the encoder or decoder can generally use an index value (denoted by index) in the reference frame list to correspond to the reference frame. If the length of a reference frame list is 4, then the index has four values 0, 1, 2, and 3. For example, if RefPicL0 of the current frame has four reference frames with POC 5, 4, 3, and 0, then index 0 of RefPicL0 is the reference frame with POC 5, index 1 of RefPicL0 is the reference frame with POC 4, index 2 of RefPicL0 is the reference frame with POC 3, and index 3 of RefPicL0 is the reference frame with POC 0.
[0055] In the current Versatile Video Coding (VVC) standard, the inter-frame prediction mode can be GPM mode. In the current AVS3 video codec standard, the inter-frame prediction mode can be AWP mode. Although these two prediction modes have different names and specific implementations, they are based on the same principle, meaning that both prediction modes can be applied to the inter-frame prediction method in this application.
[0056] It's important to note that traditional unidirectional prediction simply finds a reference block of the same size as the current block, while traditional bidirectional prediction uses two reference blocks of the same size. The pixel value of each point within the predicted block is the average of the corresponding positions in the two reference blocks; that is, all points in each reference block occupy a 50% proportion. Bidirectional weighted prediction allows the proportions of the two reference blocks to differ, such as all points in the first reference block occupying a 75% proportion, and all points in the second reference block occupying a 25% proportion. However, the proportions of all points within the same reference block are the same. Other optimization methods, such as using Decoder-Side Motion Vector Refinement (DMVR) and Bidirectional Optical Flow (BIO), can cause some changes in the reference or predicted pixels. Furthermore, GPM or AWP also use two reference blocks of the same size as the current block, but some pixel positions use 100% of the pixel values from the corresponding positions in the first reference block, and some pixel positions use 100% of the pixel values from the corresponding positions in the second reference block. In the boundary regions, the pixel values from the corresponding positions in the two reference blocks are used in a certain proportion. How these weights are specifically allocated is determined by the prediction mode of GPM or AWP, or it can be considered that GPM or AWP uses two reference blocks that are different from the current block size, that is, taking a portion of each block as a reference block.
[0057] For example, Figure 2 Illustration of weight allocation Figure 1 ,like Figure 2 As shown, it illustrates a weight allocation diagram of multiple partitioning modes of GPM on a 64×64 current block provided by an embodiment of this application, wherein GPM has 64 partitioning modes. Figure 3 Illustration of weight allocation Figure 4 ,like Figure 4 As shown, this illustration illustrates the weight allocation diagram of multiple partitioning modes of an AWP on a 64×64 current block, according to an embodiment of this application. The AWP has 56 partitioning modes. Regardless of... Figure 4 still Figure 5In each division mode, the black area represents that the weight value of the position corresponding to the first reference block is 0%, the white area represents that the weight value of the position corresponding to the first reference block is 100%, and the gray area represents that the weight value of the position corresponding to the first reference block is a certain weight value greater than 0% and less than 100% according to different color depths, and the weight value of the position corresponding to the second reference block is 100% minus the weight value of the position corresponding to the first reference block.
[0058] It should be understood that in early coding technologies, only rectangular division modes exist, whether it is CU, PU or Transform Unit (TU) division. Both GPM and AWP realize non-rectangular division, that is, a straight line can divide a rectangular block into two partitions. According to the position and angle of the straight line, the two partitions may be triangular, trapezoidal or rectangular, so that the division is closer to the edge of the object or the edge of two different motion regions. It should be noted that the division here is not a real division, but more like a division in terms of prediction effect. Because this division only divides the weights of the two reference blocks when generating a prediction block, or can be simply understood as that part of the position of the prediction block comes from the first reference block, and the other part of the position comes from the second reference block, and the current block is not really divided into two CUs or PUs or TUs according to the division line. In this way, the transformation, quantization, inverse transformation and inverse quantization of the residual after prediction are all processed as a whole.
[0059] It should be noted that in the embodiments of the present application, GPM or AWP belongs to an inter-frame prediction technology. GPM or AWP needs to transmit a flag indicating whether GPM or AWP is used in the code stream. The flag can indicate whether GPM or AWP is used for the current block. If GPM or AWP is used, the encoder needs to transmit the specific mode used in the code stream, that is, one of the 64 GPM division modes or one of the 56 AWP division modes; and the index values of the two single-direction motion information. That is, for the current block, the decoder can obtain the information of whether GPM or AWP is used by analyzing the code stream. If it is determined that GPM or AWP is used, the decoder can analyze the prediction mode parameters of GPM or AWP and the index values of the two motion information, such as the first index value corresponding to the first partition and the second index value corresponding to the second partition if the current block can be divided into two partitions.
[0060] Specifically, for the GPM mode, if GPM is used, the prediction mode parameters under GPM, such as the specific partition mode of GPM, will be transmitted in the code stream; generally, GPM includes 64 partition modes. For the AWP mode, if AWP is used, the prediction mode parameters under AWP, such as the specific partition mode of AWP, will be transmitted in the code stream; generally, AWP includes 56 partition modes.
[0061] In the inter prediction mode, both GPM and AWP need to use two single directional motion information to find two reference blocks. The current implementation is to use the related information of the previously coded / decoded part of the current block to construct a single directional motion information candidate list at the encoder side, to select the single directional motion information from the single directional motion information candidate list, and to write the index values of the two single directional motion information in the single directional motion information candidate list into the code stream. The same method is used at the decoder side, i.e. using the related information of the previously decoded part of the current block to construct a single directional motion information candidate list, which must be the same as the candidate list constructed at the encoder side. Thus, the index values of the two single directional motion information are parsed from the code stream, and then the two single directional motion information are found from the single directional motion information candidate list, which are the two single directional motion information needed by the current block.
[0062] That is, the single directional motion information described in the present application can include: motion vector information, i.e. the value of (x, y), and corresponding reference frame information, i.e. the reference frame list and the reference frame index value in the reference frame list. One representation is to record the reference frame index values of two reference frame lists, wherein the reference frame index values corresponding to one reference frame list are valid, such as 0, 1, 2, etc.; the reference frame index values corresponding to the other reference frame list are invalid, i.e. -1. The reference frame list with valid reference frame index values is the reference frame list used by the motion information of the current block, and the corresponding reference frame can be found from the reference frame list according to the reference frame index value. Each reference frame list has a corresponding motion vector, and the motion vector corresponding to the valid reference frame list is valid, and the motion vector corresponding to the invalid reference frame list is invalid. The decoder can find the required reference frame through the reference frame information in the single directional motion information, find the reference block in the reference frame according to the position of the current block and the value of the motion vector (x, y), and then determine the inter prediction value of the current block.
[0063] For example, the construction method of the single directional motion information candidate list is introduced by taking AWP in AVS as an example. Among them, Figure 5 is a schematic diagram of the spatial position relationship of the prediction block, such as Figure 6As shown, block E is the current block, and blocks A, B, C, D, F, and G are neighboring blocks of block E. Among them, the neighboring block A of block E is the block where sample (x0-1, y0) is located, the neighboring block B of block E is the block where sample (x0, y0-1) is located, the neighboring block C of block E is the block where sample (x0+1, y0-1) is located, the neighboring block D of block E is the block where sample (x0-1, y0-1) is located, the neighboring block F of block E is the block where sample (x0-1, y1) is located, and the neighboring block G of block E is the block where sample (x1, y0-1) is located. Among them, (x0, y0) is the coordinate of the top-left sample of block E in the image, (x1, y0) is the coordinate of the top-right sample of block E in the image, and (x0, y1) is the coordinate of the bottom-left sample of block E in the image.
[0064] Based on the above Figure 6 , the neighboring block X (X represents A, B, C, D, F, or G) "exists" means that the block should be in the image to be decoded and the block should belong to the same spatial region as block E; otherwise, the neighboring block "does not exist". It can be obtained that if the block "does not exist" or has not been decoded, the block is "unavailable"; otherwise, the block is "available". Or, if the block where the sample of the image to be decoded is located "does not exist" or the sample has not been decoded, the sample is "unavailable"; otherwise, the sample is "available".
[0065] It is assumed that the first one-way motion information of the AWP is represented as mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L1. Among them, mvAwp0L0 represents the corresponding motion vector in the first reference frame list RefPicL0, RefIdxAwp0L0 represents the reference frame index value of the corresponding reference frame in the first reference frame list RefPicL0; mvAwp0L1 represents the corresponding motion vector in the second reference frame list RefPicL1, and RefIdxAwp0L1 represents the reference frame index value of the corresponding reference frame in the second reference frame list RefPicL1. The second one-way motion information is similar.
[0066] Since the motion information here is one-way, one of RefIdxAwp0L0 and RefIdxAwp0L1 must be a valid value, such as 0, 1, 2, etc., and the other must be 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 mvAwp0L1 does not need to be considered. Conversely, the same is true.
[0067] In particular, the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1 are as follows:
[0068] First, as shown in FIG. 1, F, G, C, A, B, and D are neighboring blocks of the current block E, and the "availability" of F, G, C, A, B, and D is determined as follows: Figure 7
[0069] (a) F is "available" if F exists and is in inter prediction mode; otherwise, F is "unavailable".
[0070] (b) G is "available" if G exists and is in inter prediction mode; otherwise, G is "unavailable".
[0071] (c) C is "available" if C exists and is in inter prediction mode; otherwise, C is "unavailable".
[0072] (d) A is "available" if A exists and is in inter prediction mode; otherwise, A is "unavailable".
[0073] (e) B is "available" if B exists and is in inter prediction mode; otherwise, B is "unavailable".
[0074] (f) D is "available" if D exists and is in inter prediction mode; otherwise, D is "unavailable".
[0075] Second, the uni-directional available motion information is put into the uni-directional motion information candidate list (denoted as AwpUniArray) in the order of F, G, C, A, B, and D, until the length of AwpUniArray is 3 or the end of the list is reached.
[0076] Third, if the length of AwpUniArray is less than 3, the bi-directional available motion information is split into uni-directional motion information pointing to the reference frame list RefPicL0 and uni-directional motion information pointing to the reference frame list Listl in the order of F, G, C, A, B, and D, and a uni-directional motion information duplication check is performed first. If there is no duplication, the motion information is put into AwpUniArray, until the length is 3 or the end of the list is reached.
[0077] Fourth, the temporal bi-directional motion information is split into uni-directional motion information pointing to the reference frame list RefPicL0 and uni-directional motion information pointing to the reference frame list Listl, and a uni-directional motion information duplication check is performed first. If there is no duplication, the motion information is put into AwpUniArray, until the length is 4 or the end of the list is reached.
[0078] Step 5, if the length of AwpUniArray is less than 4, repeat the last uni-directional motion information in AwpUniArray until the length of AwpUniArray is 4.
[0079] Step 6, assign the (AwpCandIdx0+1)th motion information in AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1; assign the (AwpCandIdx1+1)th motion information in AwpUniArray to mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, RefIdxAwp1L1.
[0080] It can be seen that two reference blocks can be found by using the two uni-directional motion information determined by the above method, and the weight of each pixel position of the two reference blocks can be determined according to the specific prediction mode used by GPM or AWP, and finally the two reference blocks are weighted to obtain the prediction block of the current block.
[0081] Further, at the encoding end, if the current mode is a skip mode, the prediction block is the encoding block, which means that the encoding of the current block is completed.
[0082] If the current mode is not a skip mode, the quantization coefficients also need to be written in the code stream; wherein the quantization coefficients are composed of the residual block obtained by subtracting the inter-frame prediction value from the actual value of the current block, and the residual block is obtained by transforming and quantizing, at this time the encoding of the current block is completed.
[0083] Further, at the decoding end, if the current mode is a skip mode, the prediction block is the decoding block, which means that the decoding of the current block is completed.
[0084] If the current mode is not a skip mode, the quantization coefficients are entropy decoded, then dequantized and inverse transformed to obtain the residual block, and the residual block is added to the prediction block to obtain the decoding block, at this time the decoding of the current block is completed.
[0085] It should be noted that when deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefIdxAwp1L1, a duplicate check operation is required, that is, whether the two uni-directional motion information are the same. Since two identical reference blocks can be considered as one reference block regardless of the weight, it is meaningless for AWP, therefore, AWP needs to use two uni-directional motion information to find two different reference blocks.
[0086] For example, the description of motion information duplication checking in AVS3 text is mainly as follows: if two motion information satisfy one or more of the following conditions, the two motion information are different; otherwise, the two motion information are the same:
[0087] 1. InterPredRefMode is different;
[0088] 2. InterPredRefMode is both 0, and RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0089] 3. InterPredRefMode is both 1, and RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0090] 4. InterPredRefMode is both 2, and any one of RefPicL0 motion vector, RefPicL1 motion vector, RefPicL0 reference frame index or RefPicL1 reference frame index is not equal.
[0091] Wherein, InterPredRefMode is 0 represents forward prediction, that is, the reference frame list is RefPicL0, InterPredRefMode is 1 represents backward prediction, that is, the reference frame list is RefPicL1, and InterPredRefMode is 2 represents bidirectional prediction, that is, the reference frame list is RefPicL0 and RefPicL1.
[0092] At present, when performing duplication checking operation, when the effective reference frame list, reference frame index and MV corresponding to the two single motion information are the same, it can be considered that the two single motion information are the same single motion information.
[0093] However, the standard allows the same reference frame, that is, the reference frame with the same POC (or decoding order index (DOI) and the like unique identifier), to appear in two reference frame lists, and the same reference frame list cannot have duplicate reference frames, that is, the reference frame with the same POC (or DOI and the like unique identifier) cannot be included, that is, if the reference frame lists of the two single motion information are the same but the reference frame indexes are different, the reference frames corresponding to them are definitely different, but the same reference frame can be included in the two reference frame lists, and the indexes of the same reference frame in the lists can be the same or different, so even if the effective reference frame list and the reference frame index are different, the reference frames pointed to by them can be the same reference frame.
[0094] Therefore, the existing duplicate detection method is not rigorous, and the duplicate detection effect is poor in the scene of needing to detect duplicates of one-way motion information or judge whether the motion information is the same. Then, in the construction of the one-way motion information candidate list, the repeated one-way motion information occupies too many positions, so that the different one-way motion information at the back is abandoned due to the full list, and the index value of other one-way motion information in the list is increased, which needs more bit numbers for encoding processing, thereby reducing the encoding efficiency.
[0095] That is, when using GPM or AWP for inter prediction, it cannot be guaranteed that the motion information candidate list can be filled, and when using the last valid motion information to fill the motion information candidate list, duplicate detection needs to be performed on the motion information candidate list. However, the existing duplicate detection method is not rigorous, and there is still a high probability of repeated options in the constructed motion information candidate list, the duplicate detection effect is poor, which seriously affects the expression efficiency of the motion information, thereby reducing the encoding and decoding efficiency.
[0096] In order to solve the defects in the prior art, in the embodiments of the present application, when constructing the motion information candidate list, more rigorous duplicate removal processing can be performed according to the preset duplicate detection strategy, which solves the problem of repeated options in the motion information candidate list, improves the duplicate detection effect, and improves the encoding and decoding efficiency.
[0097] Specifically, when constructing the motion information candidate list, the motion information is detected according to the preset duplicate detection strategy, and a more rigorous duplicate detection standard is used, so that the duplicate detection effect is improved obviously without obvious increase in complexity. In the case where the reference frame list and the reference frame index are different but the reference frame is the same, the repeated motion information under the new definition can be excluded, so that the different motion information in the motion information candidate list is increased, the index of the effective motion information is advanced, and the encoding and decoding performance is improved.
[0098] It should be understood that the embodiments of the present application provide a video encoding system, Figure 1 The composition block diagram of the video encoding system provided by the embodiments of the present application is shown in FIG. 1. Figure 7As shown, the video encoding system 11 can include a transform unit 111, a quantization unit 112, a mode selection and encoding control logic unit 113, an intra prediction unit 114, an inter prediction unit 115 (including motion compensation and motion estimation), a dequantization unit 116, an inverse transform unit 117, a loop filter unit 118, an encoding unit 119, and a decoded picture buffer unit 110. For an input original video signal, a video reconstruction block can be obtained by dividing a Coding Tree Unit (CTU), and the mode selection and encoding control logic unit 113 determines an encoding mode. Then, the video reconstruction block after intra or inter prediction is transformed by the transform unit 111 and the quantization unit 112, including transforming residual information from a pixel domain to a transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate. The intra prediction unit 114 is configured to perform intra prediction on the video reconstruction block. The intra prediction unit 114 is configured to determine an optimal intra prediction mode (i.e., a target prediction mode) of the video reconstruction block. The inter prediction unit 115 is configured to perform inter prediction encoding of the received video reconstruction block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation is a process of generating a motion vector, which can estimate the motion of the video reconstruction block. Then, the motion compensation performs motion compensation based on the motion vector determined by the motion estimation. After determining the inter prediction mode, the inter prediction unit 115 is further configured to provide the selected inter prediction data to the encoding unit 119, and also send the calculated determined motion vector data to the encoding unit 119. In addition, the dequantization unit 116 and the inverse transform unit 117 are configured to reconstruct the video reconstruction block, reconstruct a residual block in the pixel domain, remove blockiness artifacts of the reconstructed residual block by the loop filter unit 118, and then add the reconstructed residual block to a predictive block in one of the frames of the decoded picture buffer unit 110 to generate a reconstructed video reconstruction block. The encoding unit 119 is configured to encode various encoding parameters and quantized transform coefficients. The decoded picture buffer unit 110 is configured to store the reconstructed video reconstruction block for prediction reference. As the video image encoding proceeds, new reconstructed video reconstruction blocks are continuously generated and stored in the decoded picture buffer unit 110.
[0099] The present application also provides a video decoding system, Figure 8 A component block diagram of the video decoding system provided by the present application is shown in FIG. 2. As shown, the video decoding system 21 can include a dequantization unit 211, an inverse transform unit 212, a mode selection and decoding control logic unit 213, an intra prediction unit 214, an inter prediction unit 215 (including motion compensation and motion estimation), a loop filter unit 216, a decoding unit 217, and a decoded picture buffer unit 210. For an input encoded video signal, a video reconstruction block can be obtained by dividing a Coding Tree Unit (CTU), and the mode selection and decoding control logic unit 213 determines a decoding mode. Then, the video reconstruction block after dequantization and inverse transform is decoded by the decoding unit 217, including transforming residual information from a pixel domain to a transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate. The intra prediction unit 214 is configured to perform intra prediction on the video reconstruction block. The intra prediction unit 214 is configured to determine an optimal intra prediction mode (i.e., a target prediction mode) of the video reconstruction block. The inter prediction unit 215 is configured to perform inter prediction decoding of the received video reconstruction block relative to one or more blocks in one or more reference frames to provide temporal prediction information. The motion estimation is a process of generating a motion vector, which can estimate the motion of the video reconstruction block. Then, the motion compensation performs motion compensation based on the motion vector determined by the motion estimation. After determining the inter prediction mode, the inter prediction unit 215 is further configured to provide the selected inter prediction data to the decoding unit 217, and also send the calculated determined motion vector data to the decoding unit 217. In addition, the dequantization unit 211 and the inverse transform unit 212 are configured to reconstruct the video reconstruction block, reconstruct a residual block in the pixel domain, remove blockiness artifacts of the reconstructed residual block by the loop filter unit 216, and then add the reconstructed residual block to a predictive block in one of the frames of the decoded picture buffer unit 210 to generate a reconstructed video reconstruction block. The decoding unit 217 is configured to decode various encoding parameters and quantized transform coefficients. The decoded picture buffer unit 210 is configured to store the reconstructed video reconstruction block for prediction reference. As the video image decoding proceeds, new reconstructed video reconstruction blocks are continuously generated and stored in the decoded picture buffer unit 210. Figure 2As shown, the video decoding system 12 can include a decoding unit 121, an inverse transformation unit 127, an inverse quantization unit 122, an intra prediction unit 123, a motion compensation unit 124, a loop filter unit 125 and a decoded picture buffer unit 126. After the input video signal is processed by the video encoding system 11, a bitstream of the video signal is output. The bitstream is input into the video decoding system 12, and first passes through the decoding unit 121 to obtain decoded transform coefficients. The inverse transformation unit 127 and the inverse quantization unit 122 process the transform coefficients to generate a residual block in the pixel domain. The intra prediction unit 123 can be configured to generate prediction data of a current video decoding block based on a determined intra prediction direction and data from previously decoded blocks of the current frame or picture. The motion compensation unit 124 determines prediction information for the video decoding block by parsing motion vectors and other associated syntax elements, and uses the prediction information to generate a predictive block of the video decoding block being decoded. The decoded video block is formed by summing the residual block from the inverse transformation unit 127 and the inverse quantization unit 122 and the corresponding predictive block generated by the intra prediction unit 123 or the motion compensation unit 124. The decoded video signal passes through the loop filter unit 125 to remove blocking artifacts and improve the video quality. The decoded video block is then stored in the decoded picture buffer unit 126, which stores reference pictures for subsequent intra prediction or motion compensation, and also outputs the recovered original video signal.
[0100] The inter prediction method provided by the embodiments of the present application mainly acts on the inter prediction unit 215 of the video encoding system 11 and the inter prediction unit, i.e. the motion compensation unit 124, of the video decoding system 12. That is, if a better prediction effect can be obtained by the inter prediction method provided by the embodiments of the present application in the video encoding system 11, the video decoding recovery quality can also be improved in the video decoding system 12 correspondingly.
[0101] Based on this, the technical solutions of the present application are further described in detail below in combination with the drawings and embodiments. Before the detailed description, it should be noted that "first", "second", "third" and the like mentioned throughout the specification are only used to distinguish different features, and do not have the functions of limiting priority, sequence, size relationship and the like.
[0102] The embodiments of the present application provide an inter prediction method, which is applied to a video decoding device, i.e. a decoder. The function realized by the method can be realized by a first processor in the decoder calling a computer program, and of course the computer program can be saved in a first memory. Therefore, the decoder at least includes the first processor and the first memory.
[0103] Further, in the embodiments of the present application, Figure 8 An implementation flowchart of the inter prediction method Figure 9 As shown in Figure 9 The method of the decoder for inter prediction can include the following steps:
[0104] Step 101, parsing the code stream to obtain the prediction mode parameter of the current block.
[0105] In the embodiments of the present application, the decoder can first parse the binary code stream to obtain the prediction mode parameter of the current block. The prediction mode parameter can be used to determine the prediction mode used by the current block.
[0106] It should be noted that the image to be decoded can be divided into a plurality of image blocks, and the current image block to be decoded can be referred to as a current block (which can be represented by CU), and the image block adjacent to the current block can be referred to as an adjacent block; that is, in the image to be decoded, the current block and the adjacent block have an adjacent relationship. Here, each current block can include a first image component, a second image component, and a third image component, that is, the current block represents an image block in the image to be decoded that is currently predicted for the first image component, the second image component, or the third image component.
[0107] Among them, assuming that the current block is predicted for the first image component, and the first image component is the luminance component, that is, the image component to be predicted is the luminance component, then the current block can also be referred to as a luminance block; or, assuming that the current block is predicted for the second image component, and the second image component is the chroma component, that is, the image component to be predicted is the chroma component, then the current block can also be referred to as a chroma block.
[0108] Further, in the embodiments of the present application, the prediction mode parameter can not only indicate the prediction mode adopted by the current block, but also indicate parameters related to the prediction mode.
[0109] It can be understood that in the embodiments of the present application, the prediction mode can include inter prediction mode, traditional intra prediction mode, and non-traditional intra prediction mode, etc., wherein the inter prediction mode can include normal inter prediction mode, GPM mode, and AWP mode, etc.
[0110] That is, on the encoding side, the encoder can select the optimal prediction mode to pre-encode the current block, in the process, the prediction mode of the current block can be determined, and then the prediction mode parameter used to indicate the prediction mode can be determined, so that the corresponding prediction mode parameter is written into the code stream and transmitted to the decoder by the encoder.
[0111] Accordingly, at the decoder side, the decoder can directly obtain the prediction mode parameter of the current block by parsing the bitstream, and determine the prediction mode used by the current block according to the prediction mode parameter obtained by parsing, and the related parameters corresponding to the prediction mode.
[0112] Further, in the embodiments of the present application, after the decoder obtains the prediction mode parameter by parsing, the decoder can determine whether the current block uses the preset inter prediction mode based on the prediction mode parameter. The preset inter prediction mode can include at least one inter prediction mode, for example, the preset inter prediction mode can be GPM mode, AWP mode or other general inter prediction mode.
[0113] Step 102, when the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, the motion information candidate list of the current block is constructed according to the preset duplicate detection strategy.
[0114] In the embodiments of the present application, after the decoder obtains the prediction mode parameter by parsing, if the prediction mode parameter obtained by parsing indicates that the current block uses the preset inter prediction mode to determine the inter prediction value of the current block, the decoder can construct the motion information candidate list of the current block according to the preset duplicate detection strategy.
[0115] It should be noted that in the embodiments of the present application, the preset duplicate detection strategy is used for de-duplication processing in the process of constructing the motion information candidate list. Specifically, the de-duplication processing is pruning, that is, the same motion information is removed in the process of constructing the motion information candidate list.
[0116] It can be understood that in the embodiments of the present application, when the decoder parses the bitstream to obtain the prediction mode parameter indicating that the preset inter prediction mode is used to determine the inter prediction value of the current block, the inter prediction method provided in the embodiments of the present application can be used.
[0117] For example, in the embodiments of the present application, the preset inter prediction mode can be GPM mode, AWP mode or other general inter prediction mode.
[0118] Further, in the embodiments of the present application, the preset duplicate detection strategy can include various duplicate detection methods, and specifically, the preset duplicate detection strategy can be defined first.
[0119] For example, in the present application, the preset duplicate detection strategy can be divided into a first level strategy, a second level strategy and a third level strategy. The following takes unidirectional motion information as an example to describe the preset duplicate detection strategy.
[0120] The first level strategy: Strictly speaking, the two reference blocks found by the two uni-directional motion information should not be the same, i.e. the pixel values at the corresponding positions of the two reference blocks should not be the same. This is because if the two reference blocks found by the two uni-directional motion information are the same, it is meaningless to use the inter-frame prediction using uni-directional motion information, such as AWP. Therefore, if the two reference blocks found by the two uni-directional motion information are the same, even if the two uni-directional motion information look different, for example, the MVs of the two uni-directional motion information are different, i.e. the values of (x, y) are different, or the reference frames of the two uni-directional motion information are different, or the reference frame lists corresponding to the two uni-directional motion information are different, or the reference frame indexes of the two uni-directional motion information in the reference frame list are different, as long as the two reference blocks found by the two uni-directional motion information are the same, the two uni-directional motion information can be considered as repeated, and the above preset duplicate checking strategy is determined as the first level strategy.
[0121] The second level strategy: If the two uni-directional motion information are considered to be repeated only when they point to the same reference block (the same position), otherwise, if the two uni-directional motion information point to reference blocks at different positions, the two uni-directional motion information can be considered not to be repeated. Wherein, the two uni-directional motion information pointing to reference blocks at different positions is equivalent to the reference frames or the values of the MVs of the two uni-directional motion information being not the same. That is, if the MVs of the two uni-directional motion information are the same but the reference frames are different, the reference blocks found by the two uni-directional motion information are not on the same reference frame and the positions are different; if the reference frames of the two uni-directional motion information are the same but the MVs are different, the reference blocks found by the two uni-directional motion information are also different in position, and the above preset duplicate checking strategy is determined as the second level strategy.
[0122] The third level strategy: The common practice of the current coding 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 list. This reference frame management method derives a more relaxed duplicate checking standard. It can be considered that only when the effective reference frame list, the reference frame index and the MV corresponding to the two uni-directional motion information are the same, the two uni-directional motion information are considered to be repeated uni-directional motion information, and the above preset duplicate checking strategy is determined as the third level strategy.
[0123] However, the standard allows the same reference frame, i.e., the reference frame with the same POC (or DOI, etc.) to appear in two reference frame lists, and there cannot be duplicate reference frames in the same reference frame list, i.e., there cannot be the same POC (or DOI, etc.) reference frame. Therefore, if the reference frame lists of two unidirectional motion information are the same but the reference frame indexes are different, the corresponding reference frames must be different. However, the same reference frame can be in two reference frame lists, and the indexes of the same reference frame in the respective lists can or can not be the same, which can cause the situation that even if the valid reference frame lists and the reference frame indexes of two unidirectional motion information are different, the reference frames pointed to can be the same reference frame.
[0124] The currently commonly used duplicate detection method is the third level strategy in the above preset duplicate detection strategy, and some other technologies also use the third level strategy for duplicate detection, such as ultra motion vector expression (UMVE) and history-based motion vector prediction (HMVP). It should be noted that the AWP uses only unidirectional motion information, and the UMVE and HMVP can use unidirectional motion information or bidirectional motion information. The unidirectional motion information can be considered as a reference frame list corresponding to a valid reference frame index, and the other reference frame list corresponding to an invalid reference frame index. The bidirectional motion information considers that the reference frame indexes corresponding to the two reference frame lists are the same, and if the reference frame index corresponding to a reference frame list is valid, the x and y corresponding to the two bidirectional motion information are the same, so the two bidirectional motion information are considered as duplicates.
[0125] It should be noted that the VVC also uses the third level strategy in the above preset duplicate detection strategy.
[0126] It can be understood that in the embodiments of the present application, the preset duplicate detection strategy for detecting the duplicate of the single-direction motion information or the definition of judging whether the single-direction motion information is the same can be extended to the bidirectional motion information. Specifically, the duplicate detection of the first-level strategy can be divided into two sub-levels, i.e., 1.1 level and 1.2 level. Among them, for the 1.1 level, if the reference blocks found by two motion information are the same according to the prediction blocks made by the algorithm required subsequently, it is considered that they are the same motion information, i.e., the two motion information are repeated; for the 1.2 level, if two motion information find the same set of two reference blocks (one motion information can find at most two reference blocks, if two reference blocks are found, the two reference blocks are taken as a set of reference blocks, if one reference block is found, the one reference block is taken as a set of reference blocks), it is considered that they are the same motion information, i.e., the two motion information are repeated. When the duplicate detection is performed according to the second-level strategy, if the set of two reference block positions pointed by two motion information (one motion information can determine at most two reference block positions, if there are two reference block positions, the two reference block positions are taken as a set of reference block positions, if there is one reference block position, the one reference block position is taken as a set of reference block positions) is the same, it is considered that they are the same motion information, i.e., the two motion information are repeated. The duplicate comparison of the third-level strategy is more extensive, and the effect of the duplicate detection is relatively poor compared with the first-level strategy and the second-level strategy, and this gap is more obvious for the single-direction motion information.
[0127] The proportion of the repeated motion information in the motion information list constructed by applying the third-level strategy for duplicate detection is obviously higher than that in the first-level strategy and the second-level strategy, which leads to that the repeated single-direction motion information in the sense of the first-level strategy and the second-level strategy added to the motion information candidate list is actually not used, and these motion information can lead to other different motion information in the order behind to be abandoned because the motion information candidate list has been occupied. On the other hand, since these repeated motion information occupies a position, it leads to the index value index of other motion information in the motion information list to increase, and more bit numbers are required when the index value is encoded.
[0128] That is to say, the effect of the duplicate detection of the third-level strategy is relatively poor at present, and therefore, in the embodiments of the present application, the first-level strategy or the second-level strategy defined in the preset duplicate detection strategy is preferably used, i.e., a more strict duplicate detection method is used to obtain a higher duplicate detection result. Among them, the second-level strategy is suitable for the application scenario with a relatively strict requirement on the decoding complexity, and the first-level strategy is suitable for the application scenario with a very high requirement on the compression performance but not a very strict requirement on the coding and decoding complexity.
[0129] In the embodiments of the present application, further, Figure 10Implementation flowchart of inter prediction method Figure 10 As shown in Figure 4 When the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, the method for constructing the motion information candidate list of the current block by the decoder according to the preset duplicate detection strategy can include the following steps:
[0130] Step 102a, determining the related motion information of the current block.
[0131] Step 102b, in the process of sequentially filling the related motion information into the motion information candidate list, based on the preset duplicate detection strategy, detecting duplicates between the related motion information to be filled and the motion information in the motion information candidate list to obtain a duplicate detection result.
[0132] Step 102c, constructing the motion information candidate list based on the duplicate detection result.
[0133] In the embodiments of the present application, after the decoder parses the prediction mode parameter, if the parsed prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, the decoder can 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 related motion information into the motion information candidate list, the decoder can detect duplicates between the related motion information to be filled and the motion information in the motion information candidate list according to the preset duplicate detection strategy, so as to obtain a duplicate detection result, and after obtaining the duplicate result, the construction of the motion information candidate list can be further realized based on the duplicate result.
[0134] It can be understood that in the embodiments of the present application, the related motion information of the current block can include but is not limited to at least one of the following motion information: spatial motion information, temporal motion information, motion information based on historical information. For example, the related motion information of the current block can be the motion information of the neighboring block of the current block.
[0135] It should be noted that in the present application, based on different inter prediction modes, the motion information candidate list constructed by the decoder can be a single-direction motion information candidate list or a bi-directional motion information candidate list. For example, in the present application, the single-direction motion information candidate list can be represented as RefPicL0, or RefPicList0 or List0 or L0; the bi-directional motion information candidate list can be represented as RefPicL0 and RefPicL1, wherein RefPicL1 can also be represented as RefPicList1 or List1 or L1.
[0136] It is understood that, in the embodiments of this application, 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. For example, the relevant motion information of the current block is the motion information of the adjacent block A. The unidirectional motion information of the adjacent block A may include the reference frame list a1, the reference frame index a2, and the motion vector a3 of the adjacent block A.
[0137] For example, Figure 11 This is a schematic diagram of unidirectional motion information, such as... Figure 3 As shown, the one-way information of an image patch may include a motion vector (0, 1), a reference frame list RefPicL0, and a reference frame index 1; wherein, when the reference frame index is -1, it indicates that the corresponding reference frame list RefPicL1 is invalid, 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 one-way information of the image patch indicates the reference frame with the identifier 2 in the reference frame list RefPicL0.
[0138] Accordingly, in this application, the bidirectional motion information may include two sets of motion vectors and reference frame information, wherein one set of reference frame information may include a reference frame list and a reference frame index. For example, the bidirectional motion information of an adjacent block B may include sub-information B1 and sub-information B2, wherein sub-information B1 includes the reference frame b1, reference frame index b2, and motion vector b3 of the adjacent block B; sub-information B2 includes the reference frame b4, reference frame index b5, and motion vector b6 of the adjacent block B.
[0139] For example, Figure 11 This is a schematic diagram of bidirectional motion information, such as RefPicL0 As shown, the bidirectional information of an image patch can include two sets of sub-information. One set of sub-information can include motion vector (0, 1), reference frame list RefPicL0, and reference frame index 0. The reference frame index 0 indicates the identifier (unique identifier such as POC or DOI) of the reference frame in the reference frame list RefPicL0 as 3, that is, the unidirectional information of this image patch indicates the reference frame with identifier 3 in the reference frame list RefPicL0. The other set of sub-information can include motion vector (1, 0), reference frame list RefPicL1, and reference frame index 1. The reference frame index 1 indicates the identifier (unique identifier such as POC or DOI) of the reference frame in the reference frame list RefPicL1 as 2, that is, the unidirectional information of this image patch indicates the reference frame with identifier 2 in the reference frame list RefPicL1.
[0140] It can be understood that in the embodiments of the present application, the duplicate detection result can include same or not same. Specifically, the duplicate detection result is used to determine whether the related motion information to be filled in is same as each motion information in the motion information candidate list.
[0141] Further, in the embodiments of the present application, if the preset inter prediction mode uses single direction motion information, when the decoder performs duplicate detection on the related motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate detection strategy to obtain a duplicate detection result, the first reference frame information and the first motion vector included in the related motion information to be filled in can be determined first; wherein the first reference frame information includes a first reference frame list and a first reference frame index; at the same time, the second reference frame information and the second motion vector included in the motion information in the motion information candidate list can be determined; wherein the second reference frame information includes a second reference frame list and a second reference frame index; then the duplicate 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.
[0142] It should be noted that in the embodiments of the present application, if the preset inter prediction mode uses single direction motion information and the preset duplicate detection strategy is the first level strategy, when the decoder determines the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, the first reference frame can be determined from the first reference frame list according to the first reference frame index, and the first reference block can be determined in the first reference frame according to the first motion vector; at the same time, the second reference frame can be determined from the second reference frame list according to the second reference frame index, and the second reference block can be determined 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 can be compared, if the pixel information of the first reference block and the pixel information of the second reference block are same, the decoder can determine that the duplicate detection result is that the related motion information to be filled in is 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 same, the decoder can determine that the duplicate detection result is that the related motion information to be filled in is not same as the motion information in the motion information candidate list.
[0143] That is to say, in the present application, when the decoder performs the duplicate detection according to the first level strategy, if the first reference block determined according to the related motion information to be filled in is the same image block as the second reference block determined according to the motion information in the motion information candidate list in terms of pixel information, the decoder can consider that the reference blocks indicated by the two motion information are the same, that is, the duplicate detection result is the same, that is, the related motion information to be filled in and the motion information in the motion information candidate list are duplicated; otherwise, if the pixel information of the two reference blocks determined based on the two motion information is not the same, it can be considered that the related motion information to be filled in and the motion information in the motion information candidate list are not duplicated.
[0144] It should be noted that in the embodiments of the present application, if the preset inter prediction mode uses single direction motion information, and the preset duplicate detection strategy is the second level strategy, when the decoder determines the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, it can first determine the first reference frame from the first reference frame list according to the first reference frame index, and obtain the first identifier of the first reference frame; at the same time, it can determine the second reference frame from the second reference frame list according to the second reference frame index, and obtain the second identifier of the second reference frame; then it can compare the first identifier with the second identifier, and compare the first motion vector with the second motion vector, 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 can determine that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are the same; if the first identifier and the second identifier are not the same, or the first motion vector and the second motion vector are not the same, the decoder can determine that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not the same.
[0145] It can be understood that in the embodiments of the present application, the identifier of a reference frame can be a unique identifier such as POC or DOI, for example, the first identifier can be the POC of the first reference frame in the first reference frame list; the second identifier can be the POC of the second reference frame in the second reference frame list.
[0146] That is, in the present application, when the decoder performs the duplicate detection according to the second level strategy, if the first identifier and the first motion vector of the first reference frame determined according to the related motion information to be filled in 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 can consider that the reference blocks indicated by the two motion information are the same, that is, the duplicate detection result is the same, that is, the related motion information to be filled in and the motion information in the motion information candidate list are duplicated; otherwise, if the identifiers and the motion vectors of the two reference frames determined based on the two motion information are not the same, it can be considered that the related motion information to be filled in and the motion information in the motion information candidate list are not duplicated.
[0147] It should be noted that, in the embodiments of the present application, if the preset inter prediction mode uses single direction motion information, and the preset duplicate detection strategy is the third level strategy, when the decoder determines the duplicate 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 can directly compare the first reference frame information with the second reference frame information, and compare the first motion vector with the second motion vector at the same time, if the first reference frame information and the second reference frame information are the same, and the first motion vector and the second motion vector are the same, the decoder considers that the reference blocks indicated by the two motion information are the same, that is, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are the same; if the first reference frame information and the second reference frame information are not the same, or the first motion vector and the second motion vector are not the same, the decoder can determine that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not the same.
[0148] That is, in the present application, when the decoder performs the duplicate detection according to the third level strategy, the duplicate detection result is determined only by the comparison result of comparing the two motion information.
[0149] It can be understood that, in the embodiments of the present application, comparing the third level strategy with the first level strategy and the second level strategy, since the standard allows the same reference frame, that is, the reference frame with the same POC (or DOI, etc. Unique identifier) to appear in the two reference frame lists, therefore, even if the reference frame lists and the reference frame indexes of the two single direction motion information are different, the reference frames they point to can be the same reference frame. It can be seen that, the two motion information which are detected as duplicated by using the first level strategy or the second level strategy, can be determined as not duplicated when using the third level strategy to detect the duplicate.
[0150] Further, in the embodiments of the present application, if the preset inter-frame prediction mode uses the bidirectional motion information, when the decoder performs the duplicate detection on the related motion information to be filled and the motion information in the motion information candidate list based on the preset duplicate detection strategy to obtain a duplicate detection result, the first sub-information and the second sub-information included in the related motion information to be filled can be determined first; the first sub-information includes the third reference frame information and the third motion vector, the third reference frame information includes a third reference frame list and a third reference frame index, and the second sub-information includes the fourth reference frame information and the fourth motion vector, the fourth reference frame information includes 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 in the motion information candidate list can be determined; the third sub-information includes the fifth reference frame information and the fifth motion vector, the fifth reference frame information includes a fifth reference frame list and a fifth reference frame index, and the fourth sub-information includes the sixth reference frame information and the sixth motion vector, the sixth reference frame information includes a sixth reference frame list and a sixth reference frame index; and then the duplicate detection result can be determined according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information.
[0151] It should be noted that, in the embodiments of the present application, if the preset inter-frame prediction mode uses the bidirectional motion information and the preset duplicate detection strategy is the first level strategy, when the decoder determines the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, the third reference block can be determined according to the first sub-information first, and the fourth reference block can be determined according to the second sub-information; meanwhile, the fifth reference block can be determined according to the third sub-information, and the sixth reference block can be determined according to the fourth sub-information; then the third reference block and the fourth reference block are compared with the fifth reference block and the sixth reference block respectively, 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, the decoder can determine that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are the same; 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 can determine that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are the same; otherwise, the decoder determines that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are not the same.
[0152] It can be understood that, in the embodiments of the present application, when the decoder determines the third reference frame from the third reference frame list according to the third reference frame index and determines the third reference block in the third reference frame according to the third motion vector, and simultaneously determines the fourth reference frame from the fourth reference frame list according to the fourth reference frame index and determines the fourth reference block in the fourth reference frame according to the fourth motion vector, according to the first sub-information and the second sub-information.
[0153] It can be understood that, in the embodiments of the present application, when the decoder determines the fifth reference frame from the fifth reference frame list according to the fifth reference frame index and determines the fifth reference block in the fifth reference frame according to the fifth motion vector, and simultaneously determines the sixth reference frame from the sixth reference frame list according to the sixth reference frame index and determines the sixth reference block in the sixth reference frame according to the sixth motion vector, according to the third sub-information and the fourth sub-information.
[0154] That is to say, in the present application, when the decoder performs the duplicate detection according to the first level strategy, if the third reference block and the fourth reference block determined according to the related motion information to be filled in are the same image blocks whose pixel information is identical in pairs with the fifth reference block and the sixth reference block determined according to the motion information in the motion information candidate list, the decoder can consider that the reference blocks indicated by the two motion information are identical, that is, the duplicate detection result is identical, that is, the related motion information to be filled in and the motion information in the motion information candidate list are repeated; on the contrary, if the pixel information of the four reference blocks determined based on the two motion information is not identical in pairs, it can be considered that the related motion information to be filled in and the motion information in the motion information candidate list are not repeated.
[0155] It should be noted that in the embodiments of the present application, if the preset inter-frame prediction mode uses bi-directional motion information, the preset duplicate detection strategy is the second level strategy, when the decoder determines the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, the decoder can first determine the first information combination of the related information to be filled in according to the first sub-information, and determine the second information combination of the related information to be filled in according to the second sub-information; at the same time, determine the third information combination of the motion information in the list according to the third sub-information, and determine the 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, then the decoder can determine that the duplicate detection result is that the related motion information to be filled in 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, then the decoder can determine that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in is different from the motion information in the motion information candidate list.
[0156] It can be understood that in the embodiments of the present application, when the decoder determines the first information combination of the related information to be filled in according to the first sub-information, and determines the second information combination of the related information to be filled in according to the second sub-information, the third reference frame can be determined from the third reference frame list according to the third reference frame index, and the first information combination can be constructed according to the third identifier of the third reference frame and the third motion vector; at the same time, the fourth reference frame can be determined from the fourth reference frame list according to the fourth reference frame index, and the second information combination can be constructed according to the fourth identifier of the fourth reference frame and the fourth motion vector.
[0157] It can be understood that in the embodiments of the present application, when the decoder determines the third information combination of the motion information in the list according to the third sub-information, and determines the fourth information combination of the motion information in the list according to the fourth sub-information, the fifth reference frame can be determined from the fifth reference frame list according to the fifth reference frame index, and the third information combination can be constructed according to the fifth identifier of the fifth reference frame and the fifth motion vector; at the same time, the sixth reference frame can be determined from the sixth reference frame list according to the sixth reference frame index, and the fourth information combination can be constructed according to the sixth identifier of the sixth reference frame and the sixth motion vector.
[0158] It can be understood that in the embodiments of the present application, the identifier of a reference frame can be a unique identifier such as POC or DOI, for example, the third identifier can be the POC of the third reference frame in the third reference frame list; the fifth identifier can be the POC of the fifth reference frame in the fifth reference frame list.
[0159] That is to say, in the present application, when the decoder performs the duplicate detection according to the second level strategy, 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 determined according to the related motion information to be filled in are 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 determined according to the motion information in the motion information candidate list, the decoder can consider that the reference blocks indicated by the two motion information are the same, that is, the duplicate detection result is the same, that is, the related motion information to be filled in and the motion information in the motion information candidate list are duplicated; otherwise, if the identifiers and the motion vectors of the two reference frames determined based on the two motion information are not the same, it can be considered that the related motion information to be filled in and the motion information in the motion information candidate list are not duplicated.
[0160] It should be noted that, in the embodiments of the present application, if the preset inter prediction mode uses bi-directional motion information, the preset duplicate detection strategy is the third level strategy, when the decoder determines the duplicate detection result according to the first sub information, the second sub information, the third sub information and the fourth sub information, the first sub information and the second sub information can be directly compared with the third sub information and the fourth sub information respectively, 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 the same as the fourth sub information, and the second sub information is the same as the third sub information, the decoder considers that the reference blocks indicated by the two motion information are the same; otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not the same.
[0161] That is to say, in the present application, when the decoder performs the duplicate detection according to the third level strategy, the duplicate detection result is determined only by the comparison result of comparing the two motion information.
[0162] It can be understood that, in the embodiments of the present application, comparing the third level strategy with the first level strategy and the second level strategy, since the standard allows the same reference frame, that is, the reference frame with the same POC (or DOI, etc. unique identifier) to appear in the two reference frame lists, therefore, even if the reference frame lists and the reference frame indexes of the two single direction motion information are different, the reference frames they point to can be the same reference frame. It can be seen that, the two motion information which are detected as duplicated using the first level strategy or the second level strategy, can be determined as not duplicated when using the third level strategy to detect the duplicate.
[0163] It should be noted that in the embodiments of the present application, if the obtained prediction mode parameter indicates that the GPM or the AWP is used to determine the inter prediction value of the current block, the current block can be divided into a first partition and a second partition, and the motion information of the current block can include first information corresponding to the first partition and second information corresponding to the second partition. The first information includes the motion vector and the reference frame information corresponding to the first partition, and the second information includes the motion vector and the reference frame information corresponding to the second partition.
[0164] Further, in the embodiments of the present application, when the decoder performs the construction of the motion information candidate list based on the duplication detection result, if the duplication detection result is that the related motion information to be filled in does not coincide with the motion information in the motion information candidate list, the decoder can fill the related motion information to be filled in into the motion information candidate list; if the duplication detection result is that the related motion information to be filled in coincides with the motion information in the motion information candidate list, the decoder can ignore the related motion information to be filled in.
[0165] As can be seen, for the preset duplication detection strategy proposed in the embodiments of the present application, the first level strategy has the strictest duplication detection and the best compression performance, but the complexity is relatively high because the first level strategy needs to take out the reference block to determine whether the motion information is the same. The duplication detection operation is usually performed multiple times, for example, when a new motion information candidate wants to be added to the motion information candidate list, the duplication detection (comparison of whether the same) needs to be performed with each motion information in the motion information candidate list, so that the reference block needs to be taken out from the memory multiple times in the scene that a new motion information candidate wants to be added to the motion information candidate list, and the implementation complexity is obviously increased compared with the third level strategy. Therefore, the first level strategy is suitable for the application scenario in which the compression performance requirement is very high, but the coding and decoding complexity requirement is not very strict.
[0166] The difference between the second level strategy and the third level strategy is that the third level strategy directly judges whether the reference frame list and the reference frame index are the same, while the second level strategy judges whether the reference frame (such as the POC or the DOI of the reference frame, or the unique identifier of the reference frame) is the same. Taking the POC as an example, the complexity of the second level strategy relative to the third level strategy is that the POC of the reference frame is obtained according to the reference frame list and the reference frame index, that is, the POC of the reference frame at the position of the reference frame index in the reference frame list. Because there is a case that the reference frame list and the reference frame index are different but the POC of the reference frame is the same, the duplication detection effect is obviously improved without obvious increase in complexity. Therefore, the second level strategy is suitable for the application scenario in which the decoding complexity requirement is relatively strict.
[0167] It should be noted that the preset duplicate checking strategy proposed in the present application can be applied to all scenes that need to check motion information duplicates or judge whether the motion information is the same, including but not limited to AWP. The performance difference is more obvious because AWP uses only one-way motion information. Taking AWP in AVS as an example, when constructing a motion information candidate list, based on the above RefIdxL0 The "existence" of a neighboring block X (X represents A, B, C, D, F or G) means that the block should be in the to-be-decoded picture and the block should belong to the same spatial region as block E; otherwise, the neighboring block does not exist. It can be obtained that if the block does not exist or has not been decoded, the block is "unavailable"; otherwise, the block is "available". Or, if the block where the to-be-decoded picture sample is located does not exist or the sample has not been decoded, the sample is "unavailable"; otherwise, the sample is "available".
[0168] Specifically, the steps of deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefIdxAwp1L1 are as follows:
[0169] First, determine the "availability" of F, G, C, A, B and D.
[0170] Second, put the one-way available motion information in the order of F, G, C, A, B and D into the one-way motion information candidate list AwpUniArray until the length of AwpUniArray is 3 or the iteration is completed.
[0171] Third, if the length of AwpUniArray is less than 3, split the bidirectional available motion information into one-way motion information pointing to the reference frame list RefPicL0 and one-way motion information pointing to the reference frame list List1 in the order of F, G, C, A, B and D, first perform a one-way motion information duplicate checking operation, and if it is not repeated, put it into AwpUniArray until the length is 3 or the iteration is completed.
[0172] Fourth, split the temporal bidirectional motion information into one-way motion information pointing to the reference frame list RefPicL0 and one-way motion information pointing to the reference frame list List1, first perform a one-way motion information duplicate checking operation, and if it is not repeated, put it into AwpUniArray until the length is 4 or the iteration is completed.
[0173] Fifth, if the length of AwpUniArray is less than 4, perform a repeated padding operation on the last one-way motion information in AwpUniArray until the length of AwpUniArray is 4.
[0174] Step 6: Assign the (0+1)th motion information in AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L1; assign the (1+1)th motion information in AwpUniArray to mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1.
[0175] In the third step, the preset plagiarism detection strategy proposed in this application can be used for plagiarism detection. Preferably, the second-level strategy can be used for plagiarism detection.
[0176] It is understood that in the embodiments of this application, the decoder can be pre-set to use different preset deduplication strategies for different prediction modes. That is, the preset deduplication strategies used for different prediction modes may be different. For example, if the prediction mode parameter indicates that GPM is used to determine the inter-frame prediction value of the current block, then the second-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list; if the prediction mode parameter indicates that AWP is used to determine the inter-frame prediction value of the current block, then the second-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list; if the prediction mode parameter indicates that other inter-frame prediction modes besides GPM and AWP are used to determine the inter-frame prediction value of the current block, then the third-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list.
[0177] Step 103: Determine motion information from the motion information candidate list based on the motion information index value corresponding to the current block.
[0178] In the embodiments of this application, after the decoder constructs a candidate list of motion information for the current block according to a preset deduplication strategy, it can determine the motion information from the candidate list of motion information based on the motion information index value corresponding to the current block.
[0179] In the embodiments of this application, further, mvL0 A schematic diagram of the implementation process of the inter-frame prediction method. RefPicL1 ,like RefIdxL1 As shown, after parsing the bitstream and obtaining the prediction mode parameters of the current block, i.e., after step 101, the method for the decoder to perform inter-frame prediction may further include the following steps:
[0180] Step 105: When the prediction mode parameter indicates that the preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, parse the bitstream and obtain the motion information index value.
[0181] In the embodiments of the present 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 can further parse the binary code stream, so as to further obtain the motion information index value corresponding to the current block.
[0182] It should be noted that, in the embodiments of the present application, if the prediction mode parameter indicates that the GPM or the AWP is used for inter prediction, that is, the preset inter prediction mode is the GPM or the AWP, after the decoder parses the code stream to obtain the prediction mode parameter of the current block, the decoder further needs to parse the code stream to obtain the mode type. That is, when the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, if the preset inter prediction mode is the angle weighted prediction mode GPM or the AWP, the code stream is parsed to obtain the mode type and the motion information index value.
[0183] For example, in the present application, after the decoder parses the code stream, it can not only determine whether the GPM or the AWP is used for inter prediction of the current block by parsing the obtained prediction mode parameter, but also can determine the specific mode used by the current block, such as one of the 64 modes of the GPM or one of the 56 modes of the AWP, by the mode type obtained by parsing the code stream after determining that the GPM or the AWP is used for inter prediction; at the same time, the decoder can also obtain the index values of the two single-direction motion information, that is, the first index value corresponding to the first partition and the second index value corresponding to the second partition, by parsing the code stream.
[0184] Further, in the embodiments of the present application, if the preset inter prediction mode is the GPM or the AWP, therefore, after the decoder parses the mode type of the current block, the decoder can determine the first partition and the second partition corresponding to the current block based on the mode type; accordingly, the motion information index value corresponding to the current block can include the first index value corresponding to the first information and the second index value corresponding to the second information; accordingly, the motion information corresponding to the current block can include the first information corresponding to the first partition and the second information corresponding to the second partition.
[0185] It can be understood that the GPM or the AWP belongs to an inter prediction technology, and the GPM or the AWP needs to transmit a flag indicating whether the GPM or the AWP is used in a code stream, which can indicate whether the GPM or the AWP is used for the current block. If the GPM or the AWP is used, the encoder needs to transmit a specific mode used in the code stream, that is, one of 64 partition modes of the GPM or one of 56 partition modes of the AWP; and index values of two unidirectional motion information. That is, for the current block, the decoder can obtain information indicating 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 can parse the prediction mode parameters of the GPM or the AWP and the two motion information index values. For example, the current block can be divided into two partitions, and then the first index value corresponding to the first partition and the second index value corresponding to the second partition can be parsed.
[0186] It should be noted that in the embodiments of the present application, when the decoder determines the motion information from the motion information candidate list according to the motion information index value corresponding to the current block, the motion information indicated by the first index value in the motion information candidate list can be determined as the first information of the first partition; and the motion information indicated by the second index value in the motion information candidate list can be determined as the second information of the second partition.
[0187] In step 104, an inter prediction value of the current block is determined according to the motion information.
[0188] In the embodiments of the present application, after the decoder determines the motion information from the motion information candidate list according to the motion information index value corresponding to the current block, the inter prediction value of the current block can be further obtained according to the motion information to complete the inter prediction of the current block.
[0189] It should be noted that in the embodiments of the present application, after the decoder determines the motion information of the current block, the reference block corresponding to the current block can be first determined according to the motion information; and then the corresponding inter prediction value can be determined based on the reference block to complete the inter prediction.
[0190] It can be understood that in the embodiments of the present application, the decoder can determine the motion information corresponding to the current block from the motion information candidate list according to the parsed motion information index value of the current block, and then determine the 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.
[0191] Further, in the embodiments of the present application, for GPM or AWP, after 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, and determines the motion information indicated by the second index value in the motion information candidate list as the second information of the second partition, the decoder can calculate the first prediction value of the first partition based on the first information, and calculate the second prediction value of the second partition based on the second information, and then determine the inter prediction value of the current block based on the first prediction value and the second prediction value.
[0192] It should be noted that in the embodiments of the present application, when the decoder determines the inter prediction value of the current block based on the first prediction value and the second prediction value, the decoder can first determine the first weight of the first partition and the second weight of the second partition according to the mode type, and then perform weighted fusion processing on the first prediction value and the second prediction value according to the first weight and the second weight, and finally obtain the inter prediction value.
[0193] That is, in the present application, after the decoder obtains the motion information index value of the current block, i.e., obtains the first index value of the first partition and the second index value of the second partition of the current block, the decoder can find two motion information of the current block, i.e., the first information and the second information, from the constructed motion information candidate list according to the first index value and the second index value respectively, then find two reference blocks using the two single-direction motion information, determine the weight of each pixel position of the two reference blocks according to the specific mode used by GPM or AWP, i.e., the mode type parsed, and finally perform weighted fusion on the two reference blocks based on the first weight and the second weight, to obtain the prediction block of the current block, i.e., the inter prediction value.
[0194] It should be noted that in the present application, if the current mode is a skip mode, the prediction block is the decoded block, and the decoding of the current block ends. If the current mode is not a skip mode, the entropy decoding parses the quantization coefficients, then dequantizes and inverse transforms to obtain a residual block, and adds the residual block to the prediction block to obtain a decoded block, and the decoding of the current block ends.
[0195] In summary, the inter prediction method proposed in the present application performs duplicate detection on the motion information according to the preset duplicate detection strategy when constructing the motion information candidate list, and uses a more rigorous duplicate detection standard, so that the duplicate detection effect is obviously improved without obvious increase in complexity. In the case where the reference frame list and the reference frame index are different but the reference frame is the same, the motion information that is repeatedly defined can be excluded, so that the different motion information in the motion information candidate list increases, the index of the effective motion information is advanced, and the coding and decoding performance is improved.
[0196] The embodiment provides an inter prediction method. A decoder parses a code stream, acquires a prediction mode parameter of a current block, and constructs a motion information candidate list of the current block according to a preset duplicate detection strategy when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, wherein the preset duplicate detection strategy is used for duplicate removal processing; the motion information of the current block is determined from the motion information candidate list according to a motion information index value corresponding to the current block; and the inter prediction value of the current block is determined according to the motion information. That is, the inter prediction method provided in the application can perform more rigorous duplicate removal processing according to the preset duplicate detection strategy when the motion information candidate list is constructed, solves the problem of repeated options in the motion information candidate list, obviously improves the duplicate detection effect, and improves the coding and decoding efficiency.
[0197] Based on the above embodiment, in the embodiment of the application, the duplicate detection in the construction process of the motion information candidate list is described in detail in combination with several cases.
[0198] In a possible implementation, if the two unidirectional motion information satisfy one or more of the following conditions, it is considered that the two unidirectional motion information are different, that is, not duplicated; otherwise, it is considered that the two unidirectional motion information are the same, that is, duplicated:
[0199] 1. InterPredRefMode is 0, and RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0200] 2. InterPredRefMode is 1, and RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0201] 3. one InterPredRefMode is 0, and the other InterPredRefMode is 1, the reference frame determined by the RefPicL0 reference frame index of the motion information with InterPredRefMode being 0 is different from the reference frame determined by the RefPicL1 reference frame index of the motion information with InterPredRefMode being 1, or the RefPicL0 motion vector of the motion information with InterPredRefMode being 0 is not equal to the RefPicL1 motion vector of the motion information with InterPredRefMode being 1.
[0202] Wherein, InterPredRefMode is 0 represents forward prediction, that is, the reference frame list is RefPicL0, and InterPredRefMode is 1 represents backward prediction, that is, the reference frame list is RefPicL1.
[0203] In one possible implementation, if the two uni-directional motion information satisfy one or more of the following conditions, the two uni-directional motion information are considered different, i.e. not duplicated; otherwise, the two uni-directional motion information are considered the same, i.e. duplicated:
[0204] 1. InterPredRefMode is 0, RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0205] 2. InterPredRefMode is 1, RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0206] 3. one InterPredRefMode is 0, the other is 1, the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicL0 reference frame index of the motion information with InterPredRefMode being 0 is different from the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicL1 reference frame index of the motion information with InterPredRefMode being 1, or the RefPicL0 motion vector of the motion information with InterPredRefMode being 0 is not equal to the RefPicL1 motion vector of the motion information with InterPredRefMode being 1.
[0207] wherein InterPredRefMode being 0 means forward prediction, i.e. the reference frame list is RefPicL0, and InterPredRefMode being 1 means backward prediction, i.e. the reference frame list is RefPicL1.
[0208] In one possible implementation, if the two motion information satisfy one or more of the following conditions, the two motion information are considered different, i.e. not duplicated; otherwise, the two motion information are considered the same, i.e. duplicated:
[0209] 1. InterPredRefMode is 0, RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0210] 2. InterPredRefMode is 1, RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0211] 3. one InterPredRefMode is 0, the other InterPredRefMode is 1, the reference frame determined by the RefPicLO reference frame index of the motion information with InterPredRefMode 0 is different from the reference frame determined by the RefPicLl reference frame index of the motion information with InterPredRefMode 1, or the RefPicLO motion vector of the motion information with InterPredRefMode 0 is not equal to the RefPicLl motion vector of the motion information with InterPredRefMode 1.
[0212] 4. both InterPredRefMode are 2, any one of the RefPicLO motion vector, the RefPicLl motion vector, the RefPicLO reference frame index or the RefPicLl reference frame index is not equal.
[0213] wherein, InterPredRefMode 0 represents forward prediction, i.e. the reference frame list is RefPicLO, InterPredRefMode 1 represents backward prediction, i.e. the reference frame list is RefPicLl, and InterPredRefMode 2 represents bidirectional prediction, i.e. the reference frame list is RefPicLO and RefPicLl.
[0214] According to condition 4, the third level strategy in the preset duplicate search strategy can be used to determine whether the bidirectional motion information is the same, i.e. the first to fourth conditions use the third level strategy in the preset duplicate search strategy.
[0215] In a possible implementation, when determining whether the motion information is the same, if the two motion information satisfy one or more of the following conditions, the two motion information are considered to be different, i.e. not duplicated; otherwise, the two motion information are considered to be the same, i.e. duplicated:
[0216] 1. both InterPredRefMode are 0, the RefPicLO motion vector is not equal or the RefPicLO reference frame index is not equal;
[0217] 2. both InterPredRefMode are 1, the RefPicLl motion vector is not equal or the RefPicLl reference frame index is not equal;
[0218] 3. one InterPredRefMode is 0 and the other is 1, the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicLO reference frame index of the motion information with InterPredRefMode 0 is different from the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicLl reference frame index of the motion information with InterPredRefMode 1, or the RefPicLO motion vector of the motion information with InterPredRefMode 0 is not equal to the RefPicLl motion vector of the motion information with InterPredRefMode 1.
[0219] 4. both InterPredRefMode are 2, any one of the RefPicLO motion vector, the RefPicLl motion vector, the RefPicLO reference frame index or the RefPicLl reference frame index is not equal.
[0220] wherein, InterPredRefMode 0 means forward prediction, i.e. the reference frame list is RefPicLO, InterPredRefMode 1 means backward prediction, i.e. the reference frame list is RefPicLl, and InterPredRefMode 2 means bi-prediction, i.e. the reference frame list is RefPicLO and RefPicLl.
[0221] According to condition 4, the third level strategy in the preset duplicate checking strategy can be used to determine whether the bi-prediction motion information is the same, i.e. conditions 1 to 4 combine the second level strategy and the third level strategy in the preset duplicate checking strategy.
[0222] In one possible implementation, when determining whether the motion information is the same, if the two motion information satisfy one or more of the following conditions, the two motion information are considered to be different, i.e. not duplicated; otherwise, the two motion information are considered to be the same, i.e. duplicated:
[0223] 1. both InterPredRefMode are 0, the RefPicLO motion vector is not equal or the RefPicLO reference frame index is not equal;
[0224] 2. both InterPredRefMode are 1, the RefPicLl motion vector is not equal or the RefPicLl reference frame index is not equal;
[0225] 3. one InterPredRefMode is 0, the other InterPredRefMode is 1, the reference frame determined by the RefPicL0 reference frame index of the motion information with InterPredRefMode 0 is different from the reference frame determined by the RefPicL1 reference frame index of the motion information with InterPredRefMode 1, or the RefPicL0 motion vector of the motion information with InterPredRefMode 0 is not equal to the RefPicL1 motion vector of the motion information with InterPredRefMode 1.
[0226] 4. both InterPredRefMode are 2, condition 1: any one of the RefPicL0 motion vector, the RefPicL1 motion vector, the reference frame determined by the RefPicL0 reference frame index or the reference frame determined by the RefPicL1 reference frame index is not equal; condition 2: any one of the reference frame determined by the RefPicL0 reference frame index of the first motion information and the RefPicL1 reference frame index of the second motion information, the reference frame determined by the RefPicL1 reference frame index of the first motion information and the RefPicL0 reference frame index of the second motion information, the RefPicL0 motion vector of the first motion information and the RefPicL1 motion vector of the second motion information, the RefPicL1 motion vector of the first motion information and the RefPicL0 motion vector of the second motion information is not equal. Condition 1 and condition 2 are met at the same time.
[0227] wherein, InterPredRefMode 0 represents forward prediction, i.e. the reference frame list is RefPicL0, InterPredRefMode 1 represents backward prediction, i.e. the reference frame list is RefPicL1, and InterPredRefMode 2 represents bidirectional prediction, i.e. the reference frame list is RefPicL0 and RefPicL1.
[0228] According to the above condition 4, the second level strategy in the preset duplicate checking strategy can be used to determine whether the bidirectional motion information is the same, i.e. the above conditions 1 to 4 combine the second level strategy and the third level strategy in the preset duplicate checking strategy.
[0229] In a possible implementation, in the judgment of whether the motion information is the same, if the two motion information satisfy one or more of the following conditions, it is considered that the two motion information are different, i.e. not duplicated; otherwise, it is considered that the two motion information are the same, i.e. duplicated.
[0230] 1. InterPredRefMode is 0, RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0231] 2. InterPredRefMode is 1, RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0232] 3. One InterPredRefMode is 0, another InterPredRefMode is 1, POC (or DOI or other unique identifier) of reference frame determined by RefPicL0 reference frame index of motion information of InterPredRefMode is 0 is different from POC (or DOI or other unique identifier) of reference frame determined by RefPicL1 reference frame index of motion information of InterPredRefMode is 1, or RefPicL0 motion vector of motion information of InterPredRefMode is 0 is not equal to RefPicL1 motion vector of motion information of InterPredRefMode is 1.
[0233] 4. InterPredRefMode is 2, condition 1: any one of RefPicL0 motion vector, RefPicL1 motion vector, reference frame determined by RefPicL0 reference frame index or reference frame determined by RefPicL1 reference frame index is not equal; condition 2: any one of reference frame determined by RefPicL0 reference frame index of first motion information and reference frame determined by RefPicL1 reference frame index of second motion information, reference frame determined by RefPicL1 reference frame index of first motion information and reference frame determined by RefPicL0 reference frame index of second motion information, RefPicL0 motion vector of first motion information and RefPicL1 motion vector of second motion information, RefPicL1 motion vector of first motion information and RefPicL0 motion vector of second motion information is not equal. Condition 1 and condition 2 are met simultaneously.
[0234] Wherein, InterPredRefMode is 0 represents forward prediction, i.e. reference frame list is RefPicL0, InterPredRefMode is 1 represents backward prediction, i.e. reference frame list is RefPicL1, and InterPredRefMode is 2 represents bidirectional prediction, i.e. reference frame list is RefPicL0 and RefPicL1.
[0235] It can be determined whether the two motion information are the same by using the second level strategy in the preset duplicate checking strategy according to condition 4, that is, conditions 1 to 4 all use the second level strategy in the preset duplicate checking strategy.
[0236] In a possible implementation, when determining whether the motion information is the same, if the two motion information satisfy one or more of the following conditions, it is considered that the two motion information are different, that is, not duplicated; otherwise, it is considered that the two motion information are the same, that is, duplicated.
[0237] 1. InterPredRefMode is 0, RefPicL0 motion vector is not equal or RefPicL0 reference frame index is not equal;
[0238] 2. InterPredRefMode is 1, RefPicL1 motion vector is not equal or RefPicL1 reference frame index is not equal;
[0239] 3. InterPredRefMode is 0 and InterPredRefMode is 1, the reference frame determined by the RefPicL0 reference frame index of the motion information with InterPredRefMode being 0 is different from the reference frame determined by the RefPicL1 reference frame index of the motion information with InterPredRefMode being 1, or the RefPicL0 motion vector of the motion information with InterPredRefMode being 0 is not equal to the RefPicL1 motion vector of the motion information with InterPredRefMode being 1.
[0240] 4. InterPredRefMode is 2, condition 1: RefPicL0 motion vector, RefPicL1 motion vector, POC (or DOI or other unique identifier) determined by RefPicL0 reference frame index or POC (or DOI or other unique identifier) determined by RefPicL1 reference frame index are not equal; condition 2: the reference frame determined by the RefPicL0 reference frame index of the first motion information is different from the reference frame determined by the RefPicL1 reference frame index of the second motion information, the POC (or DOI or other unique identifier) determined by the RefPicL1 reference frame index of the first motion information is different from the POC (or DOI or other unique identifier) determined by the RefPicL0 reference frame index of the second motion information, the RefPicL0 motion vector of the first motion information is different from the RefPicL1 motion vector of the second motion information, the RefPicL1 motion vector of the first motion information is different from the RefPicL0 motion vector of the second motion information. Condition 1 and condition 2 are met at the same time.
[0241] where InterPredRefMode is 0 means forward prediction, i.e. the reference frame list is RefPicLo, InterPredRefMode is 1 means backward prediction, i.e. the reference frame list is RefPicLl, and InterPredRefMode is 2 means bi-prediction, i.e. the reference frame list is RefPicLo and RefPicLl.
[0242] In one possible implementation, if the two motion information satisfy one or more of the following conditions, the two motion information are considered to be different, i.e. not duplicated; otherwise, the two motion information are considered to be the same, i.e. duplicated:
[0243] 1. InterPredRefMode is 0, RefPicLo reference frame index is different or RefPicLo motion vector is different;
[0244] 2. InterPredRefMode is 1, RefPicLl reference frame index is different or RefPicLl motion vector is different;
[0245] 3. one InterPredRefMode is 0 and the other is 1, the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicLo reference frame index of the motion information with InterPredRefMode being 0 is different from the POC (or DOI or other unique identifier) of the reference frame determined by the RefPicLl reference frame index of the motion information with InterPredRefMode being 1, or the RefPicLo motion vector of the motion information with InterPredRefMode being 0 is different from the RefPicLl motion vector of the motion information with InterPredRefMode being 1.
[0246] 4. InterPredRefMode is 2, condition 1: any one of RefPicL0 motion vector, RefPicL1 motion vector, POC (or DOI or other unique identifier) determined by RefPicL0 reference frame index or POC (or DOI or other unique identifier) determined by RefPicL1 reference frame index is not equal; condition 2: any one of reference frame determined by RefPicL0 reference frame index of the first motion information and reference frame determined by RefPicL1 reference frame index of the second motion information, POC (or DOI or other unique identifier) determined by RefPicL1 reference frame index of the first motion information and POC (or DOI or other unique identifier) determined by RefPicL0 reference frame index of the second motion information, RefPicL1 motion vector of the first motion information and RefPicL1 motion vector of the second motion information, RefPicL0 motion vector of the first motion information and RefPicL0 motion vector of the second motion information is not equal. Condition 1 and condition 2 are met at the same time.
[0247] wherein, InterPredRefMode is 0 represents forward prediction, that is, the reference frame list is RefPicL0, InterPredRefMode is 1 represents backward prediction, that is, the reference frame list is RefPicL1, and InterPredRefMode is 2 represents bidirectional prediction, that is, the reference frame list is RefPicL0 and RefPicL1.
[0248] In a possible implementation, when judging whether the motion information is the same, if the set of positions of the reference blocks pointed to by the two motion information is the same, the two motion information is the same, that is, repeated; otherwise, the two motion information is not the same, that is, not repeated. The position of the reference block includes the POC (or DOI or other unique identifier) of the reference frame and the position of the reference block in the reference frame.
[0249] In a possible implementation, when judging whether the motion information is the same, if the two motion information has the same set of combinations of reference frame POC (or DOI or other unique identifier) and motion vector, the two motion information is the same, that is, repeated; otherwise, the two motion information is not the same, that is, not repeated.
[0250] It should be noted that in the embodiments of the present application, the motion information candidate list of the embodiments of the present application generally refers to a single-direction motion information candidate list, but the construction mode of the single-direction motion information of the embodiments of the present application can be extended to the construction of bidirectional motion information, so that the construction of the single-direction motion information candidate list can also be extended to the construction of the bidirectional motion information candidate list.
[0251] For example, in this application, Table 1 is a reference frame list 1, which includes the identification (POC or DOI, etc. unique identification) of each reference frame in two different reference frame lists RefPicL0 and RefPicL1. Based on the above Table 1, Table 2 is a representation of reference frame index and motion vector, wherein RefIdxL0 is the index on the reference frame list RefPicL0, mvL0 is the corresponding motion vector on the reference frame list RefPicL0; RefIdxL1 is the index on the reference frame list RefPicL1, mvL1 is the corresponding motion vector on the reference frame list RefPicL1.
[0252] Table 1
[0253]
[0254] Table 2
[0255] mvL1 RefPicL0 RefPicL1 RefPicL0 RefPicL1 RefPicL0
[0256] The related motion information to be filled in can be represented as the following Table 3, and the motion information in the motion information candidate list can be represented as the following Table 4, wherein the single-direction motion information can be considered as the reference frame index corresponding to one reference frame list is valid, and the reference frame index corresponding to the other reference frame list is invalid. If the preset inter-frame prediction mode uses single-direction motion information, then in Table 3 and Table 4, the reference frame index -1 indicates invalid, that is, RefPicL0 in Table 3 is invalid, RefPicL1 is valid, RefPicL1 in Table 4 is invalid, and RefPicL0 is valid.
[0257] Table 3
[0258] RefPicL1 -1 (0,0) RefPicL0 1 (1,0)
[0259] Table 4
[0260] RefPicL1 0 (1,0) Figure 12 -1 (0,0)
[0261] Based on the above Tables 1 to 4, when the decoder performs the duplicate detection according to the third level strategy, since at least one of RefIdxL0, mvL0, RefIdxL1 and mvL1 is not the same, that is, not completely the same, the decoder can determine that the motion information shown in Table 3 and the motion information shown in Table 4 are not the same, and further obtain the duplicate detection result that the related motion information to be filled in and the motion information in the motion information candidate list are not the same.
[0262] However, when the decoder performs the duplicate detection according to the second level strategy, the motion information in Table 3 indicates that the reference frame with the identifier (POC or DOI or the like) of 4 and the motion vector (1, 0) on the reference frame, and the motion information in Table 4 also indicates that the reference frame with the identifier (POC or DOI or the like) of 4 and the motion vector (1, 0) on the reference frame, so the decoder can determine that the reference blocks indicated by the motion information in Table 3 and the motion information in Table 4 are the same, and further obtain the duplicate detection result that the related motion information to be filled in and the motion information in the motion information candidate list are the same.
[0263] For example, in the present application, Table 5 is a second reference frame list, which includes the identifier (POC or DOI or the like) of each reference frame in two different reference frame lists RefPicL0 and RefPicL1.
[0264] Table 5
[0265]
[0266] Based on the above Table 2, the related motion information to be filled in can be represented as the following Table 6, and the motion information in the motion information candidate list can be represented as the following Table 7, wherein if the preset inter prediction mode uses bidirectional motion information, in Table 6 and Table 7, the value of the reference frame index can represent that RefPicL0 and RefPicL1 in Table 6 and Table 7 are both valid.
[0267] Table 6
[0268] Figure 4 0 (0,0) Figure 12 1 (1,0)
[0269] Table 7
[0270] Figure 13 0 (1,0) Figure 5 1 (0,0)
[0271] Based on the above Tables 5 to 7, when the decoder performs the duplicate detection according to the third level strategy, since at least one of RefIdxL0, mvL0, RefIdxL1 and mvL1 is not the same, i.e., not completely the same, the decoder can determine that the motion information shown in Table 6 and the motion information shown in Table 7 are not the same, and further obtain the duplicate detection result that the related motion information to be filled in and the motion information in the motion information candidate list are not the same.
[0272] However, when the decoder performs the duplicate detection according to the second level strategy, the motion information in Table 6 indicates that the reference frame with an identifier (POC or DOI, etc.) of 0 and the reference frame with an identifier of 16, and the motion vector on the reference frame with an identifier of 0 is (0, 0) and the motion vector on the reference frame with an identifier of 16 is (1, 0), the motion information in Table 7 also indicates the reference frame with an identifier of 0 and the reference frame with an identifier of 16, and the motion vector on the reference frame with an identifier of 0 is (0, 0) and the motion vector on the reference frame with an identifier of 16 is (1, 0), so the decoder can determine that the reference blocks indicated by the motion information in Table 6 and the motion information in Table 7 are the same, and the duplicate detection result obtained is that the motion information in the related motion information and the motion information candidate list to be filled in is the same.
[0273] The embodiment provides an inter prediction method, when constructing a motion information candidate list, more rigorous duplicate removal processing can be performed according to a preset duplicate detection strategy, the problem that duplicate options appear in the motion information candidate list is solved, the duplicate detection effect is obviously improved, and therefore the coding and decoding efficiency is improved.
[0274] The embodiment of the present application provides an inter prediction method, which is applied to a video encoding device, i.e., an encoder. The function realized by the method can be realized by calling a computer program by a second processor in the encoder, and of course the computer program can be stored in a second memory. It can be seen that the encoder at least includes the second processor and the second memory.
[0275] Figure 13 An implementation flow of the inter prediction method is shown Figure 14 As shown in Figure 6 The method for inter prediction of the encoder can include the following steps:
[0276] Step 201, determining a prediction mode parameter of a current block.
[0277] In the embodiment of the present application, the encoder can first determine the prediction mode parameter of the current block. Specifically, the encoder can first determine the prediction mode used by the current block, and then determine the corresponding prediction mode parameter based on the prediction mode. The prediction mode parameter can be used to determine the prediction mode used by the current block.
[0278] It should be noted that in the embodiments of the present application, the to-be-encoded image can be divided into a plurality of image blocks, a current to-be-encoded image block can be referred to as a current block, and an image block adjacent to the current block can be referred to as a neighboring block; that is, in the to-be-encoded image, the current block and the neighboring block have an adjacent relationship. Here, each current block can include a first image component, a second image component, and a third image component; that is, the current block is an image block in the to-be-encoded image that is currently to be predicted for the first image component, the second image component, or the third image component.
[0279] wherein, assuming that the current block is predicted for the first image component and the first image component is a luminance component, that is, the to-be-predicted image component is a luminance component, the current block can also be referred to as a luminance block; or, assuming that the current block is predicted for the second image component and the second image component is a chroma component, that is, the to-be-predicted image component is a chroma component, the current block can also be referred to as a chroma block.
[0280] It should be noted that in the embodiments of the present application, the prediction mode parameter indicates a prediction mode adopted by the current block and a parameter related to the prediction mode. Here, for determination of the prediction mode parameter, a simple decision strategy can be adopted, such as determination according to the size of a distortion value; or a complex decision strategy can be adopted, such as determination according to the result of rate distortion optimization (RDO), and the embodiments of the present application do not make any limitation. Generally, the RDO manner can be adopted to determine the prediction mode parameter of the current block.
[0281] Specifically, in some embodiments, when determining the prediction mode parameter of the current block, the encoder can first perform pre-encoding processing on the current block by using a plurality of prediction modes to obtain a rate distortion cost value corresponding to each prediction mode; then select a minimum rate distortion cost value from the obtained plurality of rate distortion cost values, and determine the prediction mode parameter of the current block according to the prediction mode corresponding to the minimum rate distortion cost value.
[0282] That is to say, at the encoder side, the current block can be pre-encoded by using multiple prediction modes respectively. Here, the multiple prediction modes usually include inter prediction mode, traditional intra prediction mode and non-traditional intra prediction mode; the traditional intra prediction mode can include direct current (DC) mode, planar (PLANAR) mode and angle mode, etc., the non-traditional intra prediction mode can include matrix-based intra prediction (MIP) mode, cross-component linear model prediction (CCLM) mode, intra block copy (IBC) mode and PLT (Palette) mode, etc., and the inter prediction mode can include normal inter prediction mode, GPM mode and AWP mode, etc.
[0283] In this way, after the current block is pre-encoded by using multiple prediction modes respectively, the rate-distortion cost value corresponding to each prediction mode can be obtained; then the minimum rate-distortion cost value is selected from the obtained multiple rate-distortion cost values, and the prediction mode corresponding to the minimum rate-distortion cost value is determined as the prediction mode parameter of the current block. In addition, after the current block is pre-encoded by using multiple prediction modes respectively, the distortion value corresponding to each prediction mode can be obtained; then the minimum distortion value is selected from the obtained multiple distortion values, and 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 parameter is set according to the prediction mode. In this way, the current block is finally encoded by using the determined prediction mode parameter, and in this prediction mode, the prediction residual can be small, and the encoding efficiency can be improved.
[0284] That is to say, at the encoding side, the encoder can select the optimal prediction mode to pre-encode the current block, and in this process, the prediction mode of the current block can be determined, and the prediction mode parameter used to indicate 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.
[0285] Correspondingly, at the decoder side, the decoder can directly obtain the prediction mode parameter of the current block by parsing the code stream, and determine the prediction mode used by the current block according to the prediction mode parameter obtained by parsing, and the related parameters corresponding to the prediction mode.
[0286] Step 202, when the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy; wherein, the preset duplicate detection strategy is used for duplicate removal processing. Specifically, the duplicate removal processing is pruning, that is, the same motion information is removed in the process of constructing the motion information candidate list.
[0287] In the embodiments of the present application, after the encoder determines the prediction mode parameter, if the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, then the encoder can construct the motion information candidate list of the current block according to the preset duplicate detection strategy.
[0288] It should be noted that in the embodiments of the present application, the preset duplicate detection strategy is used for duplicate removal processing in the process of constructing the motion information candidate list.
[0289] 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 preset inter prediction mode is used to determine the inter prediction value of the current block, the inter prediction method provided in the embodiments of the present application can be used.
[0290] For example, in the embodiments of the present application, the preset inter prediction mode can be GPM mode, AWP mode or other inter prediction mode.
[0291] Further, in the embodiments of the present application, the preset duplicate detection strategy can include a plurality of different duplicate detection methods, and specifically, the preset duplicate detection strategy can be defined first.
[0292] For example, in the present application, the preset duplicate detection strategy can be divided into a first level strategy, a second level strategy and a third level strategy. The following takes unidirectional motion information as an example to describe the preset duplicate detection strategy.
[0293] The first level strategy: Strictly speaking, the two reference blocks found by the two uni-directional motion information should not be the same, i.e. the pixel values at the corresponding positions of the two reference blocks should not be the same. This is because if the two reference blocks found by the two uni-directional motion information are the same, it is meaningless to use the inter-frame prediction using uni-directional motion information, such as AWP. Therefore, if the two reference blocks found by the two uni-directional motion information are the same, even if the two uni-directional motion information look different, for example, the MVs of the two uni-directional motion information are different, i.e. the values of (x, y) are different, or the reference frames of the two uni-directional motion information are different, or the reference frame lists corresponding to the two uni-directional motion information are different, or the reference frame indexes of the two uni-directional motion information in the reference frame list are different, as long as the two reference blocks found by the two uni-directional motion information are the same, the two uni-directional motion information can be considered as repeated, and the above preset duplicate checking strategy is determined as the first level strategy.
[0294] The second level strategy: If the two uni-directional motion information are considered to be repeated only when they point to the same reference block (the same position), otherwise, if the two uni-directional motion information point to reference blocks at different positions, the two uni-directional motion information can be considered not to be repeated. Wherein, the two uni-directional motion information pointing to reference blocks at different positions is equivalent to the reference frames or the values of the MVs of the two uni-directional motion information being not the same. That is, if the MVs of the two uni-directional motion information are the same but the reference frames are different, the reference blocks found by the two uni-directional motion information are not on the same reference frame and the positions are different; if the reference frames of the two uni-directional motion information are the same but the MVs are different, the reference blocks found by the two uni-directional motion information are also different in position, and the above preset duplicate checking strategy is determined as the second level strategy.
[0295] The third level strategy: The common practice of the current coding 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 list. This reference frame management method derives a more relaxed duplicate checking standard. It can be considered that only when the effective reference frame list, the reference frame index and the MV corresponding to the two uni-directional motion information are the same, the two uni-directional motion information are considered to be repeated uni-directional motion information, and the above preset duplicate checking strategy is determined as the third level strategy.
[0296] However, the standard allows the same reference frame, i.e., the reference frame with the same POC (or DOI, etc.) to appear in two reference frame lists, and there cannot be duplicate reference frames in the same reference frame list, i.e., there cannot be the same POC (or DOI, etc.) reference frame. Therefore, if the reference frame lists of two unidirectional motion information are the same but the reference frame indexes are different, the corresponding reference frames must be different. However, the same reference frame can be in two reference frame lists, and the indexes of the same reference frame in the respective lists can or can not be the same, which can cause the situation that even if the valid reference frame lists and the reference frame indexes of two unidirectional motion information are different, the reference frames pointed to can be the same reference frame.
[0297] The currently commonly used duplicate detection method is the third level strategy in the above preset duplicate detection strategy, and some other technologies also use the third level strategy for duplicate detection, such as ultra motion vector expression (UMVE) and history-based motion vector prediction (HMVP). It should be noted that the AWP uses only unidirectional motion information, and the UMVE and HMVP can use unidirectional motion information or bidirectional motion information. The unidirectional motion information can be considered as a reference frame list corresponding to a valid reference frame index, and the other reference frame list corresponding to an invalid reference frame index. The bidirectional motion information considers that the reference frame indexes corresponding to the two reference frame lists are the same, and if the reference frame index corresponding to a reference frame list is valid, the x and y corresponding to the two bidirectional motion information are the same, so the two bidirectional motion information are considered as duplicates.
[0298] It should be noted that the VVC also uses the third level strategy in the above preset duplicate detection strategy.
[0299] It can be understood that in the embodiments of the present application, the preset duplicate detection strategy for detecting the duplicate of the single-direction motion information or the definition of judging whether the single-direction motion information is the same can be extended to the bidirectional motion information. Specifically, the duplicate detection of the first-level strategy can be divided into two sub-levels, i.e., 1.1 level and 1.2 level. Among them, for the 1.1 level, if the reference blocks found by two motion information are the same according to the prediction blocks made by the algorithm required subsequently, it is considered that they are the same motion information, i.e., the two motion information are repeated; for the 1.2 level, if two motion information find the same set of two reference blocks (one motion information can find at most two reference blocks, if two reference blocks are found, the two reference blocks are taken as a set of reference blocks, if one reference block is found, the one reference block is taken as a set of reference blocks), it is considered that they are the same motion information, i.e., the two motion information are repeated. When the duplicate detection is performed according to the second-level strategy, if the set of two reference block positions pointed by two motion information (one motion information can determine at most two reference block positions, if there are two reference block positions, the two reference block positions are taken as a set of reference block positions, if there is one reference block position, the one reference block position is taken as a set of reference block positions) is the same, it is considered that they are the same motion information, i.e., the two motion information are repeated. The duplicate comparison of the third-level strategy is more extensive, and the effect of the duplicate detection is relatively poor compared with the first-level strategy and the second-level strategy, and this gap is more obvious for the single-direction motion information.
[0300] The construction method of the motion information list using the third-level strategy for duplicate detection can obviously appear the proportion of the repeated motion information in the first-level strategy and the second-level strategy, which leads to that the first-level strategy and the second-level strategy in the sense of the repeated single-direction motion information added to the motion information candidate list will not actually be used, and these motion information can lead to other different motion information in the order to be abandoned because the motion information candidate list has been occupied. On the other hand, due to the fact that these repeated motion information occupies a position, leading to the index value index of other motion information in the motion information list to increase, more bit numbers are required when the index value is encoded.
[0301] That is to say, the effect of the duplicate detection of the third-level strategy is relatively poor at present, and therefore, in the embodiments of the present application, the first-level strategy or the second-level strategy defined in the above preset duplicate detection strategy is preferably used, i.e., a more strict duplicate detection method is used to obtain a more effective duplicate detection result. Among them, the second-level strategy is suitable for the application scenario with a relatively strict requirement on the decoding complexity, and the first-level strategy is suitable for the application scenario with a very high requirement on the compression performance but not a very strict requirement on the coding and decoding complexity.
[0302] In the embodiments of the present application, further, Figure 14An implementation flowchart of the inter prediction method Figure 15 As shown in Figure 1 When the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, the method for constructing the motion information candidate list of the current block by the encoder according to the preset duplicate detection strategy can include the following steps:
[0303] Step 202a, determining the related motion information of the current block.
[0304] Step 202b, in the process of sequentially filling the related motion information into the motion information candidate list, based on the preset duplicate detection strategy, detecting duplicates between the related motion information to be filled and the motion information in the motion information candidate list to obtain a duplicate detection result.
[0305] Step 202c, constructing the motion information candidate list based on the duplicate detection result.
[0306] In the embodiments of the present application, after the encoder determines the prediction mode parameter, 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 encoder can 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 related motion information into the motion information candidate list, the encoder can detect duplicates between the related motion information to be filled and the motion information in the motion information candidate list according to the preset duplicate detection strategy, so as to obtain a duplicate detection result, and after obtaining the duplicate result, the construction of the motion information candidate list can be further realized based on the duplicate result.
[0307] It can be understood that in the embodiments of the present application, the related motion information of the current block can include but is not limited to at least one of the following motion information: spatial motion information, temporal motion information, motion information based on historical information. For example, the related motion information of the current block can be the motion information of the neighboring block of the current block.
[0308] It should be noted that in the present application, based on different inter prediction modes, the motion information candidate list constructed by the encoder can be a single-direction motion information candidate list or a bi-directional motion information candidate list. For example, in the present application, the single-direction motion information candidate list can be represented as RefPicL0, or RefPicList0 or List0 or L0; the bi-directional motion information candidate list can be represented as RefPicL0 and RefPicL1, wherein RefPicL1 can also be represented as RefPicList1 or List1 or L1.
[0309] It can be understood that, in the embodiments of the present application, the single-direction motion information can include a set of motion vectors and reference frame information, and correspondingly, in the present application, the bi-directional motion information can include two sets of motion vectors and reference frame information, wherein one set of reference frame information can include a reference frame list and a reference frame index.
[0310] It can be understood that, in the embodiments of the present application, the duplicate detection result can include same or different. Specifically, the duplicate detection result is used to determine whether the related motion information to be filled in is same as each motion information in the motion information candidate list.
[0311] Further, in the embodiments of the present application, if the preset inter-frame prediction mode uses the single-direction motion information, when the encoder performs duplicate detection on the related motion information to be filled in and the motion information in the motion information candidate list based on the preset duplicate detection strategy to obtain the duplicate detection result, the encoder can first determine first reference frame information and a first motion vector included in the related motion information to be filled in; wherein the first reference frame information includes a first reference frame list and a first reference frame index; and simultaneously determine second reference frame information and a second motion vector included in the motion information in the motion information candidate list; wherein the second reference frame information includes a second reference frame list and a second reference frame index; and then determine the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector.
[0312] It should be noted that, in the embodiments of the present application, if the preset inter-frame prediction mode uses the single-direction motion information, and the preset duplicate detection strategy is the first level strategy, when the encoder determines the duplicate 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 can 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; and simultaneously determine a second reference frame from the second reference frame list according to the second reference frame index, and determine a second reference block in the second reference frame according to the second motion vector; and then compare the pixel information of the first reference block with the pixel information of the second reference block, if the pixel information of the first reference block is same as the pixel information of the second reference block, the encoder can determine that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; if the pixel information of the first reference block is different from the pixel information of the second reference block, the encoder can determine that the duplicate detection result is that the related motion information to be filled in is different from the motion information in the motion information candidate list.
[0313] It should be noted that in the embodiments of the present application, if the preset inter-frame prediction mode uses single-direction motion information, the preset duplicate detection strategy is the third level strategy, when the encoder determines the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, the first reference frame information can be directly compared with the second reference frame information, and the first motion vector and the second motion vector can be compared at the same time, if the first reference frame information and the second reference frame information are the same, and the first motion vector and the second motion vector are the same, the encoder considers that the reference blocks indicated by the two motion information are the same, that is, it is determined that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; if the first reference frame information and the second reference frame information are not the same, or the first motion vector and the second motion vector are not the same, the encoder can determine that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
[0314] It should be noted that in the embodiments of the present application, if the preset inter-frame prediction mode uses single-direction motion information, the preset duplicate detection strategy is the third level strategy, when the encoder determines the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, the first reference frame information can be directly compared with the second reference frame information, and the first motion vector and the second motion vector can be compared at the same time, if the first reference frame information and the second reference frame information are the same, and the first motion vector and the second motion vector are the same, the encoder considers that the reference blocks indicated by the two motion information are the same, that is, it is determined that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; if the first reference frame information and the second reference frame information are not the same, or the first motion vector and the second motion vector are not the same, the encoder can determine that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
[0315] Further, in the embodiments of the present application, if the preset inter-frame prediction mode uses the bidirectional motion information, when the encoder performs the duplicate detection on the related motion information to be filled and the motion information in the motion information candidate list based on the preset duplicate detection strategy to obtain a duplicate detection result, the first sub-information and the second sub-information included in the related motion information to be filled can be determined first; the first sub-information includes the third reference frame information and the third motion vector, the third reference frame information includes a third reference frame list and a third reference frame index, and the second sub-information includes the fourth reference frame information and the fourth motion vector, the fourth reference frame information includes 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 in the motion information candidate list can be determined; the third sub-information includes the fifth reference frame information and the fifth motion vector, the fifth reference frame information includes a fifth reference frame list and a fifth reference frame index, and the fourth sub-information includes the sixth reference frame information and the sixth motion vector, the sixth reference frame information includes a sixth reference frame list and a sixth reference frame index; and then the duplicate detection result can be determined according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information.
[0316] It should be noted that, in the embodiments of the present application, if the preset inter-frame prediction mode uses the bidirectional motion information and the preset duplicate detection strategy is the first level strategy, when the encoder determines the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, the third reference block can be determined according to the first sub-information first, and the fourth reference block can be determined according to the second sub-information; meanwhile, the fifth reference block can be determined according to the third sub-information, and the sixth reference block can be determined according to the fourth sub-information; then the third reference block and the fourth reference block are compared with the fifth reference block and the sixth reference block respectively, 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, the encoder can determine that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are the same; 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 can determine that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are the same; otherwise, the encoder determines that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are not the same.
[0317] It can be understood that, in the embodiments of the present application, when the encoder determines the third reference block according to the first sub-information and determines the fourth reference block according to the second sub-information, the third reference frame can be determined from the third reference frame list according to the third reference frame index, and the third reference block can be determined in the third reference frame according to the third motion vector; at the same time, the fourth reference frame can be determined from the fourth reference frame list according to the fourth reference frame index, and the fourth reference block can be determined in the fourth reference frame according to the fourth motion vector.
[0318] It can be understood that, in the embodiments of the present application, when the encoder determines the fifth reference block according to the third sub-information and determines the sixth reference block according to the fourth sub-information, the fifth reference frame can be determined from the fifth reference frame list according to the fifth reference frame index, and the fifth reference block can be determined in the fifth reference frame according to the fifth motion vector; at the same time, the sixth reference frame can be determined from the sixth reference frame list according to the sixth reference frame index, and the sixth reference block can be determined in the sixth reference frame according to the sixth motion vector.
[0319] It should be noted that, in the embodiments of the present application, if the preset inter prediction mode uses bi-directional motion information, and the preset duplicate detection strategy is the second level strategy, when the encoder determines the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, the first information combination of the related information to be filled in can be determined according to the first sub-information, and the second information combination of the related information to be filled in can be determined according to the second sub-information; at the same time, the third information combination of the motion information in the list can be determined according to the third sub-information, and the fourth information combination of the motion information in the list can be determined 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 detection result is that the related motion information to be filled in 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 can determine that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
[0320] It can be understood that in the embodiments of the present application, when the encoder determines the first information combination of the related information to be filled in according to the first sub-information and the second information combination of the related information to be filled in according to the second sub-information, the third reference frame can be determined from the third reference frame list according to the third reference frame index, and the first information combination can be constructed according to the third identifier of the third reference frame and the third motion vector; at the same time, the fourth reference frame can be determined from the fourth reference frame list according to the fourth reference frame index, and the second information combination can be constructed according to the fourth identifier of the fourth reference frame and the fourth motion vector.
[0321] It can be understood that in the embodiments of the present application, when the encoder determines the third information combination of the motion information in the list according to the third sub-information and the fourth information combination of the motion information in the list according to the fourth sub-information, the fifth reference frame can be determined from the fifth reference frame list according to the fifth reference frame index, and the third information combination can be constructed according to the fifth identifier of the fifth reference frame and the fifth motion vector; at the same time, the sixth reference frame can be determined from the sixth reference frame list according to the sixth reference frame index, and the fourth information combination can be constructed according to the sixth identifier of the sixth reference frame and the sixth motion vector.
[0322] It can be understood that in the embodiments of the present application, the identifier of one reference frame can be POC or DOI or the like unique identifier.
[0323] It should be noted that in the embodiments of the present application, if the preset inter prediction mode uses bidirectional motion information, and the preset duplicate detection strategy is the third level strategy, when the encoder determines the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, the first sub-information and the second sub-information can be directly compared with the third sub-information and the fourth sub-information respectively, 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 the same as the fourth sub-information, and the second sub-information is the same as the third sub-information, the encoder considers that the reference blocks indicated by the two motion information are the same; otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are different.
[0324] It can be understood that in the embodiments of the present application, when the third level strategy is compared with the first level strategy and the second level strategy, since the same reference frame, i.e. the reference frame with the same POC (or DOI or the like unique identifier), is allowed to appear in two reference frame lists in the standard, even if the reference frame lists and the reference frame indexes of the two single direction motion information are different, the reference frames pointed by them can be the same reference frame. It can be seen that the two motion information detected as repeated by using the first level strategy or the second level strategy can be determined as not repeated when using the third level strategy for duplicate detection.
[0325] It should be noted that in the embodiments of the present application, if the obtained prediction mode parameter indicates that the GPM or the AWP is used to determine the inter prediction value of the current block, the current block can be divided into a first partition and a second partition, and the motion information of the current block can include first information corresponding to the first partition and second information corresponding to the second partition. The first information includes the motion vector and the reference frame information corresponding to the first partition, and the second information includes the motion vector and the reference frame information corresponding to the second partition.
[0326] Further, in the embodiments of the present application, when the encoder performs the construction of the motion information candidate list based on the duplication detection result, if the duplication detection result is that the related motion information to be filled in does not coincide with the motion information in the motion information candidate list, the encoder can fill the related motion information to be filled in into the motion information candidate list; if the duplication detection result is that the related motion information to be filled in coincides with the motion information in the motion information candidate list, the encoder can ignore the related motion information to be filled in.
[0327] As can be seen, for the preset duplication detection strategy proposed in the embodiments of the present application, the first level strategy has the strictest duplication detection and the best compression performance, but the complexity is relatively high because the reference block needs to be taken out to determine whether the motion information is the same. The duplication detection operation is usually performed multiple times, for example, when a new motion information candidate wants to be added to the motion information candidate list, the duplication detection (comparison of whether the same) needs to be performed with each motion information in the motion information candidate list, so that the reference block needs to be taken out from the memory multiple times in the scene where a new motion information candidate wants to be added to the motion information candidate list, and the implementation complexity is obviously increased compared with the third level strategy. Therefore, the first level strategy is suitable for the application scenario where the compression performance requirement is very high, but the coding and decoding complexity requirement is not very strict.
[0328] The difference between the second level strategy and the third level strategy is that the third level strategy directly judges whether the reference frame list and the reference frame index are the same, while the second level strategy judges whether the reference frame (such as the POC or the DOI of the reference frame, or the unique identifier of the reference frame) is the same. Taking the POC as an example, the complexity of the second level strategy relative to the third level strategy is that the POC of the reference frame is obtained according to the reference frame list and the reference frame index, that is, the POC of the reference frame at the position of the reference frame index in the reference frame list. Because there is a case where the reference frame list and the reference frame index are different but the POC of the reference frame is the same, the duplication detection effect is obviously improved without obvious increase in complexity. Therefore, the second level strategy is suitable for the application scenario where the decoding complexity requirement is relatively strict.
[0329] It is understood that in the embodiments of this application, the decoder can be pre-set to use different preset deduplication strategies for different prediction modes. That is, the preset deduplication strategies used for different prediction modes may be different. For example, if the prediction mode parameter indicates that GPM is used to determine the inter-frame prediction value of the current block, then the second-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list; if the prediction mode parameter indicates that AWP is used to determine the inter-frame prediction value of the current block, then the second-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list; if the prediction mode parameter indicates that other inter-frame prediction modes besides GPM and AWP are used to determine the inter-frame prediction value of the current block, then the third-level strategy in the preset deduplication strategy is used for deduplication detection when constructing the motion information reference list.
[0330] Step 203: Determine the motion information of the current block from the motion information candidate list.
[0331] In the embodiments of this application, after the encoder constructs a candidate list of motion information for the current block according to a preset deduplication strategy, it can determine the motion information from the candidate list of motion information.
[0332] In the embodiments of this application, further, Figure 15 A schematic diagram of the implementation process of the inter-frame prediction method. Figure 16 ,like Figure 2 As shown, after the encoder determines the motion information of the current block from the motion information candidate list, i.e., after step 203, the method for the encoder to perform inter-frame prediction may further include the following steps:
[0333] Step 205: Set the motion information index value corresponding to the current block to the index number value of the motion information in the motion information candidate list.
[0334] In the embodiments of this application, if the preset inter-frame prediction mode is GPM or AWP, then after the encoder determines the prediction mode parameters, if the prediction mode parameters indicate that the current block uses the preset inter-frame prediction mode to determine the inter-frame prediction value of the current block, the encoder can first select the mode type in the prediction mode, and then determine the first partition and the second partition corresponding to the current block according to the mode type.
[0335] For example, in this application, after the encoder determines whether the current block uses GPM or AWP for inter-frame prediction based on the prediction mode parameters, it can further determine the specific mode type used by the current block, such as one of the 64 modes of GPM or one of the 56 modes of AWP. Thus, the first and second partitions corresponding to the current block can be determined according to the specific mode type used by the current block.
[0336] It can be understood that in the embodiments of the present application, when the encoder determines the motion information of the current block from the motion information candidate list, the first information corresponding to the first partition can be determined from the motion information candidate list; and the second information corresponding to the second partition can also be determined from the motion information candidate list.
[0337] Further, in the embodiments of the present application, if the preset inter prediction mode is GPM or AWP, after the encoder determines the motion information of the current block from the motion information candidate list, the first index value can be set as the index sequence value of the first information in the motion information candidate list, and the second index value can be set as the index sequence value of the second information in the motion information candidate list; wherein the first index value and the second index value constitute the motion information index value of the current block.
[0338] That is, the motion information index value of the current block can include the first reference frame index corresponding to the first information and the second reference frame index corresponding to the second information.
[0339] It should be noted that in the embodiments of the present application, the encoder can write the mode type and the motion information index value of the current block into the bitstream, so as to be transmitted to the decoding side. Further, not only can the decoder determine whether the current block uses GPM or AWP for inter prediction by analyzing the obtained prediction mode parameters after analyzing the bitstream, but also can determine the specific mode used by the current block, such as one of the 64 modes of GPM or one of the 56 modes of AWP, after determining that GPM or AWP is used for inter prediction by analyzing the mode type obtained by analyzing the bitstream; and the decoder can also obtain the index values of the two single-direction motion information, i.e. the first index value corresponding to the first partition and the second index value corresponding to the second partition, by analyzing the bitstream.
[0340] Further, in the embodiments of the present application, the preset inter prediction mode can include GPM or AWP, and the encoder can determine the first partition and the second partition corresponding to the current block based on the mode type; accordingly, the motion information index value corresponding to the current block can also include the first index value corresponding to the first information and the second index value corresponding to the second information; accordingly, the motion information corresponding to the current block can also include the first information corresponding to the first partition and the second information corresponding to the second partition.
[0341] Step 204, determining the inter prediction value of the current block according to the motion information.
[0342] In the embodiments of the present application, after the encoder determines the motion information from the motion information candidate list, the encoder can further obtain the inter prediction value of the current block according to the motion information to complete the inter prediction of the current block.
[0343] It should be noted that in the embodiments of the present application, the encoder can determine the reference block corresponding to the current block according to the motion information after determining the motion information of the current block; and then determine the inter prediction value based on the mode type and the reference block.
[0344] It can be understood that in the embodiments of the present application, the encoder can determine the motion information corresponding to the current block from the motion information candidate list, and then determine the reference block corresponding to the current block by using the motion information, and finally obtain the inter prediction value of the current block by performing inter prediction based on the reference block.
[0345] Further, in the embodiments of the present application, for GPM or AWP, the encoder can calculate the first prediction value of the first partition based on the first information and calculate the second prediction value of the second partition by 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; and then determine the inter prediction value of the current block based on the first prediction value and the second prediction value.
[0346] It should be noted that in the embodiments of the present application, the encoder can determine the first weight of the first partition and the second weight of the second partition according to the mode type when determining the inter prediction value of the current block according to the first prediction value and the second prediction value; and then perform weighted fusion processing on the first prediction value and the second prediction value according to the first weight and the second weight, and finally obtain the inter prediction value.
[0347] That is, in the present application, the encoder can find two reference blocks by using the two single-direction motion information after finding the two motion information, i.e., the first information and the second information, of the current block from the constructed motion information candidate list, and determine the weight of each pixel position of the two reference blocks according to the specific mode used by GPM or AWP, i.e., the parsed mode type, and finally obtain the prediction block, i.e., the inter prediction value, of the current block by weighted fusion of the two reference blocks based on the first weight and the second weight.
[0348] It should be noted that in the present application, if the current mode is a skip mode, the prediction block is the coding block, and the coding of the current block ends. If the current mode is not a skip mode, the quantization coefficients are entropy coded, then dequantized and inverse transformed to obtain a residual block, and the residual block is added to the prediction block to obtain the coding block, and the coding of the current block ends.
[0349] It should be noted that in the embodiments of the present application, the motion information candidate list of the embodiments of the present application generally refers to a single-direction motion information candidate list, but the construction mode of the single-direction motion information of the embodiments of the present application can be extended to the construction of bidirectional motion information, so that the construction of the single-direction motion information candidate list can also be extended to the construction of the bidirectional motion information candidate list.
[0350] In summary, the inter prediction method provided in the application can detect the motion information according to the preset duplicate detection strategy when constructing the motion information candidate list, and use a more rigorous duplicate detection standard, so that the duplicate detection effect is obviously improved without obvious increase in complexity. In the case where the reference frame list, the reference frame index is different but the reference frame is the same, the motion information under the new definition can be excluded, so that the different motion information in the motion information candidate list is increased, the index of the effective motion information is advanced, and the coding performance is improved.
[0351] The embodiment provides an inter prediction method. An encoder determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, a motion information candidate list of the current block is constructed according to a preset duplicate detection strategy; wherein the preset duplicate detection strategy is used for duplicate removal processing; motion information of the current block is determined from the motion information candidate list; and the inter prediction value of the current block is determined according to the motion information. That is, the inter prediction method provided in the application can perform more rigorous duplicate removal processing according to the preset duplicate detection strategy when constructing the motion information candidate list, solves the problem of repeated options in the motion information candidate list, obviously improves the duplicate detection effect, and improves the coding efficiency.
[0352] Based on the above embodiment, in another embodiment of the application, Figure 16 The composition structure of the decoder is shown in Figure 17 As shown in Figure 1 The decoder 300 provided in the embodiment of the application can include a parsing part 301, a first construction part 302 and a first determination part 303; wherein,
[0353] The parsing part 301 is configured to parse a code stream and acquire a prediction mode parameter of a current block;
[0354] The first construction part 302 is configured to construct a motion information candidate list of the current block according to a preset duplicate detection strategy when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block;
[0355] The first determination 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 determine the inter prediction value of the current block according to the motion information.
[0356] Figure 17 The composition structure of the decoder is shown in Figure 18 As shown in Figure 2As shown, the decoder 300 proposed in the embodiments of the present application can further include a first processor 304, a first memory 305 storing executable instructions 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.
[0357] Further, in the embodiments of the present application, the first processor 304 is configured to parse a bitstream, acquire a prediction mode parameter of a current block, construct a motion information candidate list of the current block according to a preset duplicate checking strategy when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, wherein the preset duplicate checking strategy is used for duplicate removal processing, determine motion information from the motion information candidate list according to a motion information index value corresponding to the current block, and determine the inter prediction value of the current block according to the motion information.
[0358] The integrated unit, if implemented in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments can essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiments. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0359] The embodiments of the present application provide a decoder. The decoder parses a bitstream, acquires a prediction mode parameter of a current block, constructs a motion information candidate list of the current block according to a preset duplicate checking strategy when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, wherein the preset duplicate checking strategy is used for duplicate removal processing, determines motion information from the motion information candidate list according to a motion information index value corresponding to the current block, and determines the inter prediction value of the current block according to the motion information. That is, the inter prediction method proposed in the present application can perform more rigorous duplicate removal processing according to the preset duplicate checking strategy when constructing the motion information candidate list, solves the problem of repeated options in the motion information candidate list, obviously improves the duplicate checking effect, and thus improves the coding efficiency.
[0360] Figure 18 Structure of the encoderFigure 1 As shown in Figure 1 The encoder 400 proposed in the embodiments of the present application can include a second determining part 401, a second constructing part 402, and a setting part 403; wherein,
[0361] The second determining part 401 is configured to determine a prediction mode parameter of a current block.
[0362] The second constructing part 402 is configured to, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, construct a motion information candidate list of the current block according to a preset duplicate checking strategy.
[0363] The second determining part 401 is further configured to determine motion information of the current block from the motion information candidate list, and determine the inter-frame prediction value of the current block according to the motion information.
[0364] Figure 1 The encoder is composed of a structure diagram Figure 1 As shown in Figure 1 The encoder 400 proposed in the embodiments of the present application can further include a second processor 404, a second memory 405 storing executable instructions 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.
[0365] Further, in the embodiments of the present application, the second processor 404 is configured to determine a prediction mode parameter of a current block, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, construct a motion information candidate list of the current block according to a preset duplicate checking strategy, wherein the preset duplicate checking strategy is used for duplicate removal processing, determine motion information of the current block from the motion information candidate list, and determine the inter-frame prediction value of the current block according to the motion information.
[0366] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium based on such understanding. The technical solutions of the embodiments essentially or the parts that contribute to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the embodiments. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0367] The embodiment of the present application provides an encoder, which determines a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, a motion information candidate list of the current block is constructed according to a preset duplicate checking strategy; wherein the preset duplicate checking strategy is used for duplicate removal processing; motion information of the current block is determined from the motion information candidate list; and the inter prediction value of the current block is determined according to the motion information. That is, the inter prediction method provided by the present application can perform more rigorous duplicate removal processing according to the preset duplicate checking strategy when constructing the motion information candidate list, solves the problem of repeated options in the motion information candidate list, obviously improves the duplicate checking effect, and improves the coding and decoding efficiency.
[0368] The embodiment of the present application provides a computer readable storage medium and a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the method described in the above embodiment.
[0369] Specifically, the program instructions corresponding to the inter prediction method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the inter prediction method in the storage medium are read by an electronic device or executed, the following steps are included:
[0370] parsing a code stream to obtain a prediction mode parameter of a current block;
[0371] when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, a motion information candidate list of the current block is constructed according to a preset duplicate checking strategy; wherein the preset duplicate checking strategy is used for duplicate removal processing;
[0372] determining motion information of the current block from the motion information candidate list according to an index value of the motion information corresponding to the current block;
[0373] determining the inter prediction value of the current block according to the motion information.
[0374] In particular, the program instructions corresponding to the inter prediction method in the embodiment can be stored on a storage medium such as an optical disc, a hard disk, a U disk, etc. When the program instructions corresponding to the inter prediction method in the embodiment are read by an electronic device or executed, the following steps are included:
[0375] determining a prediction mode parameter of the current block;
[0376] when the prediction mode parameter indicates that the inter prediction value of the current block is determined using a preset inter prediction mode, constructing a motion information candidate list of the current block according to a preset duplicate checking strategy; wherein the preset duplicate checking strategy is used for duplicate removal processing;
[0377] determining motion information of the current block from the motion information candidate list;
[0378] determining the inter prediction value of the current block according to the motion information.
[0379] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer usable program code.
[0380] The present application is described with reference to the implementation flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram and the combination of the flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowchart and / or block diagram. Figure 1 The device that implements the functions specified in one or more flows and / or blocks The device that implements the functions specified in one or more flows and / or blocks
[0381] These computer program instructions can 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 instructions which implement the function specified in the flowchart or flowsheet and / or block of the block or blocks.
[0382] The computer program instructions can 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 that are executed on the computer or other programmable apparatus provide steps for implementing the function specified in the flowchart or flowsheet and / or block of the block or blocks.
[0383] The methods disclosed in several method embodiments of the present application can be combined arbitrarily without conflict, to obtain new method embodiments.
[0384] The features disclosed in several product embodiments of the present application can be combined arbitrarily without conflict, to obtain new product embodiments.
[0385] The features disclosed in several method or device embodiments of the present application can be combined arbitrarily without conflict, to obtain new method embodiments or device embodiments.
[0386] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An inter prediction method, characterized by, The method is applied to a decoder and comprises the following steps: parsing a code stream to obtain a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy; determining motion information from the motion information candidate list according to a motion information index value corresponding to the current block; determining the inter-frame prediction value of the current block according to the motion information; determining first reference frame information and a first motion vector included in related motion information to be filled in; 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 motion information in the motion information candidate list; wherein the second reference frame information comprises a second reference frame list and a second reference frame index; determining a first reference frame from the first reference frame list according to the first reference frame index, and obtaining a first identifier of the first reference frame; wherein the first identifier is a decoding order index DOI of the first reference frame; determining a second reference frame from the second reference frame list according to the second reference frame index, and obtaining a second identifier of the second reference frame; wherein the second identifier is a DOI of the second reference frame; if the first identifier and the second identifier are different, determining that a duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are different; wherein the preset inter-frame prediction mode comprises an angular weighted prediction mode (AWP), and the method further comprises the following steps: parsing the code stream to obtain a mode type; determining a first partition and a second partition of the current block based on the mode type; the motion information comprises first information corresponding to the first partition and second information corresponding to the second partition; and the motion information index value comprises a first index value corresponding to the first information and a second index value corresponding to the second information; the determination of the inter-frame prediction value of the current block according to the motion information comprises the following steps: 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 a first weight of the first partition and a second weight of the second partition according to the mode type; performing weighted fusion processing on the first prediction value and the second prediction value according to the first weight and the second weight to obtain the inter-frame prediction value.
2. The method of claim 1, wherein, when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy, comprises the following steps: determining related motion information of the current block; in the process of sequentially filling the related motion information into the motion information candidate list, performing duplicate detection on the related motion information to be filled in and motion information in the motion information candidate list based on the preset duplicate detection strategy to obtain a duplicate detection result; performing construction of the motion information candidate list based on the duplicate detection result.
3. The method of claim 2, wherein, The related motion information includes spatial motion information, and / or time domain motion information, and / or motion information based on historical information.
4. The method of claim 3, wherein, The preset duplicate detection strategy includes a first level strategy, a second level strategy, and a third level strategy.
5. The method of claim 4, wherein, The method further includes: According to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector, determining the duplicate detection result.
6. The method of claim 5, wherein, If the preset duplicate detection strategy is the first level strategy, the determining of the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector includes: 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 and the pixel information of the second reference block are the same, determining that the duplicate detection result is that the related motion information to be filled in 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, determining that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
7. The method of claim 5, wherein, If the preset duplicate detection strategy is the second level strategy, the determining of the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector includes: if the first identifier and the second identifier are the same, and the first motion vector and the second motion vector are the same, determining that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; if the first motion vector and the second motion vector are not the same, determining that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
8. The method of claim 5, wherein, If the preset duplicate detection strategy is the third level strategy, the determining of the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector includes: if the first reference frame information and the second reference frame information are the same, and the first motion vector and the second motion vector are the same, determining that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; if the first reference frame information and the second reference frame information are not the same, or the first motion vector and the second motion vector are not the same, determining that the duplicate detection result is that the related motion information to be filled in is not the same as the motion information in the motion information candidate list.
9. The method of claim 4, wherein, If the preset inter-frame prediction mode uses bidirectional motion information, the motion information to be filled in and the motion information in the motion information candidate list are detected for duplication according to the preset duplication detection strategy, and a duplication detection result is obtained, comprising: determining first and second sub-information included in the motion information to be filled in; wherein the first sub-information includes third reference frame information and a third motion vector, the third reference frame information includes a third reference frame list and a third reference frame index, and the second sub-information includes fourth reference frame information and a fourth motion vector, the fourth reference frame information includes a fourth reference frame list and a fourth reference frame index; determining third and fourth sub-information included in the motion information in the motion information candidate list; wherein the third sub-information includes fifth reference frame information and a fifth motion vector, the fifth reference frame information includes a fifth reference frame list and a fifth reference frame index, and the fourth sub-information includes sixth reference frame information and a sixth motion vector, the sixth reference frame information includes a sixth reference frame list and a sixth reference frame index; determining the duplication detection result according to the first, second, third and fourth sub-information.
10. The method of claim 9, wherein, If the preset duplication detection strategy is the first level strategy, the duplication detection result is determined according to the first, second, third and fourth sub-information, comprising: determining a third reference block according to the first sub-information and a fourth reference block according to the second sub-information; determining a fifth reference block according to the third sub-information and 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, it is determined that the duplication detection result is that the motion information to be filled in and the motion information in the motion information candidate list are the same; 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, it is determined that the duplication detection result is that the motion information to be filled in and the motion information in the motion information candidate list are the same; otherwise, it is determined that the duplication detection result is that the motion information to be filled in and the motion information in the motion information candidate list are not the same.
11. The method of claim 10, wherein, determining a third reference block according to the first sub-information and a fourth reference block according to the second sub-information, comprising: 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 a sixth reference block according to the fourth sub-information, comprising: 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 of claim 9, wherein, If the preset duplicate detection strategy is the second level strategy, the determining the duplicate 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 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; 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 same as the third information combination, and the second information combination is same as the fourth information combination, determining that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; if the first information combination is same as the fourth information combination, and the second information combination is same as the third information combination, determining that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; otherwise, determining that the duplicate detection result is that the related motion information to be filled in is not same as the motion information in the motion information candidate list.
14. The method of claim 13, wherein, The determining the first information combination of the related information to be filled in according to the first sub-information, and the determining the 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; 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, The determining the third information combination of the motion information in the list according to the third sub-information, and the determining the 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 identifier of the sixth reference frame and the sixth motion vector.
16. The method of claim 9, wherein, If the preset duplicate detection strategy is the third level strategy, the determining the duplicate 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, it is determined that the duplicate detection result is that the related motion information to be filled in 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, it is determined that the duplicate detection result is that the related motion information to be filled in is the same as the motion information in the motion information candidate list; otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in is different from the motion information in the motion information candidate list.
17. The method of claim 1, wherein, The method further comprises: parsing the code stream to obtain the motion information index value.
18. The method of claim 17, wherein, The determining of the motion information from the motion information candidate list according to the motion information index value corresponding to the current block comprises: determining the motion information indicated by the first index value in the motion information candidate list as the first information of the first partition; determining the motion information indicated by the second index value in the motion information candidate list as the second information of the second partition.
19. The method of claim 18, wherein, The determining of the inter prediction value of the current block according to the motion information comprises: calculating a first prediction value of the first partition based on the first information, and calculating a second prediction value of the second partition based on the second information; determining the inter prediction value of the current block based on the first prediction value and the second prediction value.
20. A method of inter prediction, the method comprising: The method applied to an encoder comprises: determining a prediction mode parameter of a current block; when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy; determining motion information of the current block from the motion information candidate list; determining an inter prediction value of the current block according to the motion information; determining first reference frame information and a first motion vector included in related motion information to be filled in; 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 motion information in the motion information candidate list; wherein the second reference frame information comprises a second reference frame list and a second reference frame index; determining a first reference frame from the first reference frame list according to the first reference frame index, and obtaining a first identifier of the first reference frame; wherein the first identifier is a DOI of the first reference frame; determining a second reference frame from the second reference frame list according to the second reference frame index, and obtaining a second identifier of the second reference frame; wherein the second identifier is a DOI of the second reference frame; if the first identifier and the second identifier are different, it is determined that the duplicate detection result is that the related motion information to be filled in is different from the motion information in the motion information candidate list. The preset inter prediction mode comprises AWP, and the method further comprises: determining a mode type; determining a first partition and a second partition of the current block based on the mode type; the motion information comprises: first information corresponding to the first partition, and second information corresponding to the second partition; and the motion information index value comprises: a first index value corresponding to the first information, and a second index value corresponding to the second information; 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 a first weight of the first partition and a second weight of the second partition according to the mode type; performing weighted fusion processing on the first prediction value and the second prediction value according to the first weight and the second weight, to obtain the inter prediction value.
21. The method of claim 20, wherein, the determining the prediction mode parameter of the current block comprises: performing pre-encoding processing on the current block by using multiple prediction modes, to obtain a rate-distortion cost value corresponding to each prediction mode; selecting a minimum rate-distortion cost value from the obtained multiple rate-distortion cost values, and determining the prediction mode parameter of the current block according to a prediction mode corresponding to the minimum rate-distortion cost value.
22. The method of claim 20, wherein, when the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, constructing a motion information candidate list of the current block according to a preset duplicate detection strategy, comprises: determining related motion information of the current block; in the process of sequentially filling the related motion information into the motion information candidate list, performing duplicate detection on the related motion information to be filled and motion information in the motion information candidate list based on the preset duplicate detection strategy, to obtain a duplicate detection result; performing the construction of the motion information candidate list based on the duplicate detection result.
23. The method of claim 22, wherein, the related motion information comprises: spatial domain motion information, and / or time domain motion information, and / or motion information based on historical information.
24. The method of claim 23, wherein, the preset duplicate detection strategy comprises a first level strategy, a second level strategy, and a third level strategy.
25. The method of claim 24, wherein, the method further comprises: determining the duplicate detection result according to the first reference frame information, the first motion vector, the second reference frame information, and the second motion vector.
26. The method of claim 25, wherein, if the preset duplicate detection strategy is the first level strategy, the determining the duplicate 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 pixel information of the first reference block and pixel information of the second reference block are the same, determining that the duplicate detection result is that the related motion information to be filled and the motion information in the motion information candidate list are the same. If the pixel information of the first reference block and the pixel information of the second reference block are not identical, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not identical.
27. The method of claim 25, wherein, If the preset duplicate detection strategy is the second level strategy, the duplicate detection result is determined according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, including: If the first identifier and the second identifier are identical, and the first motion vector and the second motion vector are identical, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are identical. If the first motion vector and the second motion vector are not identical, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not identical.
28. The method of claim 25, wherein, If the preset duplicate detection strategy is the third level strategy, the duplicate detection result is determined according to the first reference frame information, the first motion vector, the second reference frame information and the second motion vector, including: If the first reference frame information and the second reference frame information are identical, and the first motion vector and the second motion vector are identical, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are identical. If the first reference frame information and the second reference frame information are not identical, or the first motion vector and the second motion vector are not identical, it is determined that the duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not identical.
29. The method of claim 24, wherein, If the preset inter-frame prediction mode uses bidirectional motion information, the duplicate detection of the related motion information to be filled in and the motion information in the motion information candidate list is performed based on the preset duplicate detection strategy to obtain a duplicate detection result, including: determining first sub-information and second sub-information included in the related motion information to be filled in; wherein the first sub-information includes third reference frame information and a third motion vector, the third reference frame information includes a third reference frame list and a third reference frame index, and the second sub-information includes fourth reference frame information and a fourth motion vector, the fourth reference frame information includes a fourth reference frame list and a fourth reference frame index; determining third sub-information and fourth sub-information included in the motion information in the motion information candidate list; wherein the third sub-information includes fifth reference frame information and a fifth motion vector, the fifth reference frame information includes a fifth reference frame list and a fifth reference frame index, and the fourth sub-information includes sixth reference frame information and a sixth motion vector, the sixth reference frame information includes a sixth reference frame list and a sixth reference frame index; determining the duplicate detection result according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information.
30. The method of claim 29, wherein, If the preset duplicate detection strategy is the first level strategy, the determining the duplicate 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 same as the pixel information of the fifth reference block, and the pixel information of the fourth reference block is same as the pixel information of the sixth reference block, determining that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; if the pixel information of the third reference block is same as the pixel information of the sixth reference block, and the pixel information of the fourth reference block is same as the pixel information of the fifth reference block, determining that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; otherwise, determining that the duplicate detection result is that the related motion information to be filled in is not same as the motion information in the motion information candidate list.
31. The method of claim 30, wherein, The determining the third reference block according to the first sub-information, and the determining the 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 the 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 the fourth reference block in the fourth reference frame according to the fourth motion vector.
32. The method of claim 30, wherein, The determining the fifth reference block according to the third sub-information, and the determining the 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 the 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 the sixth reference block in the sixth reference frame according to the sixth motion vector.
33. The method of claim 29, wherein, If the preset duplicate detection strategy is the second level strategy, the determining the duplicate 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 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; 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 same as the third information combination, and the second information combination is same as the fourth information combination, determining that the duplicate detection result is that the related motion information to be filled in is same as the motion information in the motion information candidate list; If the first information combination is identical to the fourth information combination, and the second information combination is identical to the third information combination, it is determined that the duplicate detection result is that the related motion information to be filled in is identical to the motion information in the motion information candidate list. Otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in is not identical to the motion information in the motion information candidate list.
34. The method of claim 33, wherein, The first information combination of the related information to be filled in is determined according to the first sub-information, and the second information combination of the related information to be filled in is determined according to the second sub-information, including: A third reference frame is determined from the third reference frame list according to the third reference frame index, and the first information combination is constructed according to a third identifier of the third reference frame and the third motion vector; A fourth reference frame is determined from the fourth reference frame list according to the fourth reference frame index, and the second information combination is constructed according to a fourth identifier of the fourth reference frame and the fourth motion vector.
35. The method of claim 33, wherein, The third information combination of the motion information in the list is determined according to the third sub-information, and the fourth information combination of the motion information in the list is determined according to the fourth sub-information, including: A fifth reference frame is determined from the fifth reference frame list according to the fifth reference frame index, and the third information combination is constructed according to a fifth identifier of the fifth reference frame and the fifth motion vector; A sixth reference frame is determined from the sixth reference frame list according to the sixth reference frame index, and the fourth information combination is constructed according to a sixth identifier of the sixth reference frame and the sixth motion vector.
36. The method of claim 29, wherein, If the preset duplicate detection strategy is the third level strategy, the duplicate detection result is determined according to the first sub-information, the second sub-information, the third sub-information and the fourth sub-information, including: If the first sub-information is identical to the third sub-information, and the second sub-information is identical to the fourth sub-information, it is determined that the duplicate detection result is that the related motion information to be filled in is identical to the motion information in the motion information candidate list; If the first sub-information is identical to the fourth sub-information, and the second sub-information is identical to the third sub-information, it is determined that the duplicate detection result is that the related motion information to be filled in is identical to the motion information in the motion information candidate list; Otherwise, it is determined that the duplicate detection result is that the related motion information to be filled in is not identical to the motion information in the motion information candidate list.
37. The method of claim 20, wherein, After the motion information of the current block is determined from the motion information candidate list, the method further includes: The motion information index value corresponding to the current block is set as the index sequence number value of the motion information in the motion information candidate list.
38. The method of claim 20, wherein: The motion information of the current block is determined from the motion information candidate list, including: First information corresponding to the first partition is determined from the motion information candidate list; Second information corresponding to the second partition is determined from the motion information candidate list.
39. The method of claim 38, wherein, After the motion information of the current block is determined from the motion information candidate list, the method further includes: set a first index value as an index sequence value of the first information in the motion information candidate list; set a second index value as an index sequence 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.
40. The method of claim 39, wherein, determining the inter prediction value of the current block according to the motion information, comprises: calculating a first prediction value of the first partition based on the first information, and calculating a second prediction value of the second partition based on the second information; determining the inter prediction value of the current block based on the first prediction value and the second prediction value.
41. The method of any one of claims 20 to 40, wherein, The method further comprises: writing the prediction mode parameter, the motion information index value and the mode type into a bitstream.
42. A decoder, comprising: The decoder comprises a parsing part, a first constructing part and a first determining part; wherein, the parsing part is configured to parse a bitstream to obtain a prediction mode parameter of a current block; the first constructing part is configured to construct a motion information candidate list of the current block according to a preset duplicate detection strategy when the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block; 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 determine the inter prediction value of the current block according to the motion information; the first constructing part is specifically configured to determine first reference frame information and a first motion vector included in related motion information to be filled in; wherein the first reference frame information comprises a first reference frame list and a first reference frame index; determine second reference frame information and a second motion vector included in motion information in the motion information candidate list; wherein the second reference frame information comprises a second reference frame list and a second reference frame index; 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; wherein the first identifier is a DOI of the first reference frame; determine a second reference frame from the second reference frame list according to the second reference frame index, and obtain a second identifier of the second reference frame; wherein the second identifier is a DOI of the second reference frame; if the first identifier and the second identifier are not the same, determine that a duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are not the same; wherein the preset inter prediction mode comprises AWP, the parsing part is configured to parse a bitstream to obtain a mode type; the first determining part is configured to determine a first partition and a second partition of the current block based on the mode type; the motion information comprises first information corresponding to the first partition and second information corresponding to the second partition; and the motion information index value comprises a first index value corresponding to the first information and a second index value corresponding to the second information. The first determining part is configured to calculate a first prediction value of the first partition by using the first information, calculate a second prediction value of the second partition by using the second information, determine a first weight of the first partition and a second weight of the second partition according to the mode type, and perform weighted fusion processing on the first prediction value and the second prediction value according to the first weight and the second weight to obtain the inter-frame prediction value.
43. A decoder, comprising: The decoder comprises a first processor and a first memory storing instructions executable by the first processor, and when the instructions are executed, the first processor performs the method of any one of claims 1-19.
44. An encoder comprising: The encoder comprises a second determining part and a second constructing part, wherein The second determining part is configured to determine a prediction mode parameter of a current block. The second constructing part is configured to construct a motion information candidate list of the current block according to a preset duplicate detection strategy when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-frame prediction value of the current block. The second determining part is further configured to determine motion information of the current block from the motion information candidate list and determine the inter-frame prediction value of the current block according to the motion information. The second constructing part is specifically configured to determine first reference frame information and a first motion vector included in related motion information to be filled in, wherein the first reference frame information comprises a first reference frame list and a first reference frame index; determine second reference frame information and a second motion vector included in motion information in the motion information candidate list, wherein the second reference frame information comprises a second reference frame list and a second reference frame index; 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, wherein the first identifier is a DOI of the first reference frame; determine a second reference frame from the second reference frame list according to the second reference frame index and obtain a second identifier of the second reference frame, wherein the second identifier is a DOI of the second reference frame; and if the first identifier and the second identifier are different, determine that a duplicate detection result is that the related motion information to be filled in and the motion information in the motion information candidate list are different. The preset inter-frame prediction mode comprises AWP, The second determining part is configured to determine a mode type and determine a first partition and a second partition of the current block based on the mode type. The motion information comprises first information corresponding to the first partition and second information corresponding to the second partition, and the motion information index value comprises a first index value corresponding to the first information and a second index value corresponding to the second information. The second determining part is configured to calculate a first prediction value of the first partition by using the first information, calculate a second prediction value of the second partition by using the second information, determine a first weight of the first partition and a second weight of the second partition according to the mode type, and perform a weighted fusion process on the first prediction value and the second prediction value according to the first weight and the second weight to obtain the inter-frame prediction value.
45. An encoder comprising: The encoder comprises a second processor and a second memory storing instructions executable by the second processor, wherein the second processor, when executing the instructions, implements the method of any one of claims 20-41.
46. A computer storage medium, comprising, The computer storage medium stores a computer program, wherein the computer program, when executed by the first processor, implements the method of any one of claims 1-19, or when executed by the second processor, implements the method of any one of claims 20-41.
Citation Information
Patent Citations
Method and apparatus for candidate list pruning
CN110870313A