WO2021244125A1 - 帧间预测方法、解码器、编码器及计算机存储介质 - Google Patents

帧间预测方法、解码器、编码器及计算机存储介质 Download PDF

Info

Publication number
WO2021244125A1
WO2021244125A1 PCT/CN2021/085454 CN2021085454W WO2021244125A1 WO 2021244125 A1 WO2021244125 A1 WO 2021244125A1 CN 2021085454 W CN2021085454 W CN 2021085454W WO 2021244125 A1 WO2021244125 A1 WO 2021244125A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion information
information
motion
axis component
original
Prior art date
Application number
PCT/CN2021/085454
Other languages
English (en)
French (fr)
Inventor
杨宁
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202180008731.9A priority Critical patent/CN114930839A/zh
Priority to CN202310111464.9A priority patent/CN116193139A/zh
Priority to MX2022010726A priority patent/MX2022010726A/es
Publication of WO2021244125A1 publication Critical patent/WO2021244125A1/zh

Links

Images

Classifications

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

Definitions

  • the embodiments of the present application relate to, but are not limited to, the technical field of video coding and decoding, and in particular to an inter-frame prediction method, a decoder, an encoder, and a computer storage medium.
  • the embodiments of the present application provide an inter-frame prediction method, a decoder, an encoder, and a computer storage medium.
  • an inter-frame prediction method which is applied to a decoder, and the method includes: parsing a code stream to obtain a weight derivation mode of a current block; and constructing a new motion information candidate based on the weight derivation mode of the current block List; based on the new motion information candidate list, determine the inter prediction value of the current block.
  • an inter-frame prediction method which is applied to an encoder, and the method includes: determining a weight derivation mode of a current block;
  • an inter-frame prediction method which is applied to a decoder, and the method includes: parsing a code stream to obtain motion vector information of original motion information related to the current block; and based on the motion vector information of the original motion information As a result of scaling, determine the motion vector information of the M derived motion information; M is an integer greater than or equal to 1; construct a new motion based on the motion vector information of the original motion information and the motion vector information of the derived motion information Information candidate list; based on the new motion information candidate list, determine the inter prediction value of the current block.
  • a decoder including: an acquisition unit, configured to parse a code stream, and acquire a weight derivation mode of the current block; a construction unit, configured to construct a new motion information candidate based on the weight derivation mode of the current block List; prediction unit, used to determine the inter prediction value of the current block based on the new motion information candidate list.
  • an encoder including: a mode determining unit, configured to determine a weight derivation mode of a current block; a construction unit, configured to derive a mode based on the weight of the current block to construct a new motion information candidate list; prediction The unit is configured to determine the inter prediction value of the current block based on the new motion information candidate list.
  • a decoder including: an acquisition unit, configured to parse a code stream, and acquire a weight derivation mode of the current block; and a derived motion information determination unit, configured to scale based on the motion vector information of the original motion information As a result, determine the motion vector information of M derived motion information; M is an integer greater than or equal to 1; the construction unit is used to construct based on the motion vector information of the original motion information and the motion vector information of the derived motion information A new motion information candidate list; a prediction unit, configured to determine the inter-frame prediction value of the current block based on the new motion information candidate list.
  • an encoder including: an original motion information determining unit, configured to determine the motion vector information of the original motion information related to the current block; and a derived motion information determining unit, configured based on the motion of the original motion information
  • M is an integer greater than or equal to 1
  • the construction unit is used for the motion vector information based on the original motion information and the motion of the derived motion information
  • the vector information is used to construct a new motion information candidate list
  • the prediction unit is used to determine the inter prediction value of the current block based on the new motion information candidate list.
  • a decoder including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the steps in the above method when the program is executed.
  • an encoder In a tenth aspect, an encoder, a memory, and a processor are provided, and the memory stores a computer program that can run on the processor,
  • a computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the foregoing method.
  • the decoder parses the code stream to obtain the weight derivation mode of the current block; constructs a new motion information candidate list based on the weight derivation mode of the current block; determines all the motion information candidates based on the new motion information candidate list.
  • the inter prediction value of the current block since the new motion information candidate list constructed by the decoder is based on the weight derivation mode of the current block, the decoder can construct different new motion information candidate lists according to different weight derivation modes, so that the motion information The construction of the candidate list conforms to the weight derivation mode of the current block, thereby improving the decoding efficiency of the decoder.
  • FIG. 1 is a schematic diagram of a composition block diagram of a video encoding system provided by an embodiment of the application;
  • FIG. 3 is a schematic diagram of the structure of a typical image group provided by an embodiment of the application.
  • 4a is a schematic diagram of weight distribution of multiple division modes of GPM on a 64 ⁇ 64 current block provided by an embodiment of the application;
  • 4b is a schematic diagram of weight distribution of multiple division modes of AWP on a 64 ⁇ 64 current block provided by an embodiment of the application;
  • 4c is a schematic diagram of weight distribution of multiple division modes of AWP on a 64 ⁇ 32 current block according to an embodiment of the application;
  • FIG. 6 is a schematic diagram of another spatial position relationship between a current block and neighboring blocks provided by an embodiment of this application.
  • FIG. 7 is a schematic flowchart of an inter-frame prediction method provided by an embodiment of this application.
  • FIG. 8 is a schematic diagram of another spatial position relationship between a current block and neighboring blocks provided by an embodiment of this application.
  • FIG. 10 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of this application.
  • FIG. 13 is a schematic flowchart of an inter-frame prediction method provided by another embodiment of this application.
  • FIG. 14 is a schematic flowchart of an inter-frame prediction method provided by another embodiment of this application.
  • FIG. 16 is a schematic diagram of the composition structure of a decoder provided by an embodiment of the application.
  • FIG. 17 is a schematic diagram of the composition structure of an encoder provided by an embodiment of the application.
  • FIG. 18 is a schematic diagram of the composition structure of another decoder provided by an embodiment of this application.
  • FIG. 19 is a schematic diagram of the composition structure of another encoder provided by an embodiment of the application.
  • FIG. 21 is a schematic diagram of the hardware entity of an encoder provided by an embodiment of the application.
  • the first image component, the second image component, and the third image component are generally used to represent the current block (Coding Block, CB); among them, the three image components are a luminance component and a blue chrominance component. And a red chrominance component, specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be in YCbCr format It can also be expressed in YUV format.
  • CB Current Block
  • LCU Large Coding Unit
  • CU rules Coding Unit
  • PU prediction units
  • the hybrid coding framework may include modules such as prediction, transformation (Transform), quantization (Quantization), entropy coding (Entropy Coding), and loop filtering (In Loop Filter); among them, the prediction module may include intra prediction (intra Prediction and inter prediction (inter prediction), inter prediction may include motion estimation (motion estimation) and motion compensation (motion compensation).
  • intra prediction intra Prediction and inter prediction
  • inter prediction may include motion estimation (motion estimation) and motion compensation (motion compensation).
  • motion estimation motion estimation
  • motion compensation motion compensation
  • FIG. 1 is a schematic diagram of the composition of a video encoding system provided by an embodiment of the application.
  • the video encoding system 11 may include: a transformation unit 111, a quantization unit 112, a mode selection and encoding control logic unit 113, An intra prediction unit 114, an inter prediction unit 115 (including motion compensation and motion estimation), an inverse quantization unit 116, an inverse transform unit 117, a loop filter unit 118, an encoding unit 119, and a decoded image buffer unit 110.
  • a video reconstruction block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and the coding mode is determined by the mode selection and coding control logic unit 113, and then the intra-frame or inter-frame prediction
  • the residual pixel information obtained later is transformed by the transform unit 111 and the quantization unit 112 on the video reconstruction block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce Bit rate;
  • the intra prediction unit 114 is used to perform intra prediction on the video reconstruction block; wherein, the intra prediction unit 114 is used to determine the optimal intra prediction mode (that is, the target prediction mode) of the video reconstruction block;
  • inter The prediction unit 115 is configured to perform inter-frame 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; wherein, motion estimation is a process of generating motion vectors, The motion vector can estimate the motion of the video reconstruction block, and then, the motion compensation performs motion compensation
  • the residual block is reconstructed in the domain, the reconstructed residual block is removed by the loop filter unit 118 to remove the block effect artifact, and then the reconstructed residual block is added to a predictive block in the frame of the decoded image buffer unit 110 , Used to generate reconstructed video reconstruction blocks; the encoding unit 119 is used to encode various encoding parameters and quantized transform coefficients.
  • the decoded image buffer unit 110 is used to store the reconstructed video reconstruction block for prediction reference. As the video image encoding progresses, new reconstructed video reconstruction blocks will be continuously generated, and these reconstructed video reconstruction blocks will all be stored in the decoded image buffer unit 110.
  • the inter-frame prediction method provided by the embodiment of the present application mainly acts on the inter-frame prediction unit 115 of the video encoding system 11 and the inter-frame prediction unit of the video decoding system 12, that is, the motion compensation unit 124;
  • the system 11 can obtain a better prediction effect through the inter-frame prediction method provided in the embodiments of the present application.
  • the video decoding system 12 can also improve the video decoding restoration quality.
  • the motion information may include motion vector (Motion Vector, MV) information and reference frame information.
  • MV Motion Vector
  • the current frame in which the current block is located has one or more reference frames, and the current block can be a coding unit or a prediction unit, and a set of motion vectors and reference frames can be used.
  • the motion information of the frame information indicates a pixel area of the same size as the current block in a reference frame, which is referred to as a reference block here.
  • a P frame is a frame that can only be predicted using a reference frame before the current frame in the Picture Order Count (POC).
  • the current reference frame has only one reference frame list, which is represented by RefPicList0; and RefPicList0 is all reference frames with POC before the current frame.
  • B-frame Bi-directional Interpolated Prediction Frame early is a frame that can be predicted using the reference frame of the POC before the current frame and the reference frame of the POC after the current frame.
  • RefPicList0 and RefPicList1 are expressed differently due to different standard versions or different technical materials, so RefPicList0 and RefPicList1 may also have other representations. At least in the embodiments of the present application, RefPicList0, List0, and L0 have the same meaning, and RefPicList1, List1, and L1 have the same meaning.
  • the B-frame can refer to the information before the current frame and the information after the current frame at the same time, which can significantly improve the coding performance.
  • FIG. 3 is a schematic diagram of the structure of a typical group of pictures provided by an embodiment of the application.
  • a classic group of pictures (GOP) structure of RA is shown in FIG. 3, and in FIG. 3 , The arrow indicates the reference relationship. Since the I frame does not require a reference frame, after the I frame with a POC of 0 is decoded, the P frame with a POC of 4 will be decoded, and the POC of 0 can be referred to when decoding a P frame with a POC of 4 I frame. After decoding a P frame with a POC of 4, decode a B frame with a POC of 2.
  • Low Delay configuration is divided into Low Delay P and Low Delay B.
  • Low Delay P is the traditional Low Delay configuration. Its typical structure is IPPP, that is, an I frame is first coded and decoded, and then all frames to be decoded are P frames.
  • the typical structure of Low Delay B is IBBB.
  • the difference from Low Delay P is that each inter frame is a B frame, that is, two reference frame lists are used.
  • the current block can refer to the reference block of a frame in RefPicList0 and RefPicList1 at the same time.
  • a reference frame list of the current frame can have at most several reference frames, such as 2, 3, or 4, etc.
  • the reference frames in RefPicList0 and RefPicList1 are determined by the preset configuration or algorithm, but the same reference frame can appear in RefPicList0 and RefPicList1 at the same time, that is, encoder or decoder
  • the device allows the current block to refer to two reference blocks in the same reference frame at the same time.
  • the encoder or decoder can usually use the index value (indicated by index) in the reference frame list to correspond to the reference frame. If the length of a reference frame list is 4, then index has four values such as 0, 1, 2, and 3. For example, if the RefPicList0 of the current frame has 4 reference frames with POCs of 5, 4, 3, 0, then index 0 of RefPicList0 is the reference frame of POC 5, index 1 of RefPicList0 is the reference frame of POC 4, and index 2 of RefPicList0 It is the reference frame of POC 3, and index 3 of RefPicList0 is the reference frame of POC 0.
  • the preset inter-frame prediction mode may be the GPM prediction mode.
  • the preset inter-frame prediction mode may be the AWP prediction mode.
  • the two prediction modes have different names and different specific implementation forms, they are common in principle, that is, the two prediction modes can be applied to the inter-frame prediction method in the embodiment of the present application.
  • the prediction mode parameters under GPM such as the specific division mode of GPM, will be transmitted in the code stream; in general, GPM includes 64 division modes.
  • the prediction mode parameters under the AWP will be transmitted in the code stream, such as the specific AWP division mode; under normal circumstances, AWP includes 56 division modes.
  • Fig. 4b is a schematic diagram of weight distribution of multiple division modes of an AWP on a 64 ⁇ 64 current block provided by an embodiment of the application. In Fig. 4b, there are 56 division modes for AWP.
  • Fig. 4c is a schematic diagram of weight distribution of multiple division modes of an AWP on a 64 ⁇ 32 current block provided by an embodiment of the application. In Fig. 4c, there are 56 division modes for AWP.
  • Fig. 4d is a schematic diagram of weight distribution of multiple division modes of an AWP on a 32 ⁇ 64 current block provided by an embodiment of the application. In Fig. 4d, there are 56 division modes for AWP.
  • one division mode may correspond to one weight derivation mode, that is, the division mode and the weight derivation mode have a corresponding relationship.
  • the size of the current block is 64 ⁇ 64, and the unit can be pixel size.
  • black indicates that the weight value of the corresponding position of the first reference block is 0%
  • white indicates that the weight value of the corresponding position of the first reference block is 100%
  • the gray area indicates the first according to the different color depth.
  • the weight value of the corresponding position of each reference block is a certain weight value greater than 0% and less than 100%.
  • the weight value of the position corresponding to the second reference block is 100% minus the weight value of the position corresponding to the first reference block.
  • the size of the current block is the aforementioned 64 ⁇ 64, 64 ⁇ 32, or 32 ⁇ 64
  • 64 ⁇ 64 shows the aspect ratio of the current block.
  • 64 ⁇ 64 can represent the aspect ratio of the current block as 1:1
  • 64 ⁇ 32 can represent the aspect ratio of the current block.
  • the ratio is 2:1
  • 32 ⁇ 64 can indicate that the aspect ratio of the current block is 1:2.
  • the aspect ratio of the current block may be 1:1, 2:1, 4:1, 1:2, 1:4, and so on. In another implementation manner, the aspect ratio of the current block may also be other values, for example, 1:1.5 or 1.5:1 and so on. In yet another implementation manner, the aspect ratio of the current block may be determined according to the size of the video.
  • the motion information described in the embodiments of the present application may include: motion vector information, that is, the value of (x, y), and corresponding reference frame information, that is, the reference frame list and the reference index value in the reference frame list .
  • One way of expression is to record the reference index values of two reference frame lists, where the reference index value corresponding to one reference frame list is valid, such as 0, 1, 2, etc.; the reference index value corresponding to the other reference frame list is invalid, that is -1.
  • the reference frame list for which the reference index value is valid 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 index value.
  • Each reference frame list has a corresponding motion vector, 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 motion information. According to the position of the current block and the value of the motion vector (x, y), the reference block can be found in the reference frame, and then the frame of the current block can be determined Time prediction value.
  • FIG. 5 is a schematic diagram of the spatial position relationship between a current block and adjacent blocks provided by an embodiment of the application. As shown in FIG. 5, block E is the current block, and block A, block B, block C, block D, and block F , Block G is the adjacent block of block E.
  • the adjacent block A of the block E is the block where the sample (x 0 -1, y 0 ) is located
  • the adjacent block B of the block E is the block where the sample (x 0 , y 0 -1) is located
  • the phase of the block E The adjacent block C is the block where the sample (x 0 +1, y 0 -1) is located
  • the adjacent block D of the block E is the block where the sample (x 0 -1, y 0 -1) is located
  • the adjacent block of the block E F is the block where the sample (x 0 -1, y 1 ) is located
  • the adjacent block G of the block E is the block where the sample (x 1 , y 0 -1) is located.
  • the "existence" of the adjacent block X means that the block should be in the image to be decoded and the block should belong to the same spatial region as the block E ; Otherwise, the adjacent block "does not exist”. It can be obtained that if the block "does not exist” or has not been decoded, then this block is "unavailable”; otherwise, this block is "available”. Or, if the block in which the image sample to be decoded is located "does not exist" or the sample has not been decoded, then this sample is "unavailable”; otherwise, this sample is "available”.
  • the first step 1) If the image with the reference index value of 0 in the reference image queue 1, the reference frame index stored in the temporal motion information storage unit where the brightness sample corresponding to the brightness sample position in the upper left corner of the current prediction unit is located is -1 , Then the L0 reference index and L1 reference index of the current prediction unit are both equal to 0.
  • the L0 motion vector of the temporal motion information storage unit where the brightness sample corresponding to the brightness sample position of the upper left corner of the current prediction unit is located in the image with the reference index of 0 in the reference image queue 1 is denoted as mvRef(mvRef_x, mvRef_y), the motion
  • the distance index of the image where the information storage unit is located is recorded as DistanceIndexCol
  • the distance index of the image where the reference unit pointed to by the motion vector is located is recorded as DistanceIndexRef.
  • BlockDistanceRef DistanceIndexCol-DistanceIndexRef
  • the third step is to make the L0 reference index RefIdxL0 of the current prediction unit equal to 0, and calculate the L0 motion vector mvE0 (mvE0_x, mvE0_y) of the current prediction unit:
  • mvX is mvRef
  • MVX is mvE0.
  • mvE0_y Clip3(-32768,32767,Sign(mvRef_y*BlockDistanceL1*BlockDistanceRef)*(((Abs(mvRef_y*BlockDistanceL1*(16384/BlockDistanceRef)))+8192)>>14));
  • mvX is mvRef
  • MVX is mvE1.
  • RefIdxAwp0L0 and RefIdxAwp0L1 must be a valid value, such as 0, 1, 2, etc.; the other is an invalid value, such as -1. If RefIdxAwp0L0 is a valid value, then RefIdxAwp0L1 is -1; at this time, the corresponding mvAwp0L0 is the required motion vector, namely (x, y), mvAwp0L1 does not need to be considered. vice versa.
  • two reference blocks are found by determining two motion information, the weights of the two reference blocks at each pixel position are determined according to the specific mode used by GPM or AWP, and the two reference blocks are weighted to obtain the current The prediction block of the block.
  • the probability of motion information being selected has a certain relationship with the position used to derive it and the correlation between the current block. We call this relationship correlation. Generally speaking, the closer to the current block, the stronger the correlation, and the more pixels adjacent to the current block, the stronger the correlation.
  • the method for constructing the motion information candidate list is determined according to the AWP or GPM mode. Only a certain method of constructing the motion information candidate list is used for the current block, so the computational complexity is not increased.
  • the weight derivation mode of the current block may also be one of the lower left and upper right weight derivation mode, the upper left and lower right weight derivation mode, the left and right weight derivation mode, and the upper and lower weight derivation mode.
  • the lower left and upper right weight derivation mode is used to characterize the position of the lower left part of the prediction block from the first reference block, the upper right part of the position is from the second reference block, and the left and right weight derivation mode is used to characterize the position of the left part of the prediction block from the first A reference block, the position of the right part comes from the second reference block, etc., which will not be listed here.
  • the agreement provides 64 weight derivation modes in GPM prediction mode and 56 weight derivation modes in AWP prediction mode.
  • the weight derivation mode of the current block is one of multiple weight derivation modes in the geometric partition prediction mode, or the weight derivation mode of the current block is one of multiple weight derivation modes in the angle-weighted prediction mode.
  • the weight derivation mode of the current block can be any of the 64 weight derivation modes in the GPM prediction mode, or the weight derivation mode of the current block can be any of the 56 weight derivation modes in the AWP prediction mode Any kind of weight derivation mode.
  • this division only divides the weight of the two reference blocks when generating the prediction block, or it can be simply understood that part of the position of the prediction block comes from the first reference block, and another part of the position comes from the second reference block, and There is no real division of the current block into two CUs or PUs or TUs according to the dividing line. In this way, the transformation, quantization, inverse transformation, and inverse quantization of the residuals after prediction are also processed with the current block as a whole.
  • each current block may include a first image component, a second image component, and a third image component, that is, the current block represents the prediction of the first image component, the second image component, or the third image component in the image to be decoded.
  • Image block may include a first image component, a second image component, and a third image component, that is, the current block represents the prediction of the first image component, the second image component, or the third image component in the image to be decoded.
  • the prediction mode parameter indicates the prediction mode adopted by the current block and the parameters related to the prediction mode.
  • prediction modes usually include inter prediction modes, traditional intra prediction modes, and non-traditional intra prediction modes, etc.
  • inter prediction modes include ordinary inter prediction modes, GPM prediction modes, and AWP prediction modes.
  • the encoder will select the optimal prediction mode to pre-encode the current block.
  • the prediction mode of the current block can be determined, and the corresponding prediction mode parameters will be written into the code stream and transmitted by the encoder. To the decoder.
  • the prediction mode parameters of the current block can be directly obtained by parsing the code stream, and the obtained prediction mode parameters are used to determine whether the current block uses the preset inter prediction mode, such as GPM prediction mode or AWP prediction model.
  • S703 Construct a new motion information candidate list based on the weight derivation mode of the current block.
  • the type of the weight derivation mode of the current block is different, and the new motion information candidate list constructed is different.
  • the category of the weight derivation mode of the current block may be preset.
  • the new motion information candidate list constructed when the weight derivation mode of the current block has different categories, the new motion information candidate list constructed may be different. In an embodiment, since the length of the new motion information candidate list is limited, the new motion information candidate list constructed can be the same when the weight derivation mode of the current block has different categories. Or it can be said that the weight derivation mode of the current block has multiple different categories, and when some of the multiple different categories are used, the new motion information candidate list constructed may be the same or different.
  • the decoder can determine the first motion information that should be filled into the initial motion information candidate list, and fill the first motion information into the index in the initial motion information candidate list The value is in the 0 position; then the decoder can determine the second motion information that should be filled in the initial motion information candidate list, and determine whether the second motion information is duplicated with the motion information that has been filled in (duplication check step).
  • the index value of the second motion information is filled in the initial motion information candidate list to position 1, until the preset number of motion information is filled in the initial motion information candidate list, and a certain motion information is added to the initial motion information candidate list. Fill in the index minus one from the preset number to the corresponding position, and the construction of the new motion information candidate list is completed.
  • the decoder can determine the first motion information, the second motion information, etc. from the known motion information related to the current block based on the sorting method.
  • the new motion information candidate list in the embodiment of the present application is a candidate list that allows bidirectional motion information.
  • the new motion information candidate list may be referred to as a two-way motion information candidate list.
  • the decoder may determine the motion information to be filled corresponding to the weight derivation mode of the current block based on the weight derivation mode of the current block, and each motion information to be filled may be unidirectional motion information. , Two-way motion information or one or two one-way motion information obtained by splitting the two-way motion information. Then, the decoder can construct a new motion information candidate list based on the motion information to be filled in. In this way, the sorting method of the motion information in the new motion information candidate list may be different from the way that only one-way motion information is filled in the current technology.
  • the decoder may determine the sorting method corresponding to the weight derivation mode of the current block based on the weight derivation mode of the current block, and the motion information to be filled corresponding to the weight derivation mode of the current block, thereby Based on the sorting method and the motion information to be filled in, a new motion information candidate list is constructed.
  • the sorting method of the motion information in the new motion information candidate list may not only be different from a specific sorting method existing in the current technology, but also may be different from the current technology that only fills in the list. The way to move information is different.
  • the decoder can determine two motion information from the new motion information candidate list. For example, it can find two motion information in the constructed motion information candidate list according to the parsed indexes of the two motion information, and use single motion information based on the two motion information.
  • the two-way or two-way prediction method obtains two intermediate prediction blocks, and then determines the weight of the two intermediate prediction blocks at each pixel position according to the weight derivation mode of the current block, and weights the two intermediate prediction blocks to obtain the prediction block of the current block .
  • the decoder uses the bidirectional prediction method to obtain the intermediate prediction block, where BIO or DMVR or other methods can be used to obtain the intermediate prediction block. If the motion information is unidirectional, the unidirectional prediction method is used to obtain the intermediate prediction block.
  • the above S703 can be implemented in the following ways: based on the weight derivation mode of the current block, determine the sorting method of the known motion information related to the current block; build a new motion information candidate list based on the sorting method .
  • the known motion information related to the current block may be motion information of a decoded block that is temporally or spatially related to the current block.
  • the movement information in the embodiment of the present application may be one-way movement information, two-way movement information, or one or two one-way movement information obtained by splitting the two-way movement information.
  • the known motion information related to the current block is the available motion information, or the existing motion information.
  • the sorting method can be the same or different.
  • a part close to the left, upper, or upper left can be selected from the two parts, and the block adjacent to this part is regarded as the higher order Priority to sort.
  • the known motion information is sorted as follows: The sorting method of the motion information of the neighboring block is the first; when the weight derivation mode of the current block is the upper and lower weight derivation mode, the sorting method of the known motion information is that the motion information of the upper block of the current block is sorted by The previous sorting method; when the weight derivation mode of the current block is the lower left and upper right weight derivation mode, the sorting method of the known motion information is the sorting method of the motion information of the lower-left neighboring block of the current block. In the case where the weight derivation mode of the current block is the left and right weight derivation modes, it is known that the sorting method of the motion information is a sorting method of the motion information of the left block of the current block.
  • the known motion information related to the current block may include N motion information related to the current block; N is an integer greater than or equal to 1; the N motion information related to the current block may include: The motion information of at least one neighboring block in the spatial domain, and/or the motion information of at least one corresponding block of the current block in the time domain.
  • the N pieces of motion information related to the current block may only include neighboring block motion information. In other embodiments, the N pieces of motion information related to the current block may only include the motion information of the corresponding block. In still other embodiments, the N pieces of motion information related to the current block may not only include the motion information of neighboring blocks, but also The motion information of the corresponding block can be included.
  • each of the N pieces of motion information includes original motion information, and the original motion information includes motion vector information and reference frame information.
  • the original motion information may be unidirectional original motion information, or may be bidirectional original motion information, or may be one or two unidirectional original motion information obtained by splitting the bidirectional original motion information.
  • the sorting manner of the motion information of at least one neighboring block may be determined based on the weight derivation mode of the current block.
  • determining the ordering method of the known motion information related to the current block may include: the weight derivation mode of the current block In the case of the first-type weight derivation mode, the motion information of at least one corresponding block is arranged before the motion information of at least one neighboring block.
  • the motion information in the embodiments of the present application can refer to the one-way original motion information obtained by the decoder analysis, or the two-way original motion information, or to the two-way original motion information without special instructions.
  • One or two unidirectional original motion information obtained by splitting the original motion information may not only refer to the one-way original motion information obtained by the decoder analysis, or the two-way original motion information, or one or two pieces obtained by splitting the two-way original motion information.
  • One-way motion information also refers to one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting two-way derived motion information.
  • the original motion information (including one-way original motion information or two-way original motion information) in the embodiments of this application may be the motion information obtained by the decoder by parsing the code stream, and the derived motion information may be obtained by performing mathematical calculations on the original motion information of.
  • determining the ordering method of the known motion information related to the current block may include: deriving the weight of the current block
  • the mode is the second type of weight derivation mode
  • the motion information of at least one corresponding block is interspersed with the motion information of at least one adjacent block.
  • the decoder can fill in part or all of the time domain motion information after filling in a part of the motion information in the spatial domain, and then fill in the motion information in the non-repetitive spatial domain, etc., until the preset is filled in Number of sports information.
  • determining the ordering method of the known motion information related to the current block may include: deriving the weight of the current block When the mode is the third weight derivation mode, the motion information of at least one corresponding block is arranged after the motion information of at least one adjacent block.
  • the decoder may first fill in one motion information in the time domain in the initial motion information candidate list, and then fill in the motion information in the four spatial domains in the initial motion information candidate list.
  • the initial motion information candidate list is a list that includes a preset number of filling positions, and each filling position is used to fill in motion information (including original motion information, derived motion information, one-way motion information, and two-way motion information). One of the information).
  • the initial motion information candidate list may be an empty list.
  • a new motion information candidate list may be generated based on the at least one motion information. In this manner, there may be no initial motion information candidate list.
  • the step of checking duplicates can be performed before filling. It should also be understood that the embodiment of the present application only takes the new motion information candidate list as an example with only one motion information in the time domain. In other embodiments, there may be at least two time domains in the new motion information candidate list. Sports information on the domain.
  • the weight of the current block can belong to both the second or third type of weight derivation mode and the fourth type of weight derivation mode. Therefore, the decoder can not only insert the motion information of at least one corresponding block into or after the motion information of at least one neighboring block, but also according to the motion information of the lower-left neighboring block of the current block and the upper-right phase of the current block.
  • the motion information of the neighboring block, the motion information of the upper left neighboring block of the current block, and the motion information of the lower right block of the current block in the time domain are sorted in order. This application does not describe the weight derivation modes that can be combined one by one.
  • the new motion information candidate list constructed may be the same or different.
  • sorting methods there are many sorting methods provided in the embodiments of this application. These sorting methods only provide a sorting idea, or define the sorting priority of different sports information in the sorting method, and proceed according to a certain sorting method.
  • the motion information is sorted, it does not mean that the at least two motion information proposed in these sorting methods should be used up, but only when the length of the motion information candidate list reaches a preset number (which can be a preset length), it can be determined The construction of the new motion information candidate list is completed.
  • the sorting method is the order of P, Q, R, S, then when the list is sorted to Q based on the sorting method, the length of the list reaches the preset length, then the new motion information candidate The list construction is complete, and no further sorting will be performed.
  • the ordering method for determining the known motion information related to the current block may include: the known motion related to the current block
  • the information sorting method is a sorting method determined from the sorting method set.
  • the sorting method set includes: the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, and the upper left related block of the current block.
  • the sorting mode determined from the sorting mode set is different.
  • any one of the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block, and the motion information of the lower right related block of the current block is: current The motion information of the block in the spatial domain or the motion information of the current block in the time domain.
  • the sorting mode set can include 24 sorting modes.
  • the 24 sorting modes are the motion information of the lower left related block of the current block, the motion information of the upper right related block of the current block, the motion information of the upper left related block of the current block, and the right of the current block.
  • a sorting method is the motion information of the lower-left relevant block of the current block, the motion information of the upper-right relevant block of the current block, and the motion information of the upper-left relevant block of the current block.
  • the motion information of the relevant block in the lower right of the current block is sorted in sequence.
  • the motion information of the current block in the time domain can be all or part of the motion information of the lower left related block of the current block, all or part of the motion information of the upper right related block of the current block, and all of the motion information of the upper left related block of the current block. Or part, one or at least two of all or part of the motion information of the lower right related block of the current block.
  • the motion information of the lower-left neighboring block of the current block includes: the motion information of all or part of the blocks in the lower left of the current block.
  • the motion information of the upper right neighboring block of the current block includes: the motion information of all or part of the blocks on the upper right of the current block.
  • the motion information of the lower right block of the current block in the time domain includes: motion information of the block in the time domain outside the current block, or motion information of the block in the time domain inside the current block.
  • FIG. 8 is another schematic diagram of the spatial position relationship between the current block and neighboring blocks according to an embodiment of the application.
  • the lower left neighboring block of the current block 801 may be located in the lower left area 802 of the current block.
  • the lower left neighboring block of 801 may include at least one neighboring block.
  • the upper-left neighboring block of the current block 801 may be located in the upper-left area 803 of the current block, and the upper-left neighboring block of the current block 801 may include at least one neighboring block.
  • the upper right neighboring block of the current block 801 may be located in the upper right area 804 of the current block, and the upper right neighboring block of the current block 801 may include at least one neighboring block.
  • Each adjacent block may be adjacent to the current block 801.
  • the decoder can then proceed to the step of filling in the motion information in the time domain of the current block.
  • the decoder can arrange all or part of the one-way original motion information in the N motion information in the case that the weight derivation mode of the current block is the fourth type weight derivation mode.
  • the two-way motion information in the information is split to obtain all or part of one or two one-way original motion information.
  • each of the N pieces of movement information may be one-way movement information, or, each of the N pieces of movement information may be two-way movement information, or N pieces of movement information.
  • Part of the motion information in the motion information is one-way motion information, and the other part of the motion information is two-way motion information.
  • the decoder always fills in the one-way original motion information first, and when the number of one-way original motion information is less than the preset number, consider filling in the information obtained by splitting the two-way motion information.
  • One or two bidirectional original motion information are examples of the decoder.
  • All of an object is the one object, and the part of an object is also the one object.
  • all of the one-way original motion information is the one-way original motion information, and the part of the one-way original motion information is also the one-way original motion information.
  • Directional original motion information when the number of one-way original motion information in the N pieces of motion information is at least two, all or part of the one-way original motion information may be commonly understood in the art.
  • the decoder can arrange all or part of the one-way original motion information in the N motion information in the case that the weight derivation mode of the current block is the fifth type weight derivation mode. All or part of the two-way motion information in the information precedes.
  • the decoder also first fills in the one-way original motion information, and when the number of the one-way original motion information is less than the preset number, then considers to fill in the two-way motion information.
  • the decoder may determine the sorting priority of the N pieces of motion information when the weight derivation mode of the current block is the sixth type of weight derivation mode, and sort the N pieces of motion information based on the sorting priority.
  • the decoder does not need to consider the unidirectional and bidirectional problem of the N motion information, but fills in the N motion information according to the preset sorting priority of the N motion information.
  • the decoder can first fill in the first one-way original motion information, then fill in the first one-way derived motion information, and then combine the second two-way original motion information with Fill in the second two-way derived motion information, or split the second two-way original motion information to obtain one or two one-way motion information, and the one-way corresponding to the one or two one-way motion information Fill in the derivative movement letter or two-way derivative movement information.
  • the decoder can determine the unidirectional and bidirectional information of each of the N pieces of motion information when the weight derivation mode of the current block is the seventh type of weight derivation mode, and the value of the N pieces of motion information. Sorting priority, based on the one-way and two-way information of each motion information and the sorting priority to sort the N motion information.
  • the decoder needs to comprehensively consider the unidirectional and bidirectional problems of the N motion information and the sorting priority of the N motion information, so as to sort the N motion information based on the two.
  • the decoder can determine the image frame other than the current frame and the frame of the corresponding block as the first specific frame; then, on the first specific frame, determine the motion of the first target block corresponding to the current block Information; Finally, the motion information of the first target block can be scaled to obtain the motion information of the corresponding block.
  • scaling the motion information of the first target block to obtain the motion information of the corresponding block may include one of the following:
  • the one-way motion information of the first target block is scaled to obtain the two-way motion information of the corresponding block.
  • scaling the motion information of the first target block may be to map the motion information of the first target block to the corresponding block, so as to obtain the motion information of the corresponding block.
  • the concept of derived motion information is also creatively proposed.
  • the following describes the order of derived motion information and derived motion information in the new motion information candidate list:
  • each of the N pieces of motion information further includes derivative motion information, which is determined based on the original motion information; and the derivative motion information includes motion vector information and reference frame information.
  • the derived motion information corresponding to different motion information may be the same or different.
  • the derived motion information is one-way derived motion information, or two-way derived motion information, or one or two one-way derived motion information obtained by splitting the two-way derived motion information.
  • the one-way derived motion information is determined based on one-way original motion information or two-way motion information
  • the two-way derived motion information is determined based on one-way original motion information or two-way motion information.
  • N motion information when N is greater than or equal to 2:
  • the decoder may arrange all or part of the N original motion information before all or part of the N derivative motion information.
  • the decoder may determine the unidirectional and bidirectional information of each original motion information in the N original motion information, the ordering priority of the N original motion information, and the single and bidirectional information of each of the N derivative motion information. At least one of the two-way information and the sorting priority of the N derivative sports information is sorted based on the at least one kind of information.
  • the decoder can sort the N pieces of motion information according to at least one type of information, so that the new motion information candidate list obtained can be at the top of the one-way information, the default sorting method and the sorting method of the derived information Make a balance between, so that the sorting is more in line with the actual situation.
  • the method of determining derived motion information based on the original motion information can be roughly divided into two methods.
  • the first method is to perform mathematical calculations on each original motion information to obtain the correspondence of each original motion information.
  • the second way is to average or weight the original motion information of at least two adjacent blocks to obtain the derived motion information corresponding to the original motion information of the at least two adjacent blocks.
  • the prediction direction of the derived motion information is the same as the prediction direction of the original motion information.
  • the prediction direction can be one-way prediction or two-way prediction.
  • the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
  • the decoder can determine the motion vector of the derived motion information based on the motion vector of the original motion information.
  • the motion vector information includes first axis component information and second axis component information.
  • the first axis is the x axis or the y axis
  • the second axis is the y axis or the x axis
  • the first axis is different from the second axis.
  • the first axis is the x axis
  • the second axis is the y axis
  • the first axis is the y axis
  • the second axis is the x axis.
  • the method of determining the motion vector information of the derived motion according to the motion vector information of the original motion information may be: determining each derived motion information of the M derived motion information based on the first axis component information and the second axis component information in the original motion information
  • the first axis component information and the second axis component information of each derivative motion information are used as the motion vector information of each derivative motion information; M is greater than or equal to 1 Integer.
  • the sign of the x-axis component information in the motion vector information of the original motion information is the same as the sign of the x-axis component information of each derived motion information in the M pieces of derived motion information.
  • the sign of the y-axis component information in the motion vector information of the original motion information is the same as the sign of the y-axis component information of each derived motion information in the M pieces of derived motion information.
  • the first way is to add one axis in the original motion information to get the derivative motion information, and the motion information of the other axis of the original information is used as the other of the derived motion information.
  • the movement information of the axis is to perform addition calculation on both axes in the original motion information.
  • the second way Based on the first axis component information and the second axis component information in the original motion information, determine the first axis component information and the second axis component information of each derived motion information in the M derivative motion information, which may include : The first axis component information in the original motion information is added to M third values to obtain M first axis addition results, and each derivative motion is determined based on each result of the M first axis addition results The first axis component information of the information; add M third values to the second axis component information in the original motion information to obtain M second axis addition results, based on each of the M second axis addition results As a result, the second axis component information of each derived motion information is determined.
  • determining the first axis component information of each derived motion information based on each result of the M first axis addition results may include: adding each of the M first axis addition results A result is the first axis component information of each derivative motion information.
  • the following two methods are used for scaling calculation.
  • the first method is to perform scaling calculation on one axis in the original motion information to obtain the derivative motion information, and the motion information of the other axis of the original information is used as the other of the derived motion information.
  • the second way is to perform scaling calculations on both axes in the original motion information.
  • the first way based on the first axis component information and the second axis component information in the original motion information, determine the first axis component information and the second axis component information of each derived motion information in the M derived motion information, which may include : Based on the result of scaling the first axis component information of the original motion information, determine the second axis component information of each of the M derived motion information; take the second axis component information of the original motion information as M The second axis component information of each derived motion information in the derived motion information.
  • the second way Based on the first axis component information and the second axis component information in the original motion information, determine the first axis component information and the second axis component information of each derived motion information in the M derivative motion information, which may include : Based on the result of scaling the first axis component information of the original motion information, determine the first axis component information of each of the M derived motion information; based on scaling the second axis component information of the original motion information As a result, the second axis component information of each derived motion information in the M pieces of derived motion information is determined.
  • the scaling calculation refers to scaling the first axis and/or the second axis in the original motion information, and the scaling can be zooming in or out.
  • the scaling calculation is And/or the second axis is zoomed in or out, and the motion vector derived from the motion information is directly obtained; in another embodiment, the zoom calculation is determined based on the result of zooming in or out on the first axis and/or the second axis
  • the motion vector of the derived motion information for example, when the first axis and/or the second axis is zoomed in or out, other related calculations will be performed to obtain the motion vector of the derived motion information.
  • the following describes the implementation of the scaling calculation. It should be understood that although the embodiment of the present application uses the first axis as an example to make a relevant description, it should be understood in the art that since the first axis is the x-axis or the y-axis, therefore, Through the description of the first axis, it is easy to know the process of scaling the x-axis and scaling the y-axis in the embodiment of the present application.
  • determining the second axis component information of each of the M derivative motion information includes: converting the first axis component information of the original motion information The axis component information is multiplied by the M first values to obtain M first results, and based on each of the M first results, the first axis component information of each derived motion information is determined.
  • determining the second axis component information of each of the M derivative motion information includes: converting the first axis component information of the original motion information The one-axis component information is divided by M second values to obtain M first divisors, and the first-axis component information of each derivative motion information is determined based on each of the M first divisors.
  • determining the first axis component information of each derived motion information includes: using each of the M first results as each derived motion The first axis component information of the information.
  • determining the first axis component information of each derived motion information includes: determining M third values corresponding to the M first results one-to-one , The M first results and M third values are added one by one to obtain M second results, and the first axis component information of each derived motion information is determined based on each of the M second results.
  • determining the first axis component information of each derived motion information includes: taking each of the M second results as each derived motion The first axis component information of the information.
  • each of the M second results is shifted to the right by a specific number of bits to obtain M third results, and based on each of the M third results, the value of each derived motion information is determined The first axis component information.
  • the third value is obtained by shifting the target bit to the left by one, and the target bit is the specific digit minus one.
  • the absolute value of the first axis component information in the motion vector information of the original motion information is greater than a first threshold;
  • the M first values include a first specific value and a second specific value, and the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the sum of the first specific value and the second specific value is 2.
  • the method further includes: determining that the first specific value is the first coefficient when the absolute value of the first axis component information of the original motion information is less than or equal to the second threshold; When the absolute value of the first axis component information in the vector information is greater than the second threshold and less than or equal to the third threshold, it is determined that the first specific value is the second coefficient; the first in the motion vector information of the original motion information When the absolute value of the axis component information is greater than the third threshold, the first specific value is determined to be the third coefficient; where the first coefficient is smaller than the second coefficient, and the second coefficient is smaller than the third coefficient.
  • the method further includes: the absolute value of the first axis component information of the original motion information is less than or equal to the first threshold, and the first axis component information in the motion vector information of the original motion information is positive.
  • the first target value is used as the first axis component information of the derived motion information;
  • the absolute value of the first axis component information in the motion vector information of the original motion information is less than or equal to the first threshold, and the value of the original motion information is
  • the first axis component information in the motion vector information is a negative number
  • the negative first target value is used as the first axis component information of the derived motion information.
  • the first threshold can be a number greater than 0, and the first threshold is closer to 0.
  • the first threshold can be 1, 2, or 3, etc.
  • a number greater than the first threshold can be understood as a number farther from 0. .
  • the M first divisors include the first group of divisors, and/or, the second group of divisors, and/or, the third group of divisors;
  • Each divisor in the third group of divisors is less than the minimum threshold
  • each derivative motion information including at least one of the following:
  • each divisor in the second set of divisors as the first axis component information of each derivative motion information corresponding to the second set of divisors in the M derivative motion information;
  • determining the first axis component information of each derived motion information based on each of the M first divisors includes: using a specific function based on each of the M first divisors Calculate and determine the first axis component information of each derivative motion information, where the specific function is the CLIP function, the min in the CLIP function can correspond to the minimum threshold, and the max in the CLIP function can correspond to the maximum threshold.
  • the first value, the second value, the third value, the fourth value, the first specific value or the second specific value, etc. appearing in the embodiments of the present application may be integers or decimals (may be called floating-point numbers), It can also be an integer or a negative number, which is not limited in the embodiment of the present application.
  • the number of bits shifted to the right may be fixedly set.
  • At least two of the first value, the third value, and the number of bits shifted to the right may have a corresponding relationship.
  • the decoder may also perform the following steps:
  • the decoder determining the derived motion information based on the original motion information may include: the decoder may determine the second target block from at least two adjacent blocks, and use the frame in which the second target block is located as the second specific frame; The motion vector information in the original motion information of the neighboring blocks except the second target block in the neighboring blocks is scaled to a second specific frame to obtain the motion vector information of at least two blocks to be averaged; among them, at least two blocks to be averaged The average block includes the second target block; then the motion vector information of at least two blocks to be averaged can be averaged or weighted to obtain the corresponding motion vector information of the derived motion information; finally, the motion vector information of the corresponding derived motion information can be , As the motion vector information of the derived motion information of each of the at least two adjacent blocks.
  • the prediction direction of the derived motion information is the same as the prediction direction of the original motion information
  • the reference frame information of the derived motion information is the second specific frame.
  • FIG. 9 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the application. As shown in FIG. 9, the method is applied to a decoder, and the method may include:
  • the decoder parses the code stream and obtains the weight derivation mode of the current block.
  • S903 Determine a sorting mode of known motion information related to the current block based on the weight derivation mode of the current block.
  • the known motion information related to the current block includes N motion information related to the current block; N is an integer greater than or equal to 1.
  • the N motion information related to the current block includes: motion information of at least one neighboring block of the current block in the spatial domain, and/or motion information of at least one corresponding block of the current block in the time domain.
  • Each of the N pieces of movement information includes original movement information.
  • S905 Determine an initial motion information candidate list.
  • the initial motion information candidate list may be an empty list, and the length of the initial motion information candidate list may be a preset number, so that a preset number of motion information can be put into it.
  • the decoder may only consider filling in the original motion information. For example, the decoder may fill in the original motion information in 4 spatial domains and 1 original motion information in the time domain sequentially or interleaved.
  • each of the N pieces of motion information includes derived motion information, and then there will be a scene where the derived motion information is filled into the initial motion information candidate list.
  • the decoder can be based on the ranking In this way, all or part of the original motion information of at least one neighboring block, all or part of the original motion information of at least one corresponding block, all or part of the derived motion information of at least one neighboring block, and at least one corresponding block At least one of all or part of the derived motion information of is sequentially or staggered into the initial motion information candidate list.
  • the two-way derived motion information to be filled is split into two one-way derived motion information; At least one is filled in the initial motion information candidate list; and/or, in the case that the original motion information to be filled is bidirectional original motion information, the bidirectional original motion information is split into two unidirectional original motion information, and the two At least one of the one-way original motion information is filled in the initial motion information candidate list, or the two-way original motion information is filled in the initial motion information candidate list.
  • the motion information filled in the initial motion information candidate list no matter what sort order is filled in, the number of motion information filled in is a preset number, or the initial motion information candidate list When it is full, the initial motion information candidate list is not filled with motion information.
  • the initial motion information candidate list can be filled with a preset number of motion information; each motion information of the preset number of motion information is original motion information or derived motion information; the preset number is 2-6.
  • the method may further include: after at least one piece of original motion information is filled in the initial motion information candidate list, determining the derivative motion information to be filled in; and filling the derivative motion information to be filled in the initial motion information Candidate list.
  • the method may further include: after at least one piece of original motion information is filled in the initial motion information candidate list, determining the derived motion information to be filled; after determining the derived motion information to be filled, it is different from In the case of the original motion information that has been filled in corresponding to the derivative motion information to be filled, the derivative motion information to be filled is filled into the initial motion information candidate list.
  • a method for constructing a new motion information candidate list based on a sorting method is proposed, so that the method for a new motion information candidate list can be flexibly constructed according to different sorting methods, thereby a new motion information candidate list
  • the motion information can be arranged in order of correlation with the current block from strong to weak, so that the decoding efficiency of the current block can be improved.
  • FIG. 10 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the application. As shown in FIG. 10, the method is applied to a decoder, and the method may include:
  • the decoder parses the code stream and obtains the weight derivation mode of the current block.
  • S1005 Based on all or part of the original motion information of at least one neighboring block, and/or, based on all or part of the original motion information of at least one corresponding block, generate a specific number of derivative motion information.
  • the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of adjacent blocks and/or derived motion information of corresponding blocks.
  • the decoder may obtain all or part of the original motion information of at least one neighboring block, all or part of the original motion information of at least one corresponding block, and the generated specific quantity based on the sorting method.
  • One piece of derivative motion information is filled into the initial motion information candidate list, thereby constructing a new motion information candidate list.
  • the decoder can obtain all the motion information that can be filled in the initial motion information candidate list, and then fill in all the obtained motion information in sequence based on the sorting method, until the number of motion information is filled in It is the preset number.
  • the two-way original motion information of at least one neighboring block is sequentially performed. Split to obtain two one-way original motion information corresponding to the two-way original motion information, and sequentially fill in the two one-way original motion information that are different from the one-way motion information that has been filled in to the initial motion Information candidate list; when the second total of the original motion information filled in the initial motion information candidate list is equal to the preset number minus one, continue to fill in the unidirectional motion information or bidirectional motion information of a corresponding block to the initial Motion information candidate list. In this embodiment, only one-way motion information of adjacent blocks is filled in.
  • the two-way original motion information of at least one adjacent block is sequentially added , Continue to fill in the initial motion information candidate list; when the second total of the original motion information filled in the initial motion information candidate list is equal to the preset number minus one, the one-way motion information or two-way motion information of a corresponding block The motion information continues to be filled into the initial motion information candidate list.
  • the bidirectional motion information of adjacent blocks is also filled in.
  • the first two pieces filled in the initial motion information candidate list are obtained.
  • One-way original motion information Based on the first two one-way original motion information, determine the corresponding four one-way derived motion information; sequentially fill in the four derived motion information that are different from the one-way motion information that has been filled in To the initial motion information candidate list; when the third total of the one-way original motion information and the one-way derived motion information filled in the initial motion information candidate list is equal to the preset number minus one, the one-way corresponding block
  • the motion information or two-way motion information continues to be filled into the initial motion information candidate list.
  • the one-way motion of a corresponding block when the third total of one-way original motion information and one-way derived motion information filled in the initial motion information candidate list is less than the preset number minus one, the one-way motion of a corresponding block The information or two-way motion information continues to be filled in the initial motion information candidate list; the one-way motion information or the two-way motion information of the corresponding block that has been filled is copied and filled until the total number of filled motion information is the preset number.
  • FIG. 11 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the application. As shown in FIG. 11, the method is applied to a decoder, and the method may include:
  • S1101 parse the code stream, and determine the prediction mode parameter of the current block.
  • the prediction mode parameter is used to indicate that the geometric partition prediction mode GPM or the angle-weighted prediction mode AWP is used to determine the inter prediction value of the current block.
  • S1103 Determine the weight derivation mode of the current block from the prediction mode parameters of the current block.
  • the current block is divided into a first partition and a second partition.
  • S1105 Determine a sorting mode of known motion information related to the current block based on the weight derivation mode of the current block.
  • the known motion information related to the current block includes N motion information related to the current block
  • the N motion information related to the current block includes: motion information of at least one neighboring block of the current block in the spatial domain, and/or the current block Motion information of at least one corresponding block of the block in the time domain.
  • FIG. 12 is a schematic diagram of the spatial position relationship between the current block, neighboring blocks, and corresponding blocks according to an embodiment of the application, as shown in FIG. 12, where:
  • At least one adjacent block of the current block E may include at least one of the outer lower left block F, the inner right outer upper block G, the outer upper right block C, the inner upper outer left block B, the inner left outer upper block A, and the outer upper left block D.
  • the at least one corresponding block includes: at least one of a block H corresponding to the upper left corner inside the current block E, a block 12 corresponding to the lower right corner inside the current block, and a block I1 corresponding to the lower right corner outside the current block.
  • the embodiment of the present application may also provide another positional relationship between the current block, the neighboring block, and the corresponding block: at least one neighboring block includes: inner left, outer lower At least one of a block, an inner upper outer right block, an outer upper right block, an outer lower left block, and an outer upper left block.
  • the at least one corresponding block includes at least one of a block corresponding to the upper left corner inside the current block, a block corresponding to the lower right corner inside the current block, and a block corresponding to the lower right corner outside the current block.
  • the eighth type of weight derivation mode is used to characterize the weight derivation mode of the current block as the upper left and lower right weight derivation modes; the ninth type of weight derivation mode is used to characterize the weight derivation mode of the current block as upper The weight derivation mode under, and the tenth type of weight derivation mode, which is used to characterize the weight derivation mode of the current block as the lower left and upper right weight derivation modes; the eleventh type of weight derivation mode, which is used to characterize the weight derivation mode of the current block is Left and right weight derivation mode.
  • the ordering method for determining the known motion information is that the order of the motion information of the upper-left neighboring block of the current block is higher The sorting method.
  • the weight derivation mode of the current block belongs to the eighth type of weight derivation mode, it is determined that the known motion information is sorted as follows: The motion information of the corresponding block in the time domain is sorted in the first order.
  • the upper left adjacent block of the current block includes one or at least two of the outer upper left, inner upper outer left adjacent block, and inner left outer upper adjacent block.
  • the other descriptions of the current block are similar to this.
  • the sorting method can be the motion information of the upper left block of the current block, the motion information of the corresponding block of the current block in the time domain, the motion information of the lower left block of the current block, and the motion information of the upper right adjacent block of the current block.
  • the movement information is sorted in order.
  • the decoder can determine that the known motion information is sorted as follows: the motion information of the upper block of the current block is sorted The top sorting method.
  • the decoder can determine that the known motion information is sorted as follows: The movement information of the inner left and outer lower blocks are sorted in the first order.
  • the upper block of the current block may include the outer upper block and the inner upper block of the current block, or the upper block of the current block may include the inner upper block of the current block, but not the outer upper block of the current block.
  • the other descriptions of the current block are similar to this.
  • the sorting method can be the motion information of the upper block of the current block, the motion information of the inner left and outer lower block of the current block, the motion information of the corresponding block of the current block in the time domain, and the outer upper left of the current block.
  • the movement information of the block, the movement information of the outer upper right block of the current block, and the inner left outer upper movement information of the current block are sorted in sequence.
  • the decoder when the weight derivation mode of the current block belongs to the tenth type of weight derivation mode, the decoder can determine that the known motion information is sorted as follows: the motion information of the lower left block of the current block is sorted The top sorting method.
  • the decoder can determine that the known motion information is sorted as follows: The movement information on the inner right and the outer are sorted in the first order.
  • the sorting method may be the motion information of the inner left outer lower block of the current block, the inner right outer upper motion information of the current block, the outer upper right motion information of the current block, and the inner left outer upper right of the current block.
  • the motion information of the current block, the motion information of the inner upper outer left block of the current block, the motion information of the outer upper left block of the current block, and the motion information of the corresponding block of the current block in the time domain are sorted in sequence.
  • the decoder may determine that the known motion information is sorted as follows: the motion information of the left block of the current block The sorting method of the top sort.
  • the decoder can determine that the known motion information is sorted as follows: the motion information of the left block of the current block, the current block The movement information of the outer upper right block is sorted first.
  • the left block of the current block may include the inner left block of the current block and/or the outer left block of the current block.
  • the first prediction value of the first partition is determined based on the motion information of the first partition
  • the second prediction value of the second partition is determined based on the motion information of the second partition.
  • the motion information of the first partition when the motion information of the first partition is bidirectional motion information, the motion information of the first partition is processed according to the bidirectional prediction method, so as to determine the first predicted value of the first partition; and/ Or, when the motion information of the second partition is bidirectional motion information, the motion information of the second partition is processed according to a bidirectional prediction method, so as to determine the second predicted value of the second partition.
  • the bidirectional prediction method is a method that does not use bi-directional optical flow (BIO) or a decoder-side motion vector optimization (Decoder-side Motion Vector Refinement, DMVR) method.
  • the method of bidirectional prediction may also be a method of using bidirectional optical flow BIO or a method of optimizing DMVR with a motion vector at the decoding end, which is not limited in this application.
  • S1113 Perform weighted fusion on the first predicted value and the second predicted value to obtain the inter-frame predicted value of the current block.
  • the decoder can construct different candidate lists of motion information according to different weight derivation modes of the current block, so that the sorting method of the motion information in the candidate list of motion information can be the same as the weight derivation mode. Matching, so that the new motion information candidate list can arrange the motion information in the order of correlation with the current block from strong to weak, so that the decoding efficiency of the current block can be improved.
  • the decoder may determine at least one of the size of the current block, the shape of the current block, and the aspect ratio of the current block based on the weight derivation mode of the current block, and determine that the current block is relevant based on the at least one.
  • the sorting method of the known motion information may be determined at least one of the size of the current block, the shape of the current block, and the aspect ratio of the current block based on the weight derivation mode of the current block, and determine that the current block is relevant based on the at least one. The sorting method of the known motion information.
  • the determined known motion information is sorted differently.
  • the black part in 11 in Figure 4c covers the upper right corner of the current block, but the black part in 11 in Figure 4d not only covers the upper right corner of the current block. It also covers the upper left corner of the current block. Therefore, the decoder can set the sorting method of the known motion information determined based on 11 in Figure 4c to be the same as the known motion information determined based on 11 in Figure 4c. Different ways of sorting. Thereby, decoding efficiency can be improved, and compression performance can be improved.
  • the decoder may not only determine a certain group of multiple weight derivation modes in the geometric partition prediction mode based on the weight derivation mode of the current block, or determine the angle-weighted prediction mode that belongs to A certain group of multiple weight derivation modes of the current block can also be based on the weight derivation mode of the current block to determine at least one of the size of the current block, the shape of the current block, and the aspect ratio of the current block; based on a certain group Together with the at least one, the ordering method of the known motion information is determined together.
  • the decoder can determine whether it belongs to one of the four groups in GPM or one of the four groups in AWP based on the weight derivation mode of the current block, and determine the length and width of the current block Then, based on the group to which the weight derivation mode belongs and the aspect ratio of the current block, the ordering method of the known motion information is determined.
  • the decoder determines that when the weight derivation mode of the current block belongs to the eighth type of weight derivation mode, and the aspect ratio of the current block is 1:2, the determined known motion information
  • the sorting method is the first sorting method; the decoder determines that when the weight derivation mode of the current block belongs to the eighth weight derivation mode, and the aspect ratio of the current block is 2:1, the determined known
  • the sorting method of the motion information is the second sorting method; the decoder determines that when the weight derivation mode of the current block belongs to the eighth weight derivation mode, and the aspect ratio of the current block is 1:1, it is determined It is known that the sorting method of the motion information is the third sorting method; any two of the first sorting method, the second sorting method, and the third sorting method are different.
  • the third sorting method is the motion information of the upper left block of the current block, the motion information of the corresponding block of the current block in the time domain, the motion information of the lower left block of the current block, and the motion information of the upper right adjacent block of the current block. Sort.
  • the first sorting method, the second sorting method, and the third sorting method may have two identical sorting methods.
  • the first sorting method, the second sorting method, and the third sorting method may all be the same.
  • the sorting method can be the same.
  • the sorting method is different.
  • a method for constructing a candidate list of motion information of AWP or GPM which may be determined according to the mode of AWP or GPM and the shape of the current block. It can also be considered that the modes of the same AWP or GPM are different.
  • the current block shape uses different motion information candidate list construction methods.
  • mode 11 is on 64x64
  • the black part on the 64x32 block only covers the upper right corner
  • the upper left corner is the white area
  • the black part on the 32x64 block covers the upper left and upper right corners, so on the 64x64, 64x32 and 32x64 blocks there are two modes of mode 11
  • the shape of the current block can be represented by the aspect ratio, that is, a block with an aspect ratio of 1:1, a block with an aspect ratio of 2:1, and a block with an aspect ratio of 4:1.
  • the method for constructing the motion information candidate list is determined according to the AWP or GPM mode and the shape of the current block. Only a certain method of constructing the motion information candidate list is used for the current block, so the computational complexity is not increased.
  • Figure 12 is used as an example to illustrate the implementation of this application:
  • Different motion information candidate list construction methods may be different in multiple dimensions. Explained one by one below.
  • F, G, C, A, B, and D are the adjacent prediction blocks of the current prediction unit E in the same frame.
  • the motion information derived from B and D is called spatial motion information
  • H and I are blocks in a reference frame that have the relationship shown in the figure with the position of the current prediction unit E
  • the motion information derived from H and I is called temporal motion information.
  • the current method checks the airspace motion information in the order of F->G->C->A->B->D.
  • the spatial motion information is added at most the length of the list minus one, that is, at least one position is reserved for the temporal motion information.
  • the related methods are added in the order of the spatial motion information first and then the temporal motion information. This makes sense in the prediction method that regards the current block as a whole, because the spatial motion information comes from adjacent blocks in the same frame, while the temporal motion information comes from different frames. It can be said that the correlation of the spatial motion information Stronger. However, it is not completely applicable in AWP and GPM. In some modes of AWP or GPM, a part (for example, the lower right corner of E) may not be connected to the above-mentioned spatial adjacent position, on the contrary, it may be connected to I The locations are connected, so for this part, the spatial motion information may have a stronger correlation than the temporal motion information.
  • some methods of the present invention will break the order of spatial motion information first and temporal motion information after. Some methods may use the sequence of temporal motion information followed by spatial motion information, or the sequence of spatial temporal motion information interspersed.
  • the order of use of airspace motion information can be summarized as left (lower left) -> upper (internal right outer upper -> outer upper right) -> upper left (external left inner upper -> inner left outer upper -> External upper left).
  • the order of using airspace motion information can be summarized as outer left inner lower -> inner right outer upper -> outer right outer upper -> outer lower left -> outer upper left. If the airspace motion information is set at the relevant position in the lower right corner, then the airspace motion information is considered to be the lower right.
  • the following figure can roughly represent the order of the existing methods 1->2->3->4, that is, broadly lower left -> upper right -> upper left -> lower right.
  • the second dimension some methods of the present invention will break the order of relative positions. That is, some methods use a broad lower left -> upper right -> upper left -> lower right order, and some methods use a different order from lower left -> upper right -> upper left -> lower right.
  • the setting of this relative order is related to the mode of AWP or GPM.
  • the pattern of upper left and lower right divisions uses the upper left -> lower right -> other order (or lower right -> upper left -> other order); such as the lower left upper right division Use the lower left -> upper right -> other order (or upper right -> lower left -> other order); such as the up and down division mode (as shown in the AWP mode above) 3, 11, 19, etc.) use the order of top->bottom (or the order of bottom->up), top such as top left, top right, bottom such as bottom left, bottom right; such as the left and right divided mode (as shown in the AWP mode in the above figure) 7, 15, 23, etc.) Use the left->right order (or right->left order), left as upper left and lower left, and right as upper right and lower right.
  • Another possible method is to proceed to the next position after processing the part at the position indicated in the above sequence (such as the broad upper left), and then process the unprocessed part at the indicated position in the next round of processing, such as the lower left- >Upper right->Other order, after processing A first, deal with other positions such as lower right, and then deal with B and D in the second round.
  • One possible way to deal with this is to try to ensure that certain positions in the list are assigned to certain designated relative positions.
  • the AWP is the motion information related to the F position
  • the second position in the list (index 0) is the motion information related to the F position.
  • 1) is the related motion information on the upper right
  • the AWP is the related motion information of G and C. If the motion information of G can be filled in the second position (index1) in the list, then skip C to process the "other" positions in the above sequence. If the motion information of G cannot be filled in the second position in the list (index 1), then try to fill the motion information of C in the second position in the list (index 1).
  • the purpose is to make the index value of the two motion information as small as possible and the index value of the motion information coded later is larger than the index value of the motion information coded first.
  • the third dimension some methods of the present invention will break the processing sequence of first one-way and then two-way.
  • the one-way motion information is processed preferentially regardless of the position, or in other words, motion information with only one effective prediction direction.
  • the present invention may give priority to location, or comprehensively consider location and unidirectional and bidirectional.
  • the fourth dimension some methods of the present invention construct a bidirectional motion information candidate list.
  • AWP and GPM build a one-way motion information candidate list, that is, each motion information in the list is one-way motion information or has only one prediction direction or only the index of one reference frame list is valid, and the index of the other reference frame list is invalid .
  • some motion information in the list is bidirectional motion information or indexes with 2 prediction directions or 2 reference frame lists are valid.
  • AWP or GPM If a certain part of AWP or GPM selects bidirectional motion information, then the motion compensation for this part is processed according to the bidirectional prediction method. Since there are two-way optical flow BIO (Bi-directional Optical Flow), decoder-side motion vector optimization DMVR (Decoder-side Motion Vector Refinement) and other technologies in the bidirectional prediction method, AWP or GPM compensates for a certain part of the motion according to the bidirectional prediction method.
  • BIO Bi-directional Optical Flow
  • DMVR Decoder-side Motion Vector Refinement
  • the motion information candidate list allows two-way motion information, there may be different processing methods for processing time-domain motion information.
  • the temporal motion information denoted as MIT
  • MIA is derived from the motion information of a block of a non-current frame, denoted as MIA
  • MIA includes at most two prediction directions, and each effective prediction direction L0 or L1 points to a reference Frame, and has a corresponding motion vector.
  • This motion information needs to be scaled to the current block.
  • the scaled MIT has at most two prediction directions. Each effective prediction direction will point to a reference frame, and the corresponding motion vector needs to be determined by the non-current frame and the used prediction
  • the motion vector between the reference frames of the direction is scaled to between the current block and the specified reference frame of the current prediction direction.
  • the motion vector of L0 of MIT can be derived from the motion vector of L0 of MIA
  • the motion vector of L1 of MIA can be derived from the motion vector of L1 of MIA
  • the motion vector of L0 of MIA can be derived from the motion vector of L0 of MIA.
  • the motion vector of L0 and the motion vector of L0 of MIA derive the motion vector of L1 of MIT. It is also possible to derive the motion vector of L0 of MIT from the motion vector of L1 of MIA, and the motion vector of L1 of MIA derive the motion vector of L1 of MIT.
  • one possible method is to treat it as a two-way motion information.
  • One possible method is to treat its L0 motion information and L1 motion information as two unidirectional motion information, respectively.
  • the airspace motion information can be processed as two one-way motion information, which precedes the two-way motion information processing.
  • the present invention can use motion information directly available or available through transformation plus motion information derived from these motion information as candidates.
  • the priority of derived exercise information may be lower than that of exercise information that is directly available or through conversion.
  • One possible method is to process all the sports information that is directly available or available through transformation before processing the derived sports information.
  • One possible method is to process all the motion information that is directly available or available through transformation at a certain approximate location (such as the upper left), and then process the derived motion information of the approximate location. If a certain position in the list now needs to use a certain approximate position such as the upper left motion information, but the motion information of A, B, D are all coincident with the existing motion information in the list, try the derivative of A, B, D Sports information. Then process the motion information of other approximate positions.
  • the directly available motion information includes spatial motion information, and the motion information available through transformation includes temporal motion information.
  • the derived motion information includes the zoomed motion information of the motion information directly available or obtained by conversion, if the motion information MIO directly available or available through zooming is a one-way motion Information, assuming that the effective LX (X is 0 or 1) motion vector of the above-mentioned motion information MIO directly available or available through scaling is (X_LX, Y_LX), then the prediction direction and reference frame information of the derived motion information MID Same as MIO, the motion vector of MID LX (X is 0 or 1) is (X_LX*SCALE, Y_LX*SCALE), and SCALE is 0.5, 0.75, 0.8, 0.9, 1.1, 1.2, 1.25, 1.5, etc.
  • the motion vector of MID LX (X is 0 or 1) may also be (X_LX*SCALE, Y_LX) or (X_LX, Y_LX*SCALE).
  • one possible method is to generate 4 derivative information, which are respectively enlarged and reduced in the x and y directions.
  • the LX motion information is (X_LX*SCALE_L, Y_LX), X_LX, Y_LX*SCALE_L), (X_LX*SCALE_S, Y_LX), X_LX, Y_LX*SCALE_S).
  • SCALE_L is greater than 1, and SCALE_S is less than 1.
  • SCALE_L plus SCALE_S is equal to 2.
  • X_LX or Y_LX is 0, or the absolute value is too small, scaling may not be effective.
  • X_LX*SCALE or Y_LX*SCALE can be directly replaced with a fixed value. If the value of X_LX or Y_LX is equal to 0, replace X_LX*SCALE or Y_LX*SCALE with 8, or -8.
  • the scale of scaling SCALE is related to the value range of X_LX or Y_LX. If the value of X_LX or Y_LX is less than or equal to 64, SCALE is 0.75 (ie 3/4). If the value of X_LX or Y_LX is greater than 64 and less than Equal to 128, SCALE is 0.875 (ie 7/8), if the value of X_LX or Y_LX is greater than 128, SCALE is 0.9375 (ie 15/16).
  • the motion vector of L0 and the motion vector of L1 are respectively scaled.
  • the motion vector of L0 uses SCALE0
  • the motion vector of L1 uses SCALE1.
  • SCALE0 is equal to SCALE1
  • SCALE0 plus SCALE1 is equal to 2.
  • the scaling calculation can be written as X_LX or Y_LX multiplied by a decimal (floating point number); it can also be written as X_LX or Y_LX multiplied by an integer plus a fixed value, and then the obtained value is shifted to the right; it can also be the absolute of X_LX or Y_LX The value is multiplied by an integer plus a fixed value, then the resulting value is shifted to the right, and the sign is added at the end. Set the number of bits shifted to the right as shift, and the above fixed value is value.
  • the derived motion information includes the motion information of the offset of the motion information that is directly available or obtained by conversion, and it is assumed that the LX of the motion information MIO that is directly available or that is available through scaling.
  • the motion vector (X is 0 or 1) is (X_LX, Y_LX), then the prediction direction and reference frame information of the derived motion information MID are the same as MIO, and the motion vector of MID LX (X is 0 or 1) is (X_LX +OFFSET, Y_LX+OFFSET), the motion vector of MID LX (X is 0 or 1) may also be (X_LX+OFFSET, Y_LX) or (X_LX, Y_LX+OFFSET).
  • OFFSET is 2, 4, 8, 16, etc.
  • OFFSET is CLIP (MAX, MIN, X_LX/N) or CLIP (MAX, MIN, Y_LX/N), N may be 2, 4, 8, 16, etc. If X_LX/N or Y_LX/N is greater than MAX, the result of CLIP is MAX. If X_LX/N or Y_LX/N is less than MIN, the result of CLIP is MIN, otherwise the result of CLIP is equal to the value of X_LX/N or Y_LX/N.
  • the derived motion information includes two or more motion information that is directly available or calculated by converting the motion information of the available motion information into the zoomed motion information.
  • a method of selecting two or more of the above-mentioned motion information that is directly available or available through conversion is to select the motion information of the same broad position, such as the motion information of A, B, D in the upper left of X in the above figure. C and G movement information on the upper right.
  • One possible calculation method is to scale the selected two or more motion information to the same reference frame and then do an average or weighted average.
  • the number of times the derived motion information is generated can be limited, so as to ensure the worst-case complexity.
  • One possible method is to add the derived motion information to the motion information candidate list without performing a duplicate check operation, that is, not to compare the derived motion information with each motion information in the motion information candidate list.
  • One possible method is to add the motion information candidate list only if the derived motion information is different from the motion information used to generate it. So as to ensure the complexity of the worst case.
  • the embodiment of the present application provides two embodiments of the decoding end.
  • the decoder parses the information of whether the AWP is used. If it is determined to use the AWP, the decoder parses the AWP mode and the index of the two motion information.
  • the decoder constructs the motion information candidate list used by the current block AWP. Specifically as follows:
  • F, G, C, A, B, and D are the adjacent prediction blocks of the current prediction unit E (see Figure 12). Determine the "availability" of F, G, C, A, and D:
  • T The two-way motion information in the time domain derived according to the method of deriving motion information provided in the related art is denoted as T.
  • the second step is to generate no more than 8 derivative motion information according to one of the methods of generating derivative motion information in the above-mentioned embodiment.
  • the third step is to determine the scanning order of the relevant positions:
  • the fourth step is to sort the motion information. First, the original motion information available in one direction in the scanning order of the relevant position, then the original motion information available in both directions in the scanning order of the relevant position, and then the scanning by the relevant position.
  • the sequential one-way available derivative motion information is followed by the two-way available derivative motion information in the scan order of the relevant position.
  • the temporal motion information and its derived motion information are split into one-way motion information pointing to the reference frame list List0 and one-way motion information pointing to the reference frame list List1, and processed as one-way motion information.
  • the fifth step is to add the sorted motion information to AwpArray. First check the motion information, if it is not repeated, put it into the AwpArray until the length is 5 or the traversal ends.
  • the seventh step is to assign the AwpCandIdx0+1th motion information in the AwpArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1; assign the AwpCandIdx1+1th motion information in the AwpUniArray to mv1, RefAwpIdx1, mv1, RefAwpIdx1, mv1, RefAwpL0L0, mvAwp1x1, mvAwp0L0, RefIdxAwp0L1.
  • the motion information candidate list finds two motion information in the constructed motion information candidate list according to the parsed indexes of the two motion information. If the motion information is bidirectional, the bidirectional prediction method is used to obtain the intermediate prediction block, where BIO and DMVR are not used; if the motion information is unidirectional, the unidirectional prediction method is used to obtain the intermediate prediction block.
  • the weight of the two intermediate prediction blocks at each pixel position is determined according to the specific mode used by the AWP, and the two intermediate prediction blocks are weighted to obtain the prediction block of the current block.
  • the predicted block is the decoded block, and the decoding of the current block ends. If the current mode is not the skip mode, entropy decoding analyzes the quantized coefficients, then inverse quantization, inverse transformation to obtain the residual block, and the residual block and the prediction block are added to obtain the decoded block. The decoding of the current block ends.
  • the decoder parses the information of whether the AWP is used. If it is determined to use the AWP, the decoder parses the AWP mode and the index of the two motion information.
  • the decoder constructs the motion information candidate list used by the current block AWP. Specifically as follows:
  • the third step if the length of AwpUniArray is less than 3, split the bidirectional motion information available in the order of F, G, C, A, B, and D into one-way motion information pointing to the reference frame list List0 and pointing to the reference frame list List1
  • For the one-way motion information first check the one-way motion information, if it is not repeated, put it into AwpUniArray until the length is 4 or the traversal ends.
  • the fifth step if the length of AwpUniArray is less than 5, use the 0th and 1st unidirectional movement information in AwpUniArray to generate derived movement information.
  • For each unidirectional motion information MIO in AwpUniArray record its effective prediction direction as LX (X is 0 or 1), and the motion vector corresponding to LX is (X_LX, Y_LX).
  • LX LX
  • Y_LX the motion vector corresponding to LX
  • Their reference frame information is the same as that of MIO.
  • X_LX_0 (X_LX ⁇ 0)? -X_LX_0: X_LX_0.
  • the motion vector corresponding to LX of MID1 is (X_LX_1, Y_LX_1), where:
  • Y_LX_1 (Y_LX ⁇ 0)? -Y_LX_1:Y_LX_1.
  • the motion vector corresponding to LX of MID2 is (X_LX_2, Y_LX_2), where:
  • Y_LX_2 Y_LX.
  • the motion vector corresponding to LX of MID3 is (X_LX_3, Y_LX_3), where:
  • X_LX_3 X_LX.
  • derived motion information (MID0 or MID1 or MID2 or MID3) is not the same as MIO, add it to AwpUniArray until the length of AwpUniArray is 5 or the processing ends.
  • the seventh step is to assign the AwpCandIdx0+1th motion information in the AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1; assign the AwpCandIdx1+1th motion information in the AwpUniArray to mv1, RefAwp1xId, mv1, and RefIdxAwp0L0.
  • the motion information candidate list finds two motion information in the constructed motion information candidate list according to the parsed indexes of the two motion information. If the motion information is bidirectional, the bidirectional prediction method is used to obtain the intermediate prediction block, where BIO and DMVR are not used; if the motion information is unidirectional, the unidirectional prediction method is used to obtain the intermediate prediction block.
  • the weight of the two intermediate prediction blocks at each pixel position is determined according to the specific mode used by the AWP, and the two intermediate prediction blocks are weighted to obtain the prediction block of the current block.
  • the predicted block is the decoded block, and the decoding of the current block ends. If the current mode is not the skip mode, entropy decoding analyzes the quantized coefficients, then inverse quantization, inverse transformation to obtain the residual block, and the residual block and the prediction block are added to obtain the decoded block. The decoding of the current block ends.
  • FIG. 13 is a schematic flowchart of an inter-frame prediction method according to another embodiment of the application. As shown in FIG. 13, the method is applied to an encoder, and the method may include:
  • the encoder can construct different new motion information candidate lists according to different weight derivation modes. So that the construction of the motion information candidate list conforms to the weight derivation mode of the current block, so that the new motion information candidate list can arrange the motion information in the order of correlation with the current block from strong to weak, and the encoder can easily find the current block.
  • the motion information with strong block correlation can improve the coding efficiency of the current block.
  • the weight derivation mode of the current block is one of multiple weight derivation modes in the geometric partition prediction mode, or the weight derivation mode of the current block is one of the multiple weight derivation modes in the angle-weighted prediction mode Kind of.
  • the weight derivation mode of the current block has different categories, and the new motion information candidate list constructed is different.
  • a new candidate list of motion information is constructed.
  • the known motion information related to the current block includes N motion information related to the current block; N is an integer greater than or equal to 1;
  • the N motion information related to the current block includes: motion information of at least one neighboring block of the current block in the spatial domain, and/or motion information of at least one corresponding block of the current block in the time domain.
  • the original motion information is one-way original motion information, or two-way original motion information, or one or two one-way original motion information obtained by splitting the two-way original motion information.
  • determining the sorting method of the known motion information related to the current block includes one of the following:
  • the weight derivation mode of the current block is the first-type weight derivation mode, arranging the motion information of at least one corresponding block before the motion information of the at least one neighboring block;
  • the motion information of at least one corresponding block is arranged after the motion information of at least one neighboring block.
  • the weight derivation mode based on the current block is used to determine the value of the known motion information related to the current block. Sorting method, including one of the following:
  • the known motion information related to the current block is sorted by a sorting method determined from a sorting method set, and the sorting method set includes: the motion information of the lower left related block of the current block, the current The motion information of the upper-right related block of the block, the motion information of the upper-left related block of the current block, and the motion information of the lower-right related block of the current block are all arranged to obtain multiple sorting modes;
  • the sorting mode determined from the sorting mode set is different
  • the motion information of the lower-left related block of the current block is: the motion information of the current block in the spatial domain or the motion information of the current block in the time domain.
  • the motion information of the upper-left neighboring block of the current block includes: the motion information of all or part of the upper-left blocks of the current block;
  • the motion information of the lower right block of the current block in the time domain includes: motion information of the block in the time domain outside the current block, or motion information of the block in the time domain inside the current block.
  • determining the sorting method of the known motion information related to the current block includes one of the following:
  • the weight derivation mode of the current block is the fourth type of weight derivation mode, arrange all or part of the unidirectional original motion information in the N motion information to split the bidirectional motion information in the N motion information , Before getting all or part of one or two one-way original motion information;
  • the weight derivation mode of the current block is the fifth type of weight derivation mode
  • all or part of the unidirectional original motion information in the N motion information is arranged in all or part of the bidirectional motion information in the N motion information Before;
  • the weight derivation mode of the current block is the sixth type of weight derivation mode, determine the sorting priority of the N motion information, and sort the N motion information based on the sorting priority;
  • the weight derivation mode of the current block is the seventh type of weight derivation mode
  • the unidirectional and bidirectional information of each movement information in the N pieces of movement information, and the sorting priority of the N pieces of movement information are determined, based on the single and bidirectional information of each piece of movement information. Two-way information and sorting priority sort N motion information.
  • the method further includes:
  • the one-way motion information of the first target block is scaled to obtain the two-way motion information of the corresponding block.
  • each of the N pieces of movement information further includes derivative movement information, and the derivative movement information is determined based on the original movement information;
  • the derived exercise information is one-way derived exercise information, or two-way derived exercise information, or one or two one-way derived exercise information obtained by splitting the two-way derived exercise information;
  • One-way derived motion information is determined based on one-way original motion information or two-way motion information
  • two-way derived motion information is determined based on one-way original motion information or two-way motion information.
  • the at least one type of information in the priority ranks the N pieces of motion information based on the at least one type of information.
  • the prediction direction of the derived motion information is the same as the prediction direction of the original motion information
  • the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
  • the motion vector information includes first axis component information and second axis component information; the method further includes:
  • the first axis is an x-axis or a y-axis
  • the second axis is a y-axis or an x-axis
  • the first axis is different from the second axis.
  • the first axis component information of the original motion information Based on the result of scaling the first axis component information of the original motion information, determine the first axis component information of each of the M derivative motion information; based on the second axis component information of the original motion information As a result of the scaling of the component information, the second axis component information of each derived motion information in the M pieces of derived motion information is determined.
  • the determining the first axis component information of each derived motion information in the M pieces of derived motion information based on the result of scaling the first axis component information of the original motion information includes one of the following one:
  • the determining the first axis component information of each derived motion information based on each of the M first results includes one of the following:
  • the determining the first axis component information of each derived motion information based on each of the M second results includes one of the following:
  • the third value is obtained by shifting the target bit to the left by one, and the target bit is the specific number of bits minus one.
  • the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the first specific value is equal to The sum of the second specific value is 2.
  • the method further includes:
  • the first coefficient is smaller than the second coefficient
  • the second coefficient is smaller than the third coefficient
  • the method further includes:
  • the first target value is used as the first axis component information of the derivative motion information
  • the first axis component information in the motion vector information of the original motion information is less than or equal to the first threshold, and the first axis component information in the motion vector information of the original motion information is a negative number
  • the M first divisors include a first group of divisors, and/or, a second group of divisors, and/or, a third group of divisors;
  • Each divisor in the first group of divisors is greater than a maximum threshold
  • Each divisor in the second group of divisors is greater than or equal to the minimum threshold and less than or equal to the maximum threshold;
  • Each divisor in the third group of divisors is less than a minimum threshold
  • the determining the first axis component information of each derivative motion information based on each of the M first divisors includes at least one of the following:
  • each divisor in the second set of divisors as the first axis component information of each derivative motion information corresponding to the second set of divisors in the M pieces of derivative motion information;
  • the minimum threshold is used as the first axis component information of each derivative motion information corresponding to the third set of divisors among the M derivative motion information.
  • the method further includes:
  • the first value is multiplied by the first axis component information or the second axis component information in the motion vector information of the first one-way original motion information as the result of the first one-way derived motion information
  • the fourth value is multiplied by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the motion vector of the second one-way derived motion information
  • the first value and the fourth value are both greater than 0;
  • the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
  • the N motion information includes: original motion information of at least two neighboring blocks of the current block in the spatial domain; at least two neighboring blocks are neighboring, or at least two neighboring blocks are in the current block. Lower left corner or upper right corner or upper left corner;
  • Determine derived movement information based on the original movement information including:
  • the block to be averaged includes the second target block;
  • each of the N pieces of movement information includes original movement information
  • a new motion information candidate list including:
  • all or part of the original motion information of at least one adjacent block, and/or all or part of the original motion information of at least one corresponding block are filled in the initial motion information candidate list sequentially or interlaced, Get a new candidate list of motion information.
  • each of the N pieces of exercise information includes derivative exercise information
  • all or part of the original motion information of at least one adjacent block, and/or all or part of the original motion information of at least one corresponding block are filled in the initial motion information candidate list sequentially or interlaced, Get a new candidate list of motion information, including:
  • all or part of the original motion information of at least one neighboring block, all or part of the original motion information of at least one corresponding block, all or part of the derived motion information of at least one neighboring block, and at least one At least one of all or part of the derived motion information of the corresponding block is filled in the initial motion information candidate list sequentially or staggered.
  • the initial motion information candidate list can be filled with a preset number of motion information; each motion information of the preset number of motion information is original motion information or derived motion information; the preset number is 2-6.
  • the method further includes:
  • the derivative motion information to be filled is filled into the initial motion information
  • the derived motion information to be filled is filled into the initial motion information candidate list.
  • the method before determining the sorting method of known motion information related to the current block based on the weight derivation mode of the current block, the method further includes:
  • the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of adjacent blocks and/or derived motion information of corresponding blocks.
  • the method further includes:
  • the method further includes:
  • Two one-way original motion information continue to be filled into the initial motion information candidate list; alternatively, the two-way original motion information of at least one adjacent block is sequentially filled into the initial motion information candidate list;
  • the second total number of original motion information filled in the initial motion information candidate list is equal to the preset number minus one, continue to fill in the one-way motion information or two-way motion information of a corresponding block in the initial motion information candidate list .
  • the second total number of one-way original motion information filled in the initial motion information candidate list is less than the preset number minus one, acquiring the first two one-way original motion information filled in the initial motion information candidate list;
  • the two-way derived motion information to be filled is two-way derived motion information
  • the two-way derived motion information is split into two one-way derived motion information; at least one of the two one-way derived motion information is One is filled in the initial motion information candidate list;
  • the original motion information to be filled is bidirectional original motion information
  • split the bidirectional original motion information into two unidirectional original motion information and fill in at least one of the two unidirectional original motion information. Enter the initial motion information candidate list, or fill the bidirectional original motion information into the initial motion information candidate list.
  • the method further includes:
  • the multiple weight derivation modes in the geometric division prediction mode or the multiple weight derivation modes in the angle-weighted prediction mode are grouped to obtain at least two types of weight derivation modes; different types of weight derivation modes correspond to different sorting methods.
  • At least two sets of division patterns include:
  • the eighth type of weight derivation mode is used to characterize the weight derivation mode of the current block as the upper left and lower right weight derivation modes;
  • the ninth type of weight derivation mode is used to characterize that the weight derivation mode of the current block is an upper and a lower weight derivation mode;
  • the tenth type of weight derivation mode is used to characterize the weight derivation mode of the current block as the lower left and upper right weight derivation modes;
  • the eleventh type of weight derivation mode is used to characterize that the weight derivation mode of the current block is the left and right weight derivation modes.
  • the sorting method of the known motion information is the sorting method in which the motion information of the upper-left neighboring block of the current block is sorted first ;
  • the weight derivation mode of the current block belongs to the ninth type of weight derivation mode, determining that the known motion information is sorted as a sorting method in which the motion information of the upper block of the current block is sorted first;
  • the sorting method of the known motion information is the sorting method of the motion information of the lower-left neighboring block of the current block.
  • the sorting method of the known motion information is a sorting method in which the motion information of the left block of the current block is sorted first.
  • the at least one corresponding block includes at least one of a block corresponding to the upper left corner inside the current block, a block corresponding to the lower right corner inside the current block, and a block corresponding to the lower right corner outside the current block.
  • the current block in the weight derivation mode of the current block, is divided into a first partition and a second partition;
  • determine the inter prediction value of the current block including:
  • the motion information of the first partition is bidirectional motion information
  • the motion information of the first partition is processed according to a bidirectional prediction method
  • the motion information of the second partition is bidirectional motion information
  • the motion information of the second partition is processed according to a bidirectional prediction method.
  • the bidirectional prediction method is a method that does not use bidirectional optical flow or a method that optimizes motion vector at the decoding end.
  • determining the motion information of the first partition and the motion information of the second partition from the new motion information candidate list includes:
  • the motion information in the new motion information candidate list indicated by the index value of the second partition is determined as the motion information of the second partition.
  • determining the index value of the first partition and the index value of the second partition includes:
  • the minimum rate-distortion cost value is selected from the obtained multiple rate-distortion cost values, and the two motion information corresponding to the minimum rate-distortion cost value are respectively determined as the index value of the first partition and the index value of the second partition.
  • obtaining the weight derivation mode of the current block includes:
  • the prediction mode parameter is used to indicate the use of the geometric division prediction mode or the angle-weighted prediction mode to determine the inter prediction value of the current block;
  • the new motion information candidate list is a candidate list that allows bidirectional motion information.
  • the motion information candidate list is constructed according to the AWP mode, and the construction method is the same as the construction method described in the embodiment of the decoding end. Select two motion information from the motion information candidate list.
  • One possible method is to combine all possible motion information candidates, and determine the cost of all possible AWP modes, instead of the two least expensive motion information and AWP modes. The combination of is the final one-way motion information and AWP mode.
  • AWP Write information about whether AWP is used or not in the code stream. If it is determined to use AWP, write the AWP mode and two motion information indexes in the code stream. If the current mode is the skip mode, the decoding of the current block ends. If the current mode is not the skip mode, write the quantization coefficient in the code stream. The quantization coefficient is obtained by subtracting the prediction block from the actual value of the current block to obtain the residual block, which is transformed and quantized to obtain the residual block. The decoding of the current block ends.
  • an adaptive motion information candidate list construction method is proposed, that is, the method of determining the construction method of the motion information candidate list of AWP or GPM according to the mode of AWP or GPM, so that each type of AWP or GPM mode, that is, every One type of division method has a matching motion information candidate list, thereby improving the coding efficiency, but does not add additional computational complexity to the decoder, because the use of AWP or GPM blocks only needs to construct the motion information of AWP or GPM once.
  • Candidate list is, the method of determining the construction method of the motion information candidate list of AWP or GPM according to the mode of AWP or GPM, so that each type of AWP or GPM mode, that is, every One type of division method has a matching motion information candidate list, thereby improving the coding efficiency, but does not add additional computational complexity to the decoder, because the use of AWP or GPM blocks only needs to construct the motion information of AWP or GPM once.
  • Candidate list the method
  • FIG. 14 is a schematic flowchart of an inter-frame prediction method provided by another embodiment of this application. As shown in FIG. 14, the method is applied to a decoder, and the method may include:
  • the decoder can obtain the original motion information in the process of parsing the code stream. Since the original motion information includes motion vector information and reference frame information, the decoder can obtain the motion of the original motion information related to the current block. Vector information.
  • the decoder can obtain known motion information related to the current block.
  • the known motion information related to the current block includes a preset number of motion information.
  • Each movement information in the preset number of pieces of movement information may include original movement information or derivative movement information, where the derivative movement information is determined based on the original movement information.
  • the method of determining derived motion information based on the original motion information can refer to the description in the foregoing embodiment, or refer to the description in the following embodiment.
  • S1403 Determine the motion vector information of M derived motion information based on the result of scaling the motion vector information of the original motion information; M is an integer greater than or equal to 1.
  • Scaling the motion vector information of the original motion information may refer to obtaining the motion vector information of the derived motion information based on the calculation result of the multiplication or division of the original motion information.
  • the decoder obtains at least two original motion information related to the current block by parsing the code stream, and based on each original motion information, one or at least two derived motion information can be obtained, and a new The motion information candidate list may use all or part of the original motion information in the at least two original motion information, and may use all or part of the motion vector information of the M derived motion information.
  • the amount of original motion information used can be greater than, less than or equal to the derived motion information. That is, the new motion information candidate list may include all or part of the at least two original motion information, and all or part of the motion vector information of the M derived motion information.
  • constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information may include: determining the derived motion information based on the motion vector information of the derived motion information The motion information, based on the original motion information and the derived motion information, constructs a new motion information candidate list.
  • determining the derived motion information based on the motion vector information of the derived motion information may include: determining the reference frame information of the derived motion information, and determining the derived motion information based on the motion vector information of the derived motion information and the reference frame information of the derived motion information.
  • Sports information The method for determining the reference frame information of the derived motion information can refer to the description of the foregoing embodiment.
  • the new motion information candidate list includes at least two filled-in motion information, and each of the at least two filled-in motion information is original motion information or derived motion information.
  • all the obtained original motion information may be placed before the obtained derived motion information, or the original motion information and the derived motion information may be arranged alternately.
  • the new motion information candidate list is obtained, and the new motion information candidate list is thus obtained.
  • the motion information candidate list can make full use of the motion vector information of the original motion information that has been acquired, so that the construction of the motion information candidate list conforms to the weight derivation mode of the current block, so that the new motion information candidate list can combine the motion information according to and
  • the correlation of the current block is arranged in order from strong to weak, so the decoding efficiency of the current block can be improved.
  • the motion vector information includes first axis component information and second axis component information
  • the determining the motion vector information of the M derived motion information based on the result of scaling the motion vector information of the original motion information includes one of the following:
  • the first axis is an x-axis or a y-axis
  • the second axis is a y-axis or an x-axis
  • the first axis is different from the second axis.
  • the determining the first axis component information of each derived motion information in the M pieces of derived motion information based on the result of scaling the first axis component information of the original motion information includes the following one:
  • the determining the first axis component information of each derivative motion information based on each of the M first results includes one of the following:
  • the determining the first axis component information of each derivative motion information based on each of the M second results includes one of the following:
  • the third value is obtained by shifting the target bit to the left by one, and the target bit is the specific number of bits minus one.
  • the determining the first axis component information of each derivative motion information based on each of the M third results includes:
  • the result of multiplying each of the M third results by a negative one is used as the first result of each derived motion information.
  • Axis component information is used as the first result of each derived motion information.
  • the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the first threshold
  • the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the first specific value is equal to The sum of the second specific value is 2.
  • the method further includes:
  • the first coefficient is smaller than the second coefficient
  • the second coefficient is smaller than the third coefficient
  • the method further includes:
  • the first target value is used as the first axis component information of the derivative motion information
  • the first axis component information in the motion vector information of the original motion information is less than or equal to the first threshold, and the first axis component information in the motion vector information of the original motion information is a negative number
  • the M first divisors include a first group of divisors, and/or, a second group of divisors, and/or, a third group of divisors;
  • Each divisor in the second group of divisors is greater than or equal to the minimum threshold and less than or equal to the maximum threshold;
  • the determining the first axis component information of each derivative motion information based on each of the M first divisors includes at least one of the following:
  • each divisor in the second set of divisors as the first axis component information of each derivative motion information corresponding to the second set of divisors in the M pieces of derivative motion information;
  • the minimum threshold is used as the first axis component information of each derivative motion information corresponding to the third set of divisors among the M derivative motion information.
  • the original motion information is one-way original motion information, or two-way original motion information, or one or two one-way original motion information obtained by splitting the two-way original motion information;
  • the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
  • the constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information includes:
  • the new motion information candidate list is constructed based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
  • the constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information includes :
  • the new motion information candidate list is constructed.
  • the method before the determining the sorting mode of the known motion information related to the current block based on the weight derivation mode of the current block, the method further includes:
  • the specific number is less than or equal to 8; the specific number of derived motion information includes: derived motion information of adjacent blocks and/or derived motion information of corresponding blocks.
  • the second total number of one-way original motion information filled in the initial motion information candidate list is less than the preset number minus one, obtain the first two pieces filled in the initial motion information candidate list One-way original motion information;
  • the third total of the one-way original motion information and the one-way derived motion information filled in the initial motion information candidate list is equal to the preset number minus one, the one-way motion of the corresponding block Information or two-way motion information continues to be filled in the initial motion information candidate list.
  • the two-way derived motion information to be filled is two-way derived motion information
  • the two-way derived motion information is split into two one-way derived motion information; the two one-way derived motion information are divided At least one of the motion information is filled in the initial motion information candidate list;
  • the original motion information to be filled is bidirectional original motion information
  • split the bidirectional original motion information into two unidirectional original motion information and divide the two unidirectional original motion information into At least one of is filled in the initial motion information candidate list, or the two-way original motion information is filled in the initial motion information candidate list.
  • the method further includes:
  • the first value is multiplied by the first axis component information or the second axis component information in the motion vector information of the first one-way original motion information as the result of the first one-way derived motion information
  • the fourth value is multiplied by the first axis component information or the second axis component information in the motion vector information of the second one-way original motion information as the motion vector of the second one-way derived motion information
  • the first value and the fourth value are both greater than 0;
  • the first value is the same as the fourth value, or the first value is different from the fourth value and the sum of the first value and the fourth value is 2.
  • the decoder combines all or part of the original motion information of the at least one neighboring block, all or part of the original motion information of at least one corresponding block, and the at least one All or part of the derived motion information of adjacent blocks and at least one of all or part of the derived motion information of at least one corresponding block are filled in the initial motion information candidate list in sequence or staggered.
  • the method further includes:
  • the derivative motion information to be filled is Fill in the initial motion information candidate list
  • the derivative motion information to be filled is filled into the initial motion information candidate list.
  • the prediction direction of the derived motion information is the same as the prediction direction of the original motion information ;
  • the reference frame information of the derived motion information is the same as the reference frame information of the original motion information.
  • FIG. 15 is a schematic flowchart of an inter-frame prediction method provided by still another embodiment of this application. As shown in FIG. 15, the method is applied to an encoder, and the method may include:
  • S1503 Determine the motion vector information of M derived motion information based on the result of scaling the motion vector information of the original motion information; M is an integer greater than or equal to 1.
  • the new motion information candidate list is obtained, and the new motion information candidate list is thus obtained.
  • the motion information candidate list can make full use of the motion vector information of the original motion information that has been acquired, so that the construction of the motion information candidate list conforms to the weight derivation mode of the current block, so that the new motion information candidate list can combine the motion information according to and
  • the correlation of the current block is arranged in order from strong to weak, so the coding efficiency of the current block can be improved.
  • the motion vector information includes first axis component information and second axis component information
  • the determining the motion vector information of the M derived motion information based on the result of scaling the motion vector information of the original motion information includes one of the following:
  • the first axis is an x-axis or a y-axis
  • the second axis is a y-axis or an x-axis
  • the first axis is different from the second axis.
  • the determining the first axis component information of each derived motion information in the M pieces of derived motion information based on the result of scaling the first axis component information of the original motion information includes the following one:
  • the determining the first axis component information of each derivative motion information based on each of the M first results includes one of the following:
  • the determining the first axis component information of each derivative motion information based on each of the M second results includes one of the following:
  • the third value is obtained by shifting the target bit to the left by one, and the target bit is the specific number of bits minus one.
  • the determining the first axis component information of each derivative motion information based on each of the M third results includes:
  • the absolute value of the first axis component information in the motion vector information of the original motion information is greater than the first threshold
  • the M first values include a first specific value and a second specific value, the first specific value is greater than 0 and less than 1, the second specific value is greater than 1 and less than 2, and the first specific value is equal to The sum of the second specific value is 2.
  • the method further includes:
  • the first coefficient is smaller than the second coefficient
  • the second coefficient is smaller than the third coefficient
  • the method further includes:
  • the first target value is used as the first axis component information of the derivative motion information
  • the first axis component information in the motion vector information of the original motion information is less than or equal to the first threshold, and the first axis component information in the motion vector information of the original motion information is a negative number
  • the M first divisors include a first group of divisors, and/or, a second group of divisors, and/or, a third group of divisors;
  • Each divisor in the first group of divisors is greater than a maximum threshold
  • Each divisor in the second group of divisors is greater than or equal to the minimum threshold and less than or equal to the maximum threshold;
  • Each divisor in the third group of divisors is less than a minimum threshold
  • the determining the first axis component information of each derivative motion information based on each of the M first divisors includes at least one of the following:
  • each divisor in the second set of divisors as the first axis component information of each derivative motion information corresponding to the second set of divisors in the M pieces of derivative motion information;
  • the minimum threshold is used as the first axis component information of each derivative motion information corresponding to the third set of divisors among the M derivative motion information.
  • the derivative sports information is one-way derivative sports information, or two-way derivative sports information, or one or two one-way derivative sports information obtained by splitting the two-way derivative sports information;
  • the one-way derived motion information is determined based on the one-way original motion information or the two-way motion information, and the two-way derived motion information is determined based on the one-way original motion information or the two-way motion information.
  • the obtaining the motion vector information of the original motion information related to the current block includes:
  • the constructing a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information includes:
  • the new motion information candidate list is constructed based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information.
  • the constructing the new motion information candidate list based on the weight derivation mode of the current block, the motion vector information of the original motion information, and the motion vector information of the derived motion information includes :
  • the new motion information candidate list is constructed.
  • the current block in the weight derivation mode of the current block, is divided into a first partition and a second partition;
  • the determining the inter prediction value of the current block based on the new motion information candidate list includes:
  • the determining the motion information of the first partition and the motion information of the second partition from the new motion information candidate list includes:
  • the motion information in the new motion information candidate list indicated by the index value of the second partition is determined as the motion information of the second partition.
  • the determining the index value of the first partition and the index value of the second partition includes:
  • the embodiments of the present application provide a decoder/encoder.
  • the units included in the decoder/encoder and the modules included in each unit can be processed by the decoder/encoder.
  • the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate Array (FPGA), etc.
  • FIG. 16 is a schematic diagram of the composition structure of a decoder provided by an embodiment of the application.
  • the decoder 1600 may be provided in the decoder. As shown in FIG. 16, the decoder 1600 may include:
  • the obtaining unit 1601 is configured to parse the code stream and obtain the weight derivation mode of the current block.
  • the constructing unit 1602 is configured to construct a new motion information candidate list based on the weight derivation mode of the current block.
  • the prediction unit 1603 is configured to determine the inter prediction value of the current block based on the new motion information candidate list.
  • FIG. 17 is a schematic diagram of the composition structure of an encoder provided by an embodiment of the application.
  • the encoder 1700 may be provided in the encoder. As shown in FIG. 17, the encoder 1700 may include:
  • the mode determining unit 1701 is configured to determine the weight derivation mode of the current block.
  • the constructing unit 1702 is configured to construct a new motion information candidate list based on the weight derivation mode of the current block.
  • the prediction unit 1703 is configured to determine the inter prediction value of the current block based on the new motion information candidate list.
  • FIG. 18 is a schematic diagram of the composition structure of another decoder provided by an embodiment of the application.
  • the decoder 1800 may be provided in the decoder. As shown in FIG. 18, the decoder 1800 may include:
  • the derived motion information determining unit 1802 is configured to determine the motion vector information of M derived motion information based on the result of scaling the motion vector information of the original motion information; M is an integer greater than or equal to 1;
  • the constructing unit 1803 is configured to construct a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
  • the prediction unit 1804 is configured to determine the inter prediction value of the current block based on the new motion information candidate list.
  • FIG. 19 is a schematic diagram of the composition structure of another encoder provided by an embodiment of the application.
  • the encoder 1900 may be provided in a decoder. As shown in FIG. 19, the encoder 1900 may include:
  • the original motion information determining unit 1901 is configured to determine the motion vector information of the original motion information related to the current block;
  • the derived motion information determining unit 1902 is configured to determine the motion vector information of M derived motion information based on the result of scaling the motion vector information of the original motion information; M is an integer greater than or equal to 1;
  • the construction unit 1903 is configured to construct a new motion information candidate list based on the motion vector information of the original motion information and the motion vector information of the derived motion information;
  • the prediction unit 1904 is configured to determine the inter prediction value of the current block based on the new motion information candidate list.
  • the embodiment of the present application only shows a structure of the decoder 1600, the encoder 1700, the decoder 1800, and the encoder 1900, those skilled in the art can understand that the decoder 1600, Any one of the encoder 1700, the decoder 1800, and the encoder 1900 may further include other units that can implement the steps of any of the foregoing embodiments, and the units that have been described in the embodiments of the present application may also implement any of the foregoing. Other steps of the embodiment.
  • decoder/encoder embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment.
  • technical details not disclosed in the decoder/encoder embodiment of this application please refer to the description of the method embodiment of this application for understanding.
  • the inter-frame prediction method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or a part that contributes to related technologies.
  • the computer software product is stored in a storage medium and includes a number of instructions to enable A decoder/encoder executes all or part of the methods described in the various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), magnetic disk or optical disk and other media that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
  • FIG. 20 is a schematic diagram of the hardware entity of a decoder provided by an embodiment of the application.
  • the hardware entity of the decoder 2000 includes a processor 2001 and a memory 2002.
  • the computer program running on the processor 2001 implements the steps in the method executed by the decoder of any one of the foregoing embodiments when the processor 2001 executes the program.
  • FIG. 21 is a schematic diagram of the hardware entity of an encoder provided by an embodiment of the application.
  • the hardware entity of the encoder 2100 includes a processor 2101 and a memory 2102.
  • the computer program running on 2101 when the processor 2101 executes the program, implements the steps in the method executed by the encoder in any of the foregoing embodiments.
  • the embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the decoder in the foregoing method.
  • the embodiment of the present application provides a computer storage medium, and the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method executed by the encoder in the foregoing method.
  • the decoder 2000 can be the same decoder as the decoder 1600, the decoder 2000 can be the same decoder as the decoder 1800, the encoder 2100 can be the same encoder as the encoder 1700, and the encoder 2100 can be the same as the encoder 1900.
  • the decoder 2000 can be the same decoder as the decoder 1600, the decoder 2000 can be the same decoder as the decoder 1800, the encoder 2100 can be the same encoder as the encoder 1700, and the encoder 2100 can be the same as the encoder 1900.
  • the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the aforementioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
  • DR RAM Direct Rambus RAM
  • the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
  • the decoder/encoder executes any step in the embodiments of the present application, and the processor of the decoder/encoder may execute the step.
  • the embodiment of the present application does not limit the sequence in which the decoder/encoder executes the following steps.
  • the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiments of the present application can be independently executed by the decoder/encoder, that is, when the decoder/encoder executes any step in the following embodiments, it does not depend on other steps. Implementation.
  • the disclosed decoder/encoder and method can be implemented in other ways.
  • the decoder/encoder embodiments described above are merely illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other divisions, such as multiple units or components. Can be combined, or can be integrated into another system, or some features can be omitted or not implemented.
  • the coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, indirect coupling or communication connection between resource devices or units, and may be electrical, mechanical, or other Form.
  • the foregoing program can be stored in a computer readable storage medium.
  • the execution includes The steps of the foregoing method embodiment; and the foregoing storage medium includes: removable storage resource devices, read only memory (Read Only Memory, ROM), magnetic disks or optical disks and other media that can store program codes.
  • the aforementioned integrated unit of this application is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or a part that contributes to related technologies.
  • the computer software product is stored in a storage medium and includes a number of instructions to enable The decoder/encoder executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: removable storage resource devices, ROMs, magnetic disks, or optical discs and other media that can store program codes.
  • the decoder/encoder executes P and executes Q, which can mean that the decoder/encoder executes P first and then executes Q, or The decoder/encoder executes Q first, and then executes P, or the decoder/encoder executes P while executing Q.
  • the above are only the implementation manners of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Covered in the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
  • the embodiments of the present application provide an inter-frame prediction method, a decoder, an encoder, and a computer storage medium.
  • the solution of the inter-frame prediction method in the present application is adopted so that the decoder can construct different weight derivation modes according to different weights.
  • the new motion information candidate list enables the construction of the motion information candidate list to conform to the weight derivation mode of the current block, thereby improving the decoding efficiency of the decoder.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

一种帧间预测方法,应用于解码器,所述方法包括:解析码流,获取当前块的权重导出模式;基于所述当前块的权重导出模式,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。一种解码器、编码器及计算机存储介质。

Description

帧间预测方法、解码器、编码器及计算机存储介质
相关申请的交叉引用
本申请基于申请号为202010507268.X、申请日为2020年06月05日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本申请。
技术领域
本申请实施例涉及但不限于视频编解码技术领域,尤其涉及一种帧间预测方法、解码器、编码器及计算机存储介质。
背景技术
在视频编解码领域,针对当前块进行解码的过程,除了采用帧内预测方式外,还可以采用帧间预测方式。其中,帧间预测可以包括帧间几何划分预测模式(Geometric Partitioning Mode,GPM)和角度加权预测模式(Angular Weighted Prediction,AWP)等,通过将帧间的当前块划分为两个非矩形的分区(或两个块)分别进行预测后再加权融合,能够得到当前块的预测值。
然而,相关技术中存在由于运动信息候选列表的构建不合理而导致解码效率低的问题。
发明内容
本申请实施例提供一种帧间预测方法、解码器、编码器及计算机存储介质。
第一方面,提供一种帧间预测方法,应用于解码器,所述方法包括:解析码流,获取当前块的权重导出模式;基于所述当前块的权重导出模式,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第二方面,提供一种帧间预测方法,应用于编码器,所述方法包括:确定当前块的权重导出模式;
基于所述当前块的权重导出模式,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第三方面,提供一种帧间预测方法,应用于解码器,所述方法包括:解析码流,获取当前块相关的原始运动信息的运动矢量信息;基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第四方面,提供一种帧间预测方法,应用于编码器,所述方法包括:确定当前块相关的原始运动信息的运动矢量信息;基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第五方面,提供一种解码器,包括:获取单元,用于解析码流,获取当前块的权重导出模式;构建单元,用于基于所述当前块的权重导出模式,构建新的运动信息候选列表;预测单元,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第六方面,提供一种编码器,包括:模式确定单元,用于确定当前块的权重导出模式;构建单元,用于基于所述当前块的权重导出模式,构建新的运动信息候选列表;预测单元,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第七方面,提供一种解码器,包括:获取单元,用于解析码流,获取当前块的权重导出模式;衍生运动信息确定单元,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;构建单元,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;预测单元,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第八方面,提供一种编码器,包括:原始运动信息确定单元,用于确定当前块相关的原始运动信息的运动矢量信息;衍生运动信息确定单元,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;构建单元,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;预测单 元,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
第九方面,提供一种解码器,包括:存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法中的步骤。
第十方面,提供一种编码器,存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,
所述处理器执行所述程序时实现上述方法中的步骤。
第十一方面,提供一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中的步骤。
本申请实施例中,解码器解析码流,获取当前块的权重导出模式;基于所述当前块的权重导出模式,构建新的运动信息候选列表;基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。如此,由于解码器构建的新的运动信息候选列表,根据的是当前块的权重导出模式,从而解码器能够根据不同的权重导出模式,构建出不同的新的运动信息候选列表,从而使得运动信息候选列表的构建符合当前块的权重导出模式,进而能够提高解码器的解码效率。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并于说明书一起用于说明本申请的技术方案。
图1为本申请实施例提供的一种视频编码系统的组成框图示意图;
图2为本申请实施例提供的一种视频解码系统的组成框图示意图;
图3为本申请实施例提供的一种典型图像组的结构示意图;
图4a为本申请实施例提供的一种GPM在64×64的当前块上多种划分模式的权重分配示意图;
图4b为本申请实施例提供的一种AWP在64×64的当前块上多种划分模式的权重分配示意图;
图4c为本申请实施例提供的一种AWP在64×32的当前块上多种划分模式的权重分配示意图;
图4d为本申请实施例提供的一种AWP在32×64的当前块上多种划分模式的权重分配示意图;
图5为本申请实施例提供的一种当前块与相邻块的空间位置关系示意图;
图6为本申请实施例提供的另一种当前块与相邻块的空间位置关系示意图;
图7为本申请实施例提供的一种帧间预测方法的流程示意图;
图8为本申请实施例提供的又一种当前块与相邻块的空间位置关系示意图;
图9为本申请实施例提供的另一种帧间预测方法的流程示意图;
图10为本申请实施例提供的又一种帧间预测方法的流程示意图;
图11为本申请实施例提供的再一种帧间预测方法的流程示意图;
图12为本申请实施例提供的一种当前块、相邻块与对应块之间的空间位置关系示意图;
图13为本申请另一实施例提供的一种帧间预测方法的流程示意图;
图14为本申请又一实施例提供的一种帧间预测方法的流程示意图;
图15为本申请再一实施例提供的一种帧间预测方法的流程示意图;
图16为本申请实施例提供的一种解码器的组成结构示意图;
图17为本申请实施例提供的一种编码器的组成结构示意图;
图18为本申请实施例提供的另一种解码器的组成结构示意图;
图19为本申请实施例提供的另一种编码器的组成结构示意图;
图20为本申请实施例提供的一种解码器的硬件实体示意图;
图21为本申请实施例提供的一种编码器的硬件实体示意图。
具体实施方式
下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是:在本申请实例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
另外,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征当前块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
目前,通用的视频编解码标准基于都采用基于块的混合编码框架。视频图像中的每一帧被分割成相同大小(比如128×128,64×64等)的正方形的最大编码单元(Largest Coding Unit,LCU),每个最大 编码单元还可以根据规则划分成矩形的编码单元(Coding Unit,CU);而且编码单元可能还会划分成更小的预测单元(Prediction Unit,PU)。具体地,混合编码框架可以包括有预测、变换(Transform)、量化(Quantization)、熵编码(Entropy Coding)、环路滤波(In Loop Filter)等模块;其中,预测模块可以包括帧内预测(intra prediction)和帧间预测(inter prediction),帧间预测可以包括运动估计(motion estimation)和运动补偿(motion compensation)。由于视频图像的一个帧内相邻像素之间存在很强的相关性,在视频编解码技术中使用帧内预测方式能够消除相邻像素之间的空间冗余;但是由于视频图像中的相邻帧之间也存在着很强的相似性,在视频编解码技术中使用帧间预测方式消除相邻帧之间的时间冗余,从而能够提高解码效率。下述本申请将以帧间预测进行详细描述。
图1为本申请实施例提供的一种视频编码系统的组成框图示意图,如图1所示,该视频编码系统11可以包括:变换单元111、量化单元112、模式选择和编码控制逻辑单元113、帧内预测单元114、帧间预测单元115(包括:运动补偿和运动估计)、反量化单元116、反变换单元117、环路滤波单元118、编码单元119和解码图像缓存单元110。
针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频重建块,通过模式选择和编码控制逻辑单元113确定编码模式,然后,对经过帧内或帧间预测后得到的残差像素信息,通过变换单元111、量化单元112对该视频重建块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内预测单元114用于对该视频重建块进行帧内预测;其中,帧内预测单元114用于确定该视频重建块的最优帧内预测模式(即目标预测模式);帧间预测单元115用于执行所接收的视频重建块相对于一或多个参考帧中的一或多个块的帧间预测编码,以提供时间预测信息;其中,运动估计为产生运动向量的过程,所述运动向量可以估计该视频重建块的运动,然后,运动补偿基于由运动估计所确定的运动向量执行运动补偿;在确定帧间预测模式之后,帧间预测单元115还用于将所选择的帧间预测数据提供到编码单元119,而且,将所计算确定的运动向量数据也发送到编码单元119;此外,反量化单元116和反变换单元117用于该视频重建块的重构建,在像素域中重构建残差块,该重构建残差块通过环路滤波单元118去除方块效应伪影,然后,将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频重建块;编码单元119是用于编码各种编码参数及量化后的变换系数。而解码图像缓存单元110用于存放重构建的视频重建块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频重建块,这些重构建的视频重建块都会被存放在解码图像缓存单元110中。
图2为本申请实施例提供的一种视频解码系统的组成框图示意图,如图2所示,该视频解码系统12可以包括:解码单元121、反变换单元127,与反量化单元122、帧内预测单元123、运动补偿单元124、环路滤波单元125和解码图像缓存单元126单元。
输入的视频信号经过视频编码系统11进行编码处理之后,输出该视频信号的码流;该码流输入视频解码系统12中,首先经过解码单元121,用于得到解码后的变换系数;针对该变换系数通过反变换单元127与反量化单元122进行处理,以便在像素域中产生残差块;帧内预测单元123可用于基于所确定的帧内预测方向和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元124是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换单元127与反量化单元122的残差块与由帧内预测单元123或运动补偿单元124产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过环路滤波单元125以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元126中,解码图像缓存单元126存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,得到所恢复的原始视频信号。
本申请实施例提供的一种帧间预测方法主要作用于视频编码系统11的帧间预测单元115和视频解码系统12的帧间预测单元,即运动补偿单元124;也就是说,如果在视频编码系统11能够通过本申请实施例提供的帧间预测方法得到一个较好的预测效果,那么,对应地,在视频解码系统12,也能够改善视频解码恢复质量。
在介绍本申请实施例之前,首先对本申请实施例涉及的一些技术作出描述,应注意,下述的技术是对本申请实施例的补充性说明,这些技术也是本申请实施例中的一部分,本领域人员可以得知,在不冲突的情况下,这些技术是可以与本申请实施例任意结合的。
还需要说明的是,运动信息可以包括运动矢量(Motion Vector,MV)信息和参考帧信息。具体地,对于使用帧间预测的当前块而言,该当前块所在的当前帧具有一个或多个参考帧,而当前块可以是编码单元或预测单元,可以使用一个包含一组运动矢量和参考帧信息的运动信息指示到某一参考帧内一个与当前块大小相同的像素区域,这里称之为参考块,也可以使用一个包含两组运动矢量和参考帧信息的运动信息指示到某两个可以相同也可以不同的参考帧内的两个参考块;然后运动补偿可以根据运动信息所 指示的参考块得到当前块的帧间预测值。
应理解,P帧(Predictive Frame)是只能使用图像播放顺序(Picture Order Count,POC)在当前帧之前的参考帧进行预测的帧。这时候当前参考帧只有一个参考帧列表,用RefPicList0表示;且RefPicList0中都是POC在当前帧之前的参考帧。B帧(Bi-directional Interpolated Prediction Frame)早期是可以使用POC在当前帧之前的参考帧及POC在当前帧之后的参考帧进行预测的帧。B帧有两个参考帧列表,分别用RefPicList0和RefPicList1表示;其中,RefPicList0中都是POC在当前帧之前的参考帧,RefPicList1中都是POC在当前帧之后的参考帧。对于当前块而言,可以只参考RefPicList0中某一帧的参考块,这种情况可称为前向预测;或者也可以只参考RefPicList1中某一帧的参考块,这种情况可称为后向预测;或者还可以同时参考RefPicList0中某一帧的参考块和RefPicList1中某一帧的参考块,这种情况可称为双向预测。同时参考两个参考块的一种简单方式是将两个参考块内每一个对应位置的像素进行平均以得到当前块内每一像素的帧间预测值(或者可以称为预测块)。后期B帧不再限制RefPicList0中都是POC在当前帧之前的参考帧,RefPicList1中都是POC在当前帧之后的参考帧。换句话说,RefPicList0中也可以有POC在当前帧之后的参考帧,RefPicList1中也可以有POC在当前帧之前的参考帧,也即是指当前块可以同时参考POC在当前帧之前的参考帧或者同时参考POC在当前帧之后的参考帧。但是当前块为双向预测时所使用的参考帧必须一个来自于RefPicList0,一个来自于RefPicList1;这种B帧也称为广义B帧。
需要注意的是,由于不同的标准版本或者不同的技术资料对RefPicList0、RefPicList1的表示方式不同,因此RefPicList0、RefPicList1还会有其他的表示方式。至少在本申请实施例中,RefPicList0、List0以及L0表征的意义相同,RefPicList1、List1以及L1表征的意义相同。
由于随机访问(Random Access,RA)配置的编解码顺序与POC顺序不同,这样B帧可以同时参考当前帧之前的信息和当前帧之后的信息,能够明显提高编码性能。
图3为本申请实施例提供的一种典型图像组的结构示意图,如图3所示,RA的一种经典的图像组(Group Of Pictures,GOP)结构如图3所示,在图3中,箭头表示参考关系,由于I帧不需要参考帧,那么在POC为0的I帧解码后,将会解码POC为4的P帧,而在解码POC为4的P帧时可以参考POC为0的I帧。在POC为4的P帧解码后,然后再解码POC为2的B帧,而在解码POC为2的B帧时可以参考POC为0的I帧和POC为4的P帧,等等。这样,根据图3可以得到,POC顺序为{0 1 2 3 4 5 6 7 8}的情况下,其对应的解码顺序为{0 3 2 4 1 7 6 8 5}。
另外,低延迟(Low Delay,LD)配置的编解码顺序与POC顺序是相同的,这时候当前帧只能参考当前帧之前的信息。其中,Low Delay配置又分Low Delay P和Low Delay B。Low Delay P即传统的Low Delay配置。其典型的结构是IPPP,即先编解码一个I帧,之后解码的帧都是P帧。Low Delay B的典型结构是IBBB,与Low Delay P的区别在于每个帧间帧都是B帧,即使用两个参考帧列表,当前块可以同时参考RefPicList0中的某一帧的参考块和RefPicList1中的某一帧的参考块。这里,当前帧的一个参考帧列表最多可以有几个参考帧,如2个、3个或4个等。当编码或解码某一个当前帧时,RefPicList0和RefPicList1内各有哪几个参考帧是由预设配置或算法决定的,但是同一个参考帧可以同时出现在RefPicList0和RefPicList1中,即编码器或解码器允许当前块同时参考同一个参考帧中的两个参考块。
编码器或解码器通常可以使用参考帧列表里的索引值(用index表示)来对应参考帧。如果一个参考帧列表长度为4,那么index有0、1、2、3等四个值。例如,如果当前帧的RefPicList0有POC为5,4,3,0的4个参考帧,那么RefPicList0的index 0为POC 5的参考帧,RefPicList0的index 1为POC 4的参考帧,RefPicList0的index 2为POC 3的参考帧,RefPicList0的index 3为POC 0的参考帧。
目前的VVC视频编解码标准中,预设的帧间预测模式可以为GPM预测模式。目前的AVS3视频编解码标准中,预设的帧间预测模式可以为AWP预测模式。这两种预测模式虽然名称不同、具体的实现形式不同、但原理上是共通的,即这两种预测模式都可以适用本申请实施例的帧间预测方法。
对于GPM预测模式来说,如果使用GPM,那么码流中将会传输GPM下的预测模式参数,比如GPM具体的划分模式;通常情况下,GPM包括有64种划分模式。对于AWP预测模式来说,如果使用AWP,那么码流中将会传输AWP下的预测模式参数,比如AWP具体的划分模式;通常情况下,AWP包括有56种划分模式。
图4a为本申请实施例提供的一种GPM在64×64的当前块上多种划分模式的权重分配示意图,在图4a中,GPM存在有64种划分模式。
图4b为本申请实施例提供的一种AWP在64×64的当前块上多种划分模式的权重分配示意图,在图4b中,AWP存在有56种划分模式。
图4c为本申请实施例提供的一种AWP在64×32的当前块上多种划分模式的权重分配示意图,在 图4c中,AWP存在有56种划分模式。
图4d为本申请实施例提供的一种AWP在32×64的当前块上多种划分模式的权重分配示意图,在图4d中,AWP存在有56种划分模式。
在一种实施方式中,一个划分模式可以对应一个权重导出模式,即划分模式和权重导出模式具有对应关系。在图4a中,当前块的尺寸大小为64×64,单位可以是像素大小.
在图4a~4d中,黑色表示第一个参考块对应位置的权重值为0%,白色表示第一个参考块对应位置的权重值为100%,灰色区域则按颜色深浅的不同表示第一个参考块对应位置的权重值为大于0%小于100%的某一个权重值。第二个参考块对应位置的权重值则为100%减去第一个参考块对应位置的权重值。
应理解的是,虽然本申请实施例提供了当前块的尺寸大小为上述的64×64、64×32或者32×64,但是本领域应当理解,在其它场景中,当前块的尺寸大小还会有其他选择。通过64×64、64×32或者32×64,说明了当前块的长宽比,例如,64×64可以表征当前块的长宽比为1:1,64×32可以表征当前块的长宽比为2:1,32×64可以表征当前块的长宽比为1:2。
在一种实施方式中,当前块的长宽比可以为1:1、2:1、4:1、1:2或1:4等等。在另一种实施方式中,当前块的长宽比还可以为其它数值,例如,1:1.5或1.5:1等等。在又一种实施方式中,当前块的长宽比可以根据视频的尺寸来确定。
GPM或AWP需要在码流中传输一个GPM或AWP是否使用的标志(flag)。如果使用GPM或AWP,在码流中传输具体使用的模式,即GPM的64种模式之一,或AWP的56种模式之一,并可以在码流中传输两个运动信息的索引值。flag标志当前块是否使用GPM或AWP。这个标志也可能是与其他模式结合。
在预设的预测模式下,比如GPM和AWP均需要使用两个运动信息查找两个参考块。目前的实现方式是在编码器侧利用当前块之前已编码/已解码部分的相关信息构建一个运动信息候选列表,从运动信息候选列表中选择运动信息,将这两个运动信息在运动信息候选列表中的索引值(index)写入码流。在解码器侧采用同样的方式,即利用当前块之前已解码部分的相关信息构建一个运动信息候选列表,这个运动信息候选列表与编码器侧构建的候选列表一定是相同的。如此,从码流中解析出两个运动信息的索引值,然后从运动信息候选列表中查找出这两个运动信息即为当前块需要使用的两个运动信息。
也就是说,本申请实施例所描述的运动信息可以包括:运动矢量信息,即(x,y)的值,以及对应的参考帧信息,即参考帧列表及在参考帧列表中的参考索引值。一种表示方式是记录两个参考帧列表的参考索引值,其中一个参考帧列表对应的参考索引值有效,如0,1,2等;另一个参考帧列表对应的参考索引值为无效,即-1。参考索引值有效的参考帧列表即为当前块的运动信息所使用的参考帧列表,根据参考索引值可以从该参考帧列表中查找到对应的参考帧。每个参考帧列表都有一个对应的运动矢量,有效的参考帧列表对应的运动矢量是有效的,无效的参考帧列表对应的运动矢量是无效的。解码器可以通过运动信息中的参考帧信息找到所需的参考帧,根据当前块的位置以及运动矢量即(x,y)的值可以在参考帧中找到参考块,进而确定出当前块的帧间预测值。
图5为本申请实施例提供的一种当前块与相邻块的空间位置关系示意图,如图5所示,块E为当前块,而块A、块B、块C、块D、块F、块G均为块E的相邻块。其中,块E的相邻块A是样本(x 0-1,y 0)所在的块,块E的相邻块B是样本(x 0,y 0-1)所在的块,块E的相邻块C是样本(x 0+1,y 0-1)所在的块,块E的相邻块D是样本(x 0-1,y 0-1)所在的块,块E的相邻块F是样本(x 0-1,y 1)所在的块,块E的相邻块G是样本(x 1,y 0-1)所在的块。其中(x 0,y 0)是块E左上角样本在图像中的坐标,(x 1,y 0)是块E右上角样本在图像中的坐标,(x 0,y 1)是块E左下角样本在图像中的坐标。也就是说,块E和它的相邻块A、B、C、D、F和G的空间位置关系详见图5。
对于图5而言,相邻块X(X表示为A、B、C、D、F或G)“存在”是指该块应在待解码图像内并且该块应与块E属于同一空间区域;否则相邻块“不存在”。可以得到,如果块“不存在”或者尚未解码,那么此块“不可用”;否则此块“可用”。或者,如果待解码图像样本所在的块“不存在”或者此样本尚未解码,那么此样本“不可用”;否则此样本“可用”。
此处说明相关技术中提供导出运动信息的方法,包括以下四步:
第一步,1)如果参考图像队列1中参考索引值为0的图像中与当前预测单元的左上角亮度样本位置对应的亮度样本所在的时域运动信息存储单元存储的参考帧索引为-1,则当前预测单元的L0参考索引和L1参考索引均等于0。以当前预测单元所在编码单元的尺寸和位置作为当前预测单元的尺寸和位置,然后将根据相关技术中提供导出运动信息的方法得到的L0运动矢量预测值和L1运动矢量预测值分别作为当前预测单元的L0运动矢量MvE0和L1运动矢量MvE1,并令当前预测单元的L0参考索引RefIdxL0和L1参考索引RefIdxL1均等于0,结束运动信息导出过程。
2)否则,当前预测单元的L0参考索引和L1参考索引均等于0。当前预测单元的L0参考索引和L1参考索引对应的图像的距离索引分别记为DistanceIndexL0和DistanceIndexL1;当前预测单元的L0参考索引和L1参考索引对应的图像的BlockDistance分别记为BlockDistanceL0和BlockDistanceL1。
在参考图像队列1中参考索引为0的图像中与当前预测单元的左上角亮度样本位置对应的亮度样本所在的时域运动信息存储单元的L0运动矢量记为mvRef(mvRef_x,mvRef_y),该运动信息存储单元所在的图像的距离索引记为DistanceIndexCol,该运动矢量指向的参考单元所在的图像的距离索引记为DistanceIndexRef。
第二步,BlockDistanceRef=DistanceIndexCol-DistanceIndexRef
第三步,令当前预测单元的L0参考索引RefIdxL0等于0,计算当前预测单元的L0运动矢量mvE0(mvE0_x,mvE0_y):
mvE0_x=Clip3(-32768,32767,Sign(mvRef_x*BlockDistanceL0*BlockDistanceRef)*(((Abs(mvRef_x*BlockDistanceL0*(16384/BlockDistanceRef)))+8192)>>14));
mvE0_y=Clip3(-32768,32767,Sign(mvRef_y*BlockDistanceL0*BlockDistanceRef)*(((Abs(mvRef_y*BlockDistanceL0*(16384/BlockDistanceRef)))+8192)>>14));
此时的mvX为mvRef,MVX为mvE0。
令当前预测单元的L1参考索引RefIdxL1等于0,计算当前预测单元的L1运动矢量mvE1(mvE1_x,mvE1_y):
mvE0_x=Clip3(-32768,32767,Sign(mvRef_x*BlockDistanceL1*BlockDistanceRef)*(((Abs(mvRef_x*BlockDistanceL1*(16384/BlockDistanceRef)))+8192)>>14));
mvE0_y=Clip3(-32768,32767,Sign(mvRef_y*BlockDistanceL1*BlockDistanceRef)*(((Abs(mvRef_y*BlockDistanceL1*(16384/BlockDistanceRef)))+8192)>>14));
此时的mvX为mvRef,MVX为mvE1。
第四步,interPredRefMode的值等于‘PRED_List01’。
实际应用中,运动信息候选列表的构建方式不仅使用了空域运动信息,还使用了时域运动信息。其中,在VVC中构建合并候选列表(merge list)时,也用到了时域运动信息和空域运动信息。
图6为本申请实施例提供的另一种当前块与相邻块的空间位置关系示意图,如图6所示,其示出了merge list构建时所使用到的相关位置的运动信息,填充元素为1、2、3、4、5的候选位置表示空域相关位置,即当前帧内与当前块相邻的这些位置块所使用的运动信息;填充元素为6和7的候选位置表示时域相关位置,即某一个参考帧中对应位置所使用的运动信息,这些运动信息还可以是经过了缩放(scaling)。这里,对于时域运动信息来说,如果候选位置6可用,那么可以使用6位置对应的运动信息;否则,可以使用7位置对应的运动信息。需要注意的是,三角划分预测模式(Triangle Partition Mode,TPM)和GPM预测模式中关于运动信息候选列表的构建中也涉及到了这几个位置的使用;而且这里块的大小并非为实际大小,只是作为示例说明。
假定第一个运动信息表示为mvAwp0L0、mvAwp0L1、RefIdxAwp0L0和RefIdxAwp0L1。其中,mvAwp0L0表示在第一个参考帧列表RefPicList0中对应的运动矢量,RefIdxAwp0L0表示在第一个参考帧列表RefPicList0中对应的参考帧的参考索引值;mvAwp0L1表示在第二个参考帧列表RefPicList1中对应运动矢量,RefIdxAwp0L1表示在第二个参考帧列表RefPicList1中对应的参考帧的参考索引值。第二个运动信息以此类推。
在两个运动信息都是单向的情况下,所以RefIdxAwp0L0和RefIdxAwp0L1必有一个为有效值,比如0,1,2等;另一个为无效值,比如-1。如果RefIdxAwp0L0为有效值,那么RefIdxAwp0L1为-1;这时候对应的mvAwp0L0即为所需要的运动矢量,即(x,y),mvAwp0L1不需要考虑。反之亦然。
在本申请实施例中,确定两个运动信息找到两个参考块,根据GPM或AWP使用的具体的模式确定两个参考块在每一个像素位置的权值,并将两个参考块加权得到当前块的预测块。
得到预测块后的处理都与原有的方法无异。在编码端,如果当前模式是跳过模式,则当前块的编码结束。如果当前模式不是跳过模式,将当前块与预测块相减得到残差块,将残差块进行变换,量化,熵编码。在解码端,如果当前模式是跳过模式,则预测块就是解码块,当前块的解码结束。如果当前模式不是跳过模式,熵解码解析量化系数,接着反量化,反变换得到残差块,将残差块与预测块相加得到解码块。
AWP和GPM的运动信息候选列表构建方法或沿用了传统的运动信息候选列表构建方法或基于原有的merge运动信息候选列表筛选,对于所有的AWP或GPM划分模式都使用同样的列表构建方法。对于AWP或GPM之前的那些预测方法,也就是默认把当前块作为一个整体来处理,这样的方法并无不妥,而当处理AWP或GPM时,实际上当前块是分为两个部分处理的,或者更严谨地说,当前块的 两个部分使用不同的运动信息,于是分别对这两个部分来说,能否找到与它相关性最强的位置的运动信息,以及这个位置的运动信息在列表中的位置是否靠前,将影响编码或解码效率。
无论是merge运动信息候选列表,还是AWP或GPM的运动信息候选列表,其构建基本思路都是将被选中的概率高的运动信息放在被选中的概率低的运动信息的前面,使用变长编码,即列表中靠前的运动信息使用较短的码字,列表中靠后的运动信息使用较长的码字,从而提高编码效率。
运动信息被选中的概率与导出它所使用的位置和当前块的相关关系有一定关系。我们把这种关系称为相关性。大致上与当前块挨得越近相关性越强,与当前块相邻的像素数越多,相关性越强。
对于AWP或GPM,则需要考虑相关位置与AWP或GPM分的两个部分分别的相关性,那么为什么不干脆对两个部分分别构建一个列表呢,即对AWP或GPM构建两个列表。这大概是因为构建两个列表所带来的复杂度和性能的增加并不划算。增加的复杂度一部分来自于剪枝(查重)。在使用一个列表的方法中还有一个小的技巧。因为两个运动信息不可能相同,后编码的那个运动信息的索引值不可能与先编码的那个运动信息的索引值相同,假设后编码的那个运动信息的索引值比先编码的那个运动信息的索引值大,那么后编码的那个运动信息的索引值减一,从而可以使用更短的码字。这也是用一个列表相对于两个列表的优势。
AWP或GPM的不同模式分的两个部分是不同的,如上面的图4a和图4b所示。依照上面所讲的相关性的原理,使用相关技术的列表构建方法,某些模式与第一块相关性强的运动信息在列表的顺序靠前,但某些模式与第一块相关性强的运动信息在列表的顺序靠后。某些模式与第二块相关性强的运动信息在列表的顺序靠后,但某些模式与第二块相关性强的运动信息在列表的顺序靠前。某些模式与第一块相关性强的运动信息比与第二块相关性强的运动信息在列表的顺序靠前,但某些模式与第一块相关性强的运动信息比与第二块相关性强的运动信息在列表的顺序靠后。所以相关技术的构建方法可能对某些模式是最合适的,但对某些模式未必是最合适的。
在本申请实施例中的帧间预测方法,运动信息候选列表的构建方法可以为自适应的运动信息候选列表的构建方法,或者,根据AWP或GPM的模式确定AWP或GPM的运动信息候选列表的构建方法。
本申请实施例中可以设置不止一种运动信息候选列表的构建方法,如果AWP或GPM使用某一个(些)模式,使用一种运动信息候选列表,如果AWP或GPM使用不同于上面所述的一个(些)模式,使用不同于上面所述的一种运动信息候选列表。
对解码器来说,确定AWP或GPM的模式后,根据AWP或GPM的模式确定运动信息候选列表的构建方法。对当前块只会使用某一种运动信息候选列表的构建方法,因此并没有增加计算上的复杂度。
图7为本申请实施例提供的一种帧间预测方法的流程示意图,如图7所示,该方法应用于解码器,该方法可以包括:
S701、解析码流,获取当前块的权重导出模式。
在一些实施方式中,解码器可以解析码流,确定当前块的预测模式参数,当前块的预测模式参数可以包括当前块的权重导出模式,在预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值的情况下,从当前块的预测模式参数中获取当前块的权重导出模式。预设的帧间预测模式可以是AWP模式或GPM模式。
在一些实施方式中,当前块的权重导出模式用于表征一个或两个两个参考块,在产生当前块的预测块时的权重模式或权重分布模式或权重分布区域。
当前块的权重导出模式还可以是左下右上权重导出模式、左上右下权重导出模式、左右权重导出模式、上下权重导出模式中的一种。左下右上权重导出模式用于表征预测块的左下部分位置来自于第一个参考块,右上部分位置来自于第二个参考块,左右权重导出模式用于表征预测块的左部分位置来自于第一个参考块,右部分位置来自于第二个参考块等等,此处不再列举。
当前块的权重导出模式还可以是当前块的划分模式,当前块的划分模式可以是将当前块划分成两个部分,例如,通过三角划分的方式将当前块划分为两个部分;再例如,通过矩形划分的方式将当前块划分为两个部分;又例如,通过弧形或其它规则或不规则的形状,将当前块划分为两个部分;还例如,可以基于当前块中的对象的轮廓来确定划分界限,以使得划分界限尽可能的贴合对象的轮廓。其中,在三角划分时,当前块会划分出至少一个三角形,和/或,至少一个梯形,在矩形划分时,当前块会划分出至少一个矩形。在另一些实施例中,当前块的划分模式可以是将当前块划分成三个或三个以上的部分。
在协议中给出了GPM预测模式下的64中权重导出模式、以及AWP预测模式下的56种权重导出模式。当前块的权重导出模式为几何划分预测模式中的多种权重导出模式中的一种,或者,当前块的权重导出模式为角度加权预测模式中的多种权重导出模式中的一种。例如,当前块的权重导出模式可以是GPM预测模式下的64中权重导出模式中的任一种权重导出模式,或者,当前块的权重导出模式可以是AWP预测模式下的56种权重导出模式中的任一种权重导出模式。
应理解,早期的编解码技术中只存在矩形的划分方式,无论是CU、PU还是变换单元(Transform Unit,TU)的划分。而GPM或AWP均实现了非矩形的划分,即用一条直线可以将一个矩形块分成两个分区,根据直线的位置和角度的不同,划分的两个分区可能是三角形或梯形或矩形等,从而能使得划分更贴近物体的边缘或者两个运动不同区域的边缘。需要注意的是,这里所说的划分并不是真正意义上的划分,而更像是一种预测效果上的划分。因为这个划分只是划分了两个参考块在产生预测块时的权重,或者可以简单地理解为预测块的一部分位置来自于第一个参考块,而另一部分位置来自于第二个参考块,并没有真正按划分线把当前块划分成两个CU或PU或TU。这样,在预测之后残差的变换、量化、反变换、反量化等也都是将当前块作为一个整体进行处理。
需要说明的是,待解码图像可以划分为多个图像块,而当前待解码的图像块可以称为当前块(可以用CU表示),与当前块相邻的图像块可以称为相邻块;即在待解码图像中,当前块与相邻块之间具有相邻关系。这里,每个当前块可以包括第一图像分量、第二图像分量和第三图像分量,也即当前块表示待解码图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的图像块。
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
还需要说明的是,预测模式参数指示了当前块采用的预测模式以及与该预测模式相关的参数。其中,预测模式通常包括有帧间预测模式、传统帧内预测模式和非传统帧内预测模式等,而帧间预测模式又包括有普通帧间预测模式、GPM预测模式和AWP预测模式等。也就是说,编码器会选取最优的预测模式对当前块进行预编码,在这过程中就可以确定出当前块的预测模式,从而将相应的预测模式参数写入码流,由编码器传输到解码器。
这样,在解码器侧,通过解析码流就可以直接获取到当前块的预测模式参数,根据所获取的预测模式参数用以确定当前块是否使用预设的帧间预测模式,比如GPM预测模式或AWP预测模式。
S703、基于当前块的权重导出模式,构建新的运动信息候选列表。
当前块的权重导出模式的类别不同,构建的新的运动信息候选列表不同。当前块的权重导出模式的类别可以是预先设定的。
在一种实施方式中,在当前块的权重导出模式的类别不同的情况下,构建的新的运动信息候选列表可以不同。在一种实施方式中,由于新的运动信息候选列表的长度有限,在当前块的权重导出模式的类别不同的情况下,构建的新的运动信息候选列表可以相同。或者也可以说,当前块的权重导出模式有多种不同的类别,在利用多种不同的类别中的某一些类别时,构建的新的运动信息候选列表可以相同或不同。
然而,值得本领域注意的是,即使在采用某一些类别时构建的新的运动信息候选列表相同的情况下,解码器的构建新的运动信息候选列表的方式不同或者逻辑不同。
在一种实施方式中,解码器可以基于当前块的权重导出模式,确定与当前块的权重导出模式对应的排序方式,解码器可以不同的当前块的权重导出模式,确定不同的排序方式,从而解码器可以基于排序方式,将当前块相关的已知运动信息中的全部或部分构建成新的运动信息候选列表。构建新的运动信息候选列表的一种方式可以为将运动信息写入至初始运动信息候选列表。在这种方式下,新的运动信息候选列表中的运动信息的排序方式,可能会与当前技术中存在的某一特定的排序方式不同。
在构建新的运动信息候选列表的过程中,解码器可以确定第一个应填入至初始运动信息候选列表的运动信息,并将第一个运动信息填入至初始运动信息候选列表中的索引值为0位置中;接着解码器可以确定第二个应填入至初始运动信息候选列表的运动信息,确定第二个运动信息与已经填入的运动信息是否重复(查重步骤),在不重复的情况下,将第二个运动信息填入至初始运动信息候选列表中的索引值为1位置,直到将预设数量个运动信息填入至初始运动信息候选列表中,将某一个运动信息填入至预设数量减去一的索引至所对应的位置中,新的运动信息候选列表构建完成。
解码器可以基于排序方式,从当前块相关的已知运动信息中确定给第一个运动信息、第二个运动信息等。
在一些实施方式中,排序方式可以为针对当前块相关的已知运动信息排序方式。
本申请实施例中的新的运动信息候选列表为允许存在双向运动信息的候选列表。在其它实施例中,新的运动信息候选列表可以称为双向运动信息候选列表。
在另一种实施方式中,解码器可以基于当前块的权重导出模式,确定与当前块的权重导出模式对应的待填入的运动信息,每一个待填入的运动信息可以是单向运动信息、双向运动信息或者对双向运动信息进行拆分得到的一个或两个单向运动信息,接着,解码器可以基于待填入的运动信息,构建新的运动信息候选列表。在这种方式下,新的运动信息候选列表中的运动信息的排序方式,可能会与当前技术中 存在的只填入单向运动信息的方式不同。
在又一种实施方式中,解码器可以基于当前块的权重导出模式,确定与当前块的权重导出模式对应的排序方式,和与当前块的权重导出模式对应的待填入的运动信息,从而基于排序方式和待填入的运动信息,构建新的运动信息候选列表。在这种方式下,新的运动信息候选列表中的运动信息的排序方式,不仅可能会与当前技术中存在的某一特定的排序方式不同,还可能会与当前技术中存在的只填入单向运动信息的方式不同。
S705、基于新的运动信息候选列表,确定当前块的帧间预测值。
解码器可以从新的运动信息候选列表确定两个运动信息,例如可以根据解析到的两个运动信息的索引在构建出的运动信息候选列表中找到两个运动信息,基于这两个运动信息采用单向或双向的预测方法得到两个中间预测块,然后根据当前块的权重导出模式确定两个中间预测块在每一个像素位置的权值,并将两个中间预测块加权得到当前块的预测块。
解码器在确定到某一个运动信息是双向的,则使用双向预测的方法得到中间预测块,其中,可以使用BIO或DMVR或其它方式得到中间预测块。如果运动信息是单向的,则使用单向预测的方法得到中间预测块。
本申请实施例中,由于解码器构建的新的运动信息候选列表,根据的是当前块的权重导出模式,从而解码器能够根据不同的权重导出模式,构建出不同的新的运动信息候选列表,从而使得运动信息候选列表的构建符合当前块的权重导出模式,进而能够提高解码器的解码效率。
在本申请的一些实施例中,上述S703可以通过以下方式来实现:基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式;基于排序方式,构建新的运动信息候选列表。
与当前块相关的已知运动信息可以是与当前块在时间上或者空间上相关的已解码块的运动信息。本申请实施例中的运动信息可以是单向运动信息、双向运动信息或者对双向运动信息进行拆分得到的一个或两个单向运动信息。
与当前块相关的已知运动信息中包括预设数量个运动信息,预设数量可以是2~6中的任一个,例如,2个、3个、4个、5个或6个等。与当前块相关的已知运动信息中包括的运动信息数量可以根据解码准确度和解码器的性能两者作出一个权衡。
与当前块相关的已知运动信息是可用的运动信息,或者,是存在的运动信息。
不同的权重导出模式下,排序方式可以相同或者不同。在一些实施方式中,如果当前块划分为两个部分,可以从这两个部分中选择靠近左侧、上侧或左上侧的一个部分,将与该一个部分相邻的块作为较高的排序优先级来进行排序。
以GPM预测模式和AWP预测模式中的权重导出模式为例,在当前块的权重导出模式为左上、右下的权重导出模式的情况下,已知运动信息的排序方式为,当前块的左上相邻块的运动信息排序靠前的排序方式;在当前块的权重导出模式为上、下的权重导出模式的情况下,已知运动信息的排序方式为,当前块的上块的运动信息排序靠前的排序方式;在当前块的权重导出模式为左下、右上的权重导出模式的情况下,已知运动信息的排序方式为,当前块的左下相邻块的运动信息排序靠前的排序方式;在当前块的权重导出模式为左、右的权重导出模式的情况下,已知运动信息的排序方式为,当前块的左块的运动信息排序靠前的排序方式。
在本申请的一些实施例中,当前块相关的已知运动信息可以包括当前块相关的N个运动信息;N为大于或等于1的整数;当前块相关的N个运动信息可以包括:当前块在空域上的至少一个相邻块的运动信息,和/或,当前块在时域上的至少一个对应块的运动信息。
在一些实施方式中,当前块相关的N个运动信息可以仅包括相邻块运动信息。在另一些实施方式中,当前块相关的N个运动信息可以仅包括对应块的运动信息,在又一些实施方式中,当前块相关的N个运动信息可以不仅包括相邻块的运动信息,还可以包括对应块的运动信息。
在本申请实施例中,N个运动信息中每一运动信息包括原始运动信息,原始运动信息包括运动矢量信息和参考帧信息。
其中,运动矢量信息可以包括x轴运动分量信息和y轴运动分量信息,参考帧信息可以包括参考帧列表及在参考帧列表中的索引,解码器可以通过索引从参考帧列表中确定参考帧信息。
在本申请实施例中,原始运动信息可以为单向原始运动信息,或可以双向原始运动信息,或可以为对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息。
在本申请的一些实施例中,至少一个相邻块的运动信息的排序方式,可以是基于当前块的权重导出模式确定的。
在本申请的一些实施方式中,在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,可以包括:在当前块的权重导出模式为第一类权重导出模式的情 况下,将至少一个对应块的运动信息,排列在至少一个相邻块的运动信息之前。
应需注意的是,在一些实施方式中,本申请实施例中的运动信息在未作特殊说明的情况下可以指解码器解析得到的单向原始运动信息,或双向原始运动信息,或对双向原始运动信息拆分得到的一个或两个单向原始运动信息。本申请实施例中的运动信息在未作特殊说明的情况下可以不仅指解码器解析得到的单向原始运动信息,或双向原始运动信息,或对双向原始运动信息拆分得到的一个或两个单向运动信息,还指单向衍生运动信息,或双向衍生运动信息,或对双向衍生运动信息拆分得到的一个或两个单向衍生运动信息。
本申请实施例中的原始运动信息(包括单向原始运动信息或双向原始运动信息),可以是解码器通过解析码流得到的运动信息,衍生运动信息可以是通过对原始运动信息进行数学计算得到的。
在本申请的另一些实施方式中,在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,可以包括:在当前块的权重导出模式为第二类权重导出模式的情况下,将至少一个对应块的运动信息,穿插在至少一个相邻块的运动信息之内。这样,解码器可以在填入了一部分空域上的运动信息后,再填入一部分或全部的时域运动信息,然后再填入不重复的空域上的运动信息等等,直到填入了预设数量个运动信息。
在本申请的又一些实施方式中,在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,可以包括:在当前块的权重导出模式为第三类权重导出模式的情况下,将至少一个对应块的运动信息,排列在至少一个相邻块的运动信息之后。
以预设数量为5进行举例,其中,新的运动信息候选列表中的运动信息的数量为5,可以理解为新的运动信息候选列表的长度为5。
在一些实施方式中,解码器可以先将1个时域上的运动信息填入初始运动信息候选列表中,再将4个空域上的运动信息填入初始运动信息候选列表中。
在另一些实施方式中,解码器可以先将1个或2个或3个空域上的运动信息填入初始运动信息候选列表中,再将1个时域上的运动信息填入初始运动信息候选列表中,然后将3个或2个或1个空域上的运动信息填入初始运动信息候选列表中。
在又一些实施方式中,解码器可以先将4个空域上的运动信息填入初始运动信息候选列表中,再将1个时域上的运动信息填入初始运动信息候选列表中。
在一种实施方式中,初始运动信息候选列表为包括预设数量个填充位置的列表,每一填充位置用于填入运动信息(包括原始运动信息、衍生运动信息、单向运动信息、双向运动信息中的一种)。在另一种实施方式中,初始运动信息候选列表可以为空列表。在又一种实施方式中,可以在得到至少一个代填入的运动信息后,根据至少一个运动信息生成新的运动信息候选列表,这种方式下,可以没有初始运动信息候选列表。
应理解地是,本申请实施例中,无论采用哪一种填入方式,填入之前,都可以先执行查重的步骤。还应理解的是,本申请实施例只是以新的运动信息候选列表只存在一个时域上的运动信息来进行举例,在其它实施例中,新的运动信息候选列表中可以存在至少两个时域上的运动信息。
值得注意的是,上述提到的第一类权重导出模式、第二类权重导出模式、第三类权重导出模式,以及下述提到的第四类权重导出模式、第五类权重导出模式等等中,不同的权重导出模式,采用的排序方式不同。
不同的权重导出模式在不冲突的情况下是可以相互结合的,例如,当前块的权重可以既属于第二类或第三类权重导出模式,又属于第四类权重导出模式。从而,解码器可以不仅可以将至少一个对应块的运动信息,穿插在至少一个相邻块的运动信息之内或之后,还可以按照当前块的左下相邻块的运动信息、当前块的右上相邻块的运动信息、当前块的左上相邻块的运动信息、当前块在时域上的右下块的运动信息的先后顺序进行排序。本申请对能够结合的权重导出模式不作一一说明。
能够理解地是,不同的权重模式下,构建的新的运动信息候选列表可以相同或不同。
需要理解地是,本申请实施例中提供的了很多种排序方式,这些排序方式只是提供了一种排序的思路,或定义了排序方式中不同运动信息的排序优先级,根据某一个排序方式进行运动信息的排序时,并不是指要将这些排序方式中提出的至少两种运动信息利用完,而只是在运动信息候选列表的长度达到预设数量(可以是预设长度)时,就可以确定新的运动信息候选列表构建完成。
例如,在某一类权重导出模式下,排序方式为P、Q、R、S的依次排列,那么在基于该排序方式排到Q时,列表的长度达到预设长度,则新的运动信息候选列表构建完成,不再执行后续排列。
此处描述N个运动信息中的另一种排序方式:
在本申请的一些实施方式中,在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,可以包括:当前块相关的已知运动信息的排序方式为,从排序方 式集合中确定的一种排序方式,排序方式集合包括:对当前块的左下相关块的运动信息、当前块的右上相关块的运动信息、当前块的左上相关块的运动信息、当前块的右下相关块的运动信息进行全排列,得到的多个排序方式。
其中,在当前块的权重导出模式不同的情况下,从排序方式集合中确定的排序方式不同。
其中,当前块的左下相关块的运动信息、当前块的右上相关块的运动信息、当前块的左上相关块的运动信息、当前块的右下相关块的运动信息中的任一者为:当前块在空域上的运动信息或当前块在时域上的运动信息。
排序方式集合可以包括24种排列方式,24种排列方式为对当前块的左下相关块的运动信息、当前块的右上相关块的运动信息、当前块的左上相关块的运动信息、当前块的右下相关块的运动信息进行全排列得到的排序方式,例如,一种排序方式为当前块的左下相关块的运动信息、当前块的右上相关块的运动信息、当前块的左上相关块的运动信息、当前块的右下相关块的运动信息依次排序。
当前块在时域上的运动信息可以为当前块的左下相关块的运动信息的全部或部分、当前块的右上相关块的运动信息的全部或部分、当前块的左上相关块的运动信息的全部或部分、当前块的右下相关块的运动信息的全部或部分中的一个或至少两个。
在实施过程中,当前块的左下相邻块的运动信息包括:当前块的左下的所有块或部分块的运动信息。
当前块的右上相邻块的运动信息包括:当前块的右上的所有块或部分块的运动信息。
当前块的左上相邻块的运动信息包括:当前块的左上的所有块或部分块的运动信息。
当前块在时域上的右下块的运动信息包括:在当前块的外部的时域上的块的运动信息,或者,在当前块的内部的时域上的块的运动信息。
图8为本申请实施例提供的又一种当前块与相邻块的空间位置关系示意图,如图8所示,当前块801的左下相邻块可以位于当前块的左下方区域802,当前块801的左下相邻块可以包括至少一个相邻块。当前块801的左上相邻块可以位于当前块的左上方区域803,当前块801的左上相邻块可以包括至少一个相邻块。当前块801的右上相邻块可以位于当前块的右上方区域804,当前块801的右上相邻块可以包括至少一个相邻块。每一相邻块均可以与当前块801相邻。
值得注意的是,本申请实施例中指出的按照J、K、L的先后顺序进行排序,可以通过以下方式进行排序:
(1)判断是否存在J。
如果J存在时,将J填入至初始运动信息候选列表,跳转至(2)。
如果J不存在,跳转至(3)
(2)判断已填入的运动信息的数量是否为预设数量减一个。
如果否,跳转至(3)
如果是,相关块的空域上的运动信息填写完成。
(3)判断是否存在K。
如果K存在时,将K填入至初始运动信息候选列表,跳转至(4)。
如果K不存在,跳转至(5)
(4)判断已填入的运动信息的数量是否为预设数量减一个。
如果否,跳转至(5)
如果是,相关块的空域上的运动信息填写完成。
(5)判断是否存在L。
如果L存在时,将L填入至初始运动信息候选列表,相关块的空域上的运动信息填写完成。
如果L不存在,相关块的空域上的运动信息填写完成。
在相关块的空域上的运动信息填写完成的情况下,解码器接着可以进行填写当前块的时域上的运动信息的步骤。
此处描述又一种在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式:
在一些实施方式中,解码器可以在当前块的权重导出模式为第四类权重导出模式的情况下,将N个运动信息中的单向原始运动信息的全部或部分,排列在对N个运动信息中的双向运动信息进行拆分,得到一个或两个单向原始运动信息的全部或部分之前。
需要注意的是,本申请实施例中的N个运动信息中每一个运动信息可以均为单向运动信息,或者,N个运动信息中每一个运动信息可以均为双向运动信息,或者,N个运动信息中一部分运动信息为单向运动信息,另一部分运动信息为双向运动信息。
在这种实施方式下,解码器始终先填入单向原始运动信息,在单向原始运动信息填入的数量小于预 设数量的情况下,再考虑填入对双向运动信息进行拆分得到的一个或两个双向的原始运动信息。
此处需要说明一下本申请中的对“全部”和“部分”的限定,一个对象的全部为该一个对象,一个对象的部分也为该一个对象。例如,在N个运动信息中的单向原始运动信息中的数量为一个时,单向原始运动信息的全部即为该一个单向原始运动信息,单向原始运动信息的部分也为该一个单向原始运动信息;在N个运动信息中的单向原始运动信息中的数量为至少两个时,单向原始运动信息的全部或部分可以是本领域通常的理解。
在另一些实施方式中,解码器可以在当前块的权重导出模式为第五类权重导出模式的情况下,将N个运动信息中的单向原始运动信息的全部或部分,排列在N个运动信息中的双向运动信息的全部或部分之前。
在这种实施方式下,解码器也是先填入单向原始运动信息,在单向原始运动信息填入的数量小于预设数量的情况下,再考虑填入双向运动信息。
在又一些实施方式中,解码器可以在当前块的权重导出模式为第六类权重导出模式的情况下,确定N个运动信息的排序优先级,基于排序优先级对N个运动信息进行排序。
在这种实施方式中,解码器无需考虑N个运动信息的单双向问题,而是依照预先设定的N个运动信息的排序优先级,将N个运动信息填入。
例如,解码器可以先将第一个单向原始运动信息填入,再将第二个双向原始运动信息填入,或者再将对第二个双向原始运动信息进行拆分得到的一个或两个单向运动信息填入。
再例如,在存在衍生运动信息的情况下,解码器可以先将第一个单向原始运动信息填,然后将第一个单向衍生运动信息填入,再将第二个双向原始运动信息和第二个双向衍生运动信息填入,或者,再将对第二个双向原始运动信息进行拆分得到的一个或两个单向运动信息,以及该一个或两个单向运动信息对应的单向衍生运动信或双向衍生运动信息填入。
在再一种实施方式中,解码器可以在当前块的权重导出模式为第七类权重导出模式的情况下,确定N个运动信息中每一个运动信息的单双向信息,和N个运动信息的排序优先级,基于每一个运动信息的单双向信息和排序优先级对N个运动信息进行排序。
在这种实施方式中,解码器需对N个运动信息的单双向问题和N个运动信息的排序优先级进行综合性的考量,从而基于这两者对N个运动信息进行排序。
此处描述获得某一个对应块的运动信息的方式。首先,解码器可以将除当前帧和对应块所在帧之外的图像帧,确定为的第一特定帧;然后,可以在第一特定帧上,确定与当前块对应的第一目标块的运动信息;最后,可以对第一目标块的运动信息进行缩放,得到对应块的运动信息。
在实施过程中,对第一目标块的运动信息进行缩放,得到对应块的运动信息,可以包括以下之一:
对第一目标块的双向运动信息进行缩放,得到对应块的双向运动信息;
对第一目标块的单向运动信息进行缩放,得到对应块的双向运动信息。
在一种实施方式中,对第一目标块的运动信息进行缩放,可以是将第一目标块的运动信息映射到对应块上,从而得到对应块的运动信息。
在本申请实施例中,还创造性的提出了衍生运动信息的这一概念,以下对衍生运动信息和衍生运动信息在新的运动信息候选列表中的排序作出说明:
在本申请实施例中,N个运动信息中每一运动信息还包括衍生运动信息,衍生运动信息是基于原始运动信息确定的;衍生运动信息包括运动矢量信息和参考帧信息。其中,不同的运动信息所对应的衍生运动信息可以相同或不同。
其中,衍生运动信息为单向衍生运动信息,或双向衍生运动信息,或对双向衍生运动信息进行拆分得到的一个或两个单向衍生运动信息。其中,单向衍生运动信息是基于单向原始运动信息或双向运动信息确定的,双向衍生运动信息是基于单向原始运动信息或双向运动信息确定的。
此处描述在N大于或等于2的情况下,N个运动信息的排序方式:
在一些实施例中,解码器可以将N个原始运动信息中的全部或部分,排列在N个衍生运动信息中的全部或部分之前。
其中,关于原始运动信息和原始运动信息的排序,可以参考上文的描述,此处将不作赘述。
在这种实施方式下,解码器始终先填入原始运动信息,在原始运动信息填入的数量小于预设数量的情况下,再考虑填入衍生运动信息。
在另一些实施方式中,解码器可以确定N个原始运动信息中每一个原始运动信息的单双向信息、N个原始运动信息的排序优先级、N个衍生运动信息中每一个衍生运动信息的单双向信息、N个衍生运动信息的排序优先级中的至少一种信息,基于至少一种信息,对N个运动信息进行排序。
在这种实施方式下,解码器可以根据至少一种信息对N个运动信息进行排序,从而得到的新的运 动信息候选列表能够在单向信息靠前、默认的排序方式以及衍生信息的排序方式之间做出一个均衡,从而使得排序更符合实际情况。
此处描述解码器基于原始运动信息确定衍生运动信息的方式:
在本申请是实施例中,基于原始运动信息确定衍生运动信息的方式大致可以分为两种方式,第一种方式为对每一原始运动信息分别进行数学计算,从而得到每一个原始运动信息对应的衍生运动信息,第二种方式为对至少两个相邻块的原始运动信息进行平均或加权平均,从而得到与至少两个相邻块的原始运动信息对应的衍生运动信息。
在此描述第一种方式的实现方式,即通过对逐个原始运动信息进行计算的方式,其中:
衍生运动信息的预测方向与原始运动信息的预测方向相同。其中,预测方向可以是单向预测或双向预测。
衍生运动信息的参考帧信息与原始运动信息的参考帧信息相同。
在实施过程中,解码器可以基于原始运动信息的运动矢量,确定衍生运动信息的运动矢量。
运动矢量信息包括第一轴分量信息和第二轴分量信息。其中,第一轴为x轴或y轴,第二轴为y轴或x轴,第一轴与第二轴不同。例如,第一轴为x轴,则第二轴为y轴,第一轴为y轴,则第二轴为x轴。
根据原始运动信息的运动矢量信息确定衍生运动的运动矢量信息的方式可以为:基于原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息和第二轴分量信息,将每一衍生运动信息的第一轴分量信息和第二轴分量信息,作为每一衍生运动信息的运动矢量信息;M为大于或等于1的整数。
一个原始运动信息可以生成一个或者至少两个衍生运动信息。例如,一个原始运动信息可以生成一个、两个、四个衍生运动信息等。
在一种实施的过程中,原始运动信息的运动矢量信息中的x轴分量信息的正负号,与M个衍生运动信息中每一衍生运动信息的x轴分量信息的正负号相同。原始运动信息的运动矢量信息中的y轴分量信息的正负号,与M个衍生运动信息中每一衍生运动信息的y轴分量信息的正负号相同。
在实施过程中,衍生运动信息的运动矢量信息的的确定可以包括以下大致两种方式,第一种方式为通过加法获取,另一种方式为通过缩放获取。
通过加法计算的方式以下两种方式,第一种方式为对原始运动信息中的一个轴进行加法计算,得到衍运动信息,且原始信息的另一个轴的运动信息,作为衍生运动信息的另一个轴的运动信息。第二种方式为对原始运动信息中的两个轴均进行加法计算。
第一种方式:基于原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息和第二轴分量信息,可以包括:将原始运动信息中的第一轴分量信息加上M个第三值,得到M个第一轴相加结果,基于M个第一轴相加结果中的每一结果,确定每一衍生运动信息的第一轴分量信息;将原始运动信息的第二轴分量信息,作为M个衍生运动信息中每一衍生运动信息的第二轴分量信息。
第二种方式:基于原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息和第二轴分量信息,可以包括:将原始运动信息中的第一轴分量信息加上M个第三值,得到M个第一轴相加结果,基于M个第一轴相加结果中的每一结果,确定每一衍生运动信息的第一轴分量信息;将原始运动信息中的第二轴分量信息加上M个第三值,得到M个第二轴相加结果,基于M个第二轴相加结果中的每一结果,确定每一衍生运动信息的第二轴分量信息。
在一种实施方式中,基于M个第一轴相加结果中的每一结果,确定每一衍生运动信息的第一轴分量信息,可以包括:将M个第一轴相加结果中的每一结果,作为每一衍生运动信息的第一轴分量信息。
通过缩放计算的方式以下两种方式,第一种方式为对原始运动信息中的一个轴进行缩放计算,得到衍运动信息,且原始信息的另一个轴的运动信息,作为衍生运动信息的另一个轴的运动信息。第二种方式为对原始运动信息中的两个轴均进行缩放计算。
第一种方式:基于原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息和第二轴分量信息,可以包括:基于对原始运动信息的第一轴分量信息进行缩放的结果,确定M个衍生运动信息中每一衍生运动信息的第二轴分量信息;将原始运动信息的第二轴分量信息,作为M个衍生运动信息中每一衍生运动信息的第二轴分量信息。
第二种方式:基于原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息和第二轴分量信息,可以包括:基于对原始运动信息的第一轴分量信息进行缩放的结果,确定M个衍生运动信息中每一衍生运动信息的第一轴分量信息;基于对原始运动信息的第二轴分量信息进行缩放的结果,确定M个衍生运动信息中每一衍生运动信息的第二轴分 量信息。
在本申请实施例中,缩放计算为对原始运动信息中的第一轴和/或第二轴进行缩放,进行缩放可以是进行放大或缩小,一种实施方式中,缩放计算为对第一轴和/或第二轴进行放大或缩小,而直接得到衍生运动信息的运动矢量;另一种实施方式中,缩放计算为基于对第一轴和/或第二轴进行放大或缩小的结果,确定衍生运动信息的运动矢量,例如,在对第一轴和/或第二轴进行放大或缩小,还会进行其它相关计算,从而得到衍生运动信息的运动矢量。
本领域能够理解地是,缩放计算和加法计算是不同类别的计算,不同的计算方式所产生的衍生运动信息不同,从而得到的衍生运动信息的相关性也是不同的,测试证明,采用缩放计算得到的相关性较高。
以下对缩放计算的实施方式作出说明,应理解,本申请实施例虽然以第一轴为例作出了相关性的描述,但是本领域应该理解,由于第一轴为x轴或y轴,因此,通过对第一轴的描述,可以轻易知道本申请实施例中对x轴缩放和对y轴缩放的流程。
缩放计算可以包括乘法的计算或除法的计算,乘法的计算和除法的计算都是缩放计算,以下对此作出说明:
在一些实施方式中,基于对原始运动信息的第一轴分量信息进行缩放的结果,确定M个衍生运动信息中每一衍生运动信息的第二轴分量信息,包括:将原始运动信息的第一轴分量信息乘以M个第一值,得到M个第一结果,基于M个第一结果中的每一结果,确定每一衍生运动信息的第一轴分量信息。
在另一些实施方式中,基于对原始运动信息的第一轴分量信息进行缩放的结果,确定M个衍生运动信息中每一衍生运动信息的第二轴分量信息,包括:将原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数,基于M个第一除数中的每一除数,确定每一衍生运动信息的第一轴分量信息。
在一些实施方式中,基于M个第一结果中的每一结果,确定每一衍生运动信息的第一轴分量信息,包括:将M个第一结果中的每一结果,作为每一衍生运动信息的第一轴分量信息。
在另一些实施方式中,基于M个第一结果中的每一结果,确定每一衍生运动信息的第一轴分量信息,包括:确定与M个第一结果一一对应的M个第三值,将M个第一结果与M个第三值一一相加,得到M个第二结果,基于M个第二结果中的每一结果,确定每一衍生运动信息的第一轴分量信息。
在一些实施方式中,基于M个第二结果中的每一结果,确定每一衍生运动信息的第一轴分量信息,包括:将M个第二结果中的每一结果,作为每一衍生运动信息的第一轴分量信息。
在另一些实施方式中,将M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于M个第三结果中的每一结果,确定每一衍生运动信息的第一轴分量信息。
其中,第三值为一左移目标位得到,目标位为特定位数减一。
在一些实施方式中,原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;M个第一值包括第一特定值和第二特定值,第一特定值大于0且小于1,第二特定值大于1且小于2,第一特定值与第二特定值之和为2。
在一些实施方式中,方法还包括:在原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定第一特定值为第一系数;在原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第二阈值且小于或等于第三阈值的情况下,确定第一特定值为第二系数;在原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第三阈值的情况下,确定第一特定值为第三系数;其中,第一系数小于第二系数,第二系数小于第三系数。
在一种实施方式中,第二阈值为64,第一系数为0.75,第三阈值为128,第二系数为0.875,第三系数为0.9375。本领域能够理解的是,这些值还可以基于实际情况具有其它的取值,本申请实施例对此不作限制。
在一些实施方式中,方法还包括:在原始运动信息的第一轴分量信息的绝对值,小于或等于第一阈值,且原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为衍生运动信息的第一轴分量信息;在原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的第一目标值作为衍生运动信息的第一轴分量信息。
在一种实施方式中,第一目标值为4~10,例如,第一目标值为4、6、8、10。在本申请实施方式中,第一目标值为8。
第一阈值可以为大于0的数,且第一阈值与0较为接近,例如,第一阈值可以为1、2、或3等,大于第一阈值的数,可以理解为距0较远的数。
在一些实施方式中,M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
第一组除数中每一除数大于最大阈值;
第二组除数中每一除数大于或等于最小阈值,且小于或等于最大阈值;
第三组除数中每一除数小于最小阈值;
基于M个第一除数中的每一除数,确定每一衍生运动信息的第一轴分量信息,包括以下至少之一:
将最大阈值,作为M个衍生运动信息中,与第一组除数对应的每一衍生运动信息的第一轴分量信息;
将第二组除数中每一除数,作为M个衍生运动信息中,与第二组除数对应的每一衍生运动信息的第一轴分量信息;
将最小阈值,作为M个衍生运动信息中,与第三组除数对应的每一衍生运动信息的第一轴分量信息。
在另一些实施方式中,基于M个第一除数中的每一除数,确定每一衍生运动信息的第一轴分量信息,包括:基于M个第一除数中的每一除数,采用特定函数进行计算,确定每一衍生运动信息的第一轴分量信息,其中,特定函数为CLIP函数,CLIP函数中的min可以对应最小阈值,CLIP函数中的max可以对应最大阈值。
在本申请实施例中所出现的第一值、第二值、第三值、第四值、第一特定值或第二特定值等等,可以为整数或小数(可称为浮点数),也可以为整数或负数,本申请实施例对此不作限定。
第一特定值可以是:0.5,0.75,0.8,0.9,1.1,1.2,1.25,1.5中的一种。
在一种实施方式中,右移的位数可以是固定设置的。
在另一种实施方式中,第一值、第三值以及右移的位数中的至少两者可以具有对应关系。
在一种是实施方式中,第三值可以是基于右移的位数确定的,例如,第三值为数字一左移目标位得到,目标位可以是右移的位数减一位。用数学公式表达为value=1<<(shift-1),shift为右移的位数,value为第三值。又例如,value为1<<(shift-1)的其他值,此处不做限制。
在一些实施方式中,在原始运动信息为双向原始运动信息的情况下,解码器还可以执行以下步骤:
将原始运动信息拆分为第一个单向原始运动信息和第二个单向原始运动信息;将第一值,与第一个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为第一个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;将第四值,与第二个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为第二个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;其中,第一值和第四值均大于0;其中,第一值与第四值相同,或者,第一值于第四值不同且第一值与第四值之和为2。
在此描述第二种方式的实现方式,即通过对至少两个原始运动信息进行计算的方式,其中:
N个运动信息可以包括:当前块在空域上的至少两个相邻块的原始运动信息;至少两个相邻块相邻,或者,至少两个相邻块在当前块的左下角或右上角或左上角。
解码器基于原始运动信息确定衍生运动信息,可以包括:解码器可以从至少两个相邻块中确定第二目标块,将第二目标块所在的帧作为第二特定帧;然后可以将至少两个相邻块中除第二目标块外的相邻块的原始运动信息中的运动矢量信息,缩放到第二特定帧,得到至少两个待平均块的运动矢量信息;其中,至少两个待平均块包括第二目标块;接着可以对至少两个待平均块的运动矢量信息进行平均或加权平均,得到对应的衍生运动信息的运动矢量信息;最后可以将对应的衍生运动信息的运动矢量信息,作为至少两个相邻块中每一相邻块的衍生运动信息的运动矢量信息。
其中,衍生运动信息的预测方向与原始运动信息的预测方向相同,衍生运动信息的参考帧信息为第二特定帧。
图9为本申请实施例提供的另一种帧间预测方法的流程示意图,如图9所示,该方法应用于解码器,该方法可以包括:
S901、解码器解析码流,获取当前块的权重导出模式。
S903、基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式。
其中,当前块相关的已知运动信息包括当前块相关的N个运动信息;N为大于或等于1的整数。当前块相关的N个运动信息包括:当前块在空域上的至少一个相邻块的运动信息,和/或,当前块在时域上的至少一个对应块的运动信息。N个运动信息中每一运动信息包括原始运动信息。
S905、确定初始运动信息候选列表。
在一种实施方式中,初始运动信息候选列表可以是空列表,初始运动信息候选列表的长度可以为预设数量,从而可以能够被放入预设数量个运动信息。
S907、基于排序方式,将至少一个相邻块的原始运动信息中的全部或部分,和/或,至少一个对应块的原始运动信息的全部或部分,依序或交错填入初始运动信息候选列表中,得到新的运动信息候选列表。
在一些实施方式中,解码器可以只考虑将原始运动信息填入,例如,解码器可以将4个空域上的原始运动信息和1个时域上的原始运动信息依序或交错填入。
在另一些实施方式中,N个运动信息中每一运动信息包括衍生运动信息,然后会存在将衍生运动信息填入至初始运动信息候选列表的场景,在这种情况下,解码器可以基于排序方式,将至少一个相邻块的原始运动信息中的全部或部分、至少一个对应块的原始运动信息的全部或部分、至少一个相邻块的衍生运动信息中的全部或部分、至少一个对应块的衍生运动信息的全部或部分中的至少一者,依序或交错填入初始运动信息候选列表中。
在本申请实施方式中,在待填入的衍生运动信息为双向衍生运动信息的情况下,将双向衍生运动信息拆分为两个单向衍生运动信息;将两个单向衍生运动信息中的至少一个填入初始运动信息候选列表中;和/或,在待填入的原始运动信息为双向原始运动信息的情况下,将双向原始运动信息拆分为两个单向原始运动信息,将两个单向原始运动信息中的至少一个填入初始运动信息候选列表中,或者,将双向原始运动信息填入初始运动信息候选列表中。
需要说明的是,填入至初始运动信息候选列表中的运动信息,无论是以什么样排列顺序填入,在填入至的运动信息的数量为预设数量个,或者将初始运动信息候选列表填满时,就不在向初始运动信息候选列表填入运动信息了。
在一些实施方式中,初始运动信息候选列表可填入预设数量个运动信息;预设数量个运动信息中的每一个运动信息为原始运动信息或衍生运动信息;预设数量在2~6。
在一些实施方式中,方法还可以包括:在向初始运动信息候选列表填入至少一个原始运动信息之后,确定待填入的衍生运动信息;将待填入的衍生运动信息填入至初始运动信息候选列表。
在另一些实施方式中,方法还可以包括:在向初始运动信息候选列表填入至少一个原始运动信息之后,确定待填入的衍生运动信息;在确定到待填入的衍生运动信息,不同于与待填入的衍生运动信息对应的已经填入的原始运动信息的情况下,将待填入的衍生运动信息填入至初始运动信息候选列表。
在又一些实施方式中,方法还可以包括:在向初始运动信息候选列表填入至少一个原始运动信息之后,确定待填入的衍生运动信息;在确定到待填入的衍生运动信息,不同于已经填入的原始运动信息的情况下,将待填入的衍生运动信息填入至初始运动信息候选列表。
S909、基于新的运动信息候选列表,确定当前块的帧间预测值。
在本申请实施例中,提出了一种基于排序方式,构建新的运动信息候选列表的方法,从而新的运动信息候选列表的方法能够根据不同的排序方式灵活构建,从而新的运动信息候选列表能够将运动信息,按照与当前块的相关性从强到弱的顺序排列,因此能够提高当前块的解码效率。
图10为本申请实施例提供的又一种帧间预测方法的流程示意图,如图10所示,该方法应用于解码器,该方法可以包括:
S1001、解码器解析码流,获取当前块的权重导出模式。
S1003、基于解码器解析的码流,获取至少一个相邻块的原始运动信息,和至少一个对应块的原始运动信息。
S1005、基于至少一个相邻块的原始运动信息中的全部或部分,和/或,基于至少一个对应块的原始运动信息的全部或部分,生成特定数量个衍生运动信息。
其中,特定数量小于或等于8;特定数量个衍生运动信息包括:相邻块的衍生运动信息和/或对应块的衍生运动信息。
S1007、基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式。
S1009、基于排序方式,构建新的运动信息候选列表。
在一种实施方式中,解码器可以基于排序方式,将得到的至少一个相邻块的原始运动信息中的全部或部分、至少一个对应块的原始运动信息的全部或部分、以及生成的特定数量个衍生运动信息填入至初始运动信息候选列表,从而构建得到新的运动信息候选列表。
S1011、基于新的运动信息候选列表,确定当前块的帧间预测值。
在本申请实施例中,解码器可以将能够填入至初始运动信息候选列表的所有运动信息都得到,然后基于排序方式,将得到的所有运动信息依次填入,直到填入的运动信息的数量为预设数量个。
此处介绍本申请实施例提供的另一种得到新的运动信息候选列表的方式:
在一些实施方式中,解码器可以基于解码器解析的码流,获取至少一个相邻块的原始运动信息,和一个对应块的单向运动信息或双向运动信息;将至少一个相邻块的原始运动信息中的一个单向原始运动信息,或互不相同的至少两个单向原始运动信息,填入至初始运动信息候选列表;在填入至初始运动信息候选列表的单向原始运动信息的第一总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在一些实施方式中,在填入至初始运动信息候选列表的单向原始运动信息的第一总数,小于预设数量减一的情况下,依序对至少一个相邻块的双向原始运动信息进行拆分,得到与双向原始运动信息对应的两个单向原始运动信息,并依序将与已经填入的单向运动信息不同的对应的两个单向原始运动信息,继续填入至初始运动信息候选列表;在填入至初始运动信息候选列表的原始运动信息的第二总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。在这种实施方式中,仅将相邻块的单向运动信息填入。
在另一实施方式中,在填入至初始运动信息候选列表的单向原始运动信息的第一总数,小于预设数量减一的情况下,依序将至少一个相邻块的双向原始运动信息,继续填入至初始运动信息候选列表;在填入至初始运动信息候选列表的原始运动信息的第二总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在这种实施方式中,还将相邻块的双向运动信息填入。
在一些实施方式中,在填入至初始运动信息候选列表的单向原始运动信息的第二总数,小于预设数量减一的情况下,获取填入至初始运动信息候选列表中的前两个单向原始运动信息;基于前两个单向原始运动信息,确定对应的四个单向衍生运动信息;依序将与已经填入的单向运动信息不同的四个衍生运动信息,继续填入至初始运动信息候选列表;在填入至初始运动信息候选列表的单向原始运动信息和单向衍生运动信息的第三总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在一些实施方式中,在填入至初始运动信息候选列表的单向原始运动信息和单向衍生运动信息的第三总数,小于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表;将已经填入的对应块的单向运动信息或双向运动信息进行复制填入,直到填入的运动信息的总数为预设数量。
在本申请实施例的得到新的运动信息候选列表的方式中,解码器可以写填写一部分相关性较高的运动信息,在填写完该相关性较高的运动信息后,如果填写的运动信息的数量没有达到预设数量,解码器接着可以计算相关性较低的运动信息,接着将计算得到的相关性较低的运动信息继续填入至初始运动信息候选列表,从而能够减少解码器的计算量。
值得注意的是,在本申请实施例中,无论采用何种方式来填写运动信息,在填写的运动信息的总数为预设数量个时,填写流程完成,即不再填写,填写流程终止,即得到了新的运动信息候选列表。
图11为本申请实施例提供的再一种帧间预测方法的流程示意图,如图11所示,该方法应用于解码器,该方法可以包括:
S1101、解析码流,确定当前块的预测模式参数。
预测模式参数用于指示使用几何划分预测模式GPM或角度加权预测模式AWP确定当前块的帧间预测值。
S1103、从当前块的预测模式参数中,确定当前块的权重导出模式。
其中,在当前块的权重导出模式下,当前块划分为第一分区和第二分区。
S1105、基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式。
其中,当前块相关的已知运动信息包括当前块相关的N个运动信息,当前块相关的N个运动信息包括:当前块在空域上的至少一个相邻块的运动信息,和/或,当前块在时域上的至少一个对应块的运动信息。
图12为本申请实施例提供的一种当前块、相邻块与对应块之间的空间位置关系示意图,如图12所示,其中:
当前块E的至少一个相邻块可以包括外部左下块F、内部右外部上块G、外部右上块C、内部上外部左块B、内部左外部上块A、外部左上块D中的至少一个。至少一个对应块包括:与当前块E的内部的左上角对应的块H、与当前块的内部的右下角对应的块I2、与当前块的外部的右下角对应的块I1中的至少一个。
在本申请实施例的图中未示出的是,本申请实施例还可以提供另一种当前块、相邻块与对应块之间的位置关系:至少一个相邻块包括:内部左外部下块、内部上外部右块、外部右上块、外部左下块、外部左上块中的至少一个。至少一个对应块包括:与当前块的内部的左上角对应的块、与当前块的内部的右下角对应的块、与当前块的外部的右下角对应的块中的至少一个。
应理解的是,当前块、相邻块与对应块之间的位置关系还可以有其它的关系,本申请对此不作限定。
在一种实施方式中,例如,至少一个相邻块的位置可以参照图12所示的A至F。在另一种实施方式中,至少一个相邻块可以包括:内部左外部下块、内部上外部右块、外部右上块、外部左下块、外部左上块中的至少一个。在本申请实施方式中,解码器可以执行将几何划分预测模式中的多种权重导出模 式,或者,角度加权预测模式中的多种权重导出模式进行分组,得到至少两类权重导出模式;不同类的权重导出模式对应不同的排序方式。
在一些实施方式中,第八类权重导出模式,用于表征当前块的权重导出模式为左上、右下的权重导出模式;第九类权重导出模式,用于表征当前块的权重导出模式为上、下的权重导出模式;第十类权重导出模式,用于表征当前块的权重导出模式为左下、右上的权重导出模式;第十一类权重导出模式,用于表征当前块的权重导出模式为左、右的权重导出模式。
以图12为例对确定已知运动信息的排序方式进行说明:
在本申请的一些实施方式中,在当前块的权重导出模式属于第八类权重导出模式的情况下,确定已知运动信息的排序方式为,当前块的左上相邻块的运动信息排序靠前的排序方式。
在一种实施过程中,在当前块的权重导出模式属于第八类权重导出模式的情况下,确定已知运动信息的排序方式为,当前块的左上相邻块的运动信息排序、当前块在时域上的对应块的运动信息,依序靠前的排序方式。
能够理解地,当前块的左上相邻块包括外部左上、内部上外部左相邻块以及内部左外部上相邻块中的一者或至少两者。当前块的其它描述与此类似。
在一种实施过程中,排序方式可以为当前块的左上块的运动信息、当前块在时域上的对应块的运动信息、当前块的左下块的运动信息、当前块的右上相邻块的运动信息依次排序。
在本申请的另一些实施方式中,在当前块的权重导出模式属于第九类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的上块的运动信息排序靠前的排序方式。
在一种实施过程中,在当前块的权重导出模式属于第九类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的上块的运动信息、当前块的内部左外部下块的运动信息,依序靠前的排序方式。
在实施过程中,当前块的上块可以包括当前块的外部上块和内部上块,或者,当前块的上块可以包括当前块的内部上块,而不包括当前块的外部上块。当前块的其它描述与此类似。
在一种实施过程中,排序方式可以为当前块的上块的运动信息、当前块的内部左外部下块的运动信息、当前块在时域上的对应块的运动信息、当前块的外部左上块的运动信息、当前块的外部右上块的运动信息、当前块的内部左外部上的运动信息依次排序。
在本申请的又一些实施方式中,在当前块的权重导出模式属于第十类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的左下块的运动信息排序靠前的排序方式。
在一种实施方式中,在当前块的权重导出模式属于第十类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的左下块的运动信息、当前块的内部右外部上的运动信息,依序靠前的排序方式。
在一种实施过程中,排序方式可以为当前块的内部左外部下块的运动信息、当前块的内部右外部上的运动信息、当前块的外部右上的运动信息、当前块的内部左外部上的运动信息、当前块的内部上外部左的运动信息、当前块的外部左上块的运动信息、当前块在时域上的对应块的运动信息依次排序。
在本申请的再一些实施方式中,在当前块的权重导出模式属于第十一类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的左块的运动信息排序靠前的排序方式。
在一种实施方式中,在当前块的权重导出模式属于第十一类权重导出模式的情况下,解码器可以确定已知运动信息的排序方式为,当前块的左块的运动信息、当前块的外部右上块的运动信息排序靠前的排序方式。
例如,当前块的左块可以包括当前块的内部左块和/或当前块的外部左块。
在一种实施过程中,排序方式可以为当前块的内部左外部下块的运动信息、当前块的内部左外部上块的运动信息、当前块的外部右上块的运动信息、当前块在时域上的对应块的运动信息、当前块的外部左上块的运动信息、当前块的内部上外部左块的运动信息、当前块的内部上外部右块的运动信息依次排序。
S1107、基于排序方式,构建新的运动信息候选列表。
S1109、从新的运动信息候选列表中,确定第一分区的运动信息和第二分区的运动信息。
在一种实施方式中,解码器可以先从解析的码流中,确定第一分区的索引值和第二分区的索引值;然后基于新的运动信息候选列表,将第一分区的索引值指示的新的运动信息候选列表中的运动信息确定为第一分区的运动信息;最后基于新的运动信息候选列表,将第二分区的索引值指示的新的运动信息候选列表中的运动信息确定为第二分区的运动信息。
S1111、基于第一分区的运动信息确定第一分区的第一预测值,基于第二分区的运动信息确定第二分区的第二预测值。
在一些实施方式中,在在第一分区的运动信息为双向运动信息的情况下,对第一分区的运动信息按照双向预测的方法进行处理,从而确定第一分区的第一预测值;和/或,在第二分区的运动信息为双向运动信息的情况下,对第二分区的运动信息按照双向预测的方法进行处理,从而确定第二分区的第二预测值。
其中,双向预测的方法为不使用双向光流(Bi-directional Optical Flow,BIO)的方法或解码端运动矢量优化(Decoder-side Motion Vector Refinement,DMVR)的方法。在其它实施例中,双向预测的方法还可以为使用双向光流BIO的方法或解码端运动矢量优化DMVR的方法,本申请对此不作限制。
基于解码器的计算量大小,
S1113、对第一预测值和第二预测值进行加权融合,得到当前块的帧间预测值。
在本申请实施例中,解码器可以根据当前块的不同的权重导出模式,构建不同的运动信息的候选列表,从而使得运动信息的候选列表中的运动信息的排序方式,能够与权重导出模式相匹配,从而新的运动信息候选列表能够将运动信息,按照与当前块的相关性从强到弱的顺序排列,因此能够提高当前块的解码效率。
在一些实施方式中,解码器可以基于当前块的权重导出模式,确定当前块的尺寸大小、当前块的形状以及当前块的长宽比中的至少一者,基于该至少一者确定当前块相关的已知运动信息的排序方式。
例如,在解码器基于当前块的权重导出模式,确定当前块的长宽比,基于当前块的长宽比确定当前块相关的已知运动信息的排序方式。
其中,在当前块的长宽比不同的情况下,确定的已知运动信息的排序方式不同。例如,以图4c中的11和图4d中的11进行举例,图4c中的11中黑色部分覆盖到当前块的右上角,但是图4d中的11中的黑色部分不仅覆盖到当前块的右上角,还覆盖到当前块的左上角,因此,解码器可以将基于图4c中的11确定的已知运动信息的排序方式,设置为与将基于图4c中的11确定的已知运动信息的排序方式不同的方式。从而能够提高解码效率,提高压缩性能。
在另一些实施例中,解码器可以不仅可以基于当前块的权重导出模式,确定所属于几何划分预测模式中的多种权重导出模式中的某一分组,或者,确定所属于角度加权预测模式中的多种权重导出模式中的某一分组,还可以基于当前块的权重导出模式,确定当前块的尺寸大小、当前块的形状以及当前块的长宽比中的至少一者;基于某一分组和该至少一者,共同确定已知运动信息的排序方式。
在实施过程中,解码器可以基于当前块的权重导出模式,确定属于GPM中的四种分组中的某一分组或者属于AWP中的四种分组中的某一分组,并确定当前块的长宽比,然后基于权重导出模式所属的分组和当前块的长宽比,确定已知运动信息的排序方式。
例如,在一些实施方式中,解码器确定在所述当前块的权重导出模式属于第八类权重导出模式的情况下,且当前块的长宽比为1:2时,确定的已知运动信息的排序方式为第一种排序方式;解码器确定在所述当前块的权重导出模式属于第八类权重导出模式的情况下,且当前块的长宽比为2:1时,确定的已知运动信息的排序方式为第二种排序方式;解码器确定在所述当前块的权重导出模式属于第八类权重导出模式的情况下,且当前块的长宽比为1:1时,确定的已知运动信息的排序方式为第三种排序方式;第一种排序方式、第二种排序方式以及第三种排序方式中的任两个排序方式不同。其中,第三种排序方式为当前块的左上块的运动信息、当前块在时域上的对应块的运动信息、当前块的左下块的运动信息、当前块的右上相邻块的运动信息依次排序。在另一些实施例中,第一种排序方式、第二种排序方式以及第三种排序方式中可以存在两个相同的排序方式。在又一些实施例中,第一种排序方式、第二种排序方式以及第三种排序方式中可以均相同。
在一种可行的实施方式中,在所述当前块的权重导出模式属于相同类别的权重导出模式,但是长宽比不同的情况下,排序方式相同与否可以根据黑色部分的形状有关,在两个黑色部分都为三角形时,排序方式可以相同,在一个黑色部分为三角形,另一个黑色部分为梯形时,排序方式不同。
在本申请实施例中,还可以提供一种可能是根据AWP或GPM的模式以及当前块的形状确定AWP或GPM的运动信息候选列表的构建方法,也可以认为同一AWP或GPM的模式下不同的当前块形状使用不同的运动信息候选列表构建方法。举例,如图AWP在64x64块上的56种模式的权重图、AWP在64x32块上的56种模式的权重图、AWP在32x64块上的56种模式的权重图所示,模式11在64x64,64x32的块上的黑色部分只覆盖到右上角,左上角是白色区域,而在32x64的块上黑色部分覆盖到左上角和右上角,因而在64x64,64x32和32x64的块上模式11的两个部分的紧密相邻的位置不尽相同,使用不同的运动信息候选列表构建方法也会提高压缩性能。这里一种可能的方法是当前块的形状可以用长宽比来表示,即长宽比为1:1的块,长宽比为2:1的块,长宽比为4:1的块,长宽比为1:2的块,长宽比为1:4的块等。
对解码器来说,确定AWP或GPM的模式和当前块的形状后,根据AWP或GPM的模式和当前块 的形状确定运动信息候选列表的构建方法。对当前块只会使用某一种运动信息候选列表的构建方法,因此并没有增加计算上的复杂度。
继续参阅图12,此处以图12为例,对本申请实施方式作出说明:
不同的运动信息候选列表构建方法可能有多个维度的不同。以下一一阐述。
如上图所示是当前AWP的运动信息候选列表构建方法,其中F、G、C、A、B和D是同一帧里当前预测单元E的相邻预测块,根据F、G、C、A、B和D导出的运动信息叫空域运动信息,H和I是某一个参考帧里与当前预测单元E位置有如图所示关系的块,根据H和I导出的运动信息叫时域运动信息。当前方法按F->G->C->A->B->D的顺序检查空域运动信息,首先将F、G、C、A、B和D中的不相同的单向运动信息加入列表,然后将F、G、C、A、B和D中的双向运动信息的每一个单向运动信息与列表中不相同的加入列表,最后加入H位置的时域运动信息。空域运动信息最多添加列表长度减一个,也就是至少保留一个位置给时域运动信息。
相关的方法是按先空域运动信息后时域运动信息的顺序添加的。这在把当前块视为一个整体的预测方法中是有一定道理的,因为空域运动信息来自于相同帧的相邻块,而时域运动信息来自于不同帧,可以说空域运动信息的相关性更强一些。但是在AWP和GPM中并不完全适用,AWP或GPM的某些模式中,有一个部分(比如说E的右下角)可能并不跟上述的空间相邻位置相连,相反,它可能跟I的位置相连,那么对这个部分来说,空域运动信息可能比时域运动信息有更强的相关性。
所以,第一个维度:本发明的某些方法会打破先空域运动信息后时域运动信息的顺序。某些方法可能使用先时域运动信息后空域运动信息的顺序,或空域时域运动信息穿插的顺序。
相关技术的AWP的方法中,空域运动信息的使用顺序可以归纳为左(左下)->上(内部右外部上->外部右上)->左上(外部左内部上->内部左外部上->外部左上)。现有merge的方法中,空域运动信息的使用顺序可以归纳为外部左内部下->内部右外部上->外部右外部上->外部左下->外部左上。如果将空域运动信息设置在右下角的相关位置,那么认为空域运动信息是右下。下图可以大致表示现有方法的顺序1->2->3->4的顺序,即宽泛的左下->右上->左上->右下。
第二个维度:本发明的某些方法会打破相关位置的顺序。即有些方法会使用宽泛的左下->右上->左上->右下的顺序,有些方法会使用不同于左下->右上->左上->右下的顺序。
这个相关顺序的设置跟AWP或GPM的模式有关。如左上右下划分的模式(如上图AWP模式中的33,41,49等)使用左上->右下->其他的顺序(或右下->左上->其他的顺序);如左下右上划分的模式(如上图AWP模式中的5,13,21等)使用左下->右上->其他的顺序(或右上->左下->其他的顺序);如上下划分的模式(如上图AWP模式中的3,11,19等)使用上->下的顺序(或下->上的顺序),上如左上、右上,下如左下、右下;如左右划分的模式(如上图AWP模式中的7,15,23等)使用左->右的顺序(或右->左的顺序),左如左上、左下,右如右上、右下。
更细致一点地,一种可能的方法是上述顺序中所指位置(如宽泛的左上)全部处理完后再进行下一个位置的处理,如左下->右上->其他的顺序,先将A,B,D都处理完后,再处理右下。
另一种可能的方法是上述顺序中所指位置(如宽泛的左上)处理完部分后就进行下一个位置的处理,之后在下一轮处理时再处理所指位置未处理的部分,如左下->右上->其他的顺序,先将A处理完后,处理右下等其他位置,在第二轮再处理B,D。这里面一种可能的处理方法是,尽量保证列表中某些位置分别给某些指定的相关位置。如左下->右上->其他的顺序中,尽量保证列表中第一个位置(index 0)是左下相关的运动信息,AWP中即为F位置相关的运动信息,列表中第二个位置(index 1)是右上相关的运动信息,AWP中即为G,C相关的运动信息。假如G的运动信息可以填入列表中第二个位置(index1),那么就跳过C处理上述顺序中“其他”的位置。假如G的运动信息不可以填入列表中第二个位置(index 1),那么尝试将C的运动信息填入列表中第二个位置(index 1)。其目的是尽可能使2个运动信息的索引值小而且后编码的运动信息的索引值比先编码的运动信息的索引值大。
第三个维度:本发明的某些方法会打破先单向后双向的处理顺序。现有方法中无论位置如何都优先处理单向运动信息,或者说只有一个预测方向有效的运动信息。本发明可能优先考虑位置,或者综合考虑位置和单双向。
第四个维度:本发明的某些方法会构建双向运动信息候选列表。AWP,GPM所构建的都是单向运动信息候选列表,即列表中每一个运动信息是单向运动信息或只有一个预测方向或只有一个参考帧列表的索引有效,另一个参考帧列表的索引无效。本发明的某些方法中,列表的某些运动信息是双向运动信息或有2个预测方向或2个参考帧列表的索引都有效。
如果AWP或GPM的某一个部分选中的是双向运动信息,那么对这个部分的运动补偿按双向预测的方法来处理。由于双向预测方法中有双向光流BIO(Bi-directional Optical Flow)、解码端运动矢量优化DMVR(Decoder-side Motion Vector Refinement)等技术,AWP或GPM对某个部分的运动补偿按双 向预测的方法处理时,一种可能的方法是默认打开BIO、DMVR等技术。一种可能的方法是默认关闭BIO、DMVR等技术。一种可能的方法是默认打开某个(些)技术同时默认关闭某个(些)技术。
如果运动信息候选列表允许双向运动信息,对时域运动信息的处理可能有不同的处理方法。由于时域运动信息,记为MIT,是由一个非当前帧的块的运动信息,记为MIA,导出的,MIA包括最多两个预测方向,每个有效的预测方向L0或L1都会指向一个参考帧,并有对应的运动矢量。而需要把这个运动信息缩放给当前块,缩放得到的MIT最多有两个预测方向,每个有效的预测方向都会指向一个参考帧,而对应的运动矢量需要由那个非当前帧与所使用的预测方向的参考帧之间的运动矢量缩放到当前块与所指定的当前预测方向的参考帧之间。缩放前后的被预测的帧不同,参考帧(可能)不同。在时域运动信息导出时,可以由MIA的L0的运动矢量导出MIT的L0的运动矢量,MIA的L1的运动矢量导出MIT的L1的运动矢量,也可以由MIA的L0的运动矢量导出MIT的L0的运动矢量,MIA的L0的运动矢量导出MIT的L1的运动矢量,也可以由MIA的L1的运动矢量导出MIT的L0的运动矢量,MIA的L1的运动矢量导出MIT的L1的运动矢量。
在处理时域运动信息MIT时,一种可能的方法是把它作为一个双向运动信息来处理。一种可能的方法是把它的L0的运动信息和L1的运动信息分别作为两个单向运动信息来处理。对于单向运动信息先于双向运动信息的方法中,空域运动信息可作为两个单向运动信息来处理从而先于双向运动信息处理。
第五个维度,本发明可以使用直接可得或通过转化可得的运动信息加上这些运动信息衍生的运动信息作为候选。衍生的运动信息的优先级可能低于直接可得或通过转化可得的运动信息。一种可能的方法是所有直接可得或通过转化可得的运动信息都处理完后再处理衍生的运动信息。一种可能的方法是某一个大致的位置(如左上)的所有直接可得或通过转化可得的运动信息都处理完后处理该大致位置的衍生的运动信息。如现在列表中某一个位置需要尽量使用某一个大致位置如左上的运动信息,但A,B,D的运动信息都与列表中已有的运动信息重合,则尝试A,B,D的衍生的运动信息。然后再处理其他大致位置的运动信息。
直接可得的运动信息包括空域运动信息,通过转化可得的运动信息包括时域运动信息。
在一些实施方式中,衍生的运动信息包括上述直接可得或通过转化可得的运动信息的运动信息的缩放的运动信息,如果上述直接可得或通过缩放可得的运动信息MIO为单向运动信息,设上述直接可得或通过缩放可得的运动信息MIO的有效的LX(X为0或1)的运动矢量为(X_LX,Y_LX),则衍生的运动信息MID的预测方向及参考帧信息与MIO相同,MID的LX(X为0或1)的运动矢量为(X_LX*SCALE,Y_LX*SCALE),SCALE为0.5,0.75,0.8,0.9,1.1,1.2,1.25,1.5等。MID的LX(X为0或1)的运动矢量也可能为(X_LX*SCALE,Y_LX)或(X_LX,Y_LX*SCALE)。
在实施过程中,对单向运动信息MIO,一种可能的方法是产生4个衍生信息,分别在x,y方向上放大,缩小。其LX的运动信息分别为(X_LX*SCALE_L,Y_LX),X_LX,Y_LX*SCALE_L),(X_LX*SCALE_S,Y_LX),X_LX,Y_LX*SCALE_S)。其中SCALE_L大于1,SCALE_S小于1,一种可能的方法是SCALE_L加SCALE_S等于2。
如果X_LX或Y_LX的值为0,或绝对值值太小,缩放可能起不到作用,在这种情况下可以将X_LX*SCALE或Y_LX*SCALE直接代替为一个固定的值。如果X_LX或Y_LX的值等于0,将X_LX*SCALE或Y_LX*SCALE替换为8,或-8。或如果X_LX或Y_LX的绝对值小于8,将X_LX*SCALE或Y_LX*SCALE替换为8,或-8,X_LX或Y_LX绝对值不等于0的情况,替换后是8或-8可与原正负号相同。
一种可能的方法是缩放的比例SCALE跟X_LX或Y_LX的值的范围相关,如果X_LX或Y_LX的值小于等于64,SCALE为0.75(即3/4),如果X_LX或Y_LX的值大于64而小于等于128,SCALE为0.875(即7/8),如果X_LX或Y_LX的值大于128,SCALE为0.9375(即15/16)。
如果上述直接可得或通过缩放可得的运动信息MIO为双向运动信息,对L0的运动矢量和L1的运动矢量分别进行缩放。设L0的运动矢量使用的是SCALE0,L1的运动矢量使用的是SCALE1,一种可能的方法是SCALE0等于SCALE1,一种可能的方法是SCALE0不等于SCALE1且SCALE0加SCALE1等于2。
缩放的计算可以写成X_LX或Y_LX乘以一个小数(浮点数);还可以写成X_LX或Y_LX乘以一个整数加上一个固定的值,然后将得到的值右移;也可以是X_LX或Y_LX的绝对值乘以一个整数加上一个固定的值,然后将得到的值右移,最后再加上正负号。设右移的位数为shift,上述固定的值为value。则一种可能的方法是value=1<<(shift-1),一种可能是value为1<<(shift-1)的其他值。
在另一些实施方式中,衍生的运动信息包括上述直接可得或通过转化可得的运动信息的运动信息的偏移的运动信息,设上述直接可得或通过缩放可得的运动信息MIO的LX(X为0或1)的运动矢量为(X_LX,Y_LX),则衍生的运动信息MID的预测方向及参考帧信息与MIO相同,MID的LX(X为0 或1)的运动矢量为(X_LX+OFFSET,Y_LX+OFFSET),MID的LX(X为0或1)的运动矢量也可能为(X_LX+OFFSET,Y_LX)或(X_LX,Y_LX+OFFSET)。OFFSET为2,4,8,16等。或OFFSET为CLIP(MAX,MIN,X_LX/N)或CLIP(MAX,MIN,Y_LX/N),N可能为2,4,8,16等。如果X_LX/N或Y_LX/N大于MAX,CLIP的结果为MAX。如果X_LX/N或Y_LX/N小于MIN,CLIP的结果为MIN,否则CLIP的结果等于X_LX/N或Y_LX/N的值。
在又一些实施方式中,衍生的运动信息包括两个或多个上述直接可得或通过转化可得的运动信息的运动信息的缩放的运动信息计算得到的运动信息。一个选择两个或多个上述直接可得或通过转化可得的运动信息的运动信息方法是选择同一个宽泛的位置的运动信息,如上图X中左上的A,B,D的运动信息。右上的C,G的运动信息。一种可能的计算方法是把所选的两个或多个运动信息缩放到相同的参考帧上再做平均或加权平均。
在一些实施方式中,在构建运动信息候选列表时可限制产生衍生的运动信息的次数,从而保证最差情况的复杂度。
一种可能的方法是将衍生的运动信息加入运动信息候选列表时不进行查重操作,即不将衍生的运动信息与运动信息候选列表中的每一个运动信息进行比较。一种可能的方法是只需衍生的运动信息与产生它所使用的运动信息不相同即可加入运动信息候选列表。从而保证最差情况的复杂度。
通过这种方式,可以至少部分免去解码器执行的重复性检查的步骤,从而降低了解码器的计算复杂性。
继续结合参阅图12,本申请实施例提供两种解码端的实施例。
解码端实施例1:
对当前块,解码器解析AWP是否使用的信息,如果确定使用AWP,解码器解析AWP的模式和两个运动信息的索引。解码器构造当前块AWP使用的运动信息候选列表。具体地如下:
导出mvAwp0L0,mvAwp0L1,RefIdxAwp0L0,RefIdxAwp0L1,mvAwp1L0,mvAwp1L1,RefIdxAwp1L0和RefIdxAwp1L1的步骤如下:
第一步,F、G、C、A、B和D是当前预测单元E的相邻预测块(见图12),确定F、G、C、A和D的“可用”性:
a)如果F存在且采用帧间预测模式,则F“可用”;否则,F“不可用”。
b)如果G存在且采用帧间预测模式,则G“可用”;否则,G“不可用”。
c)如果C存在且采用帧间预测模式,则C“可用”;否则,C“不可用”。
d)如果A存在且采用帧间预测模式,则A“可用”;否则,A“不可用”。
e)如果B存在且采用帧间预测模式,则B“可用”;否则,B“不可用”。
f)如果D存在且采用帧间预测模式,则D“可用”;否则,D“不可用”。
将按相关技术中提供导出运动信息的方法导出的时域双向的运动信息记为T。
第二步,按上述实施例生成衍生的运动信息方法之一生成不超过8个衍生运动信息。
第三步,确定相关位置的扫描顺序:
a)如果AWP的模式模(mod)8的结果为0或1或7,扫描顺序为A->B->D->T->F->G->C。
b)如果AWP的模式模8的结果为2,扫描顺序为B->G->F->T->D->C->A。
c)如果AWP的模式模8的结果为3或4或5,扫描顺序为F->G->C->A->B->D->T。
d)如果AWP的模式模8的结果为6,扫描顺序为F->A->C->T->D->B->G。
第四步,将运动信息进行排序,首先是按相关位置的扫描顺序的单向可用的原始运动信息,然后是按相关位置的扫描顺序的双向可用的原始运动信息,然后是按相关位置的扫描顺序的单向可用的衍生运动信息,然后是按相关位置的扫描顺序的双向可用的衍生运动信息。这里时域运动信息及其衍生运动信息都拆分为指向参考帧列表List0的单向运动信息以及指向参考帧列表List1的单向运动信息,作为单向运动信息处理。
第五步,将排序后的运动信息加入AwpArray。先进行运动信息查重操作,若不重复则放入AwpArray,直至长度为5或遍历结束。
第六步,如果AwpArray的长度小于5,将AwpArray中最后一个运动信息进行重复填充操作,直至AwpArray长度为5。
第七步,将AwpArray中第AwpCandIdx0+1个运动信息赋值给mvAwp0L0,mvAwp0L1,RefIdxAwp0L0,RefIdxAwp0L1;将AwpUniArray中第AwpCandIdx1+1个运动信息赋值给mvAwp1L0,mvAwp1L1,RefIdxAwp1L0,RefIdxAwp1L1。
根据解析到的两个运动信息的索引在构建出的运动信息候选列表中找到两个运动信息。如果运动信息是双向的,则使用双向预测的方法得到中间预测块,其中BIO和DMVR不使用;如果运动信息是单 向的,则使用单向预测的方法得到中间预测块。根据AWP使用的具体的模式确定两个中间预测块在每一个像素位置的权值,并将两个中间预测块加权得到当前块的预测块。
如果当前模式是跳过模式,则预测块就是解码块,当前块的解码结束。如果当前模式不是跳过模式,熵解码解析量化系数,接着反量化,反变换得到残差块,将残差块与预测块相加得到解码块。当前块的解码结束。
需要注意的是,在本申请实施例中AwpArray的长度(新的运动信息候选列表的长度)可以为预设数量,例如,长度为1,表示预设数量为1,长度为2,表示预设数量为2等等。
解码端实施例2:
对当前块,解码器解析AWP是否使用的信息,如果确定使用AWP,解码器解析AWP的模式和两个运动信息的索引。
解码器构造当前块AWP使用的运动信息候选列表。具体地如下:
导出mvAwp0L0,mvAwp0L1,RefIdxAwp0L0,RefIdxAwp0L1,mvAwp1L0,mvAwp1L1,RefIdxAwp1L0和RefIdxAwp1L1的步骤如下:
第一步,F、G、C、A、B和D是当前预测单元E的相邻预测块(见图12),确定F、G、C、A和D的“可用”性:
a)如果F存在且采用帧间预测模式,则F“可用”;否则,F“不可用”。
b)如果G存在且采用帧间预测模式,则G“可用”;否则,G“不可用”。
c)如果C存在且采用帧间预测模式,则C“可用”;否则,C“不可用”。
d)如果A存在且采用帧间预测模式,则A“可用”;否则,A“不可用”。
e)如果B存在且采用帧间预测模式,则B“可用”;否则,B“不可用”。
f)如果D存在且采用帧间预测模式,则D“可用”;否则,D“不可用”。
第二步,按F、G、C、A和D的顺序将单向可用的运动信息放入单向运动信息候选列表AwpUniArray,直至AwpUniArray长度为4或遍历结束。
第三步,如果AwpUniArray的长度小于3,按F、G、C、A、B和D的顺序将双向可用的运动信息拆分为指向参考帧列表List0的单向运动信息以及指向参考帧列表List1的单向运动信息,先进行单向运动信息查重操作,若不重复则放入AwpUniArray,直至长度为4或遍历结束。
第四步,将按相关技术中提供导出运动信息的方法导出的时域双向的运动信息拆分为指向参考帧列表List0的单向运动信息以及指向参考帧列表List1的单向运动信息,先进行单向运动信息查重操作,若不重复则放入AwpUniArray,直至长度为5或遍历结束。
第五步,如果AwpUniArray的长度小于5,依次使用AwpUniArray中第0个和第1个单向运动信息生成衍生的运动信息。对每一个AwpUniArray中的单向运动信息MIO,记其有效的预测方向为LX(X为0或1),LX对应的运动矢量为(X_LX,Y_LX)。产生4个衍生的运动信息分别记为MID0,MID1,MID2,MID3。它们的参考帧信息与MIO的相同。
MID0的LX对应的运动矢量为(X_LX_0,Y_LX_0),其中:
X_LX_0=(abs(X_LX)>128)?((abs(X_LX)*17+8)>>4):((abs(X_LX)>64)?((abs(X_LX)*9+4)>>3):((abs(X_LX)>=8)?(abs(X_LX)*5+2)>>2)):8))。
对该表达式的解释如下:
(1)判断abs(X_LX)是否>128,如果是,确定((abs(X_LX)*17+8)>>4),即将abs(X_LX)*17+8)右移4位,如果否,执行(2);
(2)判断(abs(X_LX)是否>64),如果是,确定((abs(X_LX)*9+4)>>3),如果否,执行(3);
(3)((abs(X_LX)是否>=8),如果是,则(abs(X_LX)*5+2)>>2)),否则,将8赋予X_LX_0。
X_LX_0=(X_LX<0)?-X_LX_0:X_LX_0。
该表达式的解释如下:
判断X_LX是否小于0,如果小于,将-X_LX_0赋给X_LX_0,如果大于,将X_LX_0赋给X_LX_0。
Y_LX_0=Y_LX。
MID1的LX对应的运动矢量为(X_LX_1,Y_LX_1),其中:
X_LX_1=X_LX。
Y_LX_1=(abs(Y_LX)>128)?((abs(Y_LX)*17+8)>>4):((abs(Y_LX)>64)?((abs(Y_LX)*9+4)>>3):((abs(Y_LX)>=8)?(abs(X_LX)*5+2)>>2)):8))。
Y_LX_1=(Y_LX<0)?-Y_LX_1:Y_LX_1。
MID2的LX对应的运动矢量为(X_LX_2,Y_LX_2),其中:
X_LX_2=(abs(X_LX)>128)?((abs(X_LX)*15+8)>>4):((abs(X_LX)>64)?((abs(X_LX)*7+ 4)>>3):((abs(X_LX)>=8)?(abs(X_LX)*3+2)>>2)):8))。
X_LX_2=(X_LX<=0)?-X_LX_2:X_LX_2。
Y_LX_2=Y_LX。
MID3的LX对应的运动矢量为(X_LX_3,Y_LX_3),其中:
X_LX_3=X_LX。
Y_LX_3=(abs(Y_LX)>128)?((abs(Y_LX)*15+8)>>4):((abs(Y_LX)>64)?((abs(Y_LX)*7+4)>>3):((abs(Y_LX)>=8)?(abs(X_LX)*3+2)>>2)):8))。
Y_LX_3=(Y_LX<=0)?-Y_LX_3:Y_LX_3。
如果衍生的运动信息(MID0或MID1或MID2或MID3)与MIO不相同,将其加入到AwpUniArray中,直至AwpUniArray长度为5或处理结束。
第六步,如果AwpUniArray的长度小于5,将AwpUniArray中最后一个单向运动信息进行重复填充操作,直至AwpUniArray长度为5。
第七步,将AwpUniArray中第AwpCandIdx0+1个运动信息赋值给mvAwp0L0,mvAwp0L1,RefIdxAwp0L0,RefIdxAwp0L1;将AwpUniArray中第AwpCandIdx1+1个运动信息赋值给mvAwp1L0,mvAwp1L1,RefIdxAwp1L0,RefIdxAwp1L1。
根据解析到的两个运动信息的索引在构建出的运动信息候选列表中找到两个运动信息。如果运动信息是双向的,则使用双向预测的方法得到中间预测块,其中BIO和DMVR不使用;如果运动信息是单向的,则使用单向预测的方法得到中间预测块。根据AWP使用的具体的模式确定两个中间预测块在每一个像素位置的权值,并将两个中间预测块加权得到当前块的预测块。
如果当前模式是跳过模式,则预测块就是解码块,当前块的解码结束。如果当前模式不是跳过模式,熵解码解析量化系数,接着反量化,反变换得到残差块,将残差块与预测块相加得到解码块。当前块的解码结束。
图13为本申请另一实施例提供的一种帧间预测方法的流程示意图,如图13所示,该方法应用于编码器,该方法可以包括:
S1301、确定当前块的权重导出模式。
S1303、基于当前块的权重导出模式,构建新的运动信息候选列表。
S1305、基于新的运动信息候选列表,确定当前块的帧间预测值。
本申请实施例中,由于由于编码器构建的新的运动信息候选列表,是根据当前块的权重导出模式,从而编码器能够根据不同的权重导出模式,构建出不同的新的运动信息候选列表,从而使得运动信息候选列表的构建符合当前块的权重导出模式,从而新的运动信息候选列表能够将运动信息,按照与当前块的相关性从强到弱的顺序排列,进而编码器容易找到与当前块相关性较强的运动信息,因此能够提高当前块的编码效率。
在一些实施方式中,当前块的权重导出模式为几何划分预测模式中的多种权重导出模式中的一种,或者,当前块的权重导出模式为角度加权预测模式中的多种权重导出模式中的一种。
在一些实施方式中,当前块的权重导出模式的类别不同,构建的新的运动信息候选列表不同。
在一些实施方式中,基于当前块的权重导出模式,构建新的运动信息候选列表,包括:
基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式;
基于排序方式,构建新的运动信息候选列表。
在一些实施方式中,当前块相关的已知运动信息包括当前块相关的N个运动信息;N为大于或等于1的整数;
当前块相关的N个运动信息包括:当前块在空域上的至少一个相邻块的运动信息,和/或,当前块在时域上的至少一个对应块的运动信息。
在一些实施方式中,N个运动信息中每一运动信息包括原始运动信息,原始运动信息包括运动矢量信息和参考帧信息。
在一些实施方式中,原始运动信息为单向原始运动信息,或双向原始运动信息,或对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息。
在一些实施方式中,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,包括以下之一:
在当前块的权重导出模式为第一类权重导出模式的情况下,将至少一个对应块的运动信息,排列在至少一个相邻块的运动信息之前;
在当前块的权重导出模式为第二类权重导出模式的情况下,将至少一个对应块的运动信息,穿插在至少一个相邻块的运动信息之内;
在当前块的权重导出模式为第三类权重导出模式的情况下,将至少一个对应块的运动信息,排列在至少一个相邻块的运动信息之后。
在一些实施方式中,在N大于或等于2的情况下,在N大于或等于2的情况下,所述基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式,包括以下之一:
所述当前块相关的已知运动信息的排序方式为,从排序方式集合中确定的一种排序方式,所述排序方式集合包括:对所述当前块的左下相关块的运动信息、所述当前块的右上相关块的运动信息、所述当前块的左上相关块的运动信息、所述当前块的右下相关块的运动信息进行全排列,得到的多个排序方式;
其中,在所述当前块的权重导出模式不同的情况下,从所述排序方式集合中确定的排序方式不同;
其中,所述当前块的左下相关块的运动信息、所述当前块的右上相关块的运动信息、所述当前块的左上相关块的运动信息、所述当前块的右下相关块的运动信息中的任一者为:所述当前块在空域上的运动信息或所述当前块在时域上的运动信息。
在一些实施方式中,当前块的左下相邻块的运动信息包括:当前块的左下的所有块或部分块的运动信息;
当前块的右上相邻块的运动信息包括:当前块的右上的所有块或部分块的运动信息;
当前块的左上相邻块的运动信息包括:当前块的左上的所有块或部分块的运动信息;
当前块在时域上的右下块的运动信息包括:在当前块的外部的时域上的块的运动信息,或者,在当前块的内部的时域上的块的运动信息。
在一些实施方式中,在N大于或等于2的情况下,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式,包括以下之一:
在当前块的权重导出模式为第四类权重导出模式的情况下,将N个运动信息中的单向原始运动信息的全部或部分,排列在对N个运动信息中的双向运动信息进行拆分,得到一个或两个单向原始运动信息的全部或部分之前;
在当前块的权重导出模式为第五类权重导出模式的情况下,将N个运动信息中的单向原始运动信息的全部或部分,排列在N个运动信息中的双向运动信息的全部或部分之前;
在当前块的权重导出模式为第六类权重导出模式的情况下,确定N个运动信息的排序优先级,基于排序优先级对N个运动信息进行排序;
在当前块的权重导出模式为第七类权重导出模式的情况下,确定N个运动信息中每一个运动信息的单双向信息,和N个运动信息的排序优先级,基于每一个运动信息的单双向信息和排序优先级对N个运动信息进行排序。
在一些实施方式中,方法还包括:
将除当前帧和对应块所在帧之外的图像帧,确定为的第一特定帧;
在第一特定帧上,确定与当前块对应的第一目标块的运动信息;
对第一目标块的运动信息进行缩放,得到对应块的运动信息;
其中,对第一目标块的运动信息进行缩放,得到对应块的运动信息,包括以下之一:
对第一目标块的双向运动信息进行缩放,得到对应块的双向运动信息;
对第一目标块的单向运动信息进行缩放,得到对应块的双向运动信息。
在一些实施方式中,N个运动信息中每一运动信息还包括衍生运动信息,衍生运动信息是基于原始运动信息确定的;
衍生运动信息包括运动矢量信息和参考帧信息。
在一些实施方式中,衍生运动信息为单向衍生运动信息,或双向衍生运动信息,或对双向衍生运动信息进行拆分得到的一个或两个单向衍生运动信息;
单向衍生运动信息是基于单向原始运动信息或双向运动信息确定的,双向衍生运动信息是基于单向原始运动信息或双向运动信息确定的。
在一些实施方式中,在N大于或等于2的情况下,确定N个运动信息的排序方式,包括以下之一:
将N个原始运动信息中的全部或部分,排列在N个衍生运动信息中的全部或部分之前;
确定N个原始运动信息中每一个原始运动信息的单双向信息、N个原始运动信息的排序优先级、N个衍生运动信息中每一个衍生运动信息的单双向信息、N个衍生运动信息的排序优先级中的至少一种信息,基于至少一种信息,对N个运动信息进行排序。
在一些实施方式中,衍生运动信息的预测方向与原始运动信息的预测方向相同;
衍生运动信息的参考帧信息与原始运动信息的参考帧信息相同。
在一些实施方式中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;所述方法还包括:
基于所述原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个所述衍生运动信息中每 一所述衍生运动信息的第一轴分量信息和第二轴分量信息,将所述每一所述衍生运动信息的第一轴分量信息和第二轴分量信息,作为所述每一所述衍生运动信息的运动矢量信息;M为大于或等于1的整数;
其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
在一些实施方式中,所述基于所述原始运动信息中的第一轴分量信息和第二轴分量信息,确定M个所述衍生运动信息中每一所述衍生运动信息的第一轴分量信息和第二轴分量信息,包括以下之一:
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;将所述原始运动信息的第二轴分量信息,作为所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;基于对所述原始运动信息的第二轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息。
在一些实施方式中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述原始运动信息的第一轴分量信息乘以M个第一值,得到M个第一结果,基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息;
将所述原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数,基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息。
在一些实施方式中,所述基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第一结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
确定与所述M个第一结果一一对应的M个第三值,将所述M个第一结果与M个第三值一一相加,得到M个第二结果,基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
在一些实施方式中,所述基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第二结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
将所述M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息;
其中,所述第三值为一左移目标位得到,所述目标位为所述特定位数减一。
在一些实施方式中,所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;
所述M个第一值包括第一特定值和第二特定值,所述第一特定值大于0且小于1,所述第二特定值大于1且小于2,所述第一特定值与所述第二特定值之和为2。
在一些实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定所述第一特定值为第一系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第二阈值且小于或等于第三阈值的情况下,确定所述第一特定值为第二系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第三阈值的情况下,确定所述第一特定值为第三系数;
其中,所述第一系数小于所述第二系数,所述第二系数小于所述第三系数。
在一些实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于所述第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为所述衍生运动信息的第一轴分量信息;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的所述第一目标值作为所述衍生运动信息的第一轴分量信息。
在一些实施方式中,所述M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
所述第一组除数中每一除数大于最大阈值;
所述第二组除数中每一除数大于或等于最小阈值,且小于或等于所述最大阈值;
所述第三组除数中每一除数小于最小阈值;
所述基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息,包括以下至少之一:
将所述最大阈值,作为所述M个衍生运动信息中,与所述第一组除数对应的每一衍生运动信息的第一轴分量信息;
将所述第二组除数中每一除数,作为所述M个衍生运动信息中,与所述第二组除数对应的每一衍生运动信息的第一轴分量信息;
将所述最小阈值,作为所述M个衍生运动信息中,与所述第三组除数对应的每一衍生运动信息的第一轴分量信息。
在一些实施方式中,在所述原始运动信息为双向原始运动信息的情况下,所述方法还包括:
将所述原始运动信息拆分为第一个单向原始运动信息和第二个单向原始运动信息;
将第一值,与所述第一个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为所述第一个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;
将第四值,与所述第二个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为第二个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;
其中,所述第一值和所述第四值均大于0;
其中,所述第一值与所述第四值相同,或者,所述第一值于所述第四值不同且所述第一值与所述第四值之和为2。
在一些实施方式中,N个运动信息包括:当前块在空域上的至少两个相邻块的原始运动信息;至少两个相邻块相邻,或者,至少两个相邻块在当前块的左下角或右上角或左上角;
基于原始运动信息确定衍生运动信息,包括:
从至少两个相邻块中确定第二目标块,将第二目标块所在的帧作为第二特定帧;
将至少两个相邻块中除第二目标块外的相邻块的原始运动信息中的运动矢量信息,缩放到第二特定帧,得到至少两个待平均块的运动矢量信息;至少两个待平均块包括第二目标块;
对至少两个待平均块的运动矢量信息进行平均或加权平均,得到对应的衍生运动信息的运动矢量信息;
将对应的衍生运动信息的运动矢量信息,作为至少两个相邻块中每一相邻块的衍生运动信息的运动矢量信息;
其中,衍生运动信息的预测方向与原始运动信息的预测方向相同,衍生运动信息的参考帧信息为第二特定帧。
在一些实施方式中,N个运动信息中每一运动信息包括原始运动信息;
基于排序方式,构建新的运动信息候选列表,包括:
确定初始运动信息候选列表;
基于排序方式,将至少一个相邻块的原始运动信息中的全部或部分,和/或,至少一个对应块的原始运动信息的全部或部分,依序或交错填入初始运动信息候选列表中,得到新的运动信息候选列表。
在一些实施方式中,N个运动信息中每一运动信息包括衍生运动信息;
基于排序方式,将至少一个相邻块的原始运动信息中的全部或部分,和/或,至少一个对应块的原始运动信息的全部或部分,依序或交错填入初始运动信息候选列表中,得到新的运动信息候选列表,包括:
基于排序方式,将至少一个相邻块的原始运动信息中的全部或部分、至少一个对应块的原始运动信息的全部或部分、至少一个相邻块的衍生运动信息中的全部或部分、至少一个对应块的衍生运动信息的全部或部分中的至少一者,依序或交错填入初始运动信息候选列表中。
在一些实施方式中,初始运动信息候选列表可填入预设数量个运动信息;预设数量个运动信息中的每一个运动信息为原始运动信息或衍生运动信息;预设数量在2~6。
在一些实施方式中,方法还包括:
在向初始运动信息候选列表填入至少一个原始运动信息之后,确定待填入的衍生运动信息;
将待填入的衍生运动信息填入至初始运动信息候选列表;
或者,在确定到待填入的衍生运动信息,不同于与待填入的衍生运动信息对应的已经填入的原始运动信息的情况下,将待填入的衍生运动信息填入至初始运动信息候选列表;
或者,在确定到待填入的衍生运动信息,不同于已经填入的原始运动信息的情况下,将待填入的衍生运动信息填入至初始运动信息候选列表。
在一些实施方式中,基于当前块的权重导出模式,确定当前块相关的已知运动信息的排序方式之前,还包括:
获取至少一个相邻块的原始运动信息,和至少一个对应块的原始运动信息;
基于至少一个相邻块的原始运动信息中的全部或部分,和/或,基于至少一个对应块的原始运动信息的全部或部分,生成特定数量个衍生运动信息;
其中,特定数量小于或等于8;特定数量个衍生运动信息包括:相邻块的衍生运动信息和/或对应块的衍生运动信息。
在一些实施方式中,方法还包括:
获取至少一个相邻块的原始运动信息,和一个对应块的单向运动信息或双向运动信息;
将至少一个相邻块的原始运动信息中的一个单向原始运动信息,或互不相同的至少两个单向原始运动信息,填入至初始运动信息候选列表;
在填入至初始运动信息候选列表的单向原始运动信息的第一总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在一些实施方式中,在填入至初始运动信息候选列表的单向原始运动信息的第一总数,小于预设数量减一的情况下,方法还包括:
依序对至少一个相邻块的双向原始运动信息进行拆分,得到与双向原始运动信息对应的两个单向原始运动信息,并依序将与已经填入的单向运动信息不同的对应的两个单向原始运动信息,继续填入至初始运动信息候选列表;或者,依序将至少一个相邻块的双向原始运动信息,继续填入至初始运动信息候选列表;
在填入至初始运动信息候选列表的原始运动信息的第二总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在一些实施方式中,方法还包括:
在填入至初始运动信息候选列表的单向原始运动信息的第二总数,小于预设数量减一的情况下,获取填入至初始运动信息候选列表中的前两个单向原始运动信息;
基于前两个单向原始运动信息,确定对应的四个单向衍生运动信息;
依序将与已经填入的单向运动信息不同的四个衍生运动信息,继续填入至初始运动信息候选列表;
在填入至初始运动信息候选列表的单向原始运动信息和单向衍生运动信息的第三总数,等于预设数量减一的情况下,将一个对应块的单向运动信息或双向运动信息继续填入至初始运动信息候选列表。
在一些实施方式中,在待填入的衍生运动信息为双向衍生运动信息的情况下,将双向衍生运动信息拆分为两个单向衍生运动信息;将两个单向衍生运动信息中的至少一个填入初始运动信息候选列表中;
和/或,在待填入的原始运动信息为双向原始运动信息的情况下,将双向原始运动信息拆分为两个单向原始运动信息,将两个单向原始运动信息中的至少一个填入初始运动信息候选列表中,或者,将双向原始运动信息填入初始运动信息候选列表中。
在一些实施方式中,方法还包括:
将几何划分预测模式中的多种权重导出模式,或者,角度加权预测模式中的多种权重导出模式进行分组,得到至少两类权重导出模式;不同类的权重导出模式对应不同的排序方式。
在一些实施方式中,至少两组划分模式集合,包括:
第八类权重导出模式,用于表征所述当前块的权重导出模式为左上、右下的权重导出模式;
第九类权重导出模式,用于表征所述当前块的权重导出模式为上、下的权重导出模式;
第十类权重导出模式,用于表征所述当前块的权重导出模式为左下、右上的权重导出模式;
第十一类权重导出模式,用于表征所述当前块的权重导出模式为左、右的权重导出模式。
在一些实施方式中,所述基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式,包括以下之一:
在所述当前块的权重导出模式属于第八类权重导出模式的情况下,确定所述已知运动信息的排序方式为,所述当前块的左上相邻块的运动信息排序靠前的排序方式;
在所述当前块的权重导出模式属于第九类权重导出模式的情况下,确定所述已知运动信息的排序方式为,所述当前块的上块的运动信息排序靠前的排序方式;
在所述当前块的权重导出模式属于第十类权重导出模式的情况下,确定所述已知运动信息的排序方式为,所述当前块的左下相邻块的运动信息排序靠前的排序方式;
在所述当前块的权重导出模式属于第十一类权重导出模式的情况下,确定所述已知运动信息的排序方式为,所述当前块的左块的运动信息排序靠前的排序方式。
在一些实施方式中,至少一个相邻块包括:外部左下块、内部右外部上块、外部右上块、内部上外部左块、内部左外部上块、外部左上块中的至少一个,或者,至少一个相邻块包括:内部左外部下块、内部上外部右块、外部右上块、外部左下块、外部左上块中的至少一个;
至少一个对应块包括:与当前块的内部的左上角对应的块、与当前块的内部的右下角对应的块、与当前块的外部的右下角对应的块中的至少一个。
在一些实施方式中,在当前块的权重导出模式下,当前块划分为第一分区和第二分区;
基于新的运动信息候选列表,确定当前块的帧间预测值,包括:
从新的运动信息候选列表中,确定第一分区的运动信息和第二分区的运动信息;
基于第一分区的运动信息确定第一分区的第一预测值,基于第二分区的运动信息确定第二分区的第二预测值;
对第一预测值和第二预测值进行加权融合,得到当前块的帧间预测值。
在一些实施方式中,在第一分区的运动信息为双向运动信息的情况下,对第一分区的运动信息按照双向预测的方法进行处理;
和/或,在第二分区的运动信息为双向运动信息的情况下,对第二分区的运动信息按照双向预测的方法进行处理。
在一些实施方式中,双向预测的方法为不使用双向光流的方法或解码端运动矢量优化的方法。
在一些实施方式中,从新的运动信息候选列表中,确定第一分区的运动信息和第二分区的运动信息,包括:
确定第一分区的索引值和第二分区的索引值;
基于新的运动信息候选列表,将第一分区的索引值指示的新的运动信息候选列表中的运动信息确定为第一分区的运动信息;
基于新的运动信息候选列表,将第二分区的索引值指示的新的运动信息候选列表中的运动信息确定为第二分区的运动信息。
在一些实施方式中,确定第一分区的索引值和第二分区的索引值,包括:
利用多种预测模式对当前块进行预编码处理,获得每一种预测模式对应的率失真代价值;
从所获得的多个率失真代价值中选择最小率失真代价值,将最小率失真代价值对应的两个运动信息,分别确定为第一分区的索引值和第二分区的索引值。
在一些实施方式中,获取当前块的权重导出模式,包括:
确定当前块的预测模式参数;预测模式参数用于指示使用几何划分预测模式或角度加权预测模式确定当前块的帧间预测值;
从当前块的预测模式参数中,确定当前块的权重导出模式。
在一些实施方式中,新的运动信息候选列表为允许存在双向运动信息的候选列表。
此处介绍一个编码端的实施例,对当前块,尝试用AWP进行编码及其他可用的模式进行编码,确定是否使用AWP。如果AWP的代价最优则使用AWP。
尝试AWP时,从AWP的模式中选择一种模式进行编码确定AWP的代价。一种可能的方法是尝试所有AWP的模式选择其中代价最小的一个作为AWP的代价。
根据AWP的模式构建运动信息候选列表,构建方法和解码端实施例所述的构建方法相同。从运动信息候选列表中选择两个运动信息,一种可能的方法是对所有可能的运动信息候选的组合,所有可能的AWP的模式确定其代价,取代价最小的两个运动信息和AWP的模式的组合为最终确定的单向运动信息和AWP的模式。
在码流中写入AWP是否使用的信息。如果确定使用AWP,在码流中写入AWP的模式和两个运动信息的索引。如果当前模式是跳过模式,当前块的解码结束。如果当前模式不是跳过模式,在码流中写入量化系数。量化系数由当前块的实际值减去预测块得到残差块,对残差块进行变换,量化得到。当前块的解码结束。
应需注意的是,在编码器端未作详细说明的部分,可以参考对解码器端作出的说明。
在申请实施例提出自适应的运动信息候选列表的构建方法,即根据AWP或GPM的模式确定AWP或GPM的运动信息候选列表的构建方法的方法,使每一类AWP或GPM的模式,即每一类划分方法都有与之匹配的运动信息候选列表,从而提高编码效率,而对解码器并没有增加额外的计算复杂度,因为使用AWP或GPM的块只需要构建一次AWP或GPM的运动信息候选列表。
以下介绍另外两种帧间预测方法,应需说明的是,下述方法中的未提及到的部分,可以参照上述实施例的说明。以及,值得注意的是,下述实施例中的一个或至少两个实施例,在不冲突的情况下,可以与上述任一个或至少两个实施例相结合。
图14为本申请又一实施例提供的一种帧间预测方法的流程示意图,如图14所示,该方法应用于解码器,该方法可以包括:
S1401、解析码流,获取当前块相关的原始运动信息的运动矢量信息。
在一种实施方式中,解码器在解析码流的过程中可以得到的原始运动信息,由于原始运动信息包括运动矢量信息和参考帧信息,从而解码器可以得到当前块相关的原始运动信息的运动矢量信息。
在一种是实施方式中,解码器可以获取到当前块相关的已知运动信息。当前块相关的已知运动信息中包括预设数量个运动信息,对于当前块相关的已知运动信息的说明,可以参照上述实施例,此处不再赘述。
预设数量个运动信息中每一个运动信息可以包括原始运动信息,也可以包括衍生运动信息,其中,衍生运动信息是基于原始运动信息确定的。
基于原始运动信息确定衍生运动信息的方式可以参照上述实施例中的说明,也可以参照下述实施例中的说明。
应该理解的是,解码器通过解析码流能够得到的是当前块相关的原始运动信息,对于当前块相关的衍生运动信息,需要通过原始运动信息进行计算得到。
S1403、基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数。
对所述原始运动信息的运动矢量信息进行缩放,可以指的是基于对原始运动信息进行乘法或除法计算的结果,得到衍生运动信息的运动矢量信息。
S1405、基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表。
在一种情况下,解码器通过解析码流,得到当前块相关的至少两个原始运动信息,而基于每一个原始运动信息,又可以得到一个或至少两个衍生运动信息,而在构建新的运动信息候选列表,可以用到该至少两个原始运动信息中的全部或部分原始运动信息,以及,可以用到M个衍生运动信息的运动矢量信息中的全部或部分。用到的原始运动信息的数量可以大于、小于或等于衍生运动信息。也就是说,新的运动信息候选列表可以包括至少两个原始运动信息中的全部或部分,以及,M个衍生运动信息的运动矢量信息中的全部或部分。
在实施的过程中,基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表,可以包括:基于所述衍生运动信息的运动矢量信息确定衍生运动信息,基于所述原始运动信息和所述衍生运动信息,构建新的运动信息候选列表。
其中,基于所述衍生运动信息的运动矢量信息确定衍生运动信息,可以包括:确定衍生运动信息的参考帧信息,基于所述衍生运动信息的运动矢量信息和衍生运动信息的参考帧信息,确定衍生运动信息。其中,衍生运动信息的参考帧信息的确定方式可以参照上述实施例的说明。
能够理解地是,新的运动信息候选列表中包括的是至少两个填入的运动信息,至少两个填入的运动信息中的每一个运动信息为原始运动信息或衍生运动信息。
在基于原始运动信息和衍生运动信息,构建新的运动信息候选列表时,可以将得到的原始运动信息全部放置在得到的衍生运动信息之前,或者,原始运动信息和衍生运动信息交错排列。
其中,原始运动信息和衍生运动信息的排序方式,可以参照上述相关实施例的描述,此处不作赘述。
S1407、基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
本申请实施例中,由于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表,从而得到的新的运动信息候选列表,因此得到的新的运动信息候选列表可以充分利用到已经获取的原始运动信息的运动矢量信息,从而使得运动信息候选列表的构建符合当前块的权重导出模式,从而新的运动信息候选列表能够将运动信息,按照与当前块的相关性从强到弱的顺序排列,因此能够提高当前块的解码效率。
在一种实施方式中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括以下之一:
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;将所述原始运动信息的第二轴分量信息,作为所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;基于对所述原始运动信息的第二轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
在一种实施方式中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述原始运动信息的第一轴分量信息乘以M个第一值,得到M个第一结果,基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息;
将所述原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数,基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第一结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
确定与所述M个第一结果一一对应的M个第三值,将所述M个第一结果与M个第三值一一相加,得到M个第二结果,基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第二结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
将所述M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述第三值为一左移目标位得到,所述目标位为所述特定位数减一。
在一种实施方式中,所述基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括:
在所述原始运动信息的第一轴分量信息为正值的情况下,将所述M个第三结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
在所述原始运动信息的第一轴分量信息为负值的情况下,将所述M个第三结果中的每一结果乘以负一的结果,作为所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;
所述M个第一值包括第一特定值和第二特定值,所述第一特定值大于0且小于1,所述第二特定值大于1且小于2,所述第一特定值与所述第二特定值之和为2。
在一种实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定所述第一特定值为第一系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第二阈值且小于或等于第三阈值的情况下,确定所述第一特定值为第二系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第三阈值的情况下,确定所述第一特定值为第三系数;
其中,所述第一系数小于所述第二系数,所述第二系数小于所述第三系数。
在一种实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于所述第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为所述衍生运动信息的第一轴分量信息;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的所述第一目标值作为所述衍生运动信息的第一轴分量信息。
在一种实施方式中,所述M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
所述第一组除数中每一除数大于最大阈值;
所述第二组除数中每一除数大于或等于最小阈值,且小于或等于所述最大阈值;
所述第三组除数中每一除数小于最小阈值;
所述基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息,包括以下至少之一:
将所述最大阈值,作为所述M个衍生运动信息中,与所述第一组除数对应的每一衍生运动信息的第一轴分量信息;
将所述第二组除数中每一除数,作为所述M个衍生运动信息中,与所述第二组除数对应的每一衍生运动信息的第一轴分量信息;
将所述最小阈值,作为所述M个衍生运动信息中,与所述第三组除数对应的每一衍生运动信息的 第一轴分量信息。
在一种实施方式中,所述原始运动信息为单向原始运动信息,或双向原始运动信息,或对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息;
所述衍生运动信息为单向衍生运动信息,或双向衍生运动信息,或对双向衍生运动信息进行拆分得到的一个或两个单向衍生运动信息;
所述单向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的,所述双向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的。
在一种实施方式中,所述解析码流,获取当前块相关的原始运动信息的运动矢量信息,包括:
解析码流,获取当前块相关的原始运动信息的运动矢量信息和所述当前块的权重导出模式;
所述基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表,包括:
基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表。
在一种实施方式中,所述基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表,包括:
基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式;
基于所述排序方式,所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表。
在一种实施方式中,所述基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式之前,还包括:
基于所述解码器解析的码流,获取至少一个相邻块的原始运动信息,和至少一个对应块的原始运动信息;
基于所述至少一个相邻块的原始运动信息中的全部或部分,和/或,基于所述至少一个对应块的原始运动信息的全部或部分,生成特定数量个衍生运动信息;
其中,所述特定数量小于或等于8;所述特定数量个衍生运动信息包括:相邻块的衍生运动信息和/或对应块的衍生运动信息。
在一种实施方式中,所述方法还包括:
在填入至所述初始运动信息候选列表的单向原始运动信息的第二总数,小于所述预设数量减一的情况下,获取填入至所述初始运动信息候选列表中的前两个单向原始运动信息;
基于所述前两个单向原始运动信息,确定对应的四个单向衍生运动信息;
依序将与已经填入的单向运动信息不同的所述四个衍生运动信息,继续填入至所述初始运动信息候选列表;
在填入至所述初始运动信息候选列表的单向原始运动信息和单向衍生运动信息的第三总数,等于所述预设数量减一的情况下,将所述一个对应块的单向运动信息或双向运动信息继续填入至所述初始运动信息候选列表。
在一种实施方式中,在待填入的衍生运动信息为双向衍生运动信息的情况下,将所述双向衍生运动信息拆分为两个单向衍生运动信息;将所述两个单向衍生运动信息中的至少一个填入所述初始运动信息候选列表中;
和/或,在待填入的原始运动信息为双向原始运动信息的情况下,将所述双向原始运动信息拆分为两个单向原始运动信息,将所述两个单向原始运动信息中的至少一个填入所述初始运动信息候选列表中,或者,将所述双向原始运动信息填入所述初始运动信息候选列表中。
在一种实施方式中,在所述原始运动信息为双向原始运动信息的情况下,所述方法还包括:
将所述原始运动信息拆分为第一个单向原始运动信息和第二个单向原始运动信息;
将第一值,与所述第一个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为所述第一个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;
将第四值,与所述第二个单向原始运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息相乘的结果,作为第二个单向衍生运动信息的运动矢量信息中的第一轴分量信息或第二轴分量信息;
其中,所述第一值和所述第四值均大于0;
其中,所述第一值与所述第四值相同,或者,所述第一值于所述第四值不同且所述第一值与所述第四值之和为2。
在一种实施方式中,解码器基于所述排序方式,将所述至少一个相邻块的原始运动信息中的全部或部分、至少一个对应块的原始运动信息的全部或部分、所述至少一个相邻块的衍生运动信息中的全部或 部分、至少一个对应块的衍生运动信息的全部或部分中的至少一者,依序或交错填入所述初始运动信息候选列表中。
在一种实施方式中,所述方法还包括:
在向所述初始运动信息候选列表填入至少一个原始运动信息之后,确定待填入的衍生运动信息;
将所述待填入的衍生运动信息填入至所述初始运动信息候选列表;
或者,在确定到所述待填入的衍生运动信息,不同于与所述待填入的衍生运动信息对应的已经填入的原始运动信息的情况下,将所述待填入的衍生运动信息填入至所述初始运动信息候选列表;
或者,在确定到所述待填入的衍生运动信息,不同于已经填入的原始运动信息的情况下,将所述待填入的衍生运动信息填入至所述初始运动信息候选列表。
应理解,在采用对所述原始运动信息的第一轴/第二轴分量信息进行缩放的方式,得到衍生运动信息时,所述衍生运动信息的预测方向与所述原始运动信息的预测方向相同;所述衍生运动信息的参考帧信息与所述原始运动信息的参考帧信息相同。
图15为本申请再一实施例提供的一种帧间预测方法的流程示意图,如图15所示,该方法应用于编码器,该方法可以包括:
S1501、确定当前块相关的原始运动信息的运动矢量信息。
S1503、基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数。
S1505、基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表。
S1507、基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
本申请实施例中,由于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表,从而得到的新的运动信息候选列表,因此得到的新的运动信息候选列表可以充分利用到已经获取的原始运动信息的运动矢量信息,从而使得运动信息候选列表的构建符合当前块的权重导出模式,从而新的运动信息候选列表能够将运动信息,按照与当前块的相关性从强到弱的顺序排列,因此能够提高当前块的编码效率。
在一种实施方式中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括以下之一:
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;将所述原始运动信息的第二轴分量信息,作为所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息;基于对所述原始运动信息的第二轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
在一种实施方式中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述原始运动信息的第一轴分量信息乘以M个第一值,得到M个第一结果,基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息;
将所述原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数,基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述基于所述M个第一结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第一结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
确定与所述M个第一结果一一对应的M个第三值,将所述M个第一结果与M个第三值一一相加,得到M个第二结果,基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
将所述M个第二结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
将所述M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于所述M个第三结果 中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述第三值为一左移目标位得到,所述目标位为所述特定位数减一。
在一种实施方式中,所述基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括:
在所述原始运动信息的第一轴分量信息为正值的情况下,将所述M个第三结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
在所述原始运动信息的第一轴分量信息为负值的情况下,将所述M个第三结果中的每一结果乘以负一的结果,作为所述每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;
所述M个第一值包括第一特定值和第二特定值,所述第一特定值大于0且小于1,所述第二特定值大于1且小于2,所述第一特定值与所述第二特定值之和为2。
在一种实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定所述第一特定值为第一系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第二阈值且小于或等于第三阈值的情况下,确定所述第一特定值为第二系数;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第三阈值的情况下,确定所述第一特定值为第三系数;
其中,所述第一系数小于所述第二系数,所述第二系数小于所述第三系数。
在一种实施方式中,所述方法还包括:
在所述原始运动信息的第一轴分量信息的绝对值,小于或等于所述第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为所述衍生运动信息的第一轴分量信息;
在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的所述第一目标值作为所述衍生运动信息的第一轴分量信息。
在一种实施方式中,所述M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
所述第一组除数中每一除数大于最大阈值;
所述第二组除数中每一除数大于或等于最小阈值,且小于或等于所述最大阈值;
所述第三组除数中每一除数小于最小阈值;
所述基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息,包括以下至少之一:
将所述最大阈值,作为所述M个衍生运动信息中,与所述第一组除数对应的每一衍生运动信息的第一轴分量信息;
将所述第二组除数中每一除数,作为所述M个衍生运动信息中,与所述第二组除数对应的每一衍生运动信息的第一轴分量信息;
将所述最小阈值,作为所述M个衍生运动信息中,与所述第三组除数对应的每一衍生运动信息的第一轴分量信息。
在一种实施方式中,所述原始运动信息为单向原始运动信息,或双向原始运动信息,或对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息;
所述衍生运动信息为单向衍生运动信息,或双向衍生运动信息,或对双向衍生运动信息进行拆分得到的一个或两个单向衍生运动信息;
所述单向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的,所述双向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的。
在一种实施方式中,所述获取当前块相关的原始运动信息的运动矢量信息,包括:
获取当前块相关的原始运动信息的运动矢量信息和所述当前块的权重导出模式;
所述基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表,包括:
基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表。
在一种实施方式中,所述基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所 述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表,包括:
基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式;
基于所述排序方式,所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述新的运动信息候选列表。
在一种实施方式中,在所述当前块的权重导出模式下,所述当前块划分为第一分区和第二分区;
所述基于所述新的运动信息候选列表,确定所述当前块的帧间预测值,包括:
从所述新的运动信息候选列表中,确定第一分区的运动信息和第二分区的运动信息;
基于所述第一分区的运动信息确定所述第一分区的第一预测值,基于所述第二分区的运动信息确定所述第二分区的第二预测值;
对所述第一预测值和所述第二预测值进行加权融合,得到所述当前块的帧间预测值。
在一种实施方式中,所述从所述新的运动信息候选列表中,确定第一分区的运动信息和第二分区的运动信息,包括:
确定所述第一分区的索引值和所述第二分区的索引值;
基于所述新的运动信息候选列表,将所述第一分区的索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第一分区的运动信息;
基于所述新的运动信息候选列表,将所述第二分区的索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第二分区的运动信息。
在一种实施方式中,所述确定所述第一分区的索引值和所述第二分区的索引值,包括:
利用多种预测模式对所述当前块进行预编码处理,获得每一种预测模式对应的率失真代价值;
从所获得的多个率失真代价值中选择最小率失真代价值,将所述最小率失真代价值对应的两个运动信息,分别确定为所述第一分区的索引值和所述第二分区的索引值。
基于前述的实施例,本申请实施例提供一种解码器/编码器,该解码器/编码器所包括的各单元、以及各单元所包括的各模块,可以通过解码器/编码器中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
图16为本申请实施例提供的一种解码器的组成结构示意图,该解码器1600可以设置在解码器中,如图16所示,解码器1600可以包括:
获取单元1601,用于解析码流,获取当前块的权重导出模式。
构建单元1602,用于基于所述当前块的权重导出模式,构建新的运动信息候选列表。
预测单元1603,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
图17为本申请实施例提供的一种编码器的组成结构示意图,该编码器1700可以设置在编码器中,如图17所示,编码器1700可以包括:
模式确定单元1701,用于确定当前块的权重导出模式。
构建单元1702,用于基于所述当前块的权重导出模式,构建新的运动信息候选列表。
预测单元1703,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
图18为本申请实施例提供的另一种解码器的组成结构示意图,该解码器1800可以设置在解码器中,如图18所示,解码器1800可以包括:
获取单元1801,用于解析码流,获取当前块的权重导出模式;
衍生运动信息确定单元1802,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
构建单元1803,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;
预测单元1804,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
图19为本申请实施例提供的另一种编码器的组成结构示意图,该编码器1900可以设置在解码器中,如图19所示,编码器1900可以包括:
原始运动信息确定单元1901,用于确定当前块相关的原始运动信息的运动矢量信息;
衍生运动信息确定单元1902,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
构建单元1903,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建新的运动信息候选列表;
预测单元1904,用于基于所述新的运动信息候选列表,确定所述当前块的帧间预测值。
需要注意的是,本申请实施例虽然只是给出了解码器1600、编码器1700、解码器1800、编码器1900的一种组成结构示意,但是本领域技术人员能够理解地是,解码器1600、编码器1700、解码器1800、编码器1900中的任一个还可以包括能够实现上述任一实施例的步骤的其它单元,以及,本申请实施例中已经描述的这些单元,也可以实现上述任一实施例的其它步骤。
以上解码器/编码器实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请解码器/编码器实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述的帧间预测方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台解码器/编码器执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。
图20为本申请实施例提供的一种解码器的硬件实体示意图,如图20所示,该解码器2000的硬件实体包括:处理器2001和存储器2002,其中,存储器2002存储有可在处理器2001上运行的计算机程序,处理器2001执行程序时实现上述任一实施例的解码器执行的方法中的步骤。
图21为本申请实施例提供的一种编码器的硬件实体示意图,如图21所示,该编码器2100的硬件实体包括:处理器2101和存储器2102,其中,存储器2102存储有可在处理器2101上运行的计算机程序,处理器2101执行程序时实现上述任一实施例的编码器执行的方法中的步骤。
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中解码器执行的方法的步骤。
本申请实施例提供一种计算机存储介质,计算机存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述方法中编码器执行的方法的步骤。
解码器2000可以与解码器1600为同一个解码器,解码器2000可以与解码器1800为同一个解码器,编码器2100可以与编码器1700为同一个编码器,编码器2100可以与编码器1900为同一个编码器
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct  Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
这里需要指出的是:以上解码器、译码器、计算机存储介质实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“本申请实施例”或“前述实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
在未做特殊说明的情况下,解码器/编码器执行本申请实施例中的任一步骤,可以是解码器/编码器的处理器执行该步骤。除非特殊说明,本申请实施例并不限定解码器/编码器执行下述步骤的先后顺序。另外,不同实施例中对数据进行处理所采用的方式可以是相同的方法或不同的方法。还需说明的是,本申请实施例中的任一步骤是解码器/编码器可以独立执行的,即解码器/编码器执行下述实施例中的任一步骤时,可以不依赖于其它步骤的执行。
在本申请所提供的几个实施例中,应该理解到,所揭露的解码器/编码器和方法,可以通过其它的方式实现。以上所描述的解码器/编码器实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,资源设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或解码器/编码器实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或解码器/编码器实施例。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储资源设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得解码器/编码器执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储资源设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
在本申请实施例中,不同实施例中相同步骤和相同内容的说明,可以互相参照。在本申请实施例中,术语“并”不对步骤的先后顺序造成影响,例如,解码器/编码器执行P,并执行Q,可以是解码器/编码器先执行P,再执行Q,或者是解码器/编码器先执行Q,再执行P,或者是解码器/编码器执行P的同时执行Q。以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例提供了一种帧间预测方法、解码器、编码器及计算机存储介质,采用本申请中的帧间预测方法的方案,使得解码器能够根据不同的权重导出模式,构建出不同的新的运动信息候选列表,从而使得运动信息候选列表的构建符合当前块的权重导出模式,进而能够提高解码器的解码效率。

Claims (43)

  1. 一种帧间预测方法,应用于解码器,所述方法包括:
    获取当前块相关的原始运动信息的运动矢量信息;
    基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
    基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表;
    基于所述运动信息候选列表,确定所述当前块的帧间预测值。
  2. 根据权利要求1所述的方法,其中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
    所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括:
    基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息;
    将所述原始运动信息的第二轴分量信息,作为所述衍生运动信息的第二轴分量信息;
    其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
  3. 根据权利要求1所述的方法,其中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
    所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括:
    基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息;
    基于对所述原始运动信息的第二轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
    其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
  4. 根据权利要求2或3所述的方法,其中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息,包括:
    将所述原始运动信息的第一轴分量信息乘以第一值,得到第一结果;
    基于所述第一结果,确定所述衍生运动信息的第一轴分量信息。
  5. 根据权利要求2或3所述的方法,其中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息,包括:
    将所述原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数;
    基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息。
  6. 根据权利要求4所述的方法,其中,所述基于所述第一结果,确定所述衍生运动信息的第一轴分量信息,包括以下之一:
    将所述第一结果,作为所述衍生运动信息的第一轴分量信息;
    确定与所述M个第一结果一一对应的M个第三值,将所述M个第一结果与M个第三值一一相加,得到M个第二结果,基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
  7. 根据权利要求6所述的方法,其中,所述基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
    将所述M个第二结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
    将所述M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
  8. 根据权利要求6或7所述的方法,其中,所述第三值为一左移目标位得到,所述目标位为所述特定位数减一。
  9. 根据权利要求7所述的方法,其中,所述基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括:
    在所述原始运动信息的第一轴分量信息为正值的情况下,将所述M个第三结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
    在所述原始运动信息的第一轴分量信息为负值的情况下,将所述M个第三结果中的每一结果乘以负一的结果,作为所述每一衍生运动信息的第一轴分量信息。
  10. 根据权利要求4至9任一项所述的方法,其中,所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;
    所述M个第一值包括第一特定值和第二特定值,所述第一特定值大于0且小于1,所述第二特定值大于1且小于2,所述第一特定值与所述第二特定值之和为2。
  11. 根据权利要求10所述的方法,其中,所述方法还包括:
    在所述原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定所述第一特定值为第一系数;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第二阈值且小于或等于第三阈值的情况下,确定所述第一特定值为第二系数;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第三阈值的情况下,确定所述第一特定值为第三系数;
    其中,所述第一系数小于所述第二系数,所述第二系数小于所述第三系数。
  12. 根据权利要求10或11所述的方法,其中,所述方法还包括:
    在所述原始运动信息的第一轴分量信息的绝对值,小于或等于所述第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为所述衍生运动信息的第一轴分量信息;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的所述第一目标值作为所述衍生运动信息的第一轴分量信息。
  13. 根据权利要求5至12任一项所述的方法,其中,所述M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
    所述第一组除数中每一除数大于最大阈值;
    所述第二组除数中每一除数大于或等于最小阈值,且小于或等于所述最大阈值;
    所述第三组除数中每一除数小于最小阈值;
    所述基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息,包括以下至少之一:
    将所述最大阈值,作为所述M个衍生运动信息中,与所述第一组除数对应的每一衍生运动信息的第一轴分量信息;
    将所述第二组除数中每一除数,作为所述M个衍生运动信息中,与所述第二组除数对应的每一衍生运动信息的第一轴分量信息;
    将所述最小阈值,作为所述M个衍生运动信息中,与所述第三组除数对应的每一衍生运动信息的第一轴分量信息。
  14. 根据权利要求1至13任一项所述的方法,其中,所述原始运动信息为单向原始运动信息,或对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息;
    所述衍生运动信息为单向衍生运动信息;
    所述单向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的。
  15. 根据权利要求1至14任一项所述的方法,其中,所述获取当前块相关的原始运动信息的运动矢量信息,包括:
    获取当前块相关的原始运动信息的运动矢量信息和所述当前块的权重导出模式;
    所述基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表,包括:
    基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述运动信息候选列表。
  16. 根据权利要求15所述的方法,其中,所述基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述运动信息候选列表,包括:
    基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式;
    基于所述排序方式,所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息, 构建所述运动信息候选列表。
  17. 根据权利要求1至16任一项所述的方法,其中,所述M为4。
  18. 根据权利要求1至17任一项所述的方法,其中,在所述运动信息候选列表中,1个时域上的运动信息在4个空域上的运动信息之前。
  19. 根据权利要求1至18任一项所述的方法,其中,在所述运动信息候选列表中,时域运动信息在空域运动信息之前。
  20. 一种帧间预测方法,应用于编码器,所述方法包括:
    确定当前块相关的原始运动信息的运动矢量信息;
    基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
    基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表;
    基于所述运动信息候选列表,确定所述当前块的帧间预测值。
  21. 根据权利要求20所述的方法,其中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
    所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括:
    基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息;
    将所述原始运动信息的第二轴分量信息,作为所述衍生运动信息的第二轴分量信息;
    其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
  22. 根据权利要求20所述的方法,其中,所述运动矢量信息包括第一轴分量信息和第二轴分量信息;
    所述基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息,包括:
    基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息;
    基于对所述原始运动信息的第二轴分量信息进行缩放的结果,确定所述M个衍生运动信息中每一衍生运动信息的第二轴分量信息;
    其中,所述第一轴为x轴或y轴,所述第二轴为y轴或x轴,所述第一轴与所述第二轴不同。
  23. 根据权利要求21或22所述的方法,其中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息,包括:
    将所述原始运动信息的第一轴分量信息乘以第一值,得到第一结果;
    基于所述第一结果,确定所述衍生运动信息的第一轴分量信息。
  24. 根据权利要求21或22所述的方法,其中,所述基于对所述原始运动信息的第一轴分量信息进行缩放的结果,确定所述衍生运动信息中的第一轴分量信息,包括:
    将所述原始运动信息的第一轴分量信息除以M个第二值,得到M个第一除数;
    基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息。
  25. 根据权利要求23所述的方法,其中,所述基于所述第一结果,确定所述衍生运动信息的第一轴分量信息,包括以下之一:
    将所述第一结果,作为所述衍生运动信息的第一轴分量信息;
    确定与所述M个第一结果一一对应的M个第三值,将所述M个第一结果与M个第三值一一相加,得到M个第二结果,基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
  26. 根据权利要求25所述的方法,其中,所述基于所述M个第二结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括以下之一:
    将所述M个第二结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
    将所述M个第二结果中的每一结果右移特定位数,得到M个第三结果,基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息。
  27. 根据权利要求25或26所述的方法,其中,所述第三值为一左移目标位得到,所述目标位为所述特定位数减一。
  28. 根据权利要求26所述的方法,其中,所述基于所述M个第三结果中的每一结果,确定所述每一衍生运动信息的第一轴分量信息,包括:
    在所述原始运动信息的第一轴分量信息为正值的情况下,将所述M个第三结果中的每一结果,作为所述每一衍生运动信息的第一轴分量信息;
    在所述原始运动信息的第一轴分量信息为负值的情况下,将所述M个第三结果中的每一结果乘以负一的结果,作为所述每一衍生运动信息的第一轴分量信息。
  29. 根据权利要求23至28任一项所述的方法,其中,所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于第一阈值;
    所述M个第一值包括第一特定值和第二特定值,所述第一特定值大于0且小于1,所述第二特定值大于1且小于2,所述第一特定值与所述第二特定值之和为2。
  30. 根据权利要求29所述的方法,其中,所述方法还包括:
    在所述原始运动信息的第一轴分量信息的绝对值,小于或等于第二阈值的情况下,确定所述第一特定值为第一系数;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第二阈值且小于或等于第三阈值的情况下,确定所述第一特定值为第二系数;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,大于所述第三阈值的情况下,确定所述第一特定值为第三系数;
    其中,所述第一系数小于所述第二系数,所述第二系数小于所述第三系数。
  31. 根据权利要求29或30所述的方法,其中,所述方法还包括:
    在所述原始运动信息的第一轴分量信息的绝对值,小于或等于所述第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为正数的情况下,将第一目标值作为所述衍生运动信息的第一轴分量信息;
    在所述原始运动信息的运动矢量信息中的第一轴分量信息的绝对值,小于或等于第一阈值,且所述原始运动信息的运动矢量信息中的第一轴分量信息为负数的情况下,将负的所述第一目标值作为所述衍生运动信息的第一轴分量信息。
  32. 根据权利要求24至31任一项所述的方法,其中,所述M个第一除数包括第一组除数,和/或,第二组除数,和/或,第三组除数;
    所述第一组除数中每一除数大于最大阈值;
    所述第二组除数中每一除数大于或等于最小阈值,且小于或等于所述最大阈值;
    所述第三组除数中每一除数小于最小阈值;
    所述基于所述M个第一除数中的每一除数,确定所述每一衍生运动信息的第一轴分量信息,包括以下至少之一:
    将所述最大阈值,作为所述M个衍生运动信息中,与所述第一组除数对应的每一衍生运动信息的第一轴分量信息;
    将所述第二组除数中每一除数,作为所述M个衍生运动信息中,与所述第二组除数对应的每一衍生运动信息的第一轴分量信息;
    将所述最小阈值,作为所述M个衍生运动信息中,与所述第三组除数对应的每一衍生运动信息的第一轴分量信息。
  33. 根据权利要求20至32任一项所述的方法,其中,所述原始运动信息为单向原始运动信息,或对双向原始运动信息进行拆分得到的一个或两个单向原始运动信息;
    所述衍生运动信息为单向衍生运动信息;
    所述单向衍生运动信息是基于所述单向原始运动信息或所述双向运动信息确定的。
  34. 根据权利要求20至33任一项所述的方法,其中,所述确定当前块相关的原始运动信息的运动矢量信息,包括:
    确定当前块相关的原始运动信息的运动矢量信息和所述当前块的权重导出模式;
    所述基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表,包括:
    基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述运动信息候选列表。
  35. 根据权利要求34所述的方法,其中,所述基于所述当前块的权重导出模式、所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述运动信息候选列表,包括:
    基于所述当前块的权重导出模式,确定所述当前块相关的已知运动信息的排序方式;
    基于所述排序方式,所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建所述运动信息候选列表。
  36. 根据权利要求20至35任一项所述的方法,其中,所述M为4。
  37. 根据权利要求20至36任一项所述的方法,其中,在所述运动信息候选列表中,1个时域上的运动信息在4个空域上的运动信息之前。
  38. 根据权利要求20至37任一项所述的方法,其中,在所述运动信息候选列表中,时域运动信息在空域运动信息之前。
  39. 一种解码器,包括:
    获取单元,用于获取当前块相关的原始运动信息的运动矢量信息;
    衍生运动信息确定单元,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
    构建单元,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表;
    预测单元,用于基于所述运动信息候选列表,确定所述当前块的帧间预测值。
  40. 一种编码器,包括:
    原始运动信息确定单元,用于确定当前块相关的原始运动信息的运动矢量信息;
    衍生运动信息确定单元,用于基于对所述原始运动信息的运动矢量信息进行缩放的结果,确定M个衍生运动信息的运动矢量信息;M为大于或等于1的整数;
    构建单元,用于基于所述原始运动信息的运动矢量信息和所述衍生运动信息的运动矢量信息,构建运动信息候选列表;
    预测单元,用于基于所述运动信息候选列表,确定所述当前块的帧间预测值。
  41. 一种解码器,包括:存储器和处理器,
    所述存储器存储有可在处理器上运行的计算机程序,
    所述处理器执行所述程序时实现权利要求1至19任一项所述方法中的步骤。
  42. 一种编码器,包括:存储器和处理器,
    所述存储器存储有可在处理器上运行的计算机程序,
    所述处理器执行所述程序时实现权利要求20至38任一项所述方法中的步骤。
  43. 一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至19任一项所述方法中的步骤;
    或者,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求20至38任一项所述方法中的步骤。
PCT/CN2021/085454 2020-06-05 2021-04-02 帧间预测方法、解码器、编码器及计算机存储介质 WO2021244125A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202180008731.9A CN114930839A (zh) 2020-06-05 2021-04-02 帧间预测方法、解码器、编码器及计算机存储介质
CN202310111464.9A CN116193139A (zh) 2020-06-05 2021-04-02 帧间预测方法、解码器、编码器及计算机存储介质
MX2022010726A MX2022010726A (es) 2020-06-05 2021-04-02 Metodo de pronostico intermarco, decodificador, codificador, y medio de almacenamiento de computadora.

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010507268.X 2020-06-05
CN202010507268.XA CN113766245A (zh) 2020-06-05 2020-06-05 帧间预测方法、解码器、编码器及计算机存储介质

Publications (1)

Publication Number Publication Date
WO2021244125A1 true WO2021244125A1 (zh) 2021-12-09

Family

ID=78785177

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085454 WO2021244125A1 (zh) 2020-06-05 2021-04-02 帧间预测方法、解码器、编码器及计算机存储介质

Country Status (4)

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

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023123495A1 (zh) * 2021-12-31 2023-07-06 Oppo广东移动通信有限公司 预测方法、装置、设备、系统、及存储介质
WO2024077553A1 (zh) * 2022-10-13 2024-04-18 Oppo广东移动通信有限公司 视频编解码方法、装置、设备、系统、及存储介质
WO2024108391A1 (zh) * 2022-11-22 2024-05-30 Oppo广东移动通信有限公司 视频编解码方法、装置、设备、系统、及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150146103A1 (en) * 2012-04-24 2015-05-28 Lg Electronics Inc. Method and apparatus for processing video signal
CN109963155A (zh) * 2017-12-23 2019-07-02 华为技术有限公司 图像块的运动信息的预测方法、装置及编解码器
CN110771169A (zh) * 2017-06-09 2020-02-07 韩国电子通信研究院 视频编码/解码方法和装置以及存储比特流的记录介质
CN110771163A (zh) * 2017-06-23 2020-02-07 高通股份有限公司 视频译码中的帧间预测与帧内预测的组合

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150146103A1 (en) * 2012-04-24 2015-05-28 Lg Electronics Inc. Method and apparatus for processing video signal
CN110771169A (zh) * 2017-06-09 2020-02-07 韩国电子通信研究院 视频编码/解码方法和装置以及存储比特流的记录介质
CN110771163A (zh) * 2017-06-23 2020-02-07 高通股份有限公司 视频译码中的帧间预测与帧内预测的组合
CN109963155A (zh) * 2017-12-23 2019-07-02 华为技术有限公司 图像块的运动信息的预测方法、装置及编解码器

Also Published As

Publication number Publication date
TW202147837A (zh) 2021-12-16
CN113766245A (zh) 2021-12-07
CN114930839A (zh) 2022-08-19
CN116193139A (zh) 2023-05-30
MX2022010726A (es) 2022-09-23

Similar Documents

Publication Publication Date Title
WO2021244125A1 (zh) 帧间预测方法、解码器、编码器及计算机存储介质
KR102357575B1 (ko) 비디오 이미지 인코딩 및 디코딩 방법, 장치 및 디바이스
CN113853783B (zh) 对帧内块复制编解码的块的块矢量的编解码
CN113039802B (zh) 基于历史的仿射参数的使用
UA126919C2 (uk) Уточнення вектора руху для мультиреференсного прогнозування
CN113853791B (zh) 数字视频中的变换旁路编解码残差块
CN114830651A (zh) 帧内预测方法、编码器、解码器以及计算机存储介质
US11706449B2 (en) Method and device for intra-prediction
WO2021203924A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
WO2021238396A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
WO2021258841A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
TW202145784A (zh) 幀間預測方法、編碼器、解碼器以及電腦儲存媒介
TWI749297B (zh) 合成式預測及限制性合併技術
TW202147851A (zh) 幀間預測方法、編碼器、解碼器以及電腦儲存媒介
WO2023044916A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044917A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044918A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
CN113727119B (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
TW202209884A (zh) 幀間預測方法、編碼器、解碼器及電腦可讀儲存媒介
WO2023123736A1 (zh) 预测方法、装置、设备、系统、及存储介质
RU2809619C1 (ru) Способ, оборудование и устройство для кодирования и декодирования
TW202209883A (zh) 幀間預測方法、編碼器、解碼器及儲存媒介
WO2024119521A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024108391A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2023141970A1 (zh) 解码方法、编码方法、解码器、编码器和编解码系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21818515

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21818515

Country of ref document: EP

Kind code of ref document: A1