Bidirectional prediction constraints
Optimizing the interpolation sequence and filter selection through block shape interpolation sequence technology and motion vector characteristics solves the problem of low video decoding efficiency in the existing technology and improves video decoding quality and efficiency.
Patent Information
- Application Number
- CN202080008719.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-06
- Filing Date
- 2020-01-13
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-01-13
AI Technical Summary
When existing video encoding and decoding technology processes video bit streams, there are inefficiencies in the interpolation order and filter selection, resulting in poor video decoding quality.
Block shape interpolation sequence technology is used to determine the interpolation sequence according to the shape and motion vector characteristics of the video block, and select appropriate interpolation filters for processing to optimize the order of horizontal and vertical interpolation.
It improves the quality and efficiency of video decoding, reduces computational complexity and storage requirements, and is suitable for HEVC and future video encoding and decoding standards.
Smart Images

Figure CN113287303B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is intended to timely claim the priority and benefits of International Patent Application No. PCT / CN2019 / 071503 filed on January 12, 2019 and International Patent Application No. PCT / CN2019 / 077171 filed on March 6, 2019, in accordance with applicable patent laws and / or rules under the Paris Convention. The entire disclosures of International Patent Application No. PCT / CN2019 / 071503 and No. PCT / CN2019 / 077171 are incorporated by reference as part of the disclosure of this application. Technical Field
[0003] This document deals with video encoding and decoding technology. Background Art
[0004] Digital video accounts for the largest use of bandwidth on the Internet and other digital communications networks. As the number of networked user devices capable of receiving and displaying video increases, bandwidth demand for digital video usage is expected to continue to grow. Summary of the invention
[0005] The disclosed techniques may be used by video decoder or encoder embodiments in which block shape interpolation order techniques are used to improve interpolation.
[0006] In one example aspect, a method of video bitstream processing is disclosed. The method includes: determining a shape of a first video block; determining an interpolation order based on the shape of the first video block, the interpolation order indicating an order in which horizontal interpolation and vertical interpolation are performed; and performing horizontal interpolation and vertical interpolation on the first video block in order according to the interpolation order to reconstruct a decoded representation of the first video block.
[0007] In another example aspect, a method of video bitstream processing includes: determining a characteristic of a motion vector associated with a first video block; determining an interpolation order based on the characteristic of the motion vector, the interpolation order indicating an order in which horizontal interpolation and vertical interpolation are performed; and performing horizontal interpolation and vertical interpolation on the first video block in order according to the interpolation order to reconstruct a decoded representation of the first video block.
[0008] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining, by a processor, a size characteristic of a first video block; determining, by the processor based on the determination of the size characteristic, that a first interpolation filter is to be applied to the first video block; and performing further processing of the first video block using the first interpolation filter.
[0009] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining, by a processor, a first characteristic of a first video block; determining, by the processor based on the first characteristic, that a first interpolation filter is to be applied to the first video block; performing further processing of the first video block using the first interpolation filter; determining, by the processor, a second characteristic of a second video block; determining, by the processor based on the second characteristic, that a second interpolation filter is to be applied to the second video block, the first interpolation filter and the second interpolation filter being different short-tap filters; and performing further processing of the second video block using the second interpolation filter.
[0010] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining, by a processor, a characteristic of a first video block, the characteristic including one or more of: size information of the first video block, a prediction direction of the first video block, or motion information of the first video block; based on the determination of the characteristic of the first video block, rounding a motion vector (MV) associated with the first video block to integer pixel precision or half-pixel precision; and performing further processing of the first video block using the rounded motion vector.
[0011] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining, by a processor, that a first video block is encoded and decoded in Merge mode; based on the determination that the first video block is encoded and decoded in Merge mode, rounding motion information associated with the first video block to integer precision to generate modified motion information; and performing a motion compensation process on the first video block using the modified motion information.
[0012] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first video block, the characteristic being one or both of: a size of the first video block or a shape of the first video block; modifying a motion vector associated with the first video block to integer pixel precision or half pixel precision to generate a modified motion vector; and performing further processing of the first video block using the modified motion vector.
[0013] In another example aspect, a method for video bitstream processing is disclosed, the method comprising: determining a characteristic of a first video block, the characteristic being one or both of: a size of the first video block or a prediction direction of the first video block; determining MMVD side information based on the determination of the characteristic of the first video block; and performing further processing of the first video block using the MMVD side information.
[0014] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first video block, the characteristic being one or both of: a size of the first video block or a shape of the first video block; modifying a motion vector associated with the first video block to integer pixel precision or half pixel precision to generate a modified motion vector; and performing further processing of the first video block using the modified motion vector.
[0015] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first video block, the characteristic being one or both of: a size of the first video block or a shape of the first video block; determining a threshold number of half-pixel motion vector (MV) components or quarter-pixel MV components to be constrained based on the determination of the characteristic of the first video block; and performing further processing of the first video block using the threshold number.
[0016] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first video block, the characteristic including a size of the first video block; based on the determination of the characteristic of the first video block, modifying a motion vector (MV) associated with the first video block from fractional precision to integer precision; and performing motion compensation on the first video block using the modified MV.
[0017] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a first size of a first video block; based on the determination of the first size, determining a first precision of a motion vector (MV) associated with the first video block; determining a second size of a second video block, the first size and the second size being different sizes; based on the determination of the second size, determining a second precision of the MV associated with the second video block, the first precision and the second precision being different precisions; and performing further processing of the first video block using the first size and performing further processing of the second video block using the second size.
[0018] In another example aspect, a method of video processing is disclosed. The method includes: determining a characteristic of a first block of video for conversion between a first block and a bitstream representation of the first block; determining a filter having interpolation filter parameters for interpolation of the first block based on the characteristic of the first block; and performing the conversion by using the filter having the interpolation filter parameters.
[0019] In another example aspect, a method of video processing is disclosed. The method includes: for conversion between a first block of video and a bitstream representation of the first block, extracting reference pixels of the first reference block from a reference picture, wherein the first reference block is smaller than a second reference block required for motion compensation of the first block; padding the first reference block with padding pixels to generate a second reference block; and performing the conversion by using the generated second reference block.
[0020] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first block of video for conversion between a first block and a bitstream representation of the first block; performing a rounding process on a motion vector (MV) of the first block based on the characteristic of the first block; and performing the conversion by using the rounded MV.
[0021] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first block of video and a conversion between a bitstream representation of the first block; performing motion compensation on the first block using an MV having a first precision; and storing an MV having a second precision for the first block; wherein the first precision is different from the second precision.
[0022] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a codec mode of a first block of video for conversion between a first block and a bitstream representation of the first block; performing a rounding process on a motion vector (MV) of the first block if the codec mode of the first block satisfies a predetermined rule; and performing motion compensation of the first block by using the rounded MV.
[0023] In another example aspect, a method for video bitstream processing is disclosed. The method includes: generating a first motion vector (MV) candidate list for a first block of a video for conversion between a first block and a bitstream representation of the first block; performing a rounding process on the MV of at least one candidate before adding the at least one candidate to the first MV candidate list; and performing the conversion by using the first MV candidate list.
[0024] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining a characteristic of a first block of video for conversion between a first block and a bitstream representation of the first block; determining a constraint parameter to be applied to the first block based on the characteristic of the first block, wherein the constraint parameter constrains a maximum number of fractional motion vector (MV) components of the first block; and performing the conversion by using the constraint parameter.
[0025] In another example aspect, a method for video bitstream processing is disclosed. The method comprises
[0026] In another example aspect, a method for video bitstream processing is disclosed. The method includes: obtaining an indication of signaling notification that at least one of bidirectional prediction and unidirectional prediction is not allowed when a characteristic of the block satisfies a predetermined rule; determining a characteristic of the first block for conversion between a first block of video and a bitstream representation of the first block; and performing the conversion by using the indication when the characteristic of the first block satisfies the predetermined rule.
[0027] In another example aspect, a method for video bitstream processing is disclosed. The method includes: signaling an indication that at least one of bidirectional prediction and unidirectional prediction is not allowed when a characteristic of the block satisfies a predetermined rule; determining a characteristic of the first block for a conversion between a first block of video and a bitstream representation of the first block; performing the conversion based on the characteristic of the first block, wherein during the conversion, when the characteristic of the first block satisfies the predetermined rule, at least one of bidirectional prediction and unidirectional prediction is disabled.
[0028] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining whether fractional motion vector (MV) or motion vector difference (MVD) precision is allowed for a first block of video and a conversion between a bitstream representation of the first block; based on the determination, signaling an advanced motion vector resolution (AMVR) parameter for the first block; and performing the conversion by using the AMVR parameter.
[0029] In another example aspect, a method for video bitstream processing is disclosed. The method includes: determining whether fractional motion vector (MV) or motion vector difference (MVD) precision is allowed for a first block of video and a conversion between a bitstream representation of the first block; based on the determination, obtaining advanced motion vector resolution (AMVR) parameters for the first block; and performing the conversion by using the AMVR parameters.
[0030] In another example aspect, the above method may be implemented by a video decoder device including a processor.
[0031] In another example aspect, the above-described method may be implemented by a video encoder apparatus including a processor for decoding encoded video during a video encoding process.
[0032] In yet another example aspect, the methods may be embodied in the form of processor-executable instructions and stored on a computer-readable program medium.
[0033] These and other aspects are further described in this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1It is a diagram of a quadtree binary tree (QTBT) structure.
[0035] Figure 2 An example derivation process for Merge candidate list construction is shown.
[0036] Figure 3 Example locations of spatial merge candidates are shown.
[0037] Figure 4 An example of candidate pairs considered for redundancy checking of spatial merge candidates is shown.
[0038] Figure 5 (a) and Figure 5 (b) shows an example of the position of the second prediction unit (PU) of N×2N and 2N×N partitions.
[0039] Figure 6 It is a diagram of the motion vector scaling of the temporal merge candidate.
[0040] Figure 7 Example candidate positions C0 and C1 of the time-domain Merge candidates are shown.
[0041] Figure 8 An example of a combined bi-predictive Merge candidate is shown.
[0042] Fig. 9 An example of a derivation process of motion vector prediction candidates is shown.
[0043] Fig.10 is a diagram of motion vector scaling of spatial motion vector candidates.
[0044] Fig.11 An example of Alternative Temporal Motion Vector Prediction (ATMVP) for a Coding Unit (CU) is shown.
[0045] Fig.12 An example of one CU having four sub-blocks (AD) and its neighboring blocks (ad) is shown.
[0046] Fig.13 The proposed non-adjacent merge candidates in an example are shown.
[0047] Fig.14 The proposed non-adjacent merge candidates in an example are shown.
[0048] Fig.15 The proposed non-adjacent merge candidates in an example are shown.
[0049] Fig.16 Examples of integer sample and fractional sample positions for quarter-sample luma interpolation are shown.
[0050] Fig.17 is a block diagram of an example of a video processing device.
[0051] Fig.18 A block diagram of an example implementation of a video encoder is shown.
[0052] Fig.19 is a flow chart of an example of a video bitstream processing method.
[0053] Fig. 20 is a flow chart of an example of a video bitstream processing method.
[0054] Fig.21 An example of repeated boundary pixels of a reference block before interpolation is shown.
[0055] Fig. 22 is a flow chart of an example of a video bitstream processing method.
[0056] Fig.23 is a flow chart of an example of a video bitstream processing method.
[0057] Fig.24 is a flow chart of an example of a video bitstream processing method.
[0058] Fig.25 is a flow chart of an example of a video bitstream processing method.
[0059] Fig.26 is a flow chart of an example of a video bitstream processing method.
[0060] Fig. 27 is a flow chart of an example of a video bitstream processing method.
[0061] Fig.28 is a flow chart of an example of a video bitstream processing method.
[0062] Fig.29 is a flow chart of an example of a video bitstream processing method.
[0063] Fig.30 is a flow chart of an example of a video bitstream processing method.
[0064] Fig.31 is a flow chart of an example of a video bitstream processing method.
[0065] Fig.32is a flow chart of an example of a video bitstream processing method.
[0066] Fig.33 is a flow chart of an example of a video bitstream processing method.
[0067] Fig.34 is a flow chart of an example of a video bitstream processing method. DETAILED DESCRIPTION
[0068] This document provides various techniques that can be used by a decoder of a video bitstream to improve the quality of a decompressed or decoded digital video. In addition, a video encoder can also implement these techniques during the encoding process to reconstruct decoded frames for further encoding.
[0069] The section headings used in this document are for ease of understanding and do not limit the embodiments and techniques to the corresponding sections. Thus, the embodiments of one section can be combined with the embodiments of other sections.
[0070] 1. Overview
[0071] This patent document relates to video codec technology. Specifically, it relates to interpolation in video codec. It can be applied to existing video codec standards, such as HEVC, or to a pending standard (Versatile Video Codec). It may also be applicable to future video codec standards or video codecs.
[0072] 2. Background
[0073] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Vision, and the two organizations jointly produced the H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC) and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that utilizes temporal prediction plus transform codec. In order to explore future video codec technologies beyond HEVC, the Joint Video Exploration Team (JVET) was jointly established in 2015 by VCEG and MPEG. Since then, JVET has adopted many new methods and input them into a reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Group (JVET) was created between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) with the goal of a VVC standard with a 50% bitrate reduction compared to HEVC.
[0074] Fig.18is a block diagram of an example implementation of a video encoder.
[0075] 2.1 Quadtree plus binary tree (QTBT) block structure with larger CTU
[0076] In HEVC, CTU is divided into CUs using a quadtree structure represented as a codec tree to accommodate various local features. It is decided at the CU level whether to use inter-picture (temporal domain) or intra-picture (spatial domain) prediction to encode and decode the picture area. Each CU can be further divided into one, two or four PUs according to the PU partition type. Within a PU, the same prediction process is applied, and relevant information is sent to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the PU partition type, the CU can be partitioned into transform units (TUs) according to another quadtree structure similar to the codec tree for the CU. One of the key features of the HEVC structure is that it has multiple partition concepts, including CU, PU, and TU.
[0077] The QTBT structure removes the concept of multiple partition types, that is, it removes the separation of the concepts of CU, PU, and TU, and supports greater flexibility in the shape of CU partitions. In the QTBT block structure, a CU can have a square or rectangular shape. Figure 1 As shown, the codec tree unit (CTU) is first partitioned by a quadtree structure. The quadtree leaf nodes are further partitioned by a binary tree structure. In the binary tree partitioning, there are two types of partitioning, symmetric horizontal partitioning and symmetric vertical partitioning. The binary tree leaf node is called a codec unit (CU), and this segmentation is used for prediction and transform processing without any further partitioning. This means that in the QTBT codec block structure, CU, PU and TU have the same block size. In JEM, a CU sometimes consists of codec blocks (CBs) of different color components, for example, in the case of P and B slices of a 4:2:0 chroma format, a CU contains one luminance CB and two chroma CBs, and sometimes consists of CBs of a single component, for example, in the case of an I slice, a CU contains only one luminance CB or only two chroma CBs.
[0078] The following parameters are defined for the QTBT segmentation scheme.
[0079] –CTU size: the root node size of the quadtree, the same concept as in HEVC
[0080] –MinQTSize: Minimum allowed quadtree leaf node size
[0081] –MaxBTSize: Maximum allowed binary tree root node size
[0082] –MaxBTDepth: Maximum allowed binary tree depth
[0083] –MinBTSize: minimum allowed binary tree leaf node size
[0084] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 luma samples with two corresponding 64×64 chroma sample blocks, MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4×4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate quadtree leaf nodes. The size of the quadtree leaf node can be from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the leaf quadtree node is 128×128, it will not be further divided by the binary tree because the size exceeds MaxBTSize (i.e., 64×64). Otherwise, the quadtree leaf node can be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree, and the depth of its binary tree is 0. When the depth of the binary tree reaches MaxBTDepth (i.e., 4), further division is no longer considered. When the width of the binary tree node is equal to MinBTSize (i.e. 4), no further horizontal splitting is considered. Similarly, when the height of the binary tree node is equal to MinBTSize, no further vertical splitting is considered. The leaf nodes of the binary tree are further processed by prediction and transform processing without any further splitting. In JEM, the maximum CTU size is 256×256 luma samples.
[0085] Figure 1 shows an example of block segmentation by using QTBT, Figure 1 (Right) shows the corresponding tree representation. Solid lines represent quadtree partitions and dashed lines represent binary tree partitions. In each partition (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where 0 indicates horizontal partitioning and 1 indicates vertical partitioning. For quadtree partitioning, there is no need to indicate the partition type since quadtree partitioning always partitions the block horizontally and vertically to produce 4 sub-blocks of the same size.
[0086] In addition, the QTBT scheme supports the ability for luma and chroma to have separate QTBT structures. Currently, for P and B slices, the luma and chroma CTBs in one CTU share the same QTBT structure. However, for I slices, the luma CTBs are partitioned into CUs by the QTBT structure, and the chroma CTBs are partitioned into chroma CUs by another QTBT structure. This means that a CU in an I slice includes a codec block for the luma component or a codec block for two chroma components, and a CU in a P or B slice includes codec blocks for all three color components.
[0087] In HEVC, inter prediction for small blocks is restricted to reduce memory access for motion compensation, so that bidirectional prediction is not supported for 4×8 and 8×4 blocks, and inter prediction is not supported for 4×4 blocks. In JEM's QTBT, these restrictions are removed.
[0088] 2.2 Inter-frame prediction of HEVC / H.265
[0089] Each inter-predicted PU has motion parameters for one or two reference picture lists. The motion parameters include motion vectors and reference picture indices. The use of one of the two reference picture lists may also be signaled using inter_pred_idc. The motion vector may be explicitly encoded as a delta relative to the prediction value.
[0090] When a CU is encoded in skip mode, a PU is associated with the CU and there are no significant residual coefficients, no encoded motion vector increments or reference picture indices. A Merge mode is specified, whereby the motion parameters of the current PU are obtained from neighboring PUs including spatial and temporal candidates. Merge mode can be applied to any inter-predicted PU, not just for skip mode. An alternative to Merge mode is explicit transmission of motion parameters, where each PU explicitly signals the motion vector (more accurately, the motion vector difference compared to the motion vector predictor), the corresponding reference picture index for each reference picture list, and the use of the reference picture list. In the present disclosure, such a mode is referred to as Advanced Motion Vector Prediction (AMVP).
[0091] When signaling indicates that one of the two reference picture lists is to be used, a PU is generated from a block of samples. This is called "unidirectional prediction". Unidirectional prediction is available for P slices and B slices.
[0092] When signaling indicates that both reference picture lists are to be used, a PU is generated from two sample blocks. This is called "bi-prediction". Bi-prediction is only available for B slices.
[0093] The following text provides detailed information about the inter prediction modes specified in HEVC. The description will start with the Merge mode.
[0094] 2.2.1 Merge mode
[0095] 2.2.1.1 Merge Mode Candidate Derivation
[0096] When predicting a PU using Merge mode, an index pointing to an entry in the Merge candidate list is parsed from the bitstream and used to retrieve motion information. The construction of this list is specified in the HEVC standard and can be summarized in the following sequence of steps:
[0097] Step 1: Initial candidate derivation
[0098] oStep 1.1: Spatial Candidate Derivation
[0099] oStep 1.2: Redundancy check of spatial domain candidates
[0100] oStep 1.3: Time Domain Candidate Derivation
[0101] Step 2: Additional candidate insertions
[0102] oStep 2.1: Create bidirectional prediction candidates
[0103] oStep 2.2: Insert zero motion candidates
[0104] These steps are also schematically depicted in Figure 2 For spatial Merge candidate derivation, a maximum of four Merge candidates are selected from candidates located at five different positions. For temporal Merge candidate derivation, a maximum of one Merge candidate is selected from two candidates. Since a constant number of candidates for each PU is assumed at the decoder, additional candidates are generated when the number of candidates obtained from step 1 does not reach the maximum number of Merge candidates (MaxNumMergeCand) signaled in the slice header. Since the number of candidates is constant, the index of the best Merge candidate is encoded using Truncated Unarybinarization (TU). If the size of the CU is equal to 8, all PUs of the current CU share a single Merge candidate list, which is the same as the Merge candidate list of the 2N×2N prediction unit.
[0105] Hereinafter, operations associated with the above-mentioned steps will be described in detail.
[0106] 2.2.1.2 Spatial Candidate Derivation
[0107] In the derivation of spatial merge candidates, Figure 3Up to four Merge candidates are selected from the candidates at the positions depicted in . The order of derivation is A1, B1, B0, A0, and B2. Position B2 is considered only when any PU at position A1, B1, B0, A0 is unavailable (for example, because it belongs to another strip or slice) or is intra-coded. After adding the candidate at position A1, a redundancy check is performed on the addition of the remaining candidates, which ensures that candidates with the same motion information are excluded from the list, thereby improving coding efficiency. Figure 4 An example of candidate pairs considered for redundant check of spatial merge candidates is shown. In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundant check. Instead, only candidate pairs with Figure 4 The arrows in the table link pairs, and candidates are only added to the list if the corresponding candidates for redundancy checking do not have the same motion information. Another source of repeated motion information is a "second PU" associated with a partition other than 2N×2N. As an example, Figure 5 The second PU is depicted for both N×2N and 2N×N cases. When the current PU is partitioned as N×2N, the candidate at position A1 is not considered for list construction. In fact, adding this candidate would result in two prediction units having the same motion information, which is redundant for having only one PU in the codec unit. Similarly, position B1 is not considered when the current PU is partitioned as 2N×N.
[0108] 2.2.1.3 Time Domain Candidate Derivation
[0109] In this step, only one candidate is added to the list. In particular, in the derivation of the temporal Merge candidate, the scaled motion vector is derived based on the co-located PU belonging to the picture with the minimum POC (Picture Order Count) difference with the current picture within a given reference picture list. The reference picture list to be used for the derivation of the co-located PU is explicitly signaled in the slice header. Figure 5 is a diagram of the motion vector scaling of the temporal Merge candidate. Figure 5 As shown by the dotted line in , a scaled motion vector for the temporal Merge candidate is obtained, which is scaled from the motion vector of the collocated PU using the POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the collocated picture and the collocated picture. The reference picture index of the temporal Merge candidate is set equal to zero. The actual implementation of the scaling process is described in the HEVC specification. For B slices, two motion vectors (one for reference picture list 0 and the other for reference picture list 1) are obtained and combined to generate a bidirectional prediction Merge candidate.
[0110] Figure 6 is an illustration of motion vector scaling for temporal merge candidates.
[0111] In the collocated PU(Y) belonging to the reference frame, the position of the temporal candidate is selected between candidates C0 and C1, such as Figure 7 If the PU at position C0 is not available, is intra-coded, or is outside the current CTU row, position C1 is used. Otherwise, position C0 is used in the derivation of the time-domain Merge candidate.
[0112] 2.2.1.4 Additional candidate insertion
[0113] In addition to the spatial and temporal Merge candidates, there are two additional types of Merge candidates: combined bidirectional prediction Merge candidates and zero Merge candidates. The combined bidirectional prediction Merge candidate is generated by utilizing the spatial and temporal Merge candidates. The combined bidirectional prediction Merge candidate is only used for B slices. The combined bidirectional prediction candidate is generated by combining the first reference picture list motion parameters of an initial candidate with the second reference picture list motion parameters of another initial candidate. If the two tuples provide different motion hypotheses, they will form a new bidirectional prediction candidate. As an example, Figure 8 Depicted is the case when two candidates in the original list (on the left) (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) are used to create a combined bi-predictive Merge candidate that is added to the final list (on the right). There are many rules for combining that are considered to generate these additional Merge candidates.
[0114] Zero motion candidates are inserted to fill the remaining entries in the Merge candidate list and thus reach the MaxNumMergeCand capacity. These candidates have zero spatial displacement and a reference picture index that starts at zero and increases each time a new zero motion candidate is added to the list. The number of reference frames used by these candidates is 1 and 2 for unidirectional prediction and bidirectional prediction, respectively. Finally, no redundancy check is performed on these candidates.
[0115] 2.2.1.5 Motion Estimation Regions for Parallel Processing
[0116] To speed up the encoding process, motion estimation can be performed in parallel, thereby deriving motion vectors for all prediction units within a given region at the same time. Deriving Merge candidates from spatial neighbors may interfere with parallel processing because a prediction unit cannot derive motion parameters from neighboring PUs until its associated motion estimation is completed. In order to ease the trade-off between coding efficiency and processing latency, HEVC defines a Motion Estimation Region (MER), and uses the "log2_parallel_merge_level_minus2" syntax element to signal the size of the MER in the picture parameter set. When a MER is defined, Merge candidates that fall into the same region are marked as unavailable and are therefore not considered in list construction.
[0117] 2.2.2 AMVP
[0118] AMVP exploits the spatiotemporal correlation of motion vectors with neighboring PUs, which is used for explicit transmission of motion parameters. For each reference picture list, a motion vector candidate list is constructed by first checking the availability of the PU positions in the temporal domain adjacent to the left and above, removing redundant candidates and adding zero vectors to make the candidate list a constant length. The encoder can then select the best predictor from the candidate list and send the corresponding index indicating the selected candidate. Similar to Merge index signaling, the index of the best motion vector candidate is encoded using truncated unary. In this case, the maximum value to be encoded is 2 (see Fig. 9 ). In the following sections, details about the derivation process of motion vector prediction candidates will be provided.
[0119] 2.2.2.1 Derivation of AMVP Candidates
[0120] Fig. 9 The process of deriving motion vector prediction candidates is outlined.
[0121] In motion vector prediction, two types of motion vector candidates are considered: spatial motion vector candidates and temporal motion vector candidates. For spatial motion vector candidate derivation, the final Figure 3 The motion vectors of each PU at the five different positions depicted are used to derive two motion vector candidates.
[0122] For temporal motion vector candidate derivation, one motion vector candidate is selected from two candidates derived based on two different collocated positions. After generating the first spatiotemporal candidate list, duplicate motion vector candidates in the list are removed. If the number of potential candidates is greater than two, motion vector candidates whose reference picture index within the associated reference picture list is greater than 1 are removed from the list. If the number of spatiotemporal motion vector candidates is less than two, an additional zero motion vector candidate is added to the list.
[0123] 2.2.2.2 Spatial Motion Vector Candidates
[0124] In the derivation of spatial motion vector candidates, the Figure 3 Consider up to two candidates out of the five potential candidates derived in the PU of the depicted position, and those positions are the same as the positions of the motion Merge. The derivation order on the left side of the current PU is defined as A0, A1, and scaling A0, scaling A1. The derivation order on the upper side of the current PU is defined as B0, B1, B2, scaling B0, scaling B1, scaling B2. Therefore, for each side, there are four cases that can be used as motion vector candidates, two of which do not require the use of spatial domain scaling, and two use spatial domain scaling. The four different cases are summarized as follows:
[0125] No airspace scaling
[0126] -(1) Same reference picture list and same reference picture index (same POC)
[0127] -(2) Different reference picture lists, but same reference pictures (same POC)
[0128] Airspace scaling
[0129] -(3) Same reference picture list, but different reference pictures (different POC)
[0130] -(4) Different reference picture lists, and different reference pictures (different POC)
[0131] First check the non-spatial scaling case, then the spatial scaling. Spatial scaling is considered when the POC is different between the reference pictures of the neighboring PU and the reference pictures of the current PU regardless of the reference picture list. If all PUs of the left candidate are unavailable or are intra-coded, then scaling for the upper motion vector is allowed to help parallel derivation of the left and upper MV candidates. Otherwise, spatial scaling is not allowed for the upper motion vector.
[0132] Fig.10 is an illustration of motion vector scaling for spatial motion vector candidates.
[0133] like Fig.10 As depicted, in the spatial scaling process, the motion vectors of neighboring PUs are scaled in a similar manner as in the temporal scaling. The main difference is that the reference picture list and the index of the current PU are given as input; the actual scaling process is the same as that of the temporal scaling process.
[0134] 2.2.2.3 Temporal Motion Vector Candidates
[0135] Except for the reference picture index derivation, all the processes used to derive the temporal merge candidate are the same as those used to derive the spatial motion vector candidate (see Figure 7 ). The reference picture index is signaled to the decoder.
[0136] 2.3 New Inter-frame Merge Candidates in JEM
[0137] 2.3.1 Motion vector prediction based on sub-CU
[0138] In JEM with QTBT, each CU can have at most one motion parameter set for each prediction direction. Two sub-CU level motion vector prediction methods are considered in the encoder by dividing the large CU into sub-CUs and deriving the motion information of all sub-CUs of the large CU. The optional temporal motion vector prediction (ATMVP) method allows each CU to extract multiple sets of motion information from multiple blocks smaller than the current CU in the collocated reference picture. In the Spatial-Temporal Motion Vector Prediction (STMVP) method, the motion vector of the sub-CU is recursively derived by using the temporal motion vector predictor and the spatial neighboring motion vector.
[0139] In order to maintain a more accurate motion field for sub-CU motion prediction, motion compression of reference frames is currently disabled.
[0140] 2.3.1.1 Optional temporal motion vector prediction
[0141] In the optional temporal motion vector prediction (ATMVP) method, the motion vector temporal motion vector prediction (TMVP) is modified by extracting multiple sets of motion information (including motion vectors and reference indices) from blocks smaller than the current CU. Fig.11 As shown, a sub-CU is a square N×N block (N is set to 4 by default).
[0142] ATMVP predicts the motion vectors of sub-CUs within a CU in two steps. The first step is to use the so-called time domain vector to identify the corresponding block in the reference picture. The reference picture is also called the motion source picture. The second step is to divide the current CU into sub-CUs and obtain the motion vector and the reference index of each sub-CU from the blocks corresponding to each sub-CU, such as Fig.11 shown.
[0143] In the first step, the reference picture and the corresponding block are determined by the motion information of the spatial neighboring blocks of the current CU. In order to avoid the repeated scanning process of the neighboring blocks, the first Merge candidate in the Merge candidate list of the current CU is used. The first available motion vector and its associated reference index are set to the index of the temporal vector and the motion source picture. In this way, in ATMVP, the corresponding block can be identified more accurately than in TMVP, where the corresponding block (sometimes called the collocated block) is always in the lower right or center position relative to the current CU.
[0144] In the second step, the corresponding block of the sub-CU is identified by the time domain vector in the motion source picture by adding the time domain vector to the coordinates of the current CU. For each sub-CU, the motion information of its corresponding block (the minimum motion grid covering the center sample point) is used to derive the motion information of the sub-CU. After identifying the motion information of the corresponding N×N block, it is converted into the motion vector and reference index of the current sub-CU in the same way as the TMVP of HEVC, where motion scaling and other processes apply. For example, the decoder checks whether the low latency condition is met (that is, the POC of all reference pictures of the current picture is less than the POC of the current picture), and may use the motion vector MV x (e.g., the motion vector corresponding to the reference picture list X) is used to predict the motion vector MV of each sub-CU y (eg, where X equals 0 or 1, and Y equals 1-X).
[0145] 2.3.1.2 Spatiotemporal Motion Vector Prediction (STMVP)
[0146] In this method, the motion vector of a sub-CU is recursively derived in raster scan order. Fig.12 This concept is illustrated in Figure 1. Let us consider an 8×8 CU, which contains four 4×4 sub-CUs: A, B, C, and D. The neighboring 4×4 blocks in the current frame are labeled a, b, c, and d.
[0147] The motion derivation of sub-CU A starts by identifying its two spatial neighbors. The first neighbor is the N×N block (block c) above the sub-CUA. If this block c is not available or is intra-coded, check the other N×N blocks above the sub-CU A (from left to right, starting with block c). The second neighbor is the block on the left of sub-CU A (block b). If block b is not available or is intra-coded, check the other blocks on the left of sub-CU A (from top to bottom, starting with block b). The motion information obtained from the adjacent blocks in each list is scaled to the first reference frame of the given list. Next, the temporal motion vector predictor (TMVP) of sub-block A is derived by following the same process of TMVP derivation as specified by HEVC. The motion information of the collocated block at position D is extracted and scaled accordingly. Finally, after retrieving and scaling the motion information, all available motion vectors (up to 3) are averaged separately for each reference list. The average motion vector is assigned as the motion vector of the current sub-CU.
[0148] 2.3.1.3 Sub-CU motion prediction mode signaling
[0149] Sub-CU modes are enabled as additional Merge candidates, and no additional syntax elements are required to signal these modes. Two additional Merge candidates are added to the Merge candidate list of each CU to represent ATMVP mode and STMVP mode. If the sequence parameter set indicates that ATMVP and STMVP are enabled, up to seven Merge candidates can be used. The encoding logic of the additional Merge candidates is the same as that of the Merge candidates in HM, which means that for each CU in a P slice or B slice, two RD checks may be required for the two additional Merge candidates.
[0150] In JEM, all bins of the Merge index are context-coded by CABAC, whereas in HEVC, only the first bin is context-coded, and the remaining bins are context-bypass coded.
[0151] 2.3.2 Non-adjacent Merge Candidates
[0152] Qualcomm proposed Fig.13 Additional spatial Merge candidates are derived from non-adjacent adjacent positions marked as 6 to 49. The derived candidates are added to the Merge candidate list after the TMVP candidates.
[0153] Tencent proposed to derive additional spatial Merge candidates from the position in the external reference area with an offset of (-96, -96) relative to the current block.
[0154] like Fig.14As shown, the positions are marked as A(i,j), B(i,j), C(i,j), D(i,j) and E(i,j). Each candidate B(i,j) or C(i,j) is offset by 16 in the vertical direction compared to the previous B or C candidate. Each candidate A(i,j) or D(i,j) is offset by 16 in the horizontal direction compared to the previous A or D candidate. Each E(i,j) is offset by 16 in both the horizontal and vertical directions compared to the previous E candidate. The candidates are checked from the inside to the outside. And the order of the candidates is A(i,j), B(i,j), C(i,j), D(i,j) and E(i,j). Further study is conducted to see if the number of Merge candidates can be further reduced. The candidates are added to the Merge candidate list after the TMVP candidates.
[0155] In some examples, such as in Fig.15 In , the extended spatial positions from 6 to 27 can be checked according to their numerical order after the temporal candidates. To save the MV row buffer, all spatial candidates are restricted to within two CTU rows.
[0156] 2.4 Intra-frame prediction in JEM
[0157] 2.4.1 Intra-mode codec with 67 intra-prediction modes
[0158] For luma interpolation filtering, an 8-tap separable DCT-based interpolation filter is used for 2 / 4 precision samples, and a 7-tap separable DCT-based interpolation filter is used for 1 / 4 precision samples, as shown in Table 1.
[0159] Table 1: 8-tap DCT-IF coefficients for 1 / 4 luma interpolation
[0160] Location Filter coefficients 1 / 4 {-1,4,-10,58,17,-5,1} 2 / 4 {-1,4,-11,40,40,-11,4,-1} 3 / 4 {1,-5,17,58,-10,4,-1}
[0161] Similarly, a 4-tap separable DCT-based interpolation filter is used for the chroma interpolation filter, as shown in Table 2.
[0162] Table 2: 4-tap DCT-IF coefficients for 1 / 8 chroma interpolation
[0163]
[0164]
[0165] For vertical interpolation of 4:2:2 and for horizontal and vertical interpolation of 4:4:4 chroma channels, the odd positions in Table 2 are not used, resulting in 1 / 4 chroma interpolation.
[0166] For bidirectional prediction, the bit depth of the output of the interpolation filter is maintained at 14-bit precision, regardless of the source bit depth, before averaging the two prediction signals. The actual averaging is done implicitly using the bit depth reduction process:
[0167] predSamples[x,y]=(predSamplesL0[x,y]+predSamplesL1[x,y]+offset)>>shift
[0168] Where shift=(15-BitDepth)and offset=1<<(shift-1)
[0169] If both the horizontal and vertical components of a motion vector point to a sub-pixel location, horizontal interpolation is always performed first, followed by vertical interpolation. Fig.16 The sub-pixel j shown 0,0 Interpolation can be performed on sub-pixel j 0,0 Interpolation is performed. Fig.16 First, according to equation 2-1, 0,k (k=-3,-2,…3) interpolate, and then use equation 2-2 to calculate j 0,0 Interpolation is performed. Here, shift1=Min(4,BitDepthY-8) and shift2=6.
[0170] b 0,k =(-A -3,k +4*A -2,k -11*A -1,k +40*A 0,k +40*A 1,k -11*A 2,k +4*A 3,k -A 4,k )>>shift1(2-1)
[0171] j 0,0 =(-b 0,-3 +4*b 0,-2 -11*b 0,-1 +40*b 0,0 +40*b 0,1 -11*b 0,2 +4*b 0,3 -b 0,4 )>>shift2(2-2)
[0172] Alternatively, we can perform vertical interpolation first and then horizontal interpolation. In this case, we need to interpolate j 0,0 To interpolate, first use equation 2-3 to interpolate h k,0(k=-3,-2,…3) interpolate, and then use equation 2-4 to calculate j 0,0 Interpolation is performed. When BitDepthY is less than or equal to 8, shift1 is 0, and nothing is lost in the first interpolation stage, so the final interpolation result does not change according to the interpolation order. However, when BitDepthY is greater than 8, shift1 is greater than 0. In this case, the final interpolation result may be different when a different interpolation order is applied.
[0173] h k,0 =(-A k,-3 +4*A k,-2 -11*A k,-1 +40*A k,0 +40*A k,1 -11*A k,2 +4*A k,3 -A k,4 )>>shift1(2-3)
[0174] j 0,0 =(-h -3,0 +4*h -2,0 -11*h -1,0 +40*h 0,0 +40*h 1,0 -11*h 2,0 +4*h 3,0 -h 4,0 )>>shift2(2-4)
[0175] 3. Examples of Problems Solved by Embodiments
[0176] For luma block size W×H, if we always perform horizontal interpolation first, the required interpolation (per pixel) is shown in Table 3.
[0177] Table 3: Interpolation required for W×H luma components via HEVC / JEM
[0178]
[0179] On the other hand, if we perform vertical interpolation first, the required interpolation is as shown in Table 4. Obviously, the best interpolation order is the order that requires a smaller interpolation time between Table 3 and Table 4.
[0180] Table 4: Required interpolation of W×H luminance components when reversing the interpolation order
[0181]
[0182] For the chroma components, if we always perform horizontal interpolation first, the required interpolation is ((H+3)×W+W×H) / (W×H)=2+3 / H. If we always perform vertical interpolation first, the required interpolation is ((W+3)×H+W×H) / (W×H)=2+3 / W.
[0183] As mentioned above, different interpolation orders will lead to different interpolation results when the bit depth of the input video is greater than 8. Therefore, the interpolation order should be implicitly defined in both the encoder and the decoder.
[0184] 4. Examples of Embodiments
[0185] To address these issues and provide other benefits, we propose a shape-dependent interpolation order.Assume that the interpolation filter taps (in motion compensation) are N (eg, 8, 6, 4, or 2), and the current block size is W×H.
[0186] Assume that the number of MVDs allowed in the MMVD (such as the number of entries of the distance table) is M. Note that the triangle mode is regarded as a bidirectional prediction mode, and the following techniques related to the bidirectional prediction can also be applied to the triangle mode.
[0187] The following detailed examples should be considered as examples to explain the general concept. These examples should not be interpreted narrowly. In addition, these examples can be combined in any way.
[0188] 1. It is proposed that the interpolation order depends on the current codec block shape (eg, the codec block is a CU).
[0189] a. In one example, for a block with width > height (such as a CU, PU, or sub-block used in sub-block based prediction such as affine, ATMVP, or BIO), vertical interpolation is performed first, and then horizontal interpolation is performed, for example, first pixel d k,0 、h k,0 and n k,0 Interpolate and then 0,0 To r 0,0 Interpolation is performed. 0,0 Examples of are shown in Equations 2-3 and 2-4.
[0190] i. Alternatively, for blocks with width>=height (such as CUs, PUs or sub-blocks used in sub-block based prediction like affine, ATMVP or BIO), vertical interpolation is performed first, followed by horizontal interpolation.
[0191] b. In one example, for blocks with width <= height (such as CUs, PUs or sub-blocks used in sub-block based prediction like affine, ATMVP or BIO), horizontal interpolation is performed first, followed by vertical interpolation.
[0192] i. Alternatively, for blocks with width < height (such as CUs, PUs or sub-blocks used in sub-block based prediction like affine, ATMVP or BIO), horizontal interpolation is performed first, followed by vertical interpolation.
[0193] c. In one example, both the luma component and the chroma components follow the same interpolation order.
[0194] d. Alternatively, when one chroma codec block corresponds to multiple luma codec blocks (e.g., for a 4:2:0 color format, one chroma 4×4 block may correspond to two 8×4 or 4×8 luma blocks), luma and chroma may use different interpolation orders.
[0195] e. In one example, when different interpolation orders are utilized, the scaling factors in multiple stages (ie, shift1 and shift2) may also be changed accordingly.
[0196] 2. Furthermore, alternatively, it is proposed that the interpolation order of the luma component may also depend on the MV.
[0197] a. In one example, if the vertical MV component points to a quarter-pixel position and the horizontal MV component points to a half-pixel position, horizontal interpolation is performed first and then vertical interpolation.
[0198] b. In one example, if the vertical MV component points to a half-pixel position and the horizontal MV component points to a quarter-pixel position, vertical interpolation is performed first and then horizontal interpolation.
[0199] c. In one example, the proposed method is only applied to square codec blocks.
[0200] 3. It is proposed that for blocks encoded and decoded in Merge mode (e.g., regular Merge list, triangle Merge list, affine Merge list or other non-intra / non-AMVP modes), the associated motion information can be modified to integer precision (e.g., via rounding) before calling the motion compensation process.
[0201] a. Alternatively, Merge candidates with score Merge candidates may be excluded from the Merge list.
[0202] b. Alternatively, when a Merge candidate derived from a spatial or temporal block or other means (such as HMVP, pairwise bidirectional prediction Merge candidates) is associated with a fractional motion vector, the fractional motion vector can be first modified to integer precision (e.g., via rounding) before being added to the Merge list.
[0203] c. In one example, a separate HMVP table may be maintained on-the-fly to store motion candidates with integer precision.
[0204] d. Alternatively, the above method can be applied only when the Merge candidate is a bi-directional prediction candidate.
[0205] e. In one example, the above method can be applied to certain block sizes, such as 4×16, 16×4,
[0206] 4×8, 8×4, 4×4.
[0207] f. In one example, the above method may be applied to an AMVP codec block, where the Merge candidate may be replaced by the AMVP candidate.
[0208] g. In one example, the above method can be applied to certain block modes, such as non-affine modes.
[0209] 4. It is proposed that MMVD side information (such as distance table, direction) may depend on block size and / or prediction direction (eg, unidirectional prediction or bidirectional prediction).
[0210] a. In one example, a distance table with all integer precision may be defined or signaled.
[0211] b. In one example, if the base Merge candidate is associated with a fractional precision motion vector, it may first be modified (such as via rounding) to integer precision and then used to derive the final motion vector for motion compensation.
[0212] 5. It is proposed that for certain block sizes or block shapes, the MV in the MMVD mode can be constrained to have integer pixel precision or half-pixel precision.
[0213] a. In one example, if integer pixel precision is selected for an MMVD codec block, the basic Merge candidate used in the MMVD may first be modified to integer pixel precision (such as via rounding).
[0214] b. In one example, if half-pixel precision is selected for an MMVD codec block, the basic Merge candidate used in the MMVD may be modified to half-pixel precision (such as via rounding).
[0215] i. In one example, rounding can be performed during the basic Merge list construction process, so the rounded MV is used in pruning.
[0216] ii. In one example, rounding can be performed after the basic Merge list construction process, so that the unrounded MV is used in pruning.
[0217] c. In one example, if integer pixel precision or half-pixel precision is used for MMVD mode, only MVDs with the same or lower precision are allowed.
[0218] i. For example, if integer pixel precision is used for MMVD mode, only integer pixel precision, 2-pixel precision or N-pixel precision (N>=1) MVD is allowed.
[0219] d. In one example, if K MVD is not allowed in MMVD mode, the binarization of the MVD index can be modified because the maximum MVD index is M–K–1 instead of M–1. At the same time, different contexts can be used in CABAC coding.
[0220] e. In one example, rounding may be performed after deriving the MV in MMVD mode.
[0221] f. This constraint may be different for bidirectional prediction and unidirectional prediction. For example, this constraint may not be applied to unidirectional prediction.
[0222] g. This constraint may be different for different block sizes or block shapes.
[0223] 6. It is proposed that for certain block sizes or block shapes, the maximum number of half-pixel MV components or / and quarter-pixel MV components (eg, horizontal MV or vertical MV) can be constrained.
[0224] a. In one example, the bitstream should conform to the constraint.
[0225] b. The constraint may be different for bidirectional prediction and unidirectional prediction. For example, the constraint may not be applied to unidirectional prediction.
[0226] i. For example, such a constraint may be applied to bidirectionally predicted 4×8 or / and 8×4 or / and 4×16 or / and 16×4 blocks, however, it may not be applied to unidirectionally predicted 4×8 or / and 8×4 or / and 4×16 or / and 16×4 blocks.
[0227] ii. For example, such constraints can be applied to bi-directionally predicted and uni-directionally predicted 4×4 blocks.
[0228] c. The constraint may be different for different block sizes or block shapes.
[0229] d. This constraint can be applied to triangle patterns.
[0230] i. For example, such constraints may be applied to 4x16 or / and 16x4 blocks encoded or decoded in triangle mode.
[0231] e. In one example, for bi-directionally predicted blocks, a maximum of 3 quarter-pel MV components may be allowed.
[0232] f. In one example, for bi-directionally predicted blocks, a maximum of 2 quarter-pel MV components may be allowed.
[0233] g. In one example, for bi-directionally predicted blocks, a maximum of 1 quarter-pel MV component may be allowed.
[0234] h. In one example, for bi-directionally predicted blocks, a maximum of 0 quarter-pel MV components may be allowed.
[0235] i. In one example, for unidirectionally predicted blocks, a maximum of 1 quarter-pel MV component may be allowed.
[0236] j. In one example, for unidirectionally predicted blocks, a maximum of 0 quarter-pel MV components may be allowed.
[0237] k. In one example, for bi-directionally predicted blocks, a maximum of 3 fractional MV components may be allowed.
[0238] 1. In one example, for bi-directionally predicted blocks, a maximum of 2 fractional MV components may be allowed.
[0239] m. In one example, for bi-directionally predicted blocks, a maximum of 1 fractional MV component may be allowed.
[0240] n. In one example, for bi-directionally predicted blocks, a maximum of 0 fractional MV components may be allowed.
[0241] o. In one example, for uni-directionally predicted blocks, a maximum of 1 fractional MV component may be allowed.
[0242] p. In one example, for unidirectionally predicted blocks, a maximum of 0 fractional MV components may be allowed.
[0243] 7. It is proposed that some components of MV can be rounded to integer pixel precision or half pixel precision according to the block size (e.g., width and / or height, ratio of width and height) or / and prediction direction or / and motion information.
[0244] a. In one example, the MV is rounded to the nearest integer pixel precision MV or / and half pixel precision MV.
[0245] b. In one example, different rounding methods may be used, such as rounding down, rounding up, rounding toward zero, or rounding away from zero.
[0246] c. In one example, if the size of the block (ie, width*height) is less than (or greater than) (and / or equal to) a threshold L (eg, L=16 or 64), MV rounding may be applied to the horizontal or / and vertical MV components.
[0247] d. In one example, if the width (or height) of the block is less than (and / or equal to) a threshold L1 (eg, L1=4, 8), MV rounding may be applied to the horizontal (or vertical) MV component.
[0248] e. In one example, the thresholds L and L1 may be different for bidirectional prediction blocks and unidirectional prediction blocks. For example, a smaller threshold may be used for bidirectional prediction blocks.
[0249] f. In one example, if the ratio between width and height is greater than a first threshold or less than a second threshold (such as for narrow blocks like 4×16 or 16×4), MV rounding may be applied.
[0250] g. In one example, MV rounding may be applied only when both horizontal and vertical components of the MV are fractional (ie, they point to fractional pixel locations instead of integer pixel locations).
[0251] h. Whether to apply MV rounding may depend on whether the current block is bidirectionally predicted or unidirectionally predicted.
[0252] i. For example, MV rounding can be applied only when the current block is bi-directionally predicted.
[0253] i. Whether to apply MV rounding may depend on the prediction direction (eg, from list 0 or list 1) and / or the associated motion vector. In one example, for a bi-directionally predicted block, whether to apply MV rounding may be different for different prediction directions.
[0254] i. In one example, if the MV of the prediction direction X (X=0 or 1) has fractional components in both the horizontal and vertical directions, MV rounding may be applied to the N MV components of the prediction direction X; otherwise, MV rounding may not be applied. Here, N=0, 1, or 2.
[0255] ii. In one example, if N (N>=0) MV components have fractional precision, MV rounding may be applied to M (0<=M<=N) MV components among the N MV components.
[0256] 1. N and M can be different for bidirectional prediction blocks and unidirectional prediction blocks.
[0257] 2. N and M can be different for different block sizes (width or / and height or / and width*height).
[0258] 3. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 4.
[0259] 4. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 3.
[0260] 5. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 2.
[0261] 6. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 1.
[0262] 7. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 3.
[0263] 8. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 2.
[0264] 9. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 1.
[0265] 10. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0266] 11. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0267] 12. For example, for a bidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0268] 13. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0269] 14. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0270] 15. For example, for a unidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0271] iii. In one example, K MV components among the M MV components are rounded to integer pixel precision, and MK MV components are rounded to half-pixel precision, where K=0, 1, ..., M−1.
[0272] j. Whether to apply MV rounding may be different for different color components (such as Y, Cb and Cr).
[0273] i. For example, whether and how MV rounding is applied may depend on the color format, such as 4:2:0, 4:2:2 or 4:4:4.
[0274] k. Whether and / or how to apply MV rounding may depend on block size (or width, height), block shape, prediction direction, etc.
[0275] i. In one example, some MV components of 4×16 or / and 16×4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks may be rounded to half-pixel precision.
[0276] ii. In one example, some MV components of 4x16 or / and 16x4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks may be rounded to integer pixel precision.
[0277] iii. In one example, some MV components of a 4×4 uni-directionally predicted luma block or / and a bi-directionally predicted luma block may be rounded to integer pixel precision.
[0278] iv. In one example, some MV components of 4x8 or / and 8x4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks may be rounded to integer pixel precision.
[0279] 1. In one example, MV rounding may not be applied to sub-block prediction, such as affine prediction.
[0280] i. In an alternative example, MV rounding can be applied to sub-block prediction such as ATMVP prediction. In this case, each sub-block is considered as a codec block to determine whether and how to apply MV rounding.
[0281] 8. It is proposed that for certain block sizes, the motion vectors of a block should be modified to integer precision before being used for motion compensation (eg if they are in fractional precision).
[0282] 9. In one example, for certain block sizes, the stored motion vectors and the motion vectors used for motion compensation may be of different precisions.
[0283] a. In one example, sub-pixel precision (also known as fractional precision, such as 1 / 4 pixel, 1 / 16 pixel) may be stored for blocks with certain block sizes, but the motion compensation process is based on integer versions of these motion vectors (such as via rounding).
[0284] 10. It is proposed that an indication that bidirectional prediction is not allowed for certain block sizes can be signaled in a sequence parameter set / picture parameter set / sequence header / picture header / slice header / slice group header / CTU line / region / other high-level syntax.
[0285] a. Alternatively, an indication that bidirectional prediction is not allowed for certain block sizes may be signaled in a sequence parameter set / picture parameter set / sequence header / picture header / slice header / slice group header / CTU line / region / other high-level syntax.
[0286] b. Alternatively, an indication that bidirectional prediction and / or unidirectional prediction is not allowed for certain block sizes may be signaled in a sequence parameter set / picture parameter set / sequence header / picture header / slice header / slice group header / CTU line / region / other high-level syntax.
[0287] c. Furthermore, alternatively, such indication may be applied only to certain modes, such as non-affine modes.
[0288] d. Furthermore, alternatively, when uni-prediction / bi-prediction is not allowed for a block, the signaling of the AMVR index may be modified accordingly, such as allowing only integer pixel precision, or instead utilizing different MV precisions.
[0289] e. Furthermore, alternatively, the above methods (such as bullet points 3-9) may also be applicable.
[0290] 11. It is proposed that the conforming bitstream should follow the rule that for certain block sizes, only integer pixel motion vectors are allowed for bidirectional predictive codec blocks.
[0291] a. It is proposed that the conforming bitstream should follow the rule that for certain block sizes, only integer pixel motion vectors are allowed for bidirectional predictive coding blocks.
[0292] 12. Signaling of the AMVR flag may depend on whether fractional motion vectors are allowed for the block.
[0293] a. In one example, if fractional (ie, 1 / 4 pixel) MV / MVD precision is not allowed for a block, the flag indicating whether the MV / MVD precision of the current block is 1 / 4 pixel can be skipped and implicitly derived as false.
[0294] 13. In one example, the block size is, for example, 4×16, 16×4, 4×8, 8×4, 4×4.
[0295] 14. It is proposed that filters with different interpolation filters (e.g., different filter taps and / or different filter interpolation filter coefficients) can be used in interpolation according to the size of the block (e.g., width and / or height, ratio of width and height).
[0296] a. Different filters can be used for vertical interpolation and horizontal interpolation. For example, a shorter tap filter can be applied for vertical interpolation compared to the filter used for horizontal interpolation.
[0297] b. In one example, interpolation filters with fewer taps than the interpolation filters in VTM-3.0 may be applied in some cases. These interpolation filters with fewer taps are also called "short tap filters".
[0298] c. In one example, if the size of the block (i.e., width*height) is less than (or greater than) (and / or equal to) a threshold L (e.g., L=16 or 64), different filters (e.g., short tap filters) may be used for horizontal interpolation or / and vertical interpolation.
[0299] d. In one example, if the width (or height) of the block is less than (and / or equal to) a threshold L1 (eg, L1=4, 8), a different filter (eg, a short tap filter) may be used for horizontal (or vertical) interpolation.
[0300] e. In one example, if the ratio between width and height is greater than a first threshold or less than a second threshold (such as for narrow blocks like 4×16 or 16×4), a different filter (e.g., a short tap filter) than filters used for other types of blocks may be selected.
[0301] f. In one example, short tap filters can be used only when both horizontal and vertical components of the MV are fractional (ie, they point to fractional pixel locations instead of integer pixel locations).
[0302] g. Which filter to use (eg, a short tap filter may or may not be used) may depend on whether the current block is bi-directionally predicted or uni-directionally predicted.
[0303] i. For example, a short tap filter can be used only when the current block is bi-directionally predicted.
[0304] h. Which filter to use (e.g., a short tap filter may or may not be used) may depend on the prediction direction (e.g., from list 0 or list 1) and / or the associated motion vector. In one example, for a bidirectionally predicted block, whether a short tap filter is used may be different for different prediction directions.
[0305] i. In one example, if the MV of the prediction direction X (X=0 or 1) has fractional components in both the horizontal and vertical directions, a short-tap filter is used for the prediction direction X; otherwise, the short-tap filter is not used.
[0306] ii. In one example, if N (N>=0) MV components have fractional precision, a short-tap filter may be applied to M (0<=M<=N) MV components among the N MV components.
[0307] 1. N and M can be different for bidirectional prediction blocks and unidirectional prediction blocks.
[0308] 2. N and M can be different for different block sizes (width or / and height or / and width*height).
[0309] 3. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 4.
[0310] 4. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 3.
[0311] 5. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 2.
[0312] 6. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 1.
[0313] 7. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 3.
[0314] 8. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 2.
[0315] 9. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 1.
[0316] 10. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0317] 11. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0318] 12. For example, for a bidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0319] 13. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0320] 14. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0321] 15. For example, for a unidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0322] iii. Different short tap filters can be used for the M MV components.
[0323] 1. In one example, K MV components out of M MV components use S1 tap filters, and M-K MV components use S2 tap filters, where K=0, 1, ..., M-1. For example, S1 is equal to 6 and S2 is equal to 4.
[0324] i. In one example, different filters (e.g., short tap filters) may be used only for some pixels. For example, they are only used for boundary pixels of a block.
[0325] i. For example, they are only used for the N1 right column or / and N2 left column or / and N3 top row or / and N4 bottom row of the block.
[0326] j. Whether to use a short tap filter may be different for unidirectional prediction blocks and bidirectional prediction blocks.
[0327] k. Whether to use a short tap filter may be different for different color components (such as Y, Cb, and Cr).
[0328] i. For example, whether and how to apply a short tap filter may depend on the color format, such as 4:2:0, 4:2:2 or 4:4:4.
[0329] 1. Different short tap filters can be used for different blocks. The selected short tap filter may depend on the block size (or width, height), block shape, prediction direction, etc.
[0330] i. In one example, a 7-tap filter is used for horizontal interpolation and vertical interpolation of 4×16 or / and 16×4 bi-directionally predicted luminance blocks or / and uni-directionally predicted luminance blocks.
[0331] ii. In one example, a 7-tap filter is used for horizontal (or vertical) interpolation of a 4×4 uni-directionally predicted luminance block or / and a bi-directionally predicted luminance block.
[0332] iii. In one example, a 6-tap filter is used for horizontal interpolation and vertical interpolation of 4×8 or / and 8×4 bi-directionally predicted luminance blocks or / and uni-directionally predicted luminance blocks.
[0333] 1. Alternatively, a 6-tap filter and a 5-tap filter (or a 5-tap filter and a 6-tap filter) are used in horizontal interpolation and vertical interpolation for 4×8 or / and 8×4 bidirectionally predicted luminance blocks or / and unidirectionally predicted luminance blocks, respectively.
[0334] m. Different short tap filters can be used for different kinds of motion vectors.
[0335] i. In one example, a longer tap length filter may be used for motion vectors having fractional components in only one direction (ie, horizontal or vertical), and a shorter tap length filter may be used for motion vectors having fractional components in both horizontal and vertical directions.
[0336] ii. For example, an 8-tap filter is used for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in only one direction, and the short tap filter described in bullet point 3.h is used for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in both directions.
[0337] iii. In one example, the interpolation filter used for affine motion may be different from the interpolation filter used for translational motion vectors.
[0338] iv. In one example, short tap interpolation filters may be used for affine motion compared to interpolation filters used for translational motion vectors.
[0339] n. In one example, short tap filters may not be applied to sub-block prediction, such as affine prediction.
[0340] i. In an alternative example, a short tap filter may be applied to a sub-block prediction, such as ATMVP prediction. In this case, each sub-block is considered as a codec block to determine whether and how to apply a short tap filter.
[0341] o. In one example, whether to apply a short tap filter and / or how to apply a tap filter may depend on a block size, codec information, etc.
[0342] i. In one example, when a certain mode (such as OBMC, interleaved affine prediction mode) is enabled for a block, a short tap filter may be applied.
[0343] 15. It is proposed that (W+N–1–PW)*(W+N–1–PH) reference pixels (instead of (W+N–1)*(H+N–1) reference pixels) can be extracted for motion compensation of W×H blocks, where PW and PH cannot both be equal to 0.
[0344] a. In addition, in one example, for the remaining reference pixels (not extracted, but required for motion compensation), padding or derivation based on the extracted reference samples can be applied.
[0345] b. In addition, alternatively, pixels at the reference block boundaries (top boundary, left boundary, bottom boundary and right boundary) are repeated to generate (W+N-1)*(H+N-1) blocks, which are used for the final interpolation. Fig.21 As shown, in the figure, W=8, H=4, N=7, PW=2 and PH=3.
[0346] c. The extracted reference pixel can be identified by (x+MVXInt–N / 2+offSet1,y+MVYInt–N / 2+offSet2), where (x,y) is the upper left position of the current block, (MVXInt,MVYInt) is the integer part of the MV, and offSet1 and offSet2 are integers such as -2, -1, 0, 1, 2, etc.
[0347] d. In one example, the PH is zero and only the left border or / and the right border are repeated.
[0348] e. In one example, PW is zero and only the top border or / and the bottom border are repeated.
[0349] f. In one example, both PW and PH are greater than zero, and first the left border or / and the right border are repeated, and then the top border or / and the bottom border are repeated.
[0350] g. In one example, both PW and PH are greater than zero, and first the top border or / and the bottom border are repeated, and then the left border or / and the right border are repeated.
[0351] h. In one example, the left boundary is repeated M1 times, and the right boundary is repeated PW-M1 times, where M1 is an integer and M1>=0.
[0352] i. Alternatively, if M1 (or PW-M1) is greater than 1, then instead of repeating the first left (or right) column M1 times, multiple columns may be utilized, such as M1 left columns (or PW-M1 right columns) may be repeated.
[0353] i. In one example, the top border is repeated M2 times, and the bottom border is repeated PH-M2 times, where M2 is an integer and M2>=0.
[0354] i. Alternatively, if M2 (or PH-M2) is greater than 1, then instead of repeating the first top (or bottom) row M2 times, multiple rows may be utilized, such as M2 top rows (or PH-M2 bottom rows) may be repeated.
[0355] j. In one example, some default values may be used for border padding.
[0356] k. In one example, such a boundary pixel repetition method can be used only when both the horizontal and vertical components of the MV are fractional (ie, they point to fractional pixel locations instead of integer pixel locations).
[0357] 1. In one example, such a boundary pixel repetition method can be applied to some or all reference blocks.
[0358] i. In one example, if the MV of the prediction direction X (X=0 or 1) has fractional components in both the horizontal and vertical directions, such a boundary pixel repetition method is used for the prediction direction X; otherwise, this method is not used.
[0359] ii. In one example, if N (N>=0) MV components have fractional precision, the boundary pixel repetition method may be applied to M (0<=M<=N) MV components among the N MV components.
[0360] 1. N and M can be different for bidirectional prediction blocks and unidirectional prediction blocks.
[0361] 2. N and M can be different for different block sizes (width or / and height or / and width*height).
[0362] 3. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 4.
[0363] 4. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 3.
[0364] 5. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 2.
[0365] 6. For example, for a bidirectionally predicted block, N is equal to 4 and M is equal to 1.
[0366] 7. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 3.
[0367] 8. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 2.
[0368] 9. For example, for a bidirectionally predicted block, N is equal to 3 and M is equal to 1.
[0369] 10. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0370] 11. For example, for a bidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0371] 12. For example, for a bidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0372] 13. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 2.
[0373] 14. For example, for a unidirectionally predicted block, N is equal to 2 and M is equal to 1.
[0374] 15. For example, for a unidirectionally predicted block, N is equal to 1 and M is equal to 1.
[0375] iii. Different boundary pixel repetition methods can be used for the M MV components.
[0376] m.PW and / or PH may be different for different color components such as Y, Cb and Cr.
[0377] i. For example, whether and how boundary pixel repetition is applied may depend on the color format, such as 4:2:0, 4:2:2, or 4:4:4.
[0378] n. In one example, PW and / or PH may be different for different block sizes or shapes.
[0379] iv. In one example, for 4x16 or / and 16x4 bi-directional prediction blocks or / and uni-directional prediction blocks, PW and PH are set equal to 1.
[0380] v. In one example, for 4x4 bi-directionally predicted or / and uni-directionally predicted blocks, PW and PH are set equal to 0 and 1 (or 1 and 0), respectively.
[0381] vi. In one example, for 4×8 or / and 8×4 bidirectional prediction blocks or / and unidirectional prediction blocks, PW and PH are set equal to 2.
[0382] 1. Alternatively, for 4×8 or / and 8×4 bidirectional prediction blocks or / and unidirectional prediction blocks, PW and PH are set equal to 2 and 3 (or 3 and 2), respectively.
[0383] o. In one example, PW and PH may be different for unidirectional prediction and bidirectional prediction.
[0384] p.PW and PH can be different for different kinds of motion vectors.
[0385] vii. In one example, PW and PH may be smaller (or even zero) for motion vectors having fractional components in only one direction (i.e., horizontal or vertical), and may be larger for motion vectors having fractional components in both horizontal and vertical directions.
[0386] viii. For example, for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in only one direction, PW and PH are set equal to 0, and the PW and PH described in item 4.i are used for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in both directions.
[0387] Fig.21 An example of repeating boundary pixels of a reference block before interpolation is shown.
[0388] 16. The proposed method can be applied to certain modes, block sizes / shapes, and / or certain sub-block sizes.
[0389] a. The proposed method can be applied to certain modes, such as bi-prediction mode.
[0390] b. The proposed method can be applied to certain block sizes.
[0391] i. In one example, it is only applied to blocks of w×h<=T, where w and h are the width and height of the current block.
[0392] ii. In one example, it is only applied to blocks where h<=T.
[0393] c. The proposed method can be applied to a certain color component (such as only the luminance component).
[0394] 17. The above rounding operation can be defined as:
[0395] a.Shift(x,s) is defined as
[0396] Shift(x,s)=(x+off)>>s
[0397] b.SignShift(x,s) is defined as
[0398]
[0399] Where off is an integer such as 0 or 2 s-1 .
[0400] c. It can be defined as those used for motion vector rounding in the AMVR process, affine process or other process modules.
[0401] 18. In one example, how to round the MV may depend on the MV components.
[0402] a. For example, the y component of the MV is rounded to integer pixels, but the x component of the MV is not rounded.
[0403] b. In one example, MV may be rounded to integer pixels before motion compensation for luma components, but rounded to 2 pixels before motion compensation for chroma components when the color format is 4:2:0.
[0404] 19. A bilinear filter is proposed for interpolation filtering for one or more specific situations, such as:
[0405] a.4×4 unidirectional prediction;
[0406] b.4×8 bidirectional prediction;
[0407] c.8×4 bidirectional prediction;
[0408] 4.4×16 bidirectional prediction;
[0409] e.16×4 bidirectional prediction;
[0410] f.8×8 bidirectional prediction;
[0411] g.8×4 unidirectional prediction;
[0412] h.4×8 unidirectional prediction;
[0413] 20. It is proposed that when multi-hypothesis prediction is applied to a block, short tap or different interpolation filters can be applied compared to those applied in normal prediction mode.
[0414] a. In one example, a bilinear filter may be used.
[0415] b. A short tap or second interpolation filter may be applied to a reference picture list involving multiple reference blocks, while for another reference picture having only one reference block, the same filter as that used for the normal prediction mode may be applied.
[0416] c. The proposed method can be applied under certain conditions, such as a certain temporal layer(s), the quantization parameters of the blocks / slices / strips / pictures containing the blocks are within a range (such as greater than a threshold).
[0417] Fig.17 1 is a block diagram of a video processing device 1700. Device 1700 may be used to implement one or more methods described herein. Device 1700 may be embodied in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. Device 1700 may include one or more processors 1702, one or more memories 1704, and video processing hardware 1706. Processor(s) 1702 may be configured to implement one or more methods described in this document. Memory(s) 1704 may be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 1706 may be used to implement some of the techniques described in this document in hardware circuits.
[0418] Fig.19 1900 is a flow chart of a method 1900 for video bitstream processing. The method 1900 includes: determining (1905) a shape of a video block; determining (1910) an interpolation order based on the video block, the interpolation order indicating an order in which horizontal interpolation and vertical interpolation are performed; and performing horizontal interpolation and vertical interpolation according to the interpolation order of the video block to reconstruct (1915) a decoded representation of the video block.
[0419] Fig. 20 2000 is a flowchart of a method 2000 for video bitstream processing. The method 2000 includes: determining (2005) a characteristic of a motion vector associated with a video block; determining (2010) an interpolation order of the video block based on the characteristic of the motion vector, the interpolation order indicating an order in which horizontal interpolation and vertical interpolation are performed; and performing horizontal interpolation and vertical interpolation according to the interpolation order of the video block to reconstruct (2015) a decoded representation of the video block.
[0420] Fig. 2222 is a flow chart of a method 2200 for video bitstream processing. The method 2200 includes: determining (2205) a size characteristic of a first video block; determining (2210) a first interpolation filter to be applied to the first video block based on the determination of the size characteristic; and performing (2215) further processing of the first video block using the first interpolation filter.
[0421] Fig.23 23 is a flowchart of a method 2300 for video bitstream processing. The method 2300 includes: determining (2305) a first characteristic of a first video block; determining (2310) a first interpolation filter to be applied to the first video block based on the determination of the first characteristic; performing (2315) further processing of the first video block using the first interpolation filter; determining (2320) a second characteristic of a second video block; determining (2325) a second interpolation filter to be applied to the first video block based on the second characteristic, the first interpolation filter and the second interpolation filter being different short tap filters; and performing (2330) further processing of the second video block using the second interpolation filter.
[0422] Some examples of the order of performing horizontal interpolation and vertical interpolation and their use are described in Section 4 of this document with reference to methods 1900, 2000, 2200, and 2300. For example, as described in Section 4, under different shapes of video blocks, it may be prioritized to perform one of horizontal interpolation or vertical interpolation first. In some embodiments, horizontal interpolation is performed before vertical interpolation, and in some embodiments, vertical interpolation is performed before horizontal interpolation.
[0423] Referring to methods 1900 , 2000 , 2200 , and 2300 , video blocks may be encoded in a video bitstream in which bit efficiency may be achieved by using a bitstream generation rule related to an interpolation order, wherein the interpolation order also depends on the shape of the video block.
[0424] The method may include, wherein rounding the motion vector comprises one or more of: rounding to the nearest integer pixel precision MV or rounding to half pixel precision MV.
[0425] The method may include, wherein rounding the MV includes one or more of: rounding down, rounding up, rounding toward zero, or rounding away from zero.
[0426] The method may include, wherein the size information indicates that the size of the first video block is less than a threshold, and rounding the MV is applied to one or both of the horizontal MV component or the vertical MV component based on the size information indicating that the size of the first video block is less than the threshold.
[0427] The method may include, wherein the size information indicates that the width or height of the first video block is less than a threshold, and rounding the MV is applied to one or both of the horizontal MV component or the vertical MV component based on the size information indicating that the width or height of the first video block is less than the threshold.
[0428] The method may include, wherein the threshold is different for bidirectionally predicted blocks and unidirectionally predicted blocks.
[0429] The method may include, wherein the size information indicates that a ratio between a width and a height of the first video block is greater than a first threshold or less than a second threshold, and wherein the rounding of the MV is based on the determination of the size information.
[0430] The method may include, wherein rounding the MV is further based on both a horizontal component and a vertical component of the MV being fractional.
[0431] The method may include, wherein rounding the MV is further based on whether the first video block is bi-directionally predicted or uni-directionally predicted.
[0432] The method may include, wherein rounding the MV is further based on a prediction direction associated with the first video block.
[0433] The method may include, wherein rounding the MV is further based on a color component of the first video block.
[0434] The method may include, wherein rounding the MV is further based on a size of the first video block, a shape of the first video block, or a predicted shape of the first video block.
[0435] The method may include, wherein rounding the MV is applied to sub-block prediction.
[0436] The method may include, wherein the short tap filter is applied to the MV component based on the MV component having fractional precision.
[0437] The method may include, wherein the short tap filter is applied based on a size of the first video block or codec information of the first video block.
[0438] The method may include, wherein the short tap filter is applied based on a mode of the first video block.
[0439] The method may include, wherein a default value is used for border padding associated with the first video block.
[0440] The method may include, wherein the Merge mode is one or more of: a regular Merge list, a triangle Merge list, an affine Merge list, or other non-intra or non-AMVP modes.
[0441] The method may include, wherein Merge candidates having a score of Merge candidates are excluded from the Merge list.
[0442] The method may include, wherein rounding the motion information includes rounding a Merge candidate associated with the fractional motion vector to integer precision, and the modified motion information is inserted into a Merge list.
[0443] The method may include, wherein the motion information is a bi-directional prediction candidate.
[0444] The method may include, where the MMVD is the average magnitude of the vector differences.
[0445] The method may include, wherein the motion vector is in MMVD mode.
[0446] The method may include, wherein the first video block is an MMVD codec block to be associated with integer pixel precision, and wherein a base Merge candidate used in the MMVD is modified to integer pixel precision via rounding.
[0447] The method may include, wherein the first video block is an MMVD codec block to be associated with half-pixel precision, and wherein a base Merge candidate used in the MMVD is modified to half-pixel precision via rounding.
[0448] The method may include wherein the threshold number is a maximum number of half-pixel MV components or quarter-pixel MV components allowed.
[0449] The method may include wherein the threshold amount is different between bidirectional prediction and unidirectional prediction.
[0450] The method may include, wherein an indication that bi-directional prediction is not allowed is signaled in a sequence parameter set, a picture parameter set, a sequence header, a picture header, a slice header, a slice group header, a CTU line, a region, or other high-level syntax.
[0451] The method may include, wherein the method complies with bitstream rules, wherein the bitstream rules only allow integer pixel motion vectors for bi-directional predictive codec blocks of a certain size.
[0452] The method may include, wherein the size of the first video block is: 4×6, 16×4, 4×8, 8×4 or 4×4.
[0453] The method may include, wherein modifying or rounding the motion information includes modifying different MV components differently.
[0454] The method may include, wherein the y-component of the first MV is modified or rounded to integer pixels, and the x-component of the first MV is not modified or rounded.
[0455] The method may include, wherein a luma component of the first MV is rounded to an integer number of pixels, and a chroma component of the first MV is rounded to a 2-pixel number of pixels.
[0456] The method may include, wherein the first MV is associated with a video block having a color format that is 4:2:0.
[0457] The method may include, wherein the bilateral filter is used for 4x4 unidirectional prediction, 4x8 bidirectional prediction, 8x4 bidirectional prediction, 4x16 bidirectional prediction, 16x4 bidirectional prediction, 8x8 bidirectional prediction, 8x4 unidirectional prediction or 4x8 unidirectional prediction.
[0458] Fig.24 2400 is a flow chart of a method 2400 for video processing. The method 2400 includes: determining (2402) a characteristic of a first block of video and a bitstream representation of the first block for conversion between the first block; determining (2404) a filter having interpolation filter parameters for interpolation of the first block based on the characteristic of the first block; and performing (2406) the conversion by using the filter having the interpolation filter parameters.
[0459] In some examples, the interpolation filter parameters include filter taps and / or interpolation filter coefficients, and the interpolation includes at least one of vertical interpolation and horizontal interpolation.
[0460] In some examples, the filter includes a short tap filter having fewer taps than a conventional interpolation filter.
[0461] In some examples, a conventional interpolation filter has 8 taps.
[0462] In some examples, the characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of the width and the height, and a width*height dimension of the first block.
[0463] In some examples, the filter used for vertical interpolation differs in the number of taps from the filter used for horizontal interpolation.
[0464] In some examples, the filter used for vertical interpolation has fewer taps than the filter used for horizontal interpolation.
[0465] In some examples, the filter used for horizontal interpolation has fewer taps than the filter used for vertical interpolation.
[0466] In some examples, when the size of the first block is less than and / or equal to a threshold, a short tap filter is used for horizontal interpolation or / and vertical interpolation.
[0467] In some examples, when the size of the first block is greater than and / or equal to a threshold, a short tap filter is used for horizontal interpolation or / and vertical interpolation.
[0468] In some examples, a short tap filter is used for horizontal interpolation when a width of the first block is less than and / or equal to a threshold, or a short tap filter is used for vertical interpolation when a height of the first block is less than and / or equal to a threshold.
[0469] In some examples, when the ratio between the width and the height is greater than a first threshold or less than a second threshold, a short tap filter is used for vertical interpolation and / or horizontal interpolation.
[0470] In some examples, the characteristic of the first block includes at least one motion vector (MV) associated with the first block.
[0471] In some examples, short tap filters are used for interpolation only when both the horizontal and vertical components of the MV are fractional.
[0472] In some examples, the characteristic of the first block includes a prediction parameter indicating whether the first block is bi-directionally predicted or uni-directionally predicted.
[0473] In some examples, whether to use a short tap filter depends on a prediction parameter.
[0474] In some examples, short tap filters are used for interpolation only when the first block is bi-directionally predicted.
[0475] In some examples, the characteristics of the first block include an indication of a prediction direction from list 0 or list 1 and / or an associated motion vector (MV).
[0476] In some examples, whether to use a short tap filter depends on the prediction direction and / or MV of the first block.
[0477] In some examples, where the first block is a bi-directionally predicted block, whether to use a short tap filter is different for different prediction directions.
[0478] In some examples, if the MV of the prediction direction X (X is 0 or 1) has fractional components in both the horizontal and vertical directions, a short tap filter is used for the prediction direction X; otherwise, the short tap filter is not used.
[0479] In some examples, if N MV components have fractional precision, a short tap filter is used for M MV components among the N MV components, where N, M are integers and 0<=M<=N.
[0480] In some examples, N and M are different for bi-directionally predicted blocks and uni-directionally predicted blocks.
[0481] In some examples, for a bidirectional prediction block, N is equal to 4 and M is equal to 4, or N is equal to 4 and M is equal to 3, or N is equal to 4 and M is equal to 2, or N is equal to 4 and M is equal to 1, or N is equal to 3 and M is equal to 3, or N is equal to 3 and M is equal to 2, or N is equal to 3 and M is equal to 1, or N is equal to 2 and M is equal to 2, or N is equal to 2 and M is equal to 1, or N is equal to 1 and M is equal to 1.
[0482] In some examples, for uni-directional predicted blocks, N is equal to 2 and M is equal to 2, or N is equal to 2 and M is equal to 1, or N is equal to 1 and M is equal to 1.
[0483] In some examples, the short tap filter includes a first short tap filter having an S1 tap and a second short tap filter having an S2 tap, and wherein K MV components out of M MV components use the first short tap filter and (M–K) MV components out of M MV components use the second short tap filter, wherein K is an integer in the range from 0 to M–1, and S1 and S2 are integers.
[0484] In some examples, N and M are different for different size parameters of the block, where the size parameters include width or / and height or / and width*height of the block.
[0485] In some examples, the characteristic of the first block includes positions of pixels of the first block.
[0486] In some examples, whether to use a short tap filter depends on the location of the pixel.
[0487] In some examples, the short tap filter is used only for the boundary pixels of the first block.
[0488] In some examples, short tap filters are used only for the N1 right column or / and N2 left column or / and N3 top row or / and N4 bottom row of the first block, where N1, N2, N3, N4 are integers.
[0489] In some examples, the characteristic of the first block includes a color component of the first block.
[0490] In some examples, whether to use a short tap filter is different for different color components of the first block.
[0491] In some examples, the color components include Y, Cb, and Cr.
[0492] In some examples, the characteristic of the first block includes a color format of the first block.
[0493] In some examples, whether and how to apply the short tap filter depends on the color format of the first block.
[0494] In some examples, the color format includes 4:2:0, 4:2:2, or 4:4:4.
[0495] In some examples, the filters include different short tap filters having different taps, and selection of the different short tap filters is based on characteristics of the block.
[0496] In some examples, a 7-tap filter is selected for horizontal interpolation and vertical interpolation of 4x16 or / and 16x4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks.
[0497] In some examples, a 7-tap filter is selected for horizontal interpolation or vertical interpolation of a 4×4 uni-predicted luma block or / and a bi-predicted luma block.
[0498] In some examples, a 6-tap filter is selected for horizontal interpolation and vertical interpolation of 4x8 or / and 8x4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks.
[0499] In some examples, a 6-tap filter and a 5-tap filter or a 5-tap filter and a 6-tap filter are selected for horizontal interpolation and vertical interpolation for 4x8 or / and 8x4 bi-directionally predicted luma blocks or / and uni-directionally predicted luma blocks, respectively.
[0500] In some examples, the filters include different short tap filters with different taps, and the different short tap filters are used for different kinds of motion vectors (MVs).
[0501] In some examples, longer tap length filters from different short tap filters are used for MVs having fractional components in only one of the horizontal or vertical directions, and shorter tap length filters from different short tap filters are used for MVs having fractional components in both the horizontal and vertical directions.
[0502] In some examples, an 8-tap filter is used for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in only one of the horizontal direction or the vertical direction, and a short tap filter is used for a 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction block or / and unidirectional prediction block having fractional MV components in both directions.
[0503] In some examples, the filter used for affine motion is different from the filter used for translational motion vectors.
[0504] In some examples, the filter used for affine motion has fewer taps than the filter used for translational motion vectors.
[0505] In some examples, short tap filters are not applied for sub-block based prediction including affine prediction.
[0506] In some examples, short tap filters are applied to sub-block based prediction including Advanced Temporal Motion Vector Prediction (ATMVP) prediction.
[0507] In some examples, each sub-block is used as a codec block to determine whether and how to apply a short-tap filter.
[0508] In some examples, the characteristics of the first block include a size parameter and codec information of the first block, and whether and how to apply the short tap filter depends on the block size and codec information of the first block.
[0509] In some examples, when a certain mode including at least one of OBMC and interleaved affine prediction modes is enabled for the first block, the short tap filter is applied.
[0510] In some examples, the transform generates a first / second block of video from the bitstream representation.
[0511] In some examples, the transform generates a bitstream representation from the first / second block of video.
[0512] Fig.25 2500 is a flowchart of a method 2500 for video processing. The method 2500 includes: for conversion between a first block of video and a bitstream representation of the first block, extracting (2502) reference pixels of the first reference block from a reference picture, wherein the first reference block is smaller than a second reference block required for motion compensation of the first block; padding (2504) the first reference block with padding pixels to generate a second reference block required for motion compensation of the first block; and performing (2506) the conversion by using the generated second reference block.
[0513] In some examples, the size of the first block is W*H, the size of the first reference block is (W+N–1–PW)*(H+N–1–PH), and the size of the second reference block is (W+N–1)*(H+N–1), where W is the width of the first block, H is the height of the first block, N is the number of interpolation filter taps for the first block, and PW and PH are integers.
[0514] In some examples, padding the first reference block with padding pixels to generate the second reference block includes repeating pixels at one or more boundaries of the first reference block as padding pixels to generate the second reference block.
[0515] In some examples, the boundaries are a top boundary, a left boundary, a bottom boundary, and a right boundary of the first reference block.
[0516] In some examples, W=8, H=4, N=7, PW=2, and PH=3.
[0517] In some examples, pixels at the top, left, and right borders are repeated once, and pixels at the bottom border are repeated twice.
[0518] In some examples, the extracted reference pixel is identified by (x+MVXInt–N / 2+offSet1,y+MVYInt–N / 2+offSet2), where (x,y) is the upper left position of the first block, (MVXInt,MVYInt) is the integer portion of the motion vector (MV) of the first block, and offSet1 and offSet2 are integers.
[0519] In some examples, when the PH is zero, only pixels at the left boundary or / and the right boundary of the first reference block are repeated.
[0520] In some examples, when PW is zero, only pixels at the top boundary or / and the bottom boundary of the first reference block are repeated.
[0521] In some examples, when both PW and PH are greater than zero, pixels at the left boundary and / or the right boundary of the first reference block are repeated first, and then pixels at the top boundary and / or the bottom boundary of the first reference block are repeated, or pixels at the top boundary and / or the bottom boundary of the first reference block are repeated first, and then the left boundary and / or the right boundary of the first reference block are repeated.
[0522] In some examples, pixels at the left boundary of the first reference block are repeated M1 times, and pixels at the right boundary of the first reference block are repeated (PW−M1) times, where M1 is an integer and M1>=0.
[0523] In some examples, pixels in M1 left columns of the first reference block or pixels in (PW-M1) right columns of the first reference block are repeated, where M1>1 or PW-M1>1.
[0524] In some examples, pixels at the top boundary of the first reference block are repeated M2 times, and pixels at the bottom boundary of the first reference block are repeated (PH-M2) times, where M2 is an integer and M2>=0.
[0525] In some examples, M2 top rows of pixels of the first reference block or (PH-M2) bottom rows of pixels of the first reference block are repeated, where M2>1 or PW-M2>1.
[0526] In some examples, when both the horizontal component and the vertical component of the MV of the first block are fractional, pixels at one or more boundaries of the first reference block are repeated as padding pixels to generate the second reference block.
[0527] In some examples, when the MV of the prediction direction X (X is 0 or 1) has fractional components in both the horizontal and vertical directions, pixels at one or more boundaries of the first reference block are repeated as padding pixels to generate the second reference block.
[0528] In some examples, the first reference block is any one of part or all of the reference blocks of the first block.
[0529] In some examples, if the MV of the prediction direction X (X is 0 or 1) has fractional components in both the horizontal and vertical directions, pixels at one or more boundaries of the first reference block are repeated as padding pixels to generate a second reference block in the prediction direction X; otherwise, the pixels are not repeated.
[0530] In some examples, if the N2 MV components have fractional precision, pixels at one or more boundaries of the first reference block are repeated as padding pixels to generate a second reference block of M MV components out of the N2 MV components, where N2, M are integers and 0<=M<=N2.
[0531] In some examples, N2 and M are different for bi-directionally predicted blocks and uni-directionally predicted blocks.
[0532] In some examples, N2 and M are different for different block sizes, where the block size is associated with the width or / and height or / and width*height of the block.
[0533] In some examples, for bidirectional prediction blocks, N2 is equal to 4 and M is equal to 4, or N2 is equal to 4 and M is equal to 3, or N2 is equal to 4 and M is equal to 2, or N2 is equal to 4 and M is equal to 1, or N2 is equal to 3 and M is equal to 3, or N2 is equal to 3 and M is equal to 2, or N2 is equal to 3 and M is equal to 1, or N2 is equal to 2 and M is equal to 2, or N2 is equal to 2 and M is equal to 1, or N2 is equal to 1 and M is equal to 1.
[0534] In some examples, for uni-directional predicted blocks, N2 is equal to 2 and M is equal to 2, or N2 is equal to 2 and M is equal to 1, or N2 is equal to 1 and M is equal to 1.
[0535] In some examples, pixels at different boundaries of the first reference block are repeated as padding pixels in different ways to generate a second reference block of M MV components.
[0536] In some examples, when pixel padding is not used for horizontal MV components, PW is set equal to zero when extracting the first reference block using MV.
[0537] In some examples, when pixel padding is not used for vertical MV components, PH is set equal to zero when extracting the first reference block using MV.
[0538] In some examples, PW and / or PH are different for different color components of the first block.
[0539] In some examples, the color components include Y, Cb, and Cr.
[0540] In some examples, the PW and / or PH are different for different block sizes or shapes.
[0541] In some examples, PW and PH are set equal to 1 for 4x16 or / and 16x4 bi-directional predicted blocks or / and uni-directional predicted blocks.
[0542] In some examples, for 4×4 bi-directional prediction blocks or / and uni-directional prediction blocks, PW and PH are set equal to 0 and 1, or 1 and 0, respectively.
[0543] In some examples, PW and PH are set equal to 2 for 4x8 or / and 8x4 bi-directional prediction blocks or / and uni-directional prediction blocks.
[0544] In some examples, for 4x8 or / and 8x4 bi-directional prediction blocks or / and uni-directional prediction blocks, PW and PH are set equal to 2 and 3, or 3 and 2, respectively.
[0545] In some examples, PW and PH are different for unidirectional prediction and bidirectional prediction.
[0546] In some examples, PW and PH are different for different kinds of motion vectors.
[0547] In some examples, for a motion vector (MV) having fractional components in only one of the horizontal or vertical directions, PW and PH are set to smaller values or equal to zero, and for a MV having fractional components in both the horizontal and vertical directions, PW and PH are set to larger values.
[0548] In some examples, for 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional predicted blocks or / and unidirectional predicted blocks having fractional MV components in only one of the horizontal direction or the vertical direction, PW and PH are set equal to 0.
[0549] In some examples, PW and PH are used for 4×16 or / and 16×4 or / and 4×8 or / and 8×4 or / and 4×4 bidirectional prediction blocks or / and unidirectional prediction blocks with fractional MV components in both horizontal and vertical directions.
[0550] In some examples, whether and how pixels at the boundary are repeated depends on the color format of the first block.
[0551] In some examples, the color format includes 4:2:0, 4:2:2, or 4:4:4.
[0552] In some examples, filling the first reference block with padding pixels to generate the second reference block includes filling default values as padding pixels to generate the second reference block.
[0553] In some examples, the transform generates a first block of video from the bitstream representation.
[0554] In some examples, the transform generates a bitstream representation from the first / second block of video.
[0555] Fig.26 2600 is a flow chart of a method 2600 for video processing. The method 2600 includes: determining (2602) a characteristic of a first block of video for conversion between a first block and a bitstream representation of the first block; performing (2604) a rounding process on a motion vector (MV) of the first block based on the characteristic of the first block; and performing (2606) the conversion by using the rounded MV.
[0556] In some examples, performing a rounding process on the MV includes rounding the MV to integer pixel precision or half-pixel precision.
[0557] In some examples, the MV is rounded to the nearest integer pixel precision MV or half-pixel precision MV.
[0558] In some examples, performing a rounding process on the MV includes rounding up, rounding down, rounding toward zero, or rounding away from zero on the MV.
[0559] In some examples, the characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of the width and the height, and a width*height dimension of the first block.
[0560] In some examples, when the size of the first block is less than and / or equal to a threshold value L, a rounding process is performed on the horizontal or / and vertical components of the MV.
[0561] In some examples, when the size of the first block is greater than and / or equal to a threshold value L, a rounding process is performed on the horizontal or / and vertical components of the MV.
[0562] In some examples, when the width of the first block is less than and / or equal to the second threshold L1, a rounding process is performed on the horizontal component of the MV, or when the height of the first block is less than and / or equal to the second threshold L1, a rounding process is performed on the vertical component of the MV.
[0563] In some examples, thresholds L and L1 are different for bidirectionally predicted blocks and unidirectionally predicted blocks.
[0564] In some examples, when the ratio between the width and the height is greater than a third threshold L3 or less than a fourth threshold L4, a rounding process is performed on the MV.
[0565] In some examples, when both the horizontal component and the vertical component of the MV are fractional, a rounding process is performed on the MV.
[0566] In some examples, the characteristic of the first block includes a prediction parameter indicating whether the first block is bi-directionally predicted or uni-directionally predicted.
[0567] In some examples, whether to perform a rounding process on the MV depends on the prediction parameters.
[0568] In some examples, the rounding process is performed on the MV only when the first block is bi-predicted.
[0569] In some examples, the characteristics of the first block include an indication of a prediction direction from list 0 or list 1 and / or an associated MV.
[0570] In some examples, whether to perform the rounding process on the MV depends on the prediction direction and / or the MV of the first block.
[0571] In some examples, when the first block is a bi-directional prediction block, whether to perform the rounding process on the MV is different for different prediction directions.
[0572] In some examples, if the MV of the prediction direction X (X is 0 or 1) has fractional components in both the horizontal and vertical directions, a rounding process is performed on the N MV components for the prediction direction X, where N is an integer in the range from 0 to 2; otherwise, the rounding process is not performed.
[0573] In some examples, if the N1 MV components have fractional precision, a rounding process is performed on M MV components among the N1 MV components, where N1 and M are integers and 0<=M<=N1.
[0574] In some examples, N1 and M are different for bi-directionally predicted blocks and uni-directionally predicted blocks.
[0575] In some examples, for a bi-directionally predicted block,
[0576] N1 is equal to 4 and M is equal to 4, or
[0577] N1 is equal to 4 and M is equal to 3, or
[0578] N1 is equal to 4 and M is equal to 2, or
[0579] N1 is equal to 4 and M is equal to 1, or
[0580] N1 is equal to 3 and M is equal to 3, or
[0581] N1 is equal to 3 and M is equal to 2, or
[0582] N1 is equal to 3 and M is equal to 1, or
[0583] N1 is equal to 2 and M is equal to 2, or
[0584] N1 is equal to 2 and M is equal to 1, or
[0585] N1 is equal to 1 and M is equal to 1.
[0586] In some examples, for a unidirectionally predicted block,
[0587] N1 is equal to 2 and M is equal to 2, or
[0588] N1 is equal to 2 and M is equal to 1, or
[0589] N1 is equal to 1 and M is equal to 1.
[0590] In some examples, N1 and M are different for different size parameters, where the size parameter includes at least one of a width, a height, a ratio of width and height, and a width*height dimension of the first block.
[0591] In some examples, K of the M MV components are rounded to integer pixel precision, and MK of the MV components are rounded to half-pixel precision, where K is an integer in the range from 0 to M-1.
[0592] In some examples, the characteristic of the first block includes a color component of the first block.
[0593] In some examples, whether to perform the rounding process on the MV is different for different color components of the first block.
[0594] In some examples, the color components include Y, Cb, and Cr.
[0595] In some examples, the characteristic of the first block includes a color format of the first block.
[0596] In some examples, whether to perform a rounding process on the MV depends on the color format of the first block.
[0597] In some examples, the color format includes 4:2:0, 4:2:2, or 4:4:4.
[0598] In some examples, whether and / or how to perform a rounding process on the MV depends on the characteristics of the block.
[0599] In some examples, one or more MV components of a 4x16 or / and 16x4 bi-directionally predicted luma block or / and a uni-directionally predicted luma block are rounded to half-pixel precision.
[0600] In some examples, one or more MV components of a 4x16 or / and 16x4 bi-directionally predicted luma block or / and a uni-directionally predicted luma block are rounded to integer pixel precision.
[0601] In some examples, one or more MV components of a 4x4 uni-predicted luma block or / and a bi-predicted luma block are rounded to integer pixel precision.
[0602] In some examples, one or more MV components of a 4x8 or / and 8x4 bi-directionally predicted luma block or / and a uni-directionally predicted luma block are rounded to integer pixel precision.
[0603] In some examples, the characteristic of the first block includes whether the first block is encoded using a sub-block based prediction method including an affine prediction mode and a sub-block based temporal motion vector prediction (SbTMVP) mode.
[0604] In some examples, if the first block is encoded in affine prediction mode, the rounding process on the MV is not applied.
[0605] In some examples, if the first block is encoded and decoded in SbTMVP mode, a rounding process for the MV is applied, and the rounding process is performed on each sub-block of the first block.
[0606] In some examples, performing a rounding process on a motion vector (MV) of the first block based on characteristics of the first block includes: determining whether at least one MV of the first block is fractional precision when a size parameter of the first block satisfies a predetermined rule; and in response to determining that at least one MV of the first block is fractional precision, performing a rounding process on the at least one MV to generate a rounded MV with integer precision.
[0607] In some examples, the bitstream representation of the first block follows a rule that depends on a size parameter of the first block, where only integer-pixel MVs are allowed for a bi-directionally predictive codec block.
[0608] In some examples, the size parameter of the first block is 4×16, 16×4, 4×8, 8×4, or 4×4.
[0609] In some examples, performing the converting by using the rounded MV includes performing motion compensation on the first block by using the rounded MV.
[0610] Fig. 27 2700 is a flow chart of a method 2700 for video processing. The method 2700 includes: determining (2702) a characteristic of a first block of video and a conversion between a bitstream representation of the first block; performing (2704) motion compensation on the first block using an MV having a first precision; and storing (2706) an MV having a second precision for the first block; wherein the first precision is different from the second precision.
[0611] In some examples, the characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of the width and the height, and a width*height dimension of the first block.
[0612] In some examples, the first precision is integer precision and the second precision is fractional precision.
[0613] Fig.28 2800 is a flow chart of a method 2800 for video processing. The method 2800 includes: determining (2802) a codec mode of a first block of video for conversion between a first block and a bitstream representation of the first block; performing (2804) a rounding process on a motion vector (MV) of the first block if the codec mode of the first block satisfies a predetermined rule; and performing (2806) motion compensation for the first block by using the rounded MV.
[0614] In some examples, the predetermined rule includes: the first block is encoded and decoded in Merge mode, non-intra mode, or non-Advanced Motion Vector Prediction (AMVP) mode.
[0615] Fig.29 2900 is a flowchart of a method 2900 for video processing. The method 2900 includes: generating (2902) a first motion vector (MV) candidate list for a first block of video for conversion between a first block and a bitstream representation of the first block; performing (2904) a rounding process on the MV of at least one candidate before adding the at least one candidate to the first MV candidate list; and performing (2906) the conversion by using the first MV candidate list.
[0616] In some examples, the first block is encoded in Merge mode, non-intra mode, or non-Advanced Motion Vector Prediction (AMVP) mode, and the MV candidate list includes a Merge candidate list and a non-Merge candidate list.
[0617] In some examples, candidates with fractional MV are excluded from the first MV candidate list.
[0618] In some examples, the at least one candidate includes: a candidate derived from a spatial domain block, a candidate derived from a temporal domain block, a candidate derived from a historical motion vector prediction (HMVP) table, or a pairwise bi-predictive Merge candidate.
[0619] In some examples, the method further includes providing a separate HMVP table to store candidates for MVs with integer precision.
[0620] In some examples, the method further includes: performing a rounding process on the MV or performing a rounding process on a candidate MV in the candidate list based on the characteristics of the first block.
[0621] In some examples, the characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of the width and the height, and a width*height dimension of the first block.
[0622] In some examples, the size parameter includes at least one of 4×16, 16×4, 4×8, 8×4, 4×4.
[0623] In some examples, the characteristics of the first block include a prediction parameter indicating whether the first block is bidirectionally predicted or unidirectionally predicted, and performing the rounding process on the MV includes: performing the rounding process on the MV only when the candidate is a bidirectionally predicted candidate or performing the rounding process on the MV of a candidate in the candidate list.
[0624] In some examples, the first block is encoded in AMVP mode and the candidate is an AMVP candidate.
[0625] In some examples, the first block is a non-affine pattern.
[0626] Fig.30 3000 is a flow chart of a method 3000 for video processing. The method 3000 includes: determining (3002) a characteristic of a first block of video for conversion between a first block and a bitstream representation of the first block; determining (3004) a constraint parameter to be applied to the first block based on the characteristic of the first block, wherein the constraint parameter constrains a maximum number of fractional motion vector (MV) components of the first block; and performing (3006) the conversion by using the constraint parameter.
[0627] In some examples, the MV components include at least one of horizontal MV components and / or vertical MV components, and the fractional MV components include at least one of half-pixel MV components, quarter-pixel MV components, and MV components with finer precision than quarter-pixel.
[0628] In some examples, the characteristic of the first block includes a prediction parameter indicating whether the first block is bi-directionally predicted or uni-directionally predicted.
[0629] In some examples, the constraint parameters are different for bidirectional prediction and unidirectional prediction.
[0630] In some examples, the constraint parameters are not applied in unidirectional prediction.
[0631] In some examples, the constraint parameters are applied when the first block is a bi-predicted 4x8, 8x4, 4x16, or 16x4 block.
[0632] In some examples, when the first block is a uni-directionally predicted 4x8, 8x4, 4x16, or 16x4 block, the constraint parameters are not applied.
[0633] In some examples, the constraint parameters are applied when the first block is a uni-predicted 4x4 block or a bi-predicted 4x4 block.
[0634] In some examples, for bi-directionally predicted blocks, the maximum number of fractional MV components is 3, 2, 1, or 0.
[0635] In some examples, for uni-directionally predicted blocks, the maximum number of fractional MV components is 1 or 0.
[0636] In some examples, for bi-directionally predicted blocks, the maximum number of quarter-pel MV components is 3, 2, 1, or 0.
[0637] In some examples, for uni-directionally predicted blocks, the maximum number of quarter-pel MV components is 1 or 0.
[0638] In some examples, the characteristic of the first block includes at least one of a shape and a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of width and height, a dimension of width*height, and a shape of the first block.
[0639] In some examples, the constraint parameters are different for different sizes or shapes of the first block.
[0640] In some examples, the characteristic of the first block includes a mode parameter indicating a codec mode of the first block.
[0641] In some examples, the encoding and decoding mode includes a triangle mode in which the current is divided into two partitions, wherein each partition has at least one MV.
[0642] In some examples, the constraint parameters are applied when the first block is a 4x16 or 16x4 block encoded in triangle mode.
[0643] Fig.31is a flow chart of a method 3100 of video processing. The method 3100 includes: obtaining (3102) an indication of signaling notification that at least one of bidirectional prediction and unidirectional prediction is not allowed when the characteristic of the block satisfies a predetermined rule; determining (3104) the characteristic of the first block for conversion between a first block of video and a bitstream representation of the first block; and performing (3106) the conversion by using the indication when the characteristic of the first block satisfies the predetermined rule.
[0644] Fig.32 is a flow chart of a method 3200 of video processing. The method 3200 includes: signaling (3202) an indication that at least one of bidirectional prediction and unidirectional prediction is not allowed when a characteristic of the block satisfies a predetermined rule; determining (3204) a characteristic of the first block for conversion between a first block of video and a bitstream representation of the first block; performing (3206) the conversion based on the characteristic of the first block, wherein during the conversion, when the characteristic of the first block satisfies the predetermined rule, at least one of bidirectional prediction and unidirectional prediction is disabled.
[0645] In some examples, the indication is signaled in a sequence parameter set / picture parameter set / sequence header / picture header / slice header / slice group header / codec tree unit (CTU) row / region / other high level syntax.
[0646] In some examples, the characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of width and height, a dimension of width*height, and a shape of the first block.
[0647] In some examples, the predetermined rule includes that the first block has a certain block size.
[0648] In some examples, the characteristic of the first block includes a mode parameter indicating a codec mode of the first block.
[0649] In some examples, the predetermined rule includes that the first block is encoded and decoded in a non-affine mode.
[0650] In some examples, when at least one of uni-directional prediction and bi-directional prediction is not allowed for the first block, signaling of an advanced motion vector resolution (AMVR) parameter for the first block is modified accordingly.
[0651] In some examples, signaling of the Advanced Motion Vector Resolution (AMVR) parameter is modified such that only integer pixel precision is allowed for the first block.
[0652] In some examples, signaling of advanced motion vector resolution (AMVR) parameters is modified so that different motion vector (MV) precisions are utilized.
[0653] In some examples, the block size of the first block is at least one of 4×16, 16×4, 4×8, 8×4, 4×4.
[0654] In some examples, the bitstream representation of the first block follows a rule that depends on a size parameter of the first block, where only integer-pixel MVs are allowed for a bi-directionally predictive codec block.
[0655] Fig.33 3300 is a flow chart of a method 3300 for video processing. The method 3300 includes: determining (3302) whether fractional motion vector (MV) or motion vector difference (MVD) precision is allowed for a first block of video and a conversion between a bitstream representation of the first block; based on the determination, signaling (3304) advanced motion vector resolution (AMVR) parameters for the first block; and performing (3306) the conversion by using the AMVR parameters.
[0656] Fig.34 is a flow chart of a method 3400 of video processing. The method 3400 includes: determining (3402) whether fractional motion vector (MV) or motion vector difference (MVD) precision is allowed for a first block of video and a conversion between a bitstream representation of the first block; based on the determination, obtaining (3404) advanced motion vector resolution (AMVR) parameters for the first block; and performing (3406) the conversion by using the AMVR parameters.
[0657] In some examples, if fractional MV or MVD precision is not allowed for the first block, the AMVR parameter indicating whether the MV / MVD precision of the current block is fractional precision is skipped and implicitly inferred to be false.
[0658] 5. Examples
[0659] In the following embodiments, PW and PH are designed for 4×16, 16×4, 4×4, 8×4, and 4×8 blocks.
[0660] Assume that the MV of the block in reference list X is MVX, and the horizontal component and vertical component of MVX are MVX[0] and MVX[1], respectively, and the integer parts of MVX[0] and MVX[1] are MVXInt[0] and MVXInt[1], respectively, where X=0 or 1. Assume that the interpolation filter tap (in motion compensation) is N (e.g., 8, 6, 4, or 2), and the current block size is W×H, and the position of the current block (i.e., the position of the upper left pixel) is (x, y). The indexes of rows and columns start from 1, for example, H rows include the 1st, ..., (H–1)th rows.
[0661] The following boundary pixel repetition process is performed only when both MVX[0] and MVX[1] are fractional.
[0662] 5.1 Example
[0663] For 4×16 and 16×4 unidirectional prediction blocks and bidirectional prediction blocks, for the prediction direction X, PW and PH are both set equal to 1. First, extract (W+N–2)*(H+N–2) reference pixels from the reference picture, where the top left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+1,MVXInt[1]+y–N / 2+1). Then, generate the (W+N-1)th column by copying the (W+N-2)th column. Finally, generate the (H+N-1)th row by copying the (H+N-2)th row.
[0664] For a 4×4 unidirectional prediction block, PW and PH are set equal to 0 and 1, respectively. First, (W+N–1)*(H+N–2) reference pixels are extracted from the reference picture, where the upper left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+1,MVXInt[1]+y–N / 2+1). Then, the (H+N-1)th row is generated by copying the (H+N-2)th row.
[0665] For 4×8 and 8×4 unidirectional prediction blocks and bidirectional prediction blocks, PW and PH are set equal to 2 and 3, respectively. First, (W+N–3)*(H+N–4) reference pixels are extracted from the reference picture, where the upper left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+2,MVXInt[1]+y–N / 2+2). Then, the 1st column is copied to its left side to obtain W+N–2 columns, after which the (W+N-1)th column is generated by copying the (W+N-2)th column. Finally, the 1st row is copied to its upper side to obtain H+N-3 rows, after which the (H+N-2)th row and the (H+N-1)th row are generated by copying the (H+N-3).
[0666] 5.2 Examples
[0667] For 4×16 and 16×4 unidirectional prediction blocks and bidirectional prediction blocks, for the prediction direction X, PW and PH are both set equal to 1. First, (W+N–2)*(H+N–2) reference pixels are extracted from the reference picture, where the upper left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+2,MVXInt[1]+y–N / 2+2). Then, column 1 is copied to its left to obtain W+N-1 columns. Finally, row 1 is copied to its upper side to obtain H+N-1 rows.
[0668] For a 4×4 unidirectional prediction block, PW and PH are set equal to 0 and 1, respectively. First, (W+N–1)*(H+N–2) reference pixels are extracted from the reference picture, where the upper left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+1,MVXInt[1]+y–N / 2+2). Then, row 1 is copied to its upper side to obtain H+N-1 rows.
[0669] For 4×8 and 8×4 unidirectional prediction blocks and bidirectional prediction blocks, PW and PH are set equal to 2 and 3, respectively. First, (W+N–3)*(H+N–4) reference pixels are extracted from the reference picture, where the upper left position of the reference pixel is identified by (MVXInt[0]+x–N / 2+2,MVXInt[1]+y–N / 2+2). Then, the 1st column is copied to its left side to obtain W+N-2 columns, after which the (W+N-1)th column is generated by copying the (W+N-2)th column. Finally, the 1st row is copied to its upper side to obtain H+N-3 rows, after which the (H+N-2)th row and the (H+N-1)th row are generated by copying the (H+N-3)th row.
[0670] It should be understood that when the shape of the compressed codec unit is significantly different from the traditional square block or half-square rectangular block, the disclosed technology can be embodied in a video encoder or decoder to improve compression efficiency. For example, new codec tools that use long or tall codec units such as 4×32 or 32×4 size units can benefit from the disclosed technology.
[0671] The disclosed and other solutions, examples, embodiments, modules and functional operations described in this document may be implemented in digital electronic circuits, or in computer software, firmware or hardware, including the structures disclosed in this document and their structural equivalents, or in a combination of one or more of them. The disclosed and other embodiments may be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium, for execution by a data processing device or for controlling the operation of the data processing device. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a material combination that implements a machine-readable propagation signal, or a combination of one or more of them. The term "data processing device" covers all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device may also include code that creates an operating environment for the computer program in question, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagation signal is an artificially generated signal, for example, a machine-generated electrical signal, an optical signal, or an electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device.
[0672] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to execute on one or more computers located at one site or distributed across multiple sites and interconnected by a communications network.
[0673] The processes and logic flows described herein may be performed by one or more programmable processors running one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, and apparatus may be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0674] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or be operably coupled to receive data from one or more mass storage devices or to transfer data to them or both. However, a computer does not require such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, for example, including semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and memory can be supplemented by or incorporated into a dedicated logic circuit.
[0675] Although this patent document contains many details, these should not be interpreted as limitations on any invention or the scope of the claimed protection, but rather as descriptions of features unique to specific embodiments of specific inventions. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable subcombination. In addition, although the above-mentioned features may be described as working in certain combinations and even initially claimed to be protected in this way, in some cases, one or more features in the combination may be deleted from the claimed combination, and the claimed combination may be directed to a subcombination or a variation of a subcombination.
[0676] Similarly, although operations are described in a particular order in the drawings, this should not be understood as requiring that the operations be performed in the particular order shown or in sequence, or that all of the operations shown be performed, in order to achieve the desired results. Furthermore, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0677] Only a few implementations and examples are described, and other implementations, enhancements, and variations may be made based on what is described and illustrated in this patent document.
Claims
1. A video processing method, comprising: obtaining a signaling indication that at least one of bidirectional prediction and unidirectional prediction is not allowed when the characteristic of the first block satisfies a predetermined rule; determining, for a first conversion between a first block of video and a bitstream representation of the first block, a characteristic of the first block; as well as When the characteristic of the first block satisfies the predetermined rule, performing the first conversion by using the indication, Wherein, when at least one of uni-directional prediction and bi-directional prediction is not allowed for the first block, signaling of an advanced motion vector resolution AMVR parameter of the first block is modified such that only integer pixel precision is allowed for the first block.
2. The method according to claim 1, wherein: The indication is signaled in a sequence parameter set / picture parameter set / sequence header / picture header / slice header / slice group header / codec tree unit CTU row / region / other high-level syntax.
3. The method according to claim 1 or 2, wherein: The characteristic of the first block includes a size parameter, wherein the size parameter includes at least one of a width, a height, a ratio of width and height, a dimension of width*height, and a shape of the first block.
4. The method according to claim 3, wherein: The predetermined rule comprises that the first block has a certain block size.
5. The method according to claim 1 or 2, wherein: The characteristic of the first block includes a mode parameter indicating a coding mode of the first block.
6. The method according to claim 5, wherein: The predetermined rule includes: the first block is encoded and decoded in a non-affine mode.
7. The method according to claim 1, wherein: The signaling of the Advanced Motion Vector Resolution (AMVR) parameters is modified so that different motion vector MV precisions are utilized.
8. The method according to claim 1 or 2, wherein: The block size of the first block is at least one of 4×16, 16×4, 4×8, 8×4, and 4×4.
9. The method according to claim 1 or 2, wherein: The bitstream representation of the first block follows a rule depending on a size parameter of the first block, wherein only integer pixels MVs are allowed for a bi-directionally predictive codec block.
10. The method according to claim 1, further comprising: determining, for a second conversion between a second block of video and a bitstream representation of the second block, whether fractional motion vector MV or motion vector difference MVD precision is allowed for the second block; obtaining advanced motion vector resolution (AMVR) parameters for the second block based on the determination of whether the fractional MV or MVD precision is allowed for the second block; as well as The second conversion is performed by using the AMVR parameters.
11. The method according to claim 10, wherein: If fractional MV or MVD precision is not allowed for the second block, the AMVR parameter indicating whether the MV / MVD precision of the current block is fractional precision is skipped and implicitly derived as false.
12. The method according to claim 1 or 2, wherein: The first conversion comprises decoding a first block of video from the bitstream representation.
13. The method according to claim 1 or 2, wherein: The first conversion includes encoding the bitstream representation from a first block of video.
14. An apparatus in a video system, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method according to any one of claims 1 to 13.
15. A non-transitory computer readable medium storing instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Motion compensation prediction method based on motion vector restraint and weighting motion vector
CN103561263A
Systems and methods for intra-block copy
CN106416245A
Methods and systems of restricting bi-prediction in video coding
CN107852498A
Method and apparatus of video coding with affine motion compensation
CN108781284A
Schemes for handling an AMVP flag when implementing intra block copy coding mode
GB201509938D0
