Embodiments of the present disclosure relates generally to video coding techniques, and more particularly, to adaptive reordering of motion candidates in video coding.
In nowadays, digital video capabilities are being applied in various aspects of peoples' lives. Multiple types of video compression technologies, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding (AVC), ITU-TH.265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding/decoding. However, coding efficiency of conventional video coding techniques is generally expected to be further improved.
Embodiments of the present disclosure provide a solution for video processing.
In a first aspect, a method for video processing is proposed. The method comprises: constructing, during a conversion between a target block of a video and a bitstream of the video, a list of motion candidates for motion information for the target block; determining a reordering scheme based at least in part on coding information, the reordering scheme indicating whether and/or how at least one motion candidate in the list of motion candidates is to be reordered; generating a target list of motion candidates from the list of motion candidates according to the reordering scheme; and deriving the motion information for the target block from the target list of motion candidates. Compared with the conventional solution, the proposed method can advantageously improve the coding effectiveness and coding efficiency.
In a second aspect, an electronic device is proposed. The electronic device comprises a processing unit, and a memory coupled to the processing unit and having instructions stored thereon which, when executed by the processing unit, cause the electronic device to perform a method in accordance with the first aspect of the present disclosure.
In a third aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with the first aspect of the present disclosure.
In a fourth aspect, a non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method in accordance with the first aspect of the present disclosure, wherein the method is performed by a video processing apparatus.
In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises constructing, during a conversion between a target block of a video and a bitstream of the video, a list of motion candidates for motion information for the target block; determining a reordering scheme based at least in part on coding information, the reordering scheme indicating whether and/or how at least one motion candidate in the list of motion candidates is to be reordered; generating a target list of motion candidates from the list of motion candidates according to the reordering scheme; deriving the motion information for the target block from the target list of motion candidates; generating the bitstream based on the motion information; and storing the bitstream in a non-transitory computer-readable recording medium.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Through the following detailed description with reference to the accompanying drawings, the above and other objectives, features, and advantages of example embodiments of the present disclosure will become more apparent. In the example embodiments of the present disclosure, the same reference numerals usually refer to the same components.
Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.
Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.
In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.
References in the present disclosure to “one embodiment,” “an embodiment,” “an example embodiment,” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
It shall be understood that although the terms “first” and “second” etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and/or” includes any and all combinations of one or more of the listed terms.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising”, “has”, “having”, “includes” and/or “including”, when used herein, specify the presence of stated features, elements, and/or components etc., but do not preclude the presence or addition of one or more other features, elements, components and/or combinations thereof.
The video source 112 may include a source such as a video capture device. Examples of the video capture device include, but are not limited to, an interface to receive video data from a video content provider, a computer graphics system for generating video data, and/or a combination thereof.
The video data may comprise one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I/O interface 116 may include a modulator/demodulator and/or a transmitter. The encoded video data may be transmitted directly to destination device 120 via the I/O interface 116 through the network 130A. The encoded video data may also be stored onto a storage medium/server 130B for access by destination device 120.
The destination device 120 may include an I/O interface 126, a video decoder 124, and a display device 122. The I/O interface 126 may include a receiver and/or a modem. The I/O interface 126 may acquire encoded video data from the source device 110 or the storage medium/server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 which is configured to interface with an external display device.
The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard and other current and/or further standards.
The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of
In some embodiments, the video encoder 200 may include a partition unit 201, a predication unit 202 which may include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.
In other examples, the video encoder 200 may include more, fewer, or different functional components. In an example, the predication unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform predication in an IBC mode in which at least one reference picture is a picture where the current video block is located.
Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, but are represented in the example of
The partition unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.
The mode select unit 203 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra-coded or inter-coded block to a residual generation unit 207 to generate residual block data and to a reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode select unit 203 may select a combination of intra and inter predication (CIIP) mode in which the predication is based on an inter predication signal and an intra predication signal. The mode select unit 203 may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter-predication.
To perform inter prediction on a current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.
The motion estimation unit 204 and the motion compensation unit 205 may perform different operations for a current video block, for example, depending on whether the current video block is in an I-slice, a P-slice, or a B-slice. As used herein, an “I-slice” may refer to a portion of a picture composed of macroblocks, all of which are based upon macroblocks within the same picture. Further, as used herein, in some aspects, “P-slices” and “B-slices” may refer to portions of a picture composed of macroblocks that are not dependent on macroblocks in the same picture.
In some examples, the motion estimation unit 204 may perform uni-directional prediction for the current video block, and the motion estimation unit 204 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video block indicated by the motion information of the current video block.
Alternatively, in other examples, the motion estimation unit 204 may perform bi-directional prediction for the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.
In some examples, the motion estimation unit 204 may output a full set of motion information for decoding processing of a decoder. Alternatively, in some embodiments, the motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, the motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.
In one example, the motion estimation unit 204 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 300 that the current video block has the same motion information as the another video block.
In another example, the motion estimation unit 204 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.
As discussed above, the video encoder 200 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by the video encoder 200 include advanced motion vector predication (AMVP) and merge mode signaling.
The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.
The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block (s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.
In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and the residual generation unit 207 may not perform the subtracting operation.
The transform processing unit 208 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.
After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the predication unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.
After the reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video blocking artifacts in the video block.
The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. When the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.
The video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of
In the example of
The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 may decode the entropy coded video data, and from the entropy decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may, for example, determine such information by performing the AMVP and merge mode. AMVP is used, including derivation of several most probable candidates based on data from adjacent PBs and the reference picture. Motion information typically includes the horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of prediction regions in B slices, an identification of which reference picture list is associated with each index. As used herein, in some aspects, a “merge mode” may refer to deriving the motion information from spatially or temporally neighboring blocks.
The motion compensation unit 302 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.
The motion compensation unit 302 may use the interpolation filters as used by the video encoder 200 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 according to the received syntax information and use the interpolation filters to produce predictive blocks.
The motion compensation unit 302 may use at least part of the syntax information to determine sizes of blocks used to encode frame(s) and/or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence. As used herein, in some aspects, a “slice” may refer to a data structure that can be decoded independently from other slices of the same picture, in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice can either be an entire picture or a region of a picture.
The intra prediction unit 303 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. The inverse quantization unit 304 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.
The reconstruction unit 306 may obtain the decoded blocks, e.g., by summing the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 302 or intra-prediction unit 303. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in the buffer 307, which provides reference blocks for subsequent motion compensation/intra predication and also produces decoded video for presentation on a display device.
Some exemplary embodiments of the present disclosure will be described in detailed hereinafter. It should be understood that section headings are used in the present document to facilitate ease of understanding and do not limit the embodiments disclosed in a section to only that section. Furthermore, while certain embodiments are described with reference to Versatile Video Coding or other specific video codecs, the disclosed techniques are applicable to other video coding technologies also. Furthermore, while some embodiments describe video coding steps in detail, it will be understood that corresponding steps decoding that undo the coding will be implemented by a decoder. Furthermore, the term video processing encompasses video coding or compression, video decoding or decompression and video transcoding in which video pixels are represented from one compressed format into another compressed format or at a different compressed bitrate.
This disclosure is related to video coding technologies. Specifically, it is related to inter prediction in video coding. It may be applied to the existing video coding standard like HEVC, or the standard Versatile Video Coding (VVC) to be finalized. It may be also applicable to future video coding standards or video codec.
Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. The ITU-T produced H.261 and H.263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4 Advanced Video Coding (AVC) and H.265/HEVC standards (see ITU-T and ISO/IEC, “High efficiency video coding”, Rec. ITU-T H.265 IISO/IEC 23008-2 (in force edition)). Since H.262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM) (see J. Chen, E. Alshina, G. J. Sullivan, J.-R. Ohm, J. Boyce, “Algorithm description of Joint Exploration Test Model 7 (JEM7),” JVET-G1001, August 2017; JEM-7.0: https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/tags/HM-16.6-JEM-7.0). In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at 50% bitrate reduction compared to HEVC.
In VVC, the merge candidate list is constructed by including the following five types of candidates in order:
The size of merge list is signalled in sequence parameter set header and the maximum allowed size of merge list is 6. For each CU code in merge mode, an index of best merge candidate is encoded using truncated unary binarization (TU). The first bin of the merge index is coded with context and bypass coding is used for other bins.
The derivation process of each category of merge candidates is provided in this session. As done in HEVC, VVC also supports parallel derivation of the merging candidate lists for all CUs within a certain size of area.
The derivation of spatial merge candidates in VVC is same to that in HEVC except the positions of first two merge candidates are swapped.
In this step, only one candidate is added to the list. Particularly, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on co-located CU belonging to the collocated reference picture. The reference picture list to be used for derivation of the co-located CU is explicitly signalled in the slice header.
The position for the temporal candidate is selected between candidates C0 and C1, as depicted in a schematic diagram 700 in
The history-based MVP (HMVP) merge candidates are added to merge list after the spatial MVP and TMVP. In this method, the motion information of a previously coded block is stored in a table and used as MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding/decoding process. The table is reset (emptied) when a new CTU row is encountered. Whenever there is a non-subblock inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate.
The HMVP table size S is set to be 6, which indicates up to 6 History-based MVP (HMVP) candidates may be added to the table. When inserting a new motion candidate to the table, a constrained first-in-first-out (FIFO) rule is utilized wherein redundancy check is firstly applied to find whether there is an identical HMVP in the table. If found, the identical HMVP is removed from the table and all the HMVP candidates afterwards are moved forward.
HMVP candidates could be used in the merge candidate list construction process. The latest several HMVP candidates in the table are checked in order and inserted to the candidate list after the TMVP candidate. Redundancy check is applied on the HMVP candidates to the spatial or temporal merge candidate.
To reduce the number of redundancy check operations, the following simplifications are introduced:
Pairwise average candidates are generated by averaging predefined pairs of candidates in the existing merge candidate list, and the predefined pairs are defined as {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)}, where the numbers denote the merge indices to the merge candidate list. The averaged motion vectors are calculated separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference pictures; if only one motion vector is available, use the one directly; if no motion vector is available, keep this list invalid.
When the merge list is not full after pair-wise average merge candidates are added, the zero MVPs are inserted in the end until the maximum merge candidate number is encountered.
Merge estimation region (MER) allows independent derivation of merge candidate list for the CUs in the same merge estimation region (MER). A candidate block that is within the same MER to the current CU is not included for the generation of the merge candidate list of the current CU. In addition, the updating process for the history-based motion vector predictor candidate list is updated only if (xCb+cbWidth)>>Log 2ParMrgLevel is greater than xCb>>Log 2ParMrgLevel and (yCb+cbHeight)>>Log 2ParMrgLevel is great than (yCb>>Log 2ParMrgLevel) and where (xCb,yCb) is the top-left luma sample position of the current CU in the picture and (cbWidth,cbHeight) is the CU size. The MER size is selected at encoder side and signalled as log 2_parallel_merge_level_minus2 in the sequence parameter set.
It is proposed to derive the additional merge candidates from the positions non-adjacent to the current block using the same pattern as that in VVC. To achieve this, for each search round i, a virtual block is generated based on the current block as follows:
First, the relative position of the virtual block to the current block is calculated by:
Offsetx=−i×gridX, Offsety=−i×gridY
where the Offsetx and Offsety denote the offset of the top-left corner of the virtual block relative to the top-left corner of the current block, gridX and gridY are the width and height of the search grid.
Second, the width and height of the virtual block are calculated by:
newWidth=i×2×gridX+currWidth newHeight=i×2×gridY+currHeight.
where the currWidth and currHeight are the width and height of current block. The newWidth and newHeight are the width and height of new virtual block.
gridX and gridY are currently set to currWidth and currHeight, respectively.
After generating the virtual block, the blocks Ai, Bi, Ci, Di and Ei can be regarded as the VVC spatial neighboring blocks of the virtual block and their positions are obtained with the same pattern as that in VVC. Obviously, the virtual block is the current block if the search round i is 0. In this case, the blocks Ai, Bi, Ci, Di and Ei are the spatially neighboring blocks that are used in VVC merge mode.
When constructing the merge candidate list, the pruning is performed to guarantee each element in merge candidate list to be unique. The maximum search round is set to 1, which means that five non-adjacent spatial neighbor blocks are utilized.
Non-adjacent spatial merge candidates are inserted into the merge list after the temporal merge candidate in the order of B1->A1->C1->D1->E1.
It is proposed to derive an averaging candidate as STMVP candidate using three spatial merge candidates and one temporal merge candidate.
STMVP is inserted before the above-left spatial merge candidate.
The STMVP candidate is pruned with all the previous merge candidates in the merge list.
For the spatial candidates, the first three candidates in the current merge candidate list are used.
For the temporal candidate, the same position as VTM/HEVC collocated position is used.
For the spatial candidates, the first, second, and third candidates inserted in the current merge candidate list before STMVP are denoted as F, S, and, T.
The temporal candidate with the same position as VTM/HEVC collocated position used in TMVP is denoted as Col.
The motion vector of the STMVP candidate in prediction direction X (denoted as mvLX) is derived as follows:
mvLX=(mvLX_F+mvLX_S+mvLX_T+mvLX_Col)>>2
mvLX=(mvLX_F×3+mvLX_S×3+mvLX_Col×2)>>3 or
mvLX=(mvLX_F×3+mvLX_T×3+mvLX_Col×2)>>3 or
mvLX=(mvLX_S×3+mvLX_T×3+mvLX_Col×2)>>3
mvLX=(mvLX_F+mvLX_Col)>>1 or
mvLX=(mvLX_S+mvLX_Col)>>1 or
mvLX=(mvLX_T+mvLX_Col)>>1
Note: If the temporal candidate is unavailable, the STMVP mode is off.
If considering both non-adjacent and STMVP merge candidates, the size of merge list is signalled in sequence parameter set header and the maximum allowed size of merge list is 8.
2.3. Merge Mode with MVD (MMVD)
In addition to merge mode, where the implicitly derived motion information is directly used for prediction samples generation of the current CU, the merge mode with motion vector differences (MMVD) is introduced in VVC, which is also known as ultimate motion vector expression. A MMVD flag is signaled right after sending a skip flag and merge flag to specify whehther MMVD mode is used for a CU.
In MMVD, a merge candidate (which is called, base merge candidate) is selected, it is further refined by the signalled MVD information. The related syntax elements include an index to specify MVD distance (denoted by mmvd_distance_idx), and an index for indication of motion direction (denoted by mmvd_direction_idx). In MMVD mode, one for the first two candidates in the merge list is selected to be used as MV basis (or base merge candidate). The merge candidate flag is signalled to specify which one is used.
Distance index specifies motion magnitude information and indicate the pre-defined offset from the starting point.
Direction index represents the direction of the MVD relative to the starting point. The direction index can represent of the four directions as shown in Table 2. It's noted that the meaning of MVD sign could be variant according to the information of starting MVs. When the starting MVs is a uni-prediction MV or bi-prediction MVs with both lists point to the same side of the current picture (i.e. POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture), the sign in Table 2 specifies the sign of MV offset added to the starting MV. When the starting MVs is bi-prediction MVs with the two MVs point to the different sides of the current picture (i.e. the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture), the sign in Table 2 specifies the sign of MV offset added to the list0 MV component of starting MV and the sign for the list1 MV has opposite value.
One internal MVD (denoted by MmvdOffset) is firstly derived according to the decoded indices of MVD distance (denoted by mmvd_distance_idx), and motion direction (denoted by mmvd_direction_idx).
Afterwards, if the internal MVD is determined, the final MVD to be added to the base merge candidate for each reference picture list is further derived according to POC distances of reference pictures relative to the current picture, and reference picture types (long-term or short-term). More specifically, the following steps are performed in order:
MMVD is also known as Ultimate Motion Vector Expression (UMVE).
In VVC, when a CU is coded in merge mode, if the CU contains at least 64 luma samples (that is, CU width times CU height is equal to or larger than 64), and if both CU width and CU height are less than 128 luma samples, an additional flag is signalled to indicate if the combined inter/intra prediction (CIIP) mode is applied to the current CU. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode Pinter is derived using the same inter prediction process applied to regular merge mode; and the intra prediction signal Pintra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighbouring blocks (depicted in a schematic diagram 1100 of
The CIIP prediction is formed as follows:
P
CIIP=((4−wt)*Pinter+wt*Pintra+2)>>2
In VVC, a geometric partitioning mode is supported for inter prediction. The geometric partitioning mode is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode and the subblock merge mode. In total 64 partitions are supported by geometric partitioning mode for each possible CU size w×h=2m×2n with m, n∈{3 . . . 6} excluding 8×64 and 64×8.
When this mode is used, a CU is split into two parts by a geometrically located straight line (as shown in
If geometric partitioning mode is used for the current CU, then a geometric partition index indicating the partition mode of the geometric partition (angle and offset), and two merge indices (one for each partition) are further signalled. The number of maximum GPM candidate size is signalled explicitly in SPS and specifies syntax binarization for GPM merge indices. After predicting each of part of the geometric partition, the sample values along the geometric partition edge are adjusted using a blending processing with adaptive weights as in 2.5.2. This is the prediction signal for the whole CU, and transform and quantization process will be applied to the whole CU as in other prediction modes. Finally, the motion field of a CU predicted using the geometric partition modes is stored as in 2.5.3.
The uni-prediction candidate list is derived directly from the merge candidate list constructed according to the extended merge prediction process in 2.1.
After predicting each part of a geometric partition using its own motion, blending is applied to the two prediction signals to derive samples around geometric partition edge. The blending weight for each position of the CU are derived based on the distance between individual position and the partition edge.
The distance for a position (x, y) to the partition edge are derived as:
where i,j are the indices for angle and offset of a geometric partition, which depend on the signaled geometric partition index. The sign of ρx,j and ρy,j depend on angle index i.
The weights for each part of a geometric partition are derived as following:
The partIdx depends on the angle index i.
Mv1 from the first part of the geometric partition, Mv2 from the second part of the geometric partition and a combined My of Mv1 and Mv2 are stored in the motion filed of a geometric partitioning mode coded CU.
The stored motion vector type for each individual position in the motion filed are determined as:
sType=abs(motionIdx)<32?2:(motionIdx;0?(1−partIdx): partIdx) (2-8)
where motionIdx is equal to d(4x+2, 4y+2), which is recalculated from equation (2-1). The partIdx depends on the angle index i.
If sType is equal to 0 or 1, Mv0 or Mv1 are stored in the corresponding motion field, otherwise if sType is equal to 2, a combined My from Mv0 and Mv2 are stored. The combined My are generated using the following process:
In VVC, a triangle partition mode (TPM) is supported for inter prediction. The triangle partition mode is only applied to CUs that are 8×8 or larger. The triangle partition mode is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode and the subblock merge mode.
When this mode is used, a CU is split evenly into two triangle-shaped partitions, using either the diagonal split (a CU 1510 depicted in
If triangle partition mode is used for the current CU, then a flag indicating the direction of the triangle partition (diagonal or anti-diagonal), and two merge indices (one for each partition) are further signalled. The number of maximum TPM candidate size is signalled explicitly at slice level and specifies syntax binarization for TMP merge indices. After predicting each of the triangle partitions, the sample values along the diagonal or anti-diagonal edge are adjusted using a blending processing with adaptive weights. This is the prediction signal for the whole CU, and transform and quantization process will be applied to the whole CU as in other prediction modes. Finally, the motion field of a CU predicted using the triangle partition mode is stored as in 2.6.3.
The triangle partition mode is not used in combination with SBT, that is, when the signalled triangle mode is equal to 1, the cu_sbt_flag is inferred to be 0 without signalling.
The uni-prediction candidate list is derived directly from the merge candidate list constructed according to the extended merge prediction process in 2.1.
After predicting each triangle partition using its own motion, blending is applied to the two prediction signals to derive samples around the diagonal or anti-diagonal edge. The following weights are used in the blending process:
The motion vectors of a CU coded in triangle partition mode are generated using the following process:
To improve the coding efficiency, after the merge candidate list is constructed, the order of each merge candidate is adjusted according to the template matching cost. The merge candidates are arranged in the list in accordance with the template matching cost of ascending order. It is operated in the form of sub-group.
The sorting process is operated in the form of sub-group, as illustrated in
Local illumination compensation (LIC) is a coding tool to address the issue of local illumination changes between current picture and its temporal reference pictures. The LIC is based on a linear model where a scaling factor and an offset are applied to the reference samples to obtain the prediction samples of a current block. Specifically, the LIC can be mathematically modeled by the following equation:
P(x,y)=α·Pr(x+vx,y+vy)+β
where P(x,y) is the prediction signal of the current block at the coordinate (x,y); Pr(x+vx,y+vy) is the reference block pointed by the motion vector (vx, vy); α and β are the corresponding scaling factor and offset that are applied to the reference block.
To improve the coding performance, no subsampling for the short side is performed as shown in the diagram 2200 of
2.9. Bi-Prediction with CU-Level Weight (BCW)
In HEVC, the bi-prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and/or using two different motion vectors. In VVC, the bi-prediction mode is extended beyond simple averaging to allow weighted averaging of the two prediction signals.
P
bi-pred=((8−w)*P0+w*P1+4)>>3
Five weights are allowed in the weighted averaging bi-prediction, w∈{−2, 3, 4, 5, 10}. For each bi-predicted CU, the weight w is determined in one of two ways: 1) for a non-merge CU, the weight index is signalled after the motion vector difference; 2) for a merge CU, the weight index is inferred from neighbouring blocks based on the merge candidate index. BCW is only applied to CUs with 256 or more luma samples (i.e., CU width times CU height is greater than or equal to 256). For low-delay pictures, all 5 weights are used. For non-low-delay pictures, only 3 weights (w∈{3, 4, 5}) are used.
The BCW weight index is coded using one context coded bin followed by bypass coded bins. The first context coded bin indicates if equal weight is used; and if unequal weight is used, additional bins are signalled using bypass coding to indicate which unequal weight is used.
Weighted prediction (WP) is a coding tool supported by the H.264/AVC and HEVC standards to efficiently code video content with fading. Support for WP was also added into the VVC standard. WP allows weighting parameters (weight and offset) to be signalled for each reference picture in each of the reference picture lists L0 and L1. Then, during motion compensation, the weight(s) and offset(s) of the corresponding reference picture(s) are applied. WP and BCW are designed for different types of video content. In order to avoid interactions between WP and BCW, which will complicate VVC decoder design, if a CU uses WP, then the BCW weight index is not signalled, and w is inferred to be 4 (i.e. equal weight is applied). For a merge CU, the weight index is inferred from neighbouring blocks based on the merge candidate index. This can be applied to both normal merge mode and inherited affine merge mode. For constructed affine merge mode, the affine motion information is constructed based on the motion information of up to 3 blocks. The BCW index for a CU using the constructed affine merge mode is simply set equal to the BCW index of the first control point MV.
In VVC, CIIP and BCW cannot be jointly applied for a CU. When a CU is coded with CIIP mode, the BCW index of the current CU is set to 2, e.g. equal weight.
VVC supports the subblock-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTMVP. SbTMVP differs from TMVP in the following two main aspects:
The SbTMVP process is illustrated in
In VVC, a combined subblock based merge list which contains both SbTMVP candidate and affine merge candidates is used for the signalling of subblock based merge mode. The SbTMVP mode is enabled/disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry of the list of subblock based merge candidates, and followed by the affine merge candidates. The size of subblock based merge list is signalled in SPS and the maximum allowed size of the subblock based merge list is 5 in VVC. The sub-CU size used in SbTMVP is fixed to be 8×8, and as done for affine merge mode, SbTMVP mode is only applicable to the CU with both width and height are larger than or equal to 8.
The encoding logic of the additional SbTMVP merge candidate is the same as for the other merge candidates, that is, for each CU in P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate.
In HEVC, only translation motion model is applied for motion compensation prediction (MCP). While in the real world, there are many kinds of motion, e.g. zoom in/out, rotation, perspective motions and the other irregular motions. In VVC, a block-based affine transform motion compensation prediction is applied.
For the 4-parameter affine motion model 2410 in
For the 6-parameter affine motion model 2420 in
Where (mv0x, mv0y) is motion vector of the top-left corner control point, (mv1x, mv1y) is motion vector of the top-right corner control point, and (mv2x, mv2y) is motion vector of the bottom-left corner control point.
In order to simplify the motion compensation prediction, block based affine transform prediction is applied.
As done for translational motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode.
AF_MERGE mode can be applied for CUs with both width and height larger than or equal to 8. In this mode the CPMVs of the current CU is generated based on the motion information of the spatial neighboring CUs. There can be up to five CPMVP candidates and an index is signalled to indicate the one to be used for the current CU. The following three types of CPVM candidate are used to form the affine merge candidate list:
In VVC, there are maximum two inherited affine candidates, which are derived from affine motion model of the neighboring blocks, one from left neighboring CUs and one from above neighboring CUs.
Constructed affine candidate means the candidate is constructed by combining the neighbor translational motion information of each control point. The motion information for the control points is derived from the specified spatial neighbors and temporal neighbor shown in
After MVs of four control points are attained, affine merge candidates are constructed based on those motion information. The following combinations of control point MVs are used to construct in order:
{CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}
The combination of 3 CPMVs constructs a 6-parameter affine merge candidate and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid motion scaling process, if the reference indices of control points are different, the related combination of control point MVs is discarded.
After inherited affine merge candidates and constructed affine merge candidate are checked, if the list is still not full, zero MVs are inserted to the end of the list.
Affine AMVP mode can be applied for CUs with both width and height larger than or equal to 16. An affine flag in CU level is signalled in the bitstream to indicate whether affine AMVP mode is used and then another flag is signalled to indicate whether 4-parameter affine or 6-parameter affine. In this mode, the difference of the CPMVs of current CU and their predictors CPMVPs is signalled in the bitstream. The affine AVMP candidate list size is 2 and it is generated by using the following four types of CPVM candidate in order:
The checking order of inherited affine AMVP candidates is same to the checking order of inherited affine merge candidates. The only difference is that, for AVMP candidate, only the affine CU that has the same reference picture as in current block is considered. No pruning process is applied when inserting an inherited affine motion predictor into the candidate list.
Constructed AMVP candidate is derived from the specified spatial neighbors shown in
If the number of affine AMVP list candidates is still less than 2 after valid inherited affine AMVP candidates and constructed AMVP candidate are inserted, mv0, mv1, and mv2 will be added, in order, as the translational MVs to predict all control point MVs of the current CU, when available. Finally, zero MVs are used to fill the affine AMVP list if it is still not full.
Template matching (TM) is a decoder-side MV derivation method to refine the motion information of the current CU by finding the closest match between a template (i.e., top and/or left neighbouring blocks of the current CU) in the current picture and a block (i.e., same size to the template) in a reference picture.
In AMVP mode, an MVP candidate is determined based on template matching error to pick up the one which reaches the minimum difference between current block template and reference block template, and then TM performs only for this particular MVP candidate for MV refinement. TM refines this MVP candidate, starting from full-pel MVD precision (or 4-pel for 4-pel AMVR mode) within a [−8, +8]-pel search range by using iterative diamond search. The AMVP candidate may be further refined by using cross search with full-pel MVD precision (or 4-pel for 4-pel AMVR mode), followed sequentially by half-pel and quarter-pel ones depending on AMVR mode as specified in Table 3. This search process ensures that the MVP candidate still keeps the same MV precision as indicated by AMVR mode after TM process.
In merge mode, similar search method is applied to the merge candidate indicated by the merge index. As shown in Table 3, TM may perform all the way down to ⅛-pel MVD precision or skipping those beyond half-pel MVD precision, depending on whether the alternative interpolation filter (that is used when AMVR is of half-pel mode) is used according to merged motion information. Besides, when TM mode is enabled, template matching may work as an independent process or an extra MV refinement process between block-based and subblock-based bilateral matching (BM) methods, depending on whether BM can be enabled or not according to its enabling condition check.
At encoder side, TM merge mode will do MV refinement for each merge candidate.
The multi-hypothesis prediction previously proposed in JVET-M0425 is adopted in this contribution. Up to two additional predictors are signalled on top of inter AMVP mode, regular merge mode, and MMVD mode. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.
p
n+1=(1−αn+1)pn+αn+1hn+1
The weighting factor α is specified according to the following table:
For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode.
In the multi-hypothesis inter prediction mode, one or more additional prediction signals are signaled, in addition to the conventional uni/bi prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the uni/bi prediction signal Puni/bi and the first additional inter prediction signal/hypothesis h3, the resulting prediction signal P3 is obtained as follows:
p
3=(1−α)puni/bi+αh3
The weighting factor α is specified by the new syntax element add_hyp_weight_idx, according to the following mapping:
Note that for the additional prediction signals, in the tests CE10.1.2.a, CE10.1.2.b, and CE10.1.2.d, the concept of prediction list0/list1 is abolished, and instead one combined list is used. This combined list is generated by alternatingly inserting reference frames from list0 and list1 with increasing reference index, omitting reference frames which have already been inserted, such that double entries are avoided. In test CE10.1.2.c, only 2 different reference pictures can be used within each PU, and therefore it is indicated by one flag which reference frame is used.
Analogously to above, more than one additional prediction signal can be used. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.
p
n+1=(1−αn+1)pn+αn+1hn+1
The resulting overall prediction signal is obtained as the last pn (i.e., the pn having the largest index n). Within this CE, up to two additional prediction signals can be used (i.e., n is limited to 2). Note that due to the iterative accumulation approach, the number of required PU sample buffers for storing intermediate prediction signals is not increased relative to bi-prediction (i.e., two buffers are sufficient).
First, the inter modes with no explicitly signaled additional inter prediction parameters are tested. For the best two of these modes (i.e., having lowest Hadamard RD cost), additional inter prediction hypotheses are searched. For that purpose, for all combinations of the following parameters, a motion estimation with a restricted search range of 16 is performed:
For determining the best combination of these two parameters, a simplified RD cost using Hadamard distortion measure and approximated bit rate is used. The chosen parameter combination is then used to compute a more accurate RD cost, using forward transform and quantization, which is compared against the so-far best found coding mode for the current block.
2.14.2 Interaction with Other Coding Tools
Multi-hypothesis inter prediction cannot be used together with BIO within one PU:
Multi-hypothesis inter prediction cannot be used together with combined intra/inter within one PU:
Multi-hypothesis inter prediction cannot be used together with triangular mode within one PU:
Overlapped Block Motion Compensation (OBMC) has previously been used in H.263. In the JEM, unlike in H.263, OBMC can be switched on and off using syntax at the CU level. When OBMC is used in the JEM, the OBMC is performed for all motion compensation (MC) block boundaries except the right and bottom boundaries of a CU. Moreover, it is applied for both the luma and chroma components. In the JEM, a MC block is corresponding to a coding block. When a CU is coded with sub-CU mode (includes sub-CU merge, affine and FRUC mode), each sub-block of the CU is a MC block.
When OBMC applies to the current sub-block, besides current motion vectors, motion vectors of four connected neighbouring sub-blocks, if available and are not identical to the current motion vector, are also used to derive prediction block for the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal of the current sub-block.
Prediction block based on motion vectors of a neighbouring sub-block is denoted as PN, with N indicating an index for the neighbouring above, below, left and right sub-blocks and prediction block based on motion vectors of the current sub-block is denoted as PC. When PN is based on the motion information of a neighbouring sub-block that contains the same motion information to the current sub-block, the OBMC is not performed from PN. Otherwise, every sample of PN is added to the same sample in PC, i.e., four rows/columns of PN are added to PC. The weighting factors {¼, ⅛, 1/16, 1/32} are used for PN and the weighting factors {¾, ⅞, 15/16, 31/32} are used for PC. The exception are small MC blocks, (i.e., when height or width of the coding block is equal to 4 or a CU is coded with sub-CU mode), for which only two rows/columns of PN are added to PC. In this case weighting factors {¼, ⅛} are used for PN and weighting factors {¾, ⅞} are used for PC. For PN generated based on motion vectors of vertically (horizontally) neighbouring sub-block, samples in the same row (column) of PN are added to PC with a same weighting factor.
In the JEM, for a CU with size less than or equal to 256 luma samples, a CU level flag is signalled to indicate whether OBMC is applied or not for the current CU. For the CUs with size larger than 256 luma samples or not coded with AMVP mode, OBMC is applied by default. At the encoder, when OBMC is applied for a CU, its impact is taken into account during the motion estimation stage. The prediction signal formed by OBMC using motion information of the top neighbouring block and the left neighbouring block is used to compensate the top and left boundaries of the original signal of the current CU, and then the normal motion estimation process is applied.
It is to assume the number of the merge candidates is 8. The first 5 merge candidates are taken as a first subgroup and take the following 3 merge candidates as a second subgroup (i.e. the last subgroup).
More specifically, at block 3104, the template matching costs for the merge candidates in all subgroups except the last subgroup are computed; then at block 3106, the merge candidates in their own subgroups are reordered except the last subgroup; finally, at block 3108, the final merge candidate list will be got.
For the decoder, after the merge candidate list is constructed, some/no merge candidates are adaptively reordered in ascending order of costs of merge candidates as shown in
More specifically, at block 3202, it is determined if the selected merge candidate is located in the last subgroup. If the selected merge candidate is located in the last subgroup, at block 3204, the merge candidate list construction process is terminated after the selected merge candidate is derived, and at block 3206, no reorder is performed and the merge candidate list is not changed; otherwise, the execution process is as follows:
At block 3208, the merge candidate list construction process is terminated after all the merge candidates in the selected subgroup are derived; at block 3210, the template matching costs for the merge candidates in the selected subgroup are computed; at block 3212, the merge candidates in the selected subgroup are reordered; finally, at block 3214, a new merge candidate list will be got.
For both encoder and decoder,
A template matching cost is derived as a function of T and RT, wherein T is a set of samples in the template and RT is a set of reference samples for the template.
When deriving the reference samples of the template for a merge candidate, the motion vectors of the merge candidate are rounded to the integer pixel accuracy.
The reference samples of the template (RT) for bi-directional prediction are derived by weighted averaging of the reference samples of the template in reference list0 (RT0) and the reference samples of the template in reference list1 (RT1) as follows.
RT=((8−w)*RT0+w*RT1+4)>>3
where the weight of the reference template in reference list0 (8−w) and the weight of the reference template in reference list1 (w) are decided by the BCW index of the merge candidate. BCW index equal to {0, 1, 2, 3, 4} corresponds to w equal to {−2,3,4,5, 10}, respectively.
If the Local Illumination Compensation (LIC) flag of the merge candidate is true, the reference samples of the template are derived with LIC method.
The template matching cost is calculated based on the sum of absolute differences (SAD) of T and RT.
The template size is 1. That means the width of the left template and/or the height of the above template is 1.
If the coding mode is MMVD, the merge candidates to derive the base merge candidates are not reordered.
If the coding mode is GPM, the merge candidates to derive the uni-prediction candidate list are not reordered.
In Geometric prediction mode with Motion Vector Difference (GMVD), each geometric partition in GPM can decide to use GMVD or not. If GMVD is chosen for a geometric region, the MV of the region is calculated as a sum of the MV of a merge candidate and an MVD. All other processing is kept the same as in GPM.
With GMVD, an MVD is signaled as a pair of direction and distance. There are nine candidate distances (¼-pel, ½-pel, 1-pel, 2-pel, 3-pel, 4-pel, 6-pel, 8-pel, 16-pel), and eight candidate directions (four horizontal/vertical directions and four diagonal directions) involved In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, the MVD in GMVD is also left shifted by 2 as in MMVD.
In affine MMVD, an affine merge candidate (which is called, base affine merge candidate) is selected, the MVs of the control points are further refined by the signalled MVD information. The MVD information for the MVs of all the control points are the same in one prediction direction.
When the starting MVs is bi-prediction MVs with the two MVs point to the different sides of the current picture (i.e. the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture), the MV offset added to the list0 MV component of starting MV and the MV offset for the list1 MV has opposite value; otherwise, when the starting MVs is bi-prediction MVs with both lists point to the same side of the current picture (i.e. POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture), the MV offset added to the list0 MV component of starting MV and the MV offset for the list1 MV are the same.
In this contribution, a multi-pass decoder-side motion vector refinement is applied. In the first pass, bilateral matching (BM) is applied to the coding block. In the second pass, BM is applied to each 16×16 subblock within the coding block. In the third pass, MV in each 8×8 subblock is refined by applying bi-directional optical flow (BDOF). The refined MVs are stored for both spatial and temporal motion vector prediction.
In the first pass, a refined MV is derived by applying BM to a coding block. Similar to decoder-side motion vector refinement (DMVR), in bi-prediction operation, a refined MV is searched around the two initial MVs (MV0 and MV1) in the reference picture lists L0 and L1. The refined MVs (MV0_pass1 and MV1_pass1) are derived around the initiate MVs based on the minimum bilateral matching cost between the two reference blocks in L0 and L1.
BM performs local search to derive integer sample precision intDeltaMV. The local search applies a 3×3 square search pattern to loop through the search range [−sHor, sHor] in horizontal direction and [−sVer, sVer] in vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.
The bilateral matching cost is calculated as: bilCost=mvDistanceCost+sadCost. When the block size cbW*cbH is greater than 64, MRSAD cost function is applied to remove the DC effect of distortion between reference blocks. When the bilCost at the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV local search is terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern and continue to search for the minimum cost, until it reaches the end of the search range.
The existing fractional sample refinement is further applied to derive the final deltaMV. The refined MVs after the first pass is then derived as:
MV0_pass1=MV0+deltaMV
MV1_pass1=MV1−deltaMV
In the second pass, a refined MV is derived by applying BM to a 16×16 grid subblock. For each subblock, a refined MV is searched around the two MVs (MV0_pass1 and MV1_pass1), obtained on the first pass, in the reference picture list L0 and L1. The refined MVs (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)) are derived based on the minimum bilateral matching cost between the two reference subblocks in L0 and L1.
For each subblock, BM performs full search to derive integer sample precision intDeltaMV. The full search has a search range [−sHor, sHor] in horizontal direction and [−sVer, sVer] in vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.
The bilateral matching cost is calculated by applying a cost factor to the SATD cost between two reference subblocks, as: bilCost=satdCost*costFactor. The search area (2*sHor+1)*(2*sVer+1) is divided up to 5 diamond shape search regions shown in the diagram 3300 of
The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV(sbIdx2). The refined MVs at second pass is then derived as:
MV0_pass2(sbIdx2)=MV0_pass1+deltaMV(sbIdx2)
MV1_pass2(sbIdx2)=MV1_pass1−deltaMV(sbIdx2)
In the third pass, a refined MV is derived by applying BDOF to an 8×8 grid subblock. For each 8×8 subblock, BDOF refinement is applied to derive scaled Vx and Vy without clipping starting from the refined MV of the parent subblock of the second pass. The derived bioMv(Vx, Vy) is rounded to 1/16 sample precision and clipped between −32 and 32.
The refined MVs (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) at third pass are derived as:
MV0_pass3(sbIdx3)=MV0_pass2(sbIdx2)+bioMv
MV1_pass3(sbIdx3)=MV0_pass2(sbIdx2)−bioMv
In order to increase the accuracy of the MVs of the merge mode, a bilateral-matching (BM) based decoder side motion vector refinement is applied in VVC. In bi-prediction operation, a refined MV is searched around the initial MVs in the reference picture list L0 and reference picture list L1. The BM method calculates the distortion between the two candidate blocks in the reference picture list L0 and list L1. As illustrated in
In VVC, the application of DMVR is restricted and is only applied for the CUs which are coded with following modes and features:
The refined MV derived by DMVR process is used to generate the inter prediction samples and also used in temporal motion vector prediction for future pictures coding. While the original MV is used in deblocking process and also used in spatial motion vector prediction for future CU coding.
The additional features of DMVR are mentioned in the following sub-clauses.
In DVMR, the search points are surrounding the initial MV and the MV offset obey the MV difference mirroring rule. In other words, any points that are checked by DMVR, denoted by candidate MV pair (MV0, MV1) obey the following two equations:
MV0′=MV0+MV_offset
MV1′=MV1−MV_offset
Where MV_offset represents the refinement offset between the initial MV and the refined MV in one of the reference pictures. The refinement search range is two integer luma samples from the initial MV. The searching includes the integer sample offset search stage and fractional sample refinement stage.
25 points full search is applied for integer sample offset searching. The SAD of the initial MV pair is first calculated. If the SAD of the initial MV pair is smaller than a threshold, the integer sample stage of DMVR is terminated. Otherwise SADs of the remaining 24 points are calculated and checked in raster scanning order. The point with the smallest SAD is selected as the output of integer sample offset searching stage. To reduce the penalty of the uncertainty of DMVR refinement, it is proposed to favor the original MV during the DMVR process. The SAD between the reference blocks referred by the initial MV candidates is decreased by ¼ of the SAD value.
The integer sample search is followed by fractional sample refinement. To save the calculational complexity, the fractional sample refinement is derived by using parametric error surface equation, instead of additional search with SAD comparison. The fractional sample refinement is conditionally invoked based on the output of the integer sample search stage. When the integer sample search stage is terminated with center having the smallest SAD in either the first iteration or the second iteration search, the fractional sample refinement is further applied.
In parametric error surface based sub-pixel offsets estimation, the center position cost and the costs at four neighboring positions from the center are used to fit a 2-D parabolic error surface equation of the following form
E(x,y)=A(x−xmin)2+B(y−ymin)2+C
where (xmin, ymin) corresponds to the fractional position with the least cost and C corresponds to the minimum cost value. By solving the above equations by using the cost value of the five search points, the (xmin, ymin) is computed as:
x
min=(E(−1,0)−E(1,0))/(2(E(−1,0)+E(1,0)−2E(0,0)))
y
min=(E(0,−1)−E(0,1))/(2((E(0,−1)+E(0,1)−2E(0,0)))
The value of xmin and ymin are automatically constrained to be between −8 and 8 since all cost values are positive and the smallest value is E(0,0). This corresponds to half peal offset with 1/16th-pel MV accuracy in VVC. The computed fractional (xmin, ymin) are added to the integer distance refinement MV to get the sub-pixel accurate refinement delta MV.
In VVC, the resolution of the MVs is 1/16 luma samples. The samples at the fractional position are interpolated using a 8-tap interpolation filter. In DMVR, the search points are surrounding the initial fractional-pel MV with integer sample offset, therefore the samples of those fractional position need to be interpolated for DMVR search process. To reduce the calculation complexity, the bi-linear interpolation filter is used to generate the fractional samples for the searching process in DMVR. Another important effect is that by using bi-linear filter is that with 2-sample search range, the DVMR does not access more reference samples compared to the normal motion compensation process. After the refined MV is attained with DMVR search process, the normal 8-tap interpolation filter is applied to generate the final prediction. In order to not access more reference samples to normal MC process, the samples, which is not needed for the interpolation process based on the original MV but is needed for the interpolation process based on the refined MV, will be padded from those available samples.
When the width and/or height of a CU are larger than 16 luma samples, it will be further split into subblocks with width and/or height equal to 16 luma samples. The maximum unit size for DMVR searching process is limit to 16×16.
2.21. Adaptive Merge Candidate List Proposed in U.S. Application Ser. No. 17/161,335 (which is Incorporated Herein in its Entirety)
Hereinafter, template is a set of reconstructed samples adjacently or non-adjacently neighboring to the current block. Reference samples of the template are derived according to the same motion information of the current block. For example, reference samples of the template are mapping of the template depend on a motion information. In this case, reference samples of the template are located by a motion vector of the motion information in a reference picture indicated by the reference index of the motion information.
When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are denoted by RT and RT may be generated from RT0 which are derived from a reference picture in reference picture list 0 and RT1 derived from a reference picture in reference picture list 1. In one example, RT0 includes a set of reference samples on the reference picture of the current block indicated by the reference index of the merge candidate referring to a reference picture in reference list 0 with the MV of the merge candidate referring to reference list 0), In one example, RT1 includes a set of reference samples on the reference picture of the current block indicated by the reference index of the merge candidate referring to a reference picture in reference list 1 with the MV of the merge candidate referring to reference list 1). An example is shown in
RT=(RT0+RT1+1)>>1
In one example, the reference samples of the template (RTbi-pred) for bi-directional prediction are derived by weighted averaging of the reference samples of the template in reference list0 (RT0) and the reference samples of the template in reference list1 (RT1). One example is as follows:
RT=((2N−w)*RT0+w*RT1+N-1)>>N, for example, N=3.
In one example, the weight of the reference template in reference list0 such as (8−w) and the weight of the reference template in reference list1 such as (w) maybe decided by the BCW index of the merge candidate.
The merge candidates can be divided to several groups according to some criterions. Each group is called a subgroup. For example, adjacent spatial and temporal merge candidates can be taken as a first subgroup and take the remaining merge candidates as a second subgroup; In another example, the first N (N≥2) merge candidates can be also taken as a first subgroup, take the following M (M≥2) merge candidates as a second subgroup, and take the remaining merge candidates as a third subgroup. Note that the proposed methods may be applied to merge candidate list construction process for inter coded blocks (e.g., translational motion), affine coded blocks; or other motion candidate list construction process (e.g., AMVP list; IBC AMVP list; IBC merge list).
W and H are the width and height of current block (e.g., luma block). Taking merge candidate list construction process as an example in the following descriptions:
RT=(RT0+RT1+1)>>1
RT=((2N−w)*RT0+w*RT1+2N-1)>>N, for example, N=3.
The current design of merge mode can be further improved.
Fixed merge candidate order may not be optimal. Adaptive merge candidate list generation process can be used to improve the effectiveness of merge mode. Furthermore, coding efficiency can be improved.
The detailed inventions below should be considered as examples to explain general concepts. These inventions should not be interpreted in a narrow way. Furthermore, these inventions can be combined in any manner.
It is noted that the terminologies mentioned below are not limited to the specific ones defined in existing standards. Any variance of the coding tool is also applicable. For example, the term “GPM” is used to represent any coding tool that derive two sets of motion information and use the derived information and the splitting pattern to get the final prediction, e.g., TPM is also treated as GPM.
Note that the proposed methods may be applied to merge candidate list construction process for inter coded blocks (e.g., translational motion), affine coded blocks, or IBC coded blocks; or other motion candidate list construction process (e.g., normal AMVP list; affine AMVP list; IBC AMVP list).
W and H are the width and height of current block (e.g., luma block).
We can assume the number of the merge candidates is 8. We take the first 5 merge candidates as a first subgroup and take the following 3 merge candidates as a second subgroup (i.e. the last subgroup).
More specifically, at block 3704, the template matching costs for the merge candidates in all subgroups except the last subgroup are computed; then at block 3706, the merge candidates in their own subgroups are reordered except the last subgroup; finally, at block 3708, the final merge candidate list will be got.
For the decoder, after the merge candidate list is constructed, some/no merge candidates are adaptively reordered in ascending order of costs of merge candidates as shown in
More specifically, at block 3802, it is determined if the selected merge candidate is located in the last subgroup. If the selected merge candidate is located in the last subgroup, at block 3804, the merge candidate list construction process is terminated after the selected merge candidate is derived, and at block 3806, no reorder is performed and the merge candidate list is not changed; otherwise, the execution process is as follows:
At block 3808, The merge candidate list construction process is terminated after all the merge candidates in the selected subgroup are derived; at block 3810, the template matching costs for the merge candidates in the selected subgroup are computed; at block 3812, the merge candidates in the selected subgroup are reordered; finally, at block 3814, a new merge candidate list will be got.
For both encoder and decoder, the followings apply:
RT==((8−w)*RT0+w*RT1+4)>>3
If the Local Illumination Compensation (LIC) flag of the merge candidate is true, the reference samples of the template are derived with LIC method.
The template matching cost is calculated based on the sum of absolute differences (SAD) of T and RT.
The template size is 1. That means the width of the left template and/or the height of the above template is 1.
If the coding mode is MMVD, the merge candidates to derive the base merge candidates are not reordered.
If the coding mode is GPM, the merge candidates to derive the uni-prediction candidate list are not reordered.
If the coding mode is TM merge, all the original TM merge candidates are reordered.
If the coding mode is subblock based merge mode, all subblock based merge candidates are reordered.
The embodiments of the present disclosure are related to merge candidate list construction process for inter coded blocks (e.g., translational motion), affine coded blocks, or IBC coded blocks; or other motion candidate list construction process (e.g., normal AMVP list; affine AMVP list; IBC AMVP list).
As used herein, the term “block” may represent a coding block (CB), a coding unit (CU), a prediction unit (PU), a transform unit (TU), a prediction block (PB), a transform block (TB).
At 3902, during a conversion between a target block of a video and a bitstream of the video, a list of motion candidates for motion information for the target block is constructed.
A target block may be comprised in a target picture of the video. A target block may sometimes be referred to a current block or a current video block, which may be of various sizes. In a merge mode, a list of motion candidates may be constructed, which may comprise a number of motion candidates (also referred to as “merge candidates”, which is used interchangeably herein with the term “motion candidate”). The list of motion candidates may be referred to as a “motion candidate list” or a “merge candidate list”. Each motion candidate in the list may comprise motion information (e.g., a motion vector) determined according to a particular method.
Further, a best candidate for the target block may be selected from a constructed motion candidate list, and an index (also referred to as merge index) for the best candidate in the list may be encoded into the bitstream. The index herein may indicate a position of the selected candidate in the motion candidate list. However, in some traditional merge modes, the order for the motion candidates in the motion candidate list is fixed. In such cases, if the selected best motion candidate is located at the latter part of the list, the index would have a larger value and then may require more bits for encoding.
According to embodiments of the present disclosure, it is proposed that the motion candidates in a motion candidate list of a block can be adaptively reordered or rearranged to derive the reordered motion candidate list according to one or some criterions, and the block is encoded/decoded according to the reordered motion candidate list. The traditional fixed merge candidate order may not be optimal. Adaptive merge candidate list generation process can be used to improve the effectiveness of the merge mode and thus improve the coding efficiency.
Specifically, at 3904, a reordering scheme is determined based at least in part on coding information, the reordering scheme indicating whether and/or how at least one motion candidate in the list of motion candidates is to be reordered. At 3906, a target list of motion candidates is generated from the list of motion candidates according to the reordering scheme.
In the embodiments of the present disclosure, the coding information related to the video is used to determine a reordering scheme to indicate whether at least one motion candidate in the list of motion candidates is to be reordered and/or how to reorder the motion candidate(s) in the case that the reordering is to be performed. Different coding information may lead to different reordering schemes.
In some embodiments, the coding information may comprise a coding mode for the video. That is, whether to and/or how to reorder the motion candidates may depend on the coding mode for the video. In some embodiments, the coding mode for the video may be a regular advanced motion vector predication (AMVP) mode, a regular merge mode, an affine merge mode, a sub-block-based merge mode, an affine AMVP mode, a geometric partitioning mode (GPM), a triangle partition mode (TPM), a template matching (TM) merge mode, a merge mode with motion vector differences (MMVD), a combined inter/intra prediction (CIIP) mode, a geometric prediction mode with motion vector difference (GMVD), an affine MMVD mode, or a decoder-side motion vector refinement (DMVR). In some examples, some coding mode may depend on the coding tool for the video.
In some embodiments, if it is determined that the coding mode is a regular merge mode, the list of motion candidates may be reordered. Here the list of motion candidates constructed in the regular merge mode may be referred to as a “regular merge candidate list” or a “merge candidate list” for short.
In some embodiments, the motion candidates in the list of motion candidates which is not constructed in a regular merge mode can be adaptively reordered to derive the reordered motion candidate list according to one or some criterions. That is, if it is determined that the coding mode is not a regular merge code, the list of motion candidates can also be reordered.
In one example, if it is determined that the coding mode is the AMVP mode (in which case the list of motion candidates is referred to as an AMVP candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the affine merge mode (in which case the list of motion candidates is referred to as an affine merge candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the sub-block-based merge mode (in which case the list of motion candidates is referred to as a sub-block-based merge candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the GPM mode (in which case the list of motion candidates is referred to as a GPM merge candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the TPM mode (in which case the list of motion candidates is referred to as a TPM merge candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the TM mode (in which case the list of motion candidates is referred to as a TM merge candidate list), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the MMVD mode (in which case the list of motion candidates is referred to as a candidate list for MMVD coded blocks), the list of motion candidates may be reordered.
In one example, if it is determined that the coding mode is the DMVR mode (in which case the list of motion candidates is referred to as a candidate list for DMVR coded blocks), the list of motion candidates may be reordered.
In some embodiments, alternatively or in addition, the coding information may comprise a category (or type) of at least one motion candidate in the list of motion candidates or a category of the list of motion candidates. That is, whether to and/or how to reorder the motion candidates may depend on the category of the motion candidates. In some embodiments, the list of motion candidates may comprise motion candidates belonging to one or more than one category, and each category may comprise at least one motion candidate. For each category of motion candidates, it may be determined adaptively whether the at least one motion candidate is to be reordered and/or how the at least one motion candidate is to be reordered.
In some embodiments, the category/categories of motion candidates in the list of motion candidates may comprise one or more of the following: a category of spatial motion candidates (which may be further divided into a category of adjacent spatial motion candidates and a category of non-adjacent spatial motion candidates), a category of temporal motion candidates, a category of spatial temporal motion vector prediction (STMVP) motion candidates, a category of history-based motion vector prediction (HMVP) motion candidates, or a category of pair-wise average motion candidates. Alternatively or in addition, in some embodiments, the category/categories of motion candidates in the list of motion candidates may comprise one or more of the following: a category of uni-prediction subblock based motion candidates, a category of subblock-based temporal motion vector prediction (SbTMVP) motion candidates, a category of inherited affine motion candidates, a category of constructed affine motion candidates, or a category of zero padding affine motion candidates
In some embodiments, the reordering scheme may be determined to indicate that the whole list of motion candidates or at least one motion candidate in the list is to be reordered if it is determined that at least one motion candidate in the list of motion candidates belongs to at least one of the following categories: a category of adjacent spatial motion candidates, a category of temporal motion candidates, a category of STMVP motion candidates, a category of non-adjacent spatial motion candidates, a category of HMVP motion candidates, or a category of pair-wise average motion candidates.
In one example, only the categories of adjacent spatial and temporal motion candidates may be reordered.
In one example, only the categories of adjacent spatial, STMVP, and temporal motion candidates may be reordered.
In one example, only the categories of adjacent spatial, STMVP, temporal and non-adjacent spatial motion candidates may be reordered.
In one example, only the categories of adjacent spatial, STMVP, temporal, non-adjacent spatial and HMVP motion candidates may be reordered.
In one example, only the categories of adjacent spatial, STMVP, temporal, non-adjacent spatial, HMVP and pair-wise average motion candidates may be reordered.
In one example, only the categories of adjacent spatial, temporal, HMVP and pair-wise average motion candidates may be reordered.
In one example, only the categories of adjacent spatial, temporal, and HMVP motion candidates may be reordered.
In one example, only the category of adjacent spatial motion candidates may be reordered.
In one example, the category of uni-prediction sub-block-based motion candidates may not be reordered. In one example, the category of SbTMVP candidate may not be reordered.
In one example, the category of inherited affine motion candidates may not be reordered.
In one example, the category of constructed affine motion candidates may not be reordered.
In one example, the category of zero padding affine motion candidates may not be reordered.
In some embodiments, for the coding mode(s) and/or the category/categories of motion candidates for which the reordering is allowed, the reordering scheme for the list of motion candidates may be determined to indicate that the list of motion candidates is to be reordered. In some embodiments, in the case that the reordering scheme indicates that the list of motion candidates or at least one motion candidate therein is to be reordered, the reordering scheme may further indicate how the motion candidate(s) is to be reordered. For different coding modes and/or different categories of motion candidates, different reordering schemes may be applied to reorder the motion candidate(s).
In some embodiments, the reordering scheme may be determined indicate that a number of motion candidates from a beginning of the list of motion candidates are to be reordered. For example, the reordering scheme may indicate that only the first N motion candidates can be reordered, where N is set to be an integer less than or equal to the total number of motion candidates in the list. In one example, N may be set equal to 5, or any other value and the scope of the present disclosure is not limited in this regard.
In some embodiments, alternatively or in addition, the reordering scheme may further indicate a scheme for selecting a template for refinement to be performed on the list of motion candidates. That is, the reordering scheme may indicate how to select the template. In some examples, the reordering scheme may indicate that a template used in the refinement process may be reused for the reordering process, or may indicate that the template used in the reordering process may be redetermined.
In some embodiments, alternatively or in addition, the reordering scheme may further indicate a scheme for calculating a template matching cost for refinement to be applied on the list of motion candidates. That is, the reordering scheme may indicate how to calculate the template matching cost. In some examples, the reordering scheme may indicate that the template matching cost determined in the e refinement process may be reused for the reordering process, or may indicate that the template matching cost may be recalculated in the reordering process.
In some embodiments, alternatively or in addition, the reordering scheme may further indicate the number of motion candidates to be reordered in the list of motion candidates, and/or the number of subgroups of motion candidates to be reordered in the list of motion candidates. That is, the reordering scheme may indicate how many motion candidates and/or how many subgroups in the list need to be reordered.
In some embodiments, the list of motion candidates may be divided into at least one subgroup of motion candidates. In this case, when determining a reordering scheme, the reordering scheme may be determined based on the at least one subgroup of motion candidates. More specifically, whether to and/or how to reorder the motion candidates may depend on the subgroup(s) of the motion candidates.
In some embodiments, the reordering scheme may be determined to indicate that only the first subgroup of motion candidates is to be reordered. The ordering of the subgroups may depend on the motion candidates arranged in the list of motion candidates.
In some embodiments, alternatively or in addition, the reordering scheme may be determined to indicate that a last subgroup of motion candidates is not to be reordered.
In some embodiments, the reordering scheme may be determined to indicate that the last subgroup of motion candidates is to be reordered if the last subgroup is also the first group. That is, the list of motion candidates is divided into only one subgroup such that the last subgroup is also the first subgroup. In this case, this subgroup may be reordered.
In some embodiments, alternatively or in addition, the reordering scheme may be determined to indicate that different subgroups are to be reordered separately. In some embodiments, alternatively or in addition, the reordering scheme may be determined to indicate that two motion candidates in different subgroups are not to be reordered together or are not to be compared with each other. Thus, the reordering of the motion candidates is performed within the subgroup.
In some embodiments, alternatively or in addition, the reordering scheme may be determined to indicate a first motion candidate in a first subgroup is to be put ahead of a second motion candidate in a second subgroup after reordering if the first subgroup is ahead of the second subgroup. Thus, the order of the subgroups is maintained and the motion candidates within each subgroup may be adaptively reordered.
With the reordering scheme determined, the target list of motion candidates can be generated from the list of motion candidates according to the reordering scheme. Depending on the reordering scheme, the list of motion candidates may not be reordered, may be partially reordered (e.g., one or more motion candidates are reordered), or may be fully reordered, to obtain the target list of motion candidates.
In some embodiments, in the case where the reordering scheme indicates that the list of motion candidates is to be partially reordered, for example, only some but not all of motion candidates in the list of motion candidates are to be reordered and at least one motion candidate in the list of motion candidates is not to be reordered, an order of the at least one motion candidate not to be reordered within the target list of motion candidates may be determined according to an original order of the at least one first motion candidate within the list of motion candidates. That is, for the motion candidates not to be reordered, they may be arranged in the target list of motion candidate according to their initial order.
In some embodiments, if the reordering scheme indicates that the list of motion candidates is to be partially reordered, one or more motion candidates not to be reordered may be put behind one or more motion candidates to be reordered. More specifically, if at least one first motion candidate in the list of motion candidates is not to be reordered and at least one second motion candidate in the list of motion candidates is to be reordered, the at least one first motion candidate may be arranged in the target list of motion candidates as following the at least one second motion candidate to be reordered.
In some embodiments, if the reordering scheme indicates that the list of motion candidates is to be partially reordered, one or more motion candidates not to be reordered may be put before one or more motion candidates to be reordered. More specifically, if at least one first motion candidate in the list of motion candidates is not to be reordered and at least one second motion candidate in the list of motion candidates is to be reordered, the at least one first motion candidate may be arranged within the target list of motion candidates as to be ahead of the at least one second motion candidate to be reordered.
In some embodiments, when generating the target list of motion candidates, one or more new motion candidates (e.g., merge candidates or AMVP candidates) may be generated based on the candidate reordering, to construct at least a part of the target list of motion candidates. Specifically, when generating the target list of motion candidates, if the reordering scheme indicates that at least one motion candidate of the list of motion candidates is to be reordered, the at least one motion candidate in the list of motion candidates to obtain a (partially or fully) reordered list of motion candidates. Then at least one further motion candidate may be generated based on the reordered list of motion candidates. The target list of motion candidates may be constructed based at least in part on the at least one further motion candidate. In some examples, one or more new motion candidates may be used as padding motion candidates in the target list of motion candidates (e.g., in the case that the target list of motion candidates is specified to have a predetermined number of motion candidates), instead of using zero padding motion candidates. In some examples, one or more new motion candidates may be used to construct a list of motion candidates in a new mode, to derive the final target list of motion candidates.
In some embodiments, the list of motion candidates may comprise a first set of motion candidates obtained from a first reference picture list for the target block and a second set of motion candidates obtained from a second reference picture list for the target block. For example, the list of motion candidates may comprise one or more motion candidates from a reference picture from a reference picture list 0 (L0), and such motion candidate(s) may be referred to as L0 motion candidate(s). The list of motion candidates may comprise one or more motion candidates from a reference picture from a reference picture list 1 (L1), and such motion candidate(s) may be referred to as L1 motion candidate(s).
In some examples, the first and second sets of reference may be adaptively reordered separately based on the reordering scheme, to generate a first target set of motion candidates and a second target set of motion candidates, respectively. The first and second target sets of motion candidates may be used to constructed to the target list of motion candidates. For example, the L0 motion candidates and L1 motion candidates may be reordered separately, and the reordered motion candidates may be used to construct the final target list of motion candidates.
In some embodiments, when constructing the target list of motion candidates, one or more new bi-prediction motion candidates may be constructed from the first and second target sets of motion candidates obtained after the reordering. Each bi-prediction motion candidates may be constructed by combining one motion candidate from the first target set of motion candidates and a further motion candidate from the second target set of motion candidates. For example, one or more new bi-prediction motion candidates may be constructed by combining one from the reordered L0 motion candidates and the other from the reordered L1 motion candidates.
In some embodiments, when constructing the target list of motion candidates, one or more new uni-prediction motion candidates may be constructed from at least one of the first and second target sets of motion candidates obtained after the reordering. For example, one or more reordered motion candidates may be selected to form the new uni-prediction motion candidates. In one example, one or more new uni-prediction motion candidates may be generated from the reordered L0 or L1 motion candidates.
Referring back to
In some embodiments, the motion information is selected from the target list of motion candidates according to some particular criterions. For example, at the side of the video encoder, it may consider a balance between the encoding cost of the index and a template matching cost for determining the motion information. It should be understood that the video encoder may utilize any proper methods to determine one or more best candidates, and the present disclosure is not aimed to be limited in this regard. In some embodiments, the video encoder may encode at least one index for the motion information into a bitstream. The at least one index may be determined based on at least one position of the selected motion information in the target list of candidates.
In some embodiments, the video decoder may decode, from a bitstream of a video, at least one index for motion information of the target block. With the target list of motion candidates determined, the video decoder may retrieve at least one motion candidate indexed by the at least one index and derive the final motion information to be used for the target block based on the at least one motion candidate.
In some embodiments, at the side of the video decoder, the motion candidates in the list of motion candidate list may be first adaptively reordered to construct a fully reordered list of motion candidates or a partially reordered list of motion candidates, to obtain the target list of motion candidates. Alternatively, in some cases, depending on the reordering scheme, the list of motion candidates may not be reordered. The video decoder may derive, from the bitstream of the video, at least one index for motion information of the target block. With the target list of motion candidates determined, the video decoder may retrieve at least one motion candidate indexed by the at least one index from the target list of motion candidates and derive the final motion information to be used for the target block based on the at least one motion candidate.
In some cases, refinement may be applied on one or more motion candidates. The refinement operations may, for example, depend on the coding mode. In some examples, the refinement may include using TM for TM coded blocks, adding MVD for MMVD coded blocks, or the like. It should be appreciated that the specific refinement operations are not limited in the present disclosure.
In some embodiments, it is proposed to perform the adaptive motion candidate reordering (as discussed above) before the refinement. Specifically, if the reordering scheme indicates that one or more motion candidates or the whole list of motion candidates is to be reordered, those motion candidates or the list of motion candidates are reordered to obtain the target list of motion candidates. If the reordering scheme indicates that the list of motion candidates is not to be reordered, then no reordering may be performed. Then at least one index of at least one motion candidate may be retrieved from the target list of motion candidates. Refinement may be applied on the at least one motion candidate indexed by the at least one retrieved index, to obtain at least one refined motion candidate. The motion information may be derived based on the at least one refined motion candidate. In this case, since the refinement is performed on at least one retrieved motion candidates instead of on the whole list of motion candidates, the coding efficiency can be improved.
In some embodiments, it is proposed to perform the refinement before the adaptive motion candidate reordering as discussed above. Specifically, refinement may be applied on the list of motion candidates to obtain a refined list of motion candidates. One or more motion candidates may be refined in the refined list of motion candidates. If the reordering scheme indicates that one or more motion candidates or the whole list of motion candidates is to be reordered, the corresponding refined motion candidates in the refined list of motion candidates are reordered, to obtain the target list of motion candidates. If the reordering scheme indicates that the list of motion candidates is not to be reordered, the refined list of motion candidates may be determined as the target list of motion candidates. In this case, the refinement is performed on the list of motion candidates, to improve the coding performance. When deriving the motion information, at least one index of at least one motion candidate may be retrieved from the target list of motion candidates and the motion information based on the at least one refined motion candidate indexed by the at least one index.
In some embodiments, whether to apply the adaptive motion candidate reordering as discussed above may be indicated in the bitstream. In some embodiments, the bitstream may comprise signaling indicates the reordering scheme applied on the list of motion candidates. In some embodiments, the signaling may comprise a message signaled in a video parameter set (VPS), in a sequence parameter set (SPS), a picture parameter set (PPS), in a sequence header, in a picture header, in a slice header, or in a CTU/CU/TU/PU. In some embodiments, the signaling may be included in the bitstream per region; that is, it may be a region based on signaling. For example, a picture may be partitioned into a plurality of groups of CTU or CUs evenly or unevenly, and one flag may be coded for each of the groups to indicate the adaptive motion candidate reordering as discussed above is applied or not.
Although the above description may be focused on the HEVC and/or VVC standards, it should be appreciated that the concepts described herein may be applicable to other coding standards or video codec.
Implementations of the present disclosure can be described in view of the following clauses, the features of which can be combined in any reasonable manner.
Clause 1. A method for video processing, comprising: constructing, during a conversion between a target block of a video and a bitstream of the video, a list of motion candidates for motion information for the target block; determining a reordering scheme based at least in part on coding information, the reordering scheme indicating whether and/or how at least one motion candidate in the list of motion candidates is to be reordered; generating a target list of motion candidates from the list of motion candidates according to the reordering scheme; and deriving the motion information for the target block from the target list of motion candidates.
Clause 2. The method of Clause 1, wherein the coding information comprises at least one of the following: a coding mode for the video, or a category of at least one motion candidate in the list of motion candidates.
Clause 3. The method of Clause 2, wherein determining a reordering scheme comprises: determining a reordering scheme to indicate that the list of motion candidates is to be reordered in accordance with a determination that the coding mode is one of the following: a regular advanced motion vector predication (AMVP) mode, a regular merge mode, an affine merge mode, a sub-block-based merge mode, a geometric partitioning mode (GPM), a triangle partition mode (TPM), a template matching (TM) merge mode, a merge mode with motion vector differences (MMVD), or a decoder-side motion vector refinement (DMVR).
Clause 4. The method of Clause 2, wherein determining a reordering scheme comprises: determining a reordering scheme to indicate that the list of motion candidates or at least one motion candidate in the list of motion candidates is to be reordered, in accordance with a determination that the at least one motion candidate belongs to at least one of the following categories: a category of adjacent spatial motion candidates, a category of temporal motion candidates, a category of spatial temporal motion vector prediction (STMVP) motion candidates, a category of non-adjacent spatial motion candidates, a category of history-based motion vector prediction (HMVP) motion candidates, or a category of pair-wise average motion candidates.
Clause 5. The method of Clause 2, wherein determining a reordering scheme comprises: determining a reordering scheme to indicate that at least one motion candidate in the list of motion candidates is not to be reordered in accordance with a determination that the at least one motion candidate belongs to at least one of the following categories: a category of uni-prediction subblock based motion candidates, a category of subblock-based temporal motion vector prediction (SbTMVP) motion candidates, a category of inherited affine motion candidates, a category of constructed affine motion candidates, or a category of zero padding affine motion candidates.
Clause 6. The method of any of Clauses 1-5, wherein in the case that the reordering scheme indicates that at least one motion candidate in the list of motion candidates is to be reordered, the reordering scheme further indicates at least one of the following: a scheme for selecting a template for refinement to be performed on the list of motion candidates, a scheme for calculating a template matching cost for refinement to be applied on the list of motion candidates, the number of motion candidates to be reordered in the list of motion candidates, or the number of subgroups of motion candidates to be reordered in the list of motion candidates.
Clause 7. The method of any of Clauses 1-6, wherein generating the target list of motion candidates comprises: in accordance with a determination that the reordering scheme indicates that at least one motion candidate of the list of motion candidates is to be reordered, reordering the at least one motion candidate in the list of motion candidates to obtain the target list of motion candidates, in accordance with a determination that the reordering scheme indicates that the list of motion candidates is not to be reordered, determining the list of motion candidates as the target list of motion candidates.
Clause 8. The method of Clause 7, wherein deriving the motion information comprises: retrieving at least one index of at least one motion candidate from the target list of motion candidates; applying refinement on the at least one motion candidate indexed by the at least one retrieved index, to obtain at least one refined motion candidate; and deriving the motion information based on the at least one refined motion candidate.
Clause 9. The method of Clause 7, wherein deriving the motion information comprises: deriving at least one index from the bitstream; retrieving at least one motion candidate indexed by the at least one index from the target list of motion candidates; and deriving the motion information based on the at least one motion candidate.
Clause 10. The method of any of Clauses 1-6, wherein generating the target list of motion candidates comprises: applying refinement on the list of motion candidates, to obtain a refined list of motion candidates; in accordance with a determination that the reordering scheme indicates that at least one motion candidate of the list of motion candidates is to be reordered, reordering at least one refined motion candidate in the refined list of motion candidates to obtain the target list of motion candidates, the at least one refined motion candidate being corresponding to the at least one motion candidate; and in accordance with a determination that the reordering scheme indicates that the list of motion candidates is not to be reordered, determining the refined list of motion candidates as the target list of motion candidates.
Clause 11. The method of Clause 10, wherein deriving the motion information comprises: retrieving at least one index of at least one motion candidate from the target list of motion candidates; and deriving the motion information based on the at least one refined motion candidate indexed by the at least one index.
Clause 12. The method of any of Clauses 1-11, wherein generating the target list of motion candidates comprises: in accordance with a determination that the reordering scheme indicates that at least one motion candidate of the list of motion candidates is to be reordered, reordering the at least one motion candidate in the list of motion candidates to obtain a reordered list of motion candidates; generating at least one further motion candidate based on the reordered list of motion candidates; and constructing the target list of motion candidates based at least in part on the at least one further motion candidate.
Clause 13. The method of Clause 12, wherein the list of motion candidates comprises a first set of motion candidates obtained from a first reference picture list for the target block and a second set of motion candidates obtained from a second reference picture list for the target block, and wherein generating the target list of motion candidates comprises: generating a first target set of motion candidates from the first set of motion candidates based on the reordering scheme; generating a second target set of motion candidates from the second set of motion candidates based on the reordering scheme; and constructing the target list of motion candidates based on the first target set of motion candidates and the second set of motion candidates.
Clause 14. The method of Clause 13, wherein constructing the target list of motion candidates based on the first target set of motion candidates and the second set of motion candidates comprises: constructing at least one bi-prediction motion candidate for the target list of motion candidates, each of the at least one bi-prediction motion candidate being constructed by combining one motion candidate from the first target set of motion candidates and a further motion candidate from the second target set of motion candidates.
Clause 15. The method of Clause 13 or 14, wherein constructing the target list of motion candidates based on the first target set of motion candidates and the second set of motion candidates comprises: constructing at least one uni-prediction motion candidate for the target list of motion candidates from at least one of the first target set of motion candidates and the second set of motion candidates.
Clause 16. The method of any of Clauses 1-13, wherein determining a reordering scheme comprises: determining the reordering scheme to indicate that a number of motion candidates from a beginning of the list of motion candidates are to be reordered.
Clause 17. The method of Clause 1, wherein the list of motion candidates is divided into at least one subgroup of motion candidates, and wherein determining a reordering scheme comprises: determining the reordering scheme based on the at least one subgroup of motion candidates.
Clause 18. The method of Clause 17, wherein the reordering scheme indicates at least one of the following: only the first subgroup of motion candidates is to be reordered, a last subgroup of motion candidates is not to be reordered, the last subgroup of motion candidates is to be reordered if the last subgroup is also the first group, different subgroups are to be reordered separately, two motion candidates in different subgroups are not to be reordered together, or a first motion candidate in a first subgroup is to be put ahead of a second motion candidate in a second subgroup after reordering if the first subgroup is ahead of the second subgroup.
Clause 19. The method of any of Clauses 1-18, wherein generating the target list of motion candidates comprises: in accordance with a determination that the reordering scheme indicates that at least one first motion candidate in the list of motion candidates is not to be reordered, determining an order of the at least one first motion candidate within the target list of motion candidates according to an original order of the at least one first motion candidate within the list of motion candidates.
Clause 20. The method of any of Clauses 1-19, wherein generating the target list of motion candidates comprises: in accordance with a determination that the reordering scheme indicates that at least one first motion candidate in the list of motion candidates is not to be reordered and at least one second motion candidate in the list of motion candidates is to be reordered, arranging, within the target list of motion candidates, the at least one first motion candidate to be ahead of the at least one second motion candidate to be reordered, or arranging, within the target list of motion candidates, the at least one first motion candidate to follow the at least one second motion candidate to be reordered.
Clause 21. The method of any of Clauses 1-20, wherein the bitstream comprises signaling indicating the reordering scheme applied on the list of motion candidates.
Clause 22. An electronic device, comprising: a processing unit; and a memory coupled to the processing unit and having instructions stored thereon which, when executed by the processing unit, cause the electronic device to perform a method in accordance with any of Clauses 1-21.
Clause 23. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of Clauses 1-21.
Clause 24. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method in accordance with any of Clauses 1-21, wherein the method is performed by a video processing apparatus.
Clause 25. A method for storing a bitstream of a video comprising: constructing, during a conversion between a target block of a video and a bitstream of the video, a list of motion candidates for motion information for the target block; determining a reordering scheme based at least in part on coding information, the reordering scheme indicating whether and/or how at least one motion candidate in the list of motion candidates is to be reordered; generating a target list of motion candidates from the list of motion candidates according to the reordering scheme; deriving the motion information for the target block from the target list of motion candidates; generating the bitstream based on the motion information; and storing the bitstream in a non-transitory computer-readable recording medium.
It would be appreciated that the computing device 4000 shown in
As shown in
In some embodiments, the computing device 4000 may be implemented as any user terminal or server terminal having the computing capability. The server terminal may be a server, a large-scale computing device or the like that is provided by a service provider. The user terminal may for example be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, station, unit, device, multimedia computer, multimedia tablet, Internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system (PCS) device, personal navigation device, personal digital assistant (PDA), audio/video player, digital camera/video camera, positioning device, television receiver, radio broadcast receiver, E-book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It would be contemplated that the computing device 4000 can support any type of interface to a user (such as “wearable” circuitry and the like).
The processing unit 4010 may be a physical or virtual processor and can implement various processes based on programs stored in the memory 4020. In a multi-processor system, multiple processing units execute computer executable instructions in parallel so as to improve the parallel processing capability of the computing device 4000. The processing unit 4010 may also be referred to as a central processing unit (CPU), a microprocessor, a controller or a microcontroller.
The computing device 4000 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 4000, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 4020 can be a volatile memory (for example, a register, cache, Random Access Memory (RAM)), a non-volatile memory (such as a Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), or a flash memory), or any combination thereof. The storage unit 4030 may be any detachable or non-detachable medium and may include a machine-readable medium such as a memory, flash memory drive, magnetic disk or another other media, which can be used for storing information and/or data and can be accessed in the computing device 4000.
The computing device 4000 may further include additional detachable/non-detachable, volatile/non-volatile memory medium. Although not shown in
The communication unit 4040 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 4000 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 4000 can operate in a networked environment using a logical connection with one or more other servers, networked personal computers (PCs) or further general network nodes.
The input device 4050 may be one or more of a variety of input devices, such as a mouse, keyboard, tracking ball, voice-input device, and the like. The output device 4060 may be one or more of a variety of output devices, such as a display, loudspeaker, printer, and the like. By means of the communication unit 4040, the computing device 4000 can further communicate with one or more external devices (not shown) such as the storage devices and display device, with one or more devices enabling the user to interact with the computing device 4000, or any devices (such as a network card, a modem and the like) enabling the computing device 4000 to communicate with one or more other computing devices, if required. Such communication can be performed via input/output (I/O) interfaces (not shown).
In some embodiments, instead of being integrated in a single device, some or all components of the computing device 4000 may also be arranged in cloud computing architecture. In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or configurations of the systems or hardware providing these services. In various embodiments, the cloud computing provides the services via a wide area network (such as Internet) using suitable protocols. For example, a cloud computing provider provides applications over the wide area network, which can be accessed through a web browser or any other computing components. The software or components of the cloud computing architecture and corresponding data may be stored on a server at a remote position. The computing resources in the cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructures may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing architectures may be used to provide the components and functionalities described herein from a service provider at a remote location. Alternatively, they may be provided from a conventional server or installed directly or otherwise on a client device.
The computing device 4000 may be used to implement video encoding/decoding in embodiments of the present disclosure. The memory 4020 may include one or more video coding modules 4025 having one or more program instructions. These modules are accessible and executable by the processing unit 4010 to perform the functionalities of the various embodiments described herein.
In the example embodiments of performing video encoding, the input device 4050 may receive video data as an input 4070 to be encoded. The video data may be processed, for example, by the video coding module 4025, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 4060 as an output 4080.
In the example embodiments of performing video decoding, the input device 4050 may receive an encoded bitstream as the input 4070. The encoded bitstream may be processed, for example, by the video coding module 4025, to generate decoded video data. The decoded video data may be provided via the output device 4060 as the output 4080.
While this disclosure has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application as defined by the appended claims. Such variations are intended to be covered by the scope of this present application. As such, the foregoing description of embodiments of the present application is not intended to be limiting.
Number | Date | Country | Kind |
---|---|---|---|
PCT/CN2021/086213 | Apr 2021 | WO | international |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2022/085917 | 4/8/2022 | WO |