Bandwidth control method for inter-frame prediction
By limiting and clipping the motion vectors of affine coding and decoding blocks in video coding and decoding technology, optimizing block size and boundary pixel repetition, and disabling bidirectional prediction mode, the problem of bandwidth and resource waste in the existing technology is solved, and the coding and decoding efficiency is improved. and resource utilization.
Patent Information
- Application Number
- CN202410747688.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-24
- Filing Date
- 2019-11-12
- Publication Date
- 2024-10-29
AI Technical Summary
Among existing video coding and decoding technologies, affine prediction and other coding and decoding tools have high bandwidth and line buffer requirements, resulting in resource waste and inefficiency, especially when dealing with different block sizes and prediction modes, which are difficult to flexibly control.
By limiting the sub-block motion vectors of affine codec blocks within a specific range, clipping and constraining motion vectors, using different block sizes and boundary pixel repetition methods to reduce memory bandwidth requirements, and disabling bidirectional prediction mode under appropriate conditions, optimizing encoding Decoding tree partitioning and motion compensation process.
It effectively reduces the bandwidth and line buffer requirements of affine prediction and other encoding and decoding tools, improves resource utilization and encoding and decoding efficiency, adapts to the needs of different block sizes and prediction modes, and reduces the worst-case scenario of memory bandwidth.
Smart Images

Figure CN118870018A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is a divisional application of the invention patent application with the application date of November 12, 2019, application number 201980005110.8, and invention name “Bandwidth control method for inter-frame prediction”. Technical Field
[0003] This patent document relates to image and video encoding and decoding. Background Art
[0004] Digital video accounts for the largest bandwidth usage on the Internet and other digital communications networks. As the number of connected 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] This document discloses various video processing techniques that may be used by video encoders and decoders during encoding and decoding operations.
[0006] In one example aspect, a method of video processing is disclosed. The method includes determining that a first motion vector of a sub-block of the current block and a second motion vector that is a representative motion vector of the current block meet a size constraint for conversion between a current block of a video and a bitstream representation of the video using an affine codec tool. The method also includes performing the conversion based on the determination.
[0007] In another example aspect, a method of video processing is disclosed. The method includes: determining an affine model including six parameters for a conversion between a current block of a video and a bitstream representation of the video. The affine model inherits affine codec information of neighboring blocks of the current block. The method also includes performing the conversion based on the affine model.
[0008] In another example aspect, a method of video processing is disclosed. The method includes: for conversion between a block of video and a bitstream representation of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on the size of the block with a width of W and a height of H, where W and H are positive integers. The method also includes performing the conversion based on the determination.
[0009] In another example aspect, a method of video processing is disclosed. The method includes: for conversion between a block of video and a bitstream representation of the video, based on the size of a sub-block as a sub-codec unit of the block according to the codec tree partitioning process, determining whether the codec tree partitioning process is applicable to the block. The sub-block has a width of W and a height of H, where W and H are positive integers. The method also includes performing the conversion based on the determination.
[0010] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video and a bitstream representation of the video, determining whether an index of a bi-prediction with coding unit level weight (BCW) coding mode is derived based on a rule about the position of the current block. In the BCW coding mode, a weight set including a plurality of weights is used to generate a bi-directional prediction value for the current block. The method also includes performing the conversion based on the determination.
[0011] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video encoded and decoded using a combined inter and intra prediction (CIIP) codec technique and a bitstream representation of the video, determining an intra prediction mode of the current block independently of intra prediction modes of neighboring blocks. The CIIP codec technique uses intermediate inter prediction values and intermediate intra prediction values to derive a final prediction value for the current block. The method also includes performing the conversion based on the determination.
[0012] In another example aspect, a method for video processing is disclosed. The method includes: for a conversion between a current block of a video encoded and decoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique and a bitstream representation of the video, determining an intra-frame prediction mode of the current block according to a first intra-frame prediction mode of a first neighboring block and a second intra-frame prediction mode of a second neighboring block. The first neighboring block is encoded and decoded using an intra-frame prediction codec technique, and the second neighboring block is encoded and decoded using a CIIP codec technique. The first intra-frame prediction mode is assigned a priority different from that of the second intra-frame prediction mode. The CIIP codec technique uses an intermediate inter-frame prediction value and an intermediate intra-frame prediction value to derive a final prediction value of the current block. The method also includes performing the conversion based on the determination.
[0013] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video and a bitstream representation of the video, determining whether a combined inter-frame and intra-frame prediction (CIIP) process is applicable to a color component of the current block based on the size of the current block. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The method also includes performing the conversion based on the determination.
[0014] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video and a bitstream representation of the video, based on characteristics of the current block, determining whether to apply a combined inter-frame and intra-frame prediction (CIIP) codec technique to the current block. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The method also includes performing the conversion based on the determination.
[0015] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video and a bitstream representation of the video, based on whether the current block is encoded and decoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique, determining whether to disable a codec tool for the current block. The codec tool includes at least one of: Bi-Directional Optical Flow (BDOF), Overlapped Block Motion Compensation (OBMC), or a decoder-side motion vector refinement process (DMVR). The method also includes performing the conversion based on the determination.
[0016] In another example aspect, a method of video processing is disclosed. The method includes: for conversion between a block of a video and a bitstream representation of the video, determining a first precision P1 of a motion vector for spatial motion prediction and a second precision P2 of a motion vector for temporal motion prediction. P1 and / or P2 are fractional, and neither P1 nor P2 is signaled in the bitstream representation. The method also includes performing the conversion based on the determination.
[0017] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a block of a video and a bitstream representation of the video, determining a motion vector (MVx, MVy) with a precision of (Px, Py). Px is associated with MVx, and Py is associated with MVy. MVx and MVy are stored as integers each having N bits, and MinX≤MVx≤MaxX and MinY≤MVy≤MaxY, where MinX, MaxX, MinY, and MaxY are real numbers. The method also includes performing the conversion based on the determination.
[0018] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video and a bitstream representation of the video, determining whether a shared Merge list is applicable to the current block according to a codec mode of the current block. The method also includes performing the conversion based on the determination.
[0019] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video of size WxH and a bitstream representation of the video, determining a second block of dimensions (W+N-1)x(H+N-1) for motion compensation during the conversion. The second block is determined based on a reference block of dimensions (W+N-1-PW)x(H+N-1-PH). N represents a filter size, and W, H, N, PW, and PH are non-negative integers. PW and PH are not both equal to 0. The method also includes performing the conversion based on the determination.
[0020] In another example aspect, a method of video processing is disclosed. The method includes: for a conversion between a current block of a video of size WxH and a bitstream representation of the video, determining a second block of dimensions (W+N-1)x(H+N-1) for motion compensation during the conversion. W, H are non-negative integers, and N is a non-negative integer and based on a filter size. During the conversion, based on a motion vector refinement operation on an original motion vector, a refined motion vector is determined based on a multi-point search, and a pixel-length boundary of a reference block is determined by repeating one or more non-boundary pixels. The method also includes performing the conversion based on the determination.
[0021] In another example aspect, a method of video processing is disclosed. The method includes: for a block of a video encoded and decoded using a combined inter-intra prediction (CIIP) codec technique and a conversion of a bitstream representation of the video, determining a prediction value at a position in the block based on a weighted sum of an inter-prediction value and an intra-prediction value at the position. The weighted sum is based on adding an offset to an initial sum obtained based on the inter-prediction value and the intra-prediction value, and the offset is added before performing a right shift operation to determine the weighted sum. The method also includes performing the conversion based on the determination.
[0022] In another example aspect, a method of video processing is disclosed, the method comprising: determining a size constraint between a representative motion vector of a current video block and a motion vector of a sub-block of the current video block that is affine-coded, and performing a conversion between a bitstream representation and a pixel value of the current video block or the sub-block by using the size constraint.
[0023] In another example aspect, another method of video processing is disclosed. The method includes: determining, for a current video block that is affine-coded, one or more sub-blocks of the current video block, wherein each sub-block has a size of MxN pixels, wherein M and N are multiples of 2 or 4, making a motion vector of the sub-block conform to a size constraint, and conditionally performing a conversion between a bitstream representation and a pixel value of the current video block based on a trigger using the size constraint.
[0024] In yet another example aspect, another method of video processing is disclosed. The method includes determining that a current video block satisfies a size condition, and based on the determination, performing a conversion between a bitstream representation and pixel values of the current video block by excluding a bidirectional predictive coding mode of the current video block.
[0025] In yet another example aspect, another method of video processing is disclosed. The method includes: determining that a current video block satisfies a size condition, and performing conversion between a bitstream representation and pixel values of the current video block based on the determination, wherein an inter-frame prediction mode is signaled in the bitstream representation according to the size condition.
[0026] In another example aspect, another method of video processing is disclosed, which includes: determining that a current video block satisfies a size condition, and performing a conversion between a bitstream representation and a pixel value of the current video block based on the determination, wherein generation of a Merge candidate list during the conversion depends on the size condition.
[0027] In yet another example aspect, another method of video processing is disclosed, the method comprising: determining that a sub-codec unit of a current video block satisfies a size condition, and performing conversion between a bitstream representation and pixel values of the current video block based on the determination, wherein a codec tree partitioning process for generating the sub-codec unit depends on the size condition.
[0028] In yet another example aspect, another method of video processing is disclosed, the method comprising: determining a weight index for a generalized bi-prediction (GBi) process for the current video block based on a position of the current video block, and performing a conversion between the current video block and its bitstream representation using the weight index to implement the GBi process.
[0029] In yet another example aspect, another method of video processing is disclosed, the method comprising: determining that a current video block is coded as an intra-inter prediction (IIP) codec block, and performing conversion between the current video block and its bitstream representation using a simplified rule for determining an intra prediction mode or a most probable mode (MPM) of the current video block.
[0030] In yet another example aspect, another method of video processing is disclosed. The method includes determining that a current video block satisfies a simplification criterion, and performing the conversion between the current video block and a bitstream representation by disabling use of an inter-intra prediction mode for the conversion or by disabling additional codec tools for the conversion.
[0031] In yet another example aspect, another method of video processing is disclosed. The method includes: performing conversion between a current video block and a bitstream representation of the current video block using a motion vector-based encoding process, wherein (a) during the conversion process, precision P1 is used to store spatial motion prediction results and precision P2 is used to store temporal motion prediction results, where P1 and P2 are fractional, or (b) precision Px is used to store x motion vectors and precision Py is used to store y motion vectors, where Px and Py are fractional.
[0032] In yet another example aspect, another method of video processing is disclosed. The method includes: extracting a (W2+N–1–PW)*(H2+N–1–PH) block, pixel padding the extracted block, performing boundary pixel repetition on the pixel-padded block, and obtaining pixel values of a small sub-block of size W1xH1, interpolating the small sub-block in a large sub-block of size W2xH2 of a current video block, wherein W1, W2, H1, H2, PW, and PH are integers, and performing conversion between a current video block and a bitstream representation of the current video block using the interpolated pixel values of the small sub-block.
[0033] In another example aspect, another method of video processing is disclosed. The method includes: during conversion between a current video block of dimension WxH and a bitstream representation of the current video block, performing a motion compensation operation by extracting (W+N–1–PW)*(W+N–1–PH) reference pixels during the motion compensation operation and padding reference pixels outside the extracted reference pixels, and performing conversion between the current video block and the bitstream representation of the current video block using a result of the motion compensation operation, wherein W, H, N, PW, and PH are integers.
[0034] In yet another example aspect, another method of video processing is disclosed. The method includes: determining that bidirectional prediction or unidirectional prediction of the current video block is not allowed based on the size of the current video block, and based on the determination, performing conversion between a bitstream representation and a pixel value of the current video block by disabling the bidirectional prediction or unidirectional prediction mode.
[0035] In yet another example aspect, another method of video processing is disclosed. The method includes: determining that bidirectional prediction or unidirectional prediction of the current video block is not allowed based on the size of the current video block, and based on the determination, performing conversion between a bitstream representation and a pixel value of the current video block by disabling the bidirectional prediction or unidirectional prediction mode.
[0036] In yet another example aspect, a video encoder apparatus is disclosed. The video encoder includes a processor configured to implement the above method.
[0037] In yet another example aspect, a video encoder apparatus is disclosed. The video encoder includes a processor configured to implement the above method.
[0038] In yet another example aspect, a computer readable medium having code stored thereon is disclosed. The code is in the form of processor executable code embodying one of the methods described herein.
[0039] These and other features are described throughout this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An example of sub-block based prediction is shown.
[0041] Figure 2A A 4-parameter affine model is shown.
[0042] Figure 2B A 6-parameter affine model is shown.
[0043] Figure 3 An example of the affine motion vector field for each sub-block is shown.
[0044] Figure 4A An example of an AF_MERGE candidate is shown.
[0045] Figure 4B Another example of an AF_MERGE candidate is shown.
[0046] Figure 5 Shows candidate positions for the affine merge mode.
[0047] Figure 6 An example of constrained sub-block motion vectors for a coding unit (CU) in affine mode is shown.
[0048] Fig. 7A An example of splitting a CU into 135 degree portions of two triangular prediction units is shown.
[0049] Figure 7B An example of a 45-degree partitioning pattern that partitions a CU into two triangular prediction units is shown.
[0050] Figure 8 An example of the positions of neighboring blocks is shown.
[0051] Fig. 9 An example of repeated boundary pixels of a reference block before interpolation is shown.
[0052] Fig.10An example of a Coding Tree Unit (CTU) and a CTU (region) line is shown. A shaded CTU (region) is on one CTU (region) line and an unshaded CTU (region) is on another CTU (region) line.
[0053] Fig.11 is a block diagram of an example of a hardware platform for implementing the video decoder or video encoder apparatus described herein.
[0054] Fig.12 is a flow chart of an example method of video processing.
[0055] Fig.13 An example of a motion vector difference MVD(0,1) mirrored between list 0 and list 1 in DMVR is shown.
[0056] Fig.14 Example MVs that may be checked in one iteration are shown.
[0057] Fig.15 The required reference samples and boundaries filled in for calculation are shown.
[0058] Fig.16 is a block diagram of an example video processing system in which the disclosed technology may be implemented.
[0059] Fig.17 is a flowchart representation of a method for video processing according to the present disclosure.
[0060] Fig.18 is a flowchart representation of another method for video processing according to the present disclosure.
[0061] Fig.19 is a flowchart representation of another method for video processing according to the present disclosure.
[0062] Fig. 20 is a flowchart representation of another method for video processing according to the present disclosure.
[0063] Fig.21 is a flowchart representation of another method for video processing according to the present disclosure.
[0064] Fig. 22 is a flowchart representation of another method for video processing according to the present disclosure.
[0065] Fig.23 is a flowchart representation of another method for video processing according to the present disclosure.
[0066] Fig.24 is a flowchart representation of another method for video processing according to the present disclosure.
[0067] Fig.25 is a flowchart representation of another method for video processing according to the present disclosure.
[0068] Fig.26 is a flowchart representation of another method for video processing according to the present disclosure.
[0069] Fig. 27 is a flowchart representation of another method for video processing according to the present disclosure.
[0070] Fig.28 is a flowchart representation of another method for video processing according to the present disclosure.
[0071] Fig.29 is a flowchart representation of another method for video processing according to the present disclosure.
[0072] Fig.30 is a flowchart representation of another method for video processing according to the present disclosure.
[0073] Fig.31 is a flowchart representation of another method for video processing according to the present disclosure.
[0074] Fig.32 is a flowchart representation of yet another method for video processing according to the present disclosure. DETAILED DESCRIPTION
[0075] Section headings are used in this document to facilitate understanding and do not limit the applicability of the techniques and embodiments disclosed in each section to only that section.
[0076] 1. Summary
[0077] This patent document relates to video / image codec technology. Specifically, it relates to reducing the bandwidth and line buffer of several codec tools in video / image codec. It can be applied to existing video codec standards (such as HEVC) or standards to be finalized (multi-function video codec). It can also be applied to future video / image codec standards or video / image codecs.
[0078] 2. Background
[0079] 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 Visual, and the two organizations jointly produced the H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Coding (AVC) and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that utilizes temporal prediction plus transform codecs. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and put them into reference software named the Joint Exploration Model (JEM). In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to work on the VVC standard with the goal of a 50% bitrate reduction compared to HEVC.
[0080] 2.1 Inter-frame prediction of HEVC / VVC
[0081] Interpolation Filter
[0082] In HEVC, luma subsamples are generated by an 8-tap interpolation filter, and chroma subsamples are generated by a 4-tap interpolation filter.
[0083] The filters are separable in two dimensions. Samples are filtered horizontally and then vertically.
[0084] 2.2 Sub-block-based prediction techniques
[0085] Sub-block based prediction was first introduced into the video codec standard by HEVC Annex I (3D-HEVC). With sub-block based prediction, a block such as a coding unit (CU) or a prediction unit (PU) is divided into several non-overlapping sub-blocks. Different sub-blocks can be assigned different motion information, such as reference index or motion vector (MV), and motion compensation (MC) is performed separately for each sub-block. Figure 1 The concept of sub-block based prediction is demonstrated.
[0086] To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and put them into reference software named Joint Exploration Model (JEM).
[0087] In JEM, sub-block-based prediction is used for a variety of codec tools, such as affine prediction, alternative temporal motion vector prediction (ATMVP), spatial-temporal motion vector prediction (STMVP), bidirectional optical flow (BIO) and frame rate up conversion (FRUC). Affine prediction is also adopted in VVC.
[0088] 2.3 Affine Prediction
[0089] In HEVC, only the translational motion model is used for motion compensation prediction (MCP). In the real world, there are many kinds of motion, such as zooming in / out, rotation, perspective motion, and other irregular motions. In VVC, a simplified affine transformation motion compensation prediction is applied. Figure 2A and Figure 2B As shown, the affine motion field of a block is described by two (in the 4-parameter affine model) or three (in the 6-parameter affine model) control point motion vectors.
[0090] The motion vector field (MVF) of the block is described by the following equations using a 4-parameter affine model in equation (1) (where the 4 parameters are defined as variables a, b, e, and f) and a 6-parameter affine model in equation (2) (where the 4 parameters are defined as variables a, b, c, d, e, and f):
[0091]
[0092] Among them, (mv h 0,mv h 0) is the motion vector of the upper left control point (Control Point, CP), (mv h 1,mv h 1) is the motion vector of the upper right control point, and (mv h 2,mv h2) is the motion vector of the lower left control point. All three motion vectors are called control point motion vectors (CPMV). (x, y) represents the coordinates of the representative point relative to the upper left sample point in the current block. The CP motion vector can be signaled (like in affine AMVP mode) or derived on the fly (like in affine Merge mode). w and h are the width and height of the current block. In practice, the division is implemented by right shift and rounding operations. In VTM, the representative point is defined as the center position of the sub-block. For example, when the coordinates of the upper left corner of the sub-block relative to the upper left sample point in the current block are (xs, ys), the coordinates of the representative point are defined as (xs+2, ys+2).
[0093] In the divide-free design, equations (1) and (2) are implemented as:
[0094]
[0095] For the 4-parameter affine model shown in (1):
[0096]
[0097] For the 6-parameter affine model shown in (2):
[0098]
[0099] final,
[0100]
[0101] Off=1<<(S-1)
[0102] Wherein, S represents the calculation precision. For example, in VVC, S=7. In VVC, the MV for the subblock with the upper left sample at (xs, ys) in MC is calculated by equation (6), where x=xs+2 and y=ys+2.
[0103] To derive the motion vector for each 4×4 sub-block, Figure 3 As shown, the motion vector of the center sample of each sub-block is calculated according to equation (1) or (2) and rounded to fractional precision of 1 / 16. Then, a motion compensated interpolation filter is applied to generate a prediction of each sub-block using the derived motion vector.
[0104] The affine model can be inherited from spatially adjacent affine codec blocks (such as left, top, top-right, bottom-left, and top-left neighboring blocks), as Figure 4A For example, if you are encoding and decoding in affine mode Figure 4A The lower left block A in the neighborhood is Figure 4BIf A0 is represented in , the control point (CP) motion vector mv0 of the upper left corner, upper right corner and lower left corner of the neighboring CU / PU containing block A is extracted N 、mv1 N and mv2 N . And based on mv0 N 、mv1 N and mv2 N Calculate the motion vector mv0 of the upper left corner / upper right side / lower left side of the current CU / PU C 、mv1 C and mv2 C (Only for 6-parameter affine model). It should be noted that in VTM-2.0, if the current block is affine coded, the sub-block (e.g., 4×4 block in VTM) LT stores mv0 and RT stores mv1. If the current block is coded with 6-parameter affine model, LB stores mv2; otherwise (with 4-parameter affine model), LB stores mv2'. Other sub-blocks store MV for MC.
[0105] It should be noted that when the CU is encoded and decoded in affine Merge mode (for example, in AF_MERGE mode), it obtains the first block encoded and decoded in affine mode from the valid neighboring reconstructed block. And the selection order of the candidate blocks is from the left, top, top right, bottom left to top left, such as Figure 4A shown.
[0106] In affine Merge mode, the derived CP MV mv0 of the current block can be C 、mv1 C and mv2 C Used as CP MV. Or they can be used as MVP of affine inter mode in VVC. It should be noted that for Merge mode, if the current block is encoded and decoded in affine mode, after deriving the CP MV of the current block, the current block can be further divided into multiple sub-blocks, and each block will derive its motion information based on the derived CP MV of the current block.
[0107] 2.4 Example Embodiment in JVET
[0108] Unlike VTM where only one affine spatial neighboring block can be used to derive the affine motion of a block. In some embodiments, a separate affine candidate list is constructed for AF_MERGE mode.
[0109] 1) Insert the inherited affine candidate into the candidate list
[0110] Inherited affine candidates are candidates derived from valid neighborhood reconstructed blocks encoded and decoded using affine mode. Figure 5As shown, the scanning order of candidate blocks is A1, B1, B0, A0 and B2. When a block (for example A1) is selected, a two-step process is applied:
[0111] 1.a First, two / three control points of the current block are derived using the three angular motion vectors of the CU covering the block.
[0112] 1.b The sub-block motion of each sub-block within the current block is derived based on the control points of the current block.
[0113] 2) Insert the constructed affine candidate
[0114] If the number of candidates in the affine Merge candidate list is less than MaxNumAffineCand, the constructed affine candidate is inserted into the candidate list.
[0115] Constructed affine candidates means that the candidates are constructed by combining the neighborhood motion information of each control point.
[0116] The motion information of the control point is first obtained from Figure 5 CPk (k = 1, 2, 3, 4) represents the kth control point. A0, A1, A2, B0, B1, B2 and B3 are the spatial locations used to predict CPk (k = 1, 2, 3); T is the temporal location used to predict CP4.
[0117] The coordinates of CP1, CP2, CP3 and CP4 are (0,0), (W,0), (H,0) and (W,H), respectively, where W and H are the width and height of the current block.
[0118] The motion information for each control point is obtained according to the following priority order:
[0119] 2.a For CP1, the priority of checking is B2 → B3 → A2. If B2 is available, use B2. Otherwise, if B2 is available, use B3. If neither B2 nor B3 is available, use A2. If all three candidates are unavailable, the motion information of CP1 cannot be obtained.
[0120] 2.b For CP2, check the priority from B1 to B0;
[0121] 2.c For CP3, check the priority from A1 to A0;
[0122] 2.d For CP4, use T.
[0123] Second, a combination of control points is used to construct a motion model.
[0124] The motion vectors of three control points are required to calculate the transformation parameters in the 6-parameter affine model. The three control points can be selected from one of the following four combinations ({CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}). For example, the 6-parameter affine motion model is constructed using the CP1, CP2, and CP3 control points, denoted as Affine(CP1, CP2, CP3).
[0125] The motion vectors of two control points are required to calculate the transformation parameters in the 4-parameter affine model. The two control points can be selected from one of the following six combinations ({CP1, CP4}, {CP2, CP3}, {CP1, CP2}, {CP2, CP4}, {CP1, CP3}, {CP3, CP4}). For example, the 4-parameter affine motion model is constructed using the CP1 and CP2 control points, denoted as Affine(CP1, CP2).
[0126] The combinations of constructed affine candidates are inserted into the candidate list in the following order: {CP1,CP2,CP3}, {CP1,CP2,CP4}, {CP1,CP3,CP4}, {CP2,CP3,CP4}, {CP1,CP2}, {CP1,CP3}, {CP2,CP3}, {CP1,CP4}, {CP2,CP4}, {CP3,CP4}
[0127] 3) Insert zero motion vector
[0128] If the number of candidates in the affine merge candidate list is less than MaxNumAffineCand, zero motion vectors are inserted into the candidate list until the list is full.
[0129] 2.5 Affine Merge Candidate List
[0130] 2.5.1 Affine Merge Mode
[0131] In the Affine Merge mode of VTM-2.0.1, only the first available affine neighborhood can be used to derive motion information for the Affine Merge mode. In JVET-L0366, the candidate list for the Affine Merge mode is constructed by searching for valid affine neighborhoods and combining the neighborhood motion information for each control point.
[0132] The affine merge candidate list is constructed as follows:
[0133] 1) Insert inherited affine candidates
[0134] The inherited affine candidate means that the candidate is derived from the affine motion model of its valid neighboring affine codec blocks. In a common basis, such as Figure 5 As shown, the scanning order of candidate positions is: A1, B1, B0, A0 and B2.
[0135] After deriving a candidate, a complete pruning process is performed to check if the same candidate has been inserted into the list. If there is an identical candidate, the derived candidate is discarded.
[0136] 2) Insert the constructed affine candidate
[0137] If the number of candidates in the affine Merge candidate list is less than MaxNumAffineCand (set to 5 in this contribution), the constructed affine candidate is inserted into the candidate list. The constructed affine candidate means that the candidate is constructed by combining the neighborhood motion information of each control point.
[0138] The motion information of the control point is first derived from the specified spatial and temporal neighborhoods. CPk (k = 1, 2, 3, 4) represents the kth control point. A0, A1, A2, B0, B1, B2 and B3 are the spatial locations used to predict CPk (k = 1, 2, 3); T is the temporal location used to predict CP4.
[0139] The coordinates of CP1, CP2, CP3 and CP4 are (0,0), (W,0), (H,0) and (W,H), respectively, where W and H are the width and height of the current block.
[0140] The motion information for each control point is obtained according to the following priority order:
[0141] For CP1, the priority of checking is B2 → B3 → A2. If B2 is available, use B2. Otherwise, if B2 is available, use B3. If neither B2 nor B3 is available, use A2. If all three candidates are unavailable, the motion information of CP1 cannot be obtained.
[0142] For CP2, the inspection priority is B1→B0;
[0143] For CP3, the inspection priority is A1→A0;
[0144] For CP4, use T.
[0145] Second, affine merge candidates are constructed using combinations of control points.
[0146] The motion information of three control points is required to construct a 6-parameter affine candidate. The three control points can be selected from one of the following four combinations ({CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}). The combination {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4} will be converted into a 6-parameter motion model represented by the top left, top right and bottom left control points.
[0147] The motion information of two control points is required to construct a 4-parameter affine candidate. The two control points can be selected from one of the following six combinations ({CP1,CP4}, {CP2,CP3}, {CP1,CP2}, {CP2,CP4}, {CP1,CP3}, {CP3,CP4}). The combination {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, {CP3,CP4} will be converted into a 4-parameter motion model represented by the top left and top right control points.
[0148] The combinations of constructed affine candidates are inserted into the candidate list in the following order:
[0149] {CP1,CP2,CP3}, {CP1,CP2,CP4}, {CP1,CP3,CP4}, {CP2,CP3,CP4}, {CP1,CP2}, {CP1,CP3}, {CP2,CP3}, {CP1,CP4}, {CP2,CP4}, {CP3,CP4}
[0150] For a combined reference list X (X is 0 or 1), the reference index with the highest usage in the control point is selected as the reference index of list X, and the motion vectors pointing to different reference pictures will be scaled.
[0151] After deriving a candidate, a complete pruning process is performed to check if the same candidate has been inserted into the list. If there is an identical candidate, the derived candidate is discarded.
[0152] 3) Fill with zero motion vectors
[0153] If the number of candidates in the affine merge candidate list is less than 5, a zero motion vector with a zero reference index is inserted into the candidate list until the list is full.
[0154] 2.5.2 Example Affine Merge Mode
[0155] In some embodiments, the affine merge mode can be simplified as follows:
[0156] 1) The pruning process of inherited affine candidates is simplified by comparing codec units covering neighboring positions instead of comparing affine candidates derived in VTM-2.0.1. Up to 2 inherited affine candidates are inserted into the affine merge list. The pruning process of constructed affine candidates is completely removed.
[0157] 2) Remove the MV scaling operation in the constructed affine candidates. If the reference index of the control points is different, the constructed motion model is discarded.
[0158] 3) The number of constructed affine candidates is reduced from 10 to 6.
[0159] 4) In some embodiments, other Merge candidates using sub-block prediction such as ATMVP are also put into the affine Merge candidate list. In this case, the affine Merge candidate list can be renamed with some other names such as sub-block Merge candidate list.
[0160] 2.6 Example of control point MV offset in affine merge mode
[0161] Generate new affine Merge candidates based on the CPMV offset of the first affine Merge candidate. If the first affine Merge candidate enables the 4-parameter affine model, 2 CPMVs are derived for each new affine Merge candidate by offsetting the 2 CPMVs of the first affine Merge candidate; otherwise (the 6-parameter affine model is enabled), 3 CPMVs are derived for each new affine Merge candidate by offsetting the 3 CPMVs of the first affine Merge candidate. In unidirectional prediction, the CPMV offset is applied to the CPMV of the first candidate. In bidirectional prediction with list 0 and list 1 in the same direction, the CPMV offset is applied to the first candidate as follows:
[0162] MV new(L0),i =MV old(L0) +MV offset(i) Equation (8)
[0163] MV new(L1),i =MV old(L1) +MV offset(i) Equation (9)
[0164] In bidirectional prediction with list 0 and list 1 in opposite directions, the CPMV offset is applied to the first candidate as follows:
[0165] MV new(L0),i =MV old(L0) +MV offset(i) Equation (10)
[0166] MV new(L1),i =MVold(L1) -MV offset(i) Equation (11)
[0167] Various offset directions with different offset magnitudes can be used to generate new affine merge candidates. Two implementations have been tested:
[0168] (1) Generate 16 new affine merge candidates with 8 different offset directions and 2 different offset magnitudes, as shown in the following offset set:
[0169] Offset set = {(4,0),(0,4),(-4,0),(0,-4),(-4,-4),(4,-4),(4,4),(-4,4),(8,0),(0,8),(-8,0),(0,-8),(-8,-8),(8,-8),(8,8),(-8,8)}.
[0170] For this design, the affine merge list increases to 20. The number of potential affine merge candidates is 31 in total.
[0171] (2) Generate 4 new affine merge candidates with 4 different offset directions and 1 offset magnitude, as shown in the following offset set:
[0172] Offset set = {(4,0),(0,4),(-4,0),(0,-4)}.
[0173] The affine merge list remains at 5 as in VTM2.0.1. Remove the affine merge candidates constructed in the four time domains to keep the number of potential affine merge candidates unchanged, for example, 15 in total. Assume that the coordinates of CPMV1, CPMV2, CPMV3, and CPMV4 are (0, 0), (W, 0), (H, 0), and (W, H). Note that CPMV4 is derived from Figure 6 The removed candidates are the following four time-domain related constructed affine merge candidates: {CP2, CP3, CP4}, {CP1, CP4}, {CP2, CP4}, {CP3, CP4}.
[0174] 2.7 Bandwidth Issues in Affine Motion Compensation
[0175] Since the current block is divided into 4×4 sub-blocks for the luma component and 2×2 sub-blocks for the two chroma components for motion compensation, the total bandwidth requirement is much higher than that of non-sub-block inter prediction. To address the bandwidth issue, several methods have been proposed.
[0176] 2.7.1 Example 1
[0177] A 4x4 block is used as a sub-block size of a CU of uni-predictive affine coding and decoding, while an 8x4 / 4x8 block is used as a sub-block size of a CU of bi-predictive affine coding and decoding.
[0178] 2.7.2 Example 2
[0179] For affine mode, the sub-block motion vectors of the affine CU are constrained to be within a predefined motion vector field. Assume that the motion vector of the first (upper left) sub-block is (v 0x ,v 0y ), and the second sub-block is (v ix ,v iy ), v ix and v iy The values of exhibit the following constraints:
[0180] v ix ∈[v 0x -H,v 0x +H] Equation (12)
[0181] v iy ∈[v 0y -V,v 0y +V] Equation (13)
[0182] If the motion vector of any sub-block exceeds the predefined motion vector field, the motion vector is clipped. Figure 6 An illustration of the idea of constrained sub-block motion vectors is given.
[0183] Assuming that memory is retrieved per CU rather than per subblock, the values of H and V are chosen such that the memory bandwidth of an affine CU does not exceed the memory bandwidth of a normal inter MC for 8×8 bi-predicted blocks in the worst case. Note that the values of H and V adapt to the size of the CU and to uni- or bi-prediction.
[0184] 2.7.3 Example 3
[0185] To reduce the memory bandwidth requirement in affine prediction, each 8x8 block within the block is treated as a basic unit. The MVs of all four 4x4 sub-blocks within the 8x8 block are constrained so that the maximum difference between the integer parts of the four 4x4 sub-block MVs does not exceed 1 pixel. Therefore, the bandwidth is (8+7+1)*(8+7+1) / (8*8)=4 samples / pixel.
[0186] In some cases, after calculating the MVs of all sub-blocks inside the current block with the affine model, the MVs of the sub-blocks containing the control points are first replaced with the corresponding control point MVs. This means that the MVs of the upper left, upper right, and lower left sub-blocks are replaced by the upper left, upper right, and lower left control point MVs, respectively. Then, for each 8x8 block in the current block, the MVs of all four 4x4 sub-blocks are clipped to ensure that the maximum difference between the integer parts of the four MVs does not exceed 1 pixel. It should be noted here that the sub-blocks containing the control points (upper left, upper right, and lower left sub-blocks) use the corresponding control point MVs to participate in the MV clipping process. During the clipping process, the MV of the upper right control point remains unchanged.
[0187] The pruning process applied to each 8x8 block is described as follows:
[0188] 1. First, determine the maximum and minimum values MVminx, MVminy, MVmaxx, and MVmaxy of the MV components for each 8x8 block as follows:
[0189] a) Get the minimum MV component among the four 4x4 sub-block MVs
[0190] MVminx=min(MVx0,MVx1,MVx2,MVx3)
[0191] MVminy=min(MVy0,MVy1,MVy2,MVy3)
[0192] b) Use the integer part of MVminx and MVminy as the minimum MV component
[0193] MVminx=MVminx>>MV_precision< <MV_precision
[0194] MVminy=MVminy>>MV_precision< <MV_precision
[0195] c) The maximum MV component is calculated as follows:
[0196] MVmaxx=MVminx+(2< <MV_precision)–1
[0197] MVmaxy=MVminy+(2< <MV_precision)–1
[0198] d) If the upper right control point is in the current 8x8 block
[0199] If (MV1x>MVmaxx)
[0200] MVminx=(MV1x>>MV_precision< <MV_precision)–(1<<MV_precision)
[0201] MVmaxx=MVminx+(2< <MV_precision)–1
[0202] If (MV1y>MVmaxy)
[0203] MVminy=(MV1y>>MV_precision< <MV_precision)–(1<<MV_precision)
[0204] MVmaxy=MVminy+(2< <MV_precision)–1
[0205] 2. The MV components of each 4x4 block within the 8x8 block are cropped as follows:
[0206] MVxi=max(MVminx,min(MVmaxx,MVxi))
[0207] MVyi=max(MVminy,min(MVmaxy,MVyi))
[0208] Where (MVxi, MVyi) is the MV of the i-th sub-block within an 8x8 block, where i is 0, 1, 2, 3; (MV1x, MV1y) is the MV of the upper right control point; MV_precision is equal to 4, corresponding to a motion vector fractional accuracy of 1 / 16. Since the difference between the integer parts of MVminx and MVmaxx (MVminy and MVmaxy) is 1 pixel, the maximum difference between the integer parts of the four 4x4 sub-block MVs does not exceed 1 pixel.
[0209] In some embodiments, a similar approach may also be used to handle planar mode.
[0210] 2.7.4 Example 4
[0211] In some embodiments, restrictions on affine modes for worst case bandwidth reduction. To ensure that the worst case bandwidth of an affine block is no worse than an INTER_4x8 / INTER_8x4 block or even an INTER_9x9 block, the motion vector differences between the affine control points are used to decide whether the sub-block size of the affine block is 4x4 or 8x8.
[0212] General affine limit for worst-case bandwidth reduction
[0213] The memory bandwidth reduction of the affine mode is controlled by limiting the motion vector differences between the affine control points (also called control point differences). In general, if the control point differences satisfy the following restrictions, the affine motion uses 4x4 sub-blocks (i.e., 4x4 affine mode). Otherwise, it uses 8x8 sub-blocks (8x8 affine mode). The restrictions for the 6-parameter and 4-parameter models are given below.
[0214] To derive the constraints for different block sizes (wxh), the motion vector differences of the control points are normalized as:
[0215]
[0216] Norm(v 2x -v 0x )=(v 2x -v 0x )*128 / h Equation (14)
[0217] In the 4-parameter affine model, (v 2x -v 0x ) and (v 2y -v 0y ) is set as follows:
[0218] (v 2x -v 0x )=-(v 1y -v 0y )
[0219] (v 2y -v 0y )=-(v 1x -v 0x ) Equation (15)
[0220] Therefore, (v 2x -v 0x ) and (v 2y -v 0y ) is given as follows:
[0221] Norm(v 2x -v 0x )=-Norm(v 1y -x 0y )
[0222] Norm(v 2y -v 0y )=Norm(v 1x -v 0x ) Equation (16)
[0223] Guaranteed worst-case bandwidth meets the limits of INTER_4x8 or INTER_8x4:
[0224] |Norm(v 1x -v 0x )+Norm(v 2x -v 0x )+128|+
[0225] |Norm(v 1y -v 0y )+Norm(v 2y -v 0y )+128|+
[0226] |Norm(v 1x -v 0x )-Norm(v 2x -v 0x )|+
[0227] |Norw(v 1y -v 0y )-Norm(v 2y -v 0y )|
[0228] <128*3.25 Equation (17)
[0229] where the left hand side of equation (18) represents the contraction or stride level of the sub-affine block, and (3.25) represents a 3.25 pixel shift.
[0230] Guaranteed worst case bandwidth reaches INTER_9x9 limit
[0231] (4*Norm(v 1x -v 0x )>-4*pel&&+4*Norm(v 1x -v 0x ) <pel)&&
[0232] (4*Norm(v 1y -v 0y )>-pel&&4*Norm(v 1y -v 0y ) <pel)&&
[0233] (4*Norm(v 2x -v 0x )>-pel&&4*Norm(v 2x -v 0x ) <pel)&&
[0234] (4*Norm(v 2y -v 0y )>-4*pel&&4*Norm(v 2y -v 0y)<pel)&&
[0235] ((4*Norm(v 1x -v 0x )+4*Norm(v 2x -v 0x )>-4*pel)&&
[0236] (4*Norm(v 1x -v 0x )+4*Norm(v 2x -v 0x )<pel))&&
[0237] ((4*Norm(v 1y -v 0y )+4*Norm(v 2y -v 0y )>-4*pel)&&
[0238] (4*Norm(v 1y -v 0y )+4*Norm(v 2y -v 0y )<pel)) Equation (18)
[0239] where pel = 128 * 16 (128 and 16 represent the normalization factor and the motion vector precision respectively).
[0240] 2.8 Generalized Bi - directional Prediction Improvement
[0241] Some embodiments improve the gain - complexity trade - off of GBi and are adopted in BMS2.1. GBi is also known as Bi - directional Prediction with CU - level Weights (BCW). BMS2.1 GBi applies unequal weights to the predicted values from L0 and L1 in the bi - directional prediction mode. In the inter - frame prediction mode, multiple weight pairs including the equal weight pair (1 / 2, 1 / 2) are evaluated based on rate - distortion optimization (RDO), and the GBi index of the selected weight pair is signaled to the decoder. In the Merge mode, the GBi index is inherited from neighboring CUs. In BMS2.1 GBi, the predicted value generation in the bi - directional prediction mode is as shown in Equation (19).
[0242] P GBi =(w0*P L0 +w1*P L1 +RoundingOffset GBi )>>shiftNum GBi , Equation (19)
[0243] Where P GBi is the final prediction value of GBi. w0 and w1 are the selected GBi weight pairs and are applied to the prediction values of list 0 (L0) and list 1 (L1) respectively. RoundingOffset GBi and shiftNum GBi Used to normalize the final prediction value in GBi. The supported w1 weight sets are {-1 / 4, 3 / 8, 1 / 2, 5 / 8, 5 / 4}, where the five weights correspond to one equal weight pair and four unequal weight pairs. The hybrid gain, i.e. the sum of w1 and w0, is fixed to 1.0. Therefore, the corresponding w0 weight set is {5 / 4, 5 / 8, 1 / 2, 3 / 8, -1 / 4}. The weight pairs are selected at the CU level.
[0244] For non-low-latency images, the weight set size is reduced from five to three, where the w1 weight set is {3 / 8, 1 / 2, 5 / 8} and the w0 weight set is {5 / 8, 1 / 2, 3 / 8}. The weight set size reduction for non-low-latency images applies to the BMS2.1 GBi and all GBi tests in this contribution.
[0245] In some embodiments, the following modifications are applied based on the existing GBi design in BMS2.1 to further improve the GBi performance.
[0246] 2.8.1GBi encoder bug fix
[0247] In order to reduce GBi encoding time, in the current encoder design, the encoder will store the unidirectional prediction motion vectors estimated from GBi weights equal to 4 / 8 and reuse them for unidirectional prediction searches for other GBi weights. This fast encoding method is applied to both translational motion models and affine motion models. In VTM2.0, a 6-parameter affine model and a 4-parameter affine model are adopted. When the GBi weight is equal to 4 / 8, the BMS2.1 encoder does not distinguish between the 4-parameter affine model and the 6-parameter affine model when storing the unidirectional prediction affine MV. Therefore, after encoding with GBi weight 4 / 8, the 4-parameter affine MV may be overwritten by the 6-parameter affine MV. For other GBi weights, the stored 6-parameter affine MV can be used for the 4-parameter affine ME, or the stored 4-parameter affine MV can be used for the 6-parameter affine ME. The proposed GBi encoder error repair is to separate the 4-parameter and 6-parameter affine MV storage. When GBi weight is equal to 4 / 8, the encoder stores those affine MVs based on the affine model type, and for other GBi weights, reuses the corresponding affine MVs based on the affine model type.
[0248] 2.8.2GBi CU size constraints
[0249] In this method, GBi is disabled for small CUs. In inter prediction mode, if bidirectional prediction is used and the CU area is less than 128 luma samples, GBi is disabled without any signaling.
[0250] 2.8.3 Using GBi's Merge Mode
[0251] In Merge mode, the GBi index is not signaled. Instead, it is inherited from the neighboring block it is merged into. When a TMVP candidate is selected, GBi is turned off in that block.
[0252] 2.8.4 Affine prediction using GBi
[0253] GBi can be used when the current block is coded with affine prediction. For affine inter mode, the GBi index is signaled. For affine merge mode, the GBi index is inherited from the neighboring block it is merged into. If the constructed affine model is selected, GBi is turned off in this block.
[0254] 2.9 Example Inter-Intra Prediction Mode (IIP)
[0255] With the inter-intra prediction mode (also known as combined inter and intra prediction (CIIP)), multi-hypothesis prediction combines an intra prediction and a Merge index prediction. Such a block is treated as a special inter-coded block. In a Merge CU, a flag is signaled to the Merge mode when the flag is true to select the intra mode from the intra candidate list. For the luma component, the intra candidate list is derived from 4 intra prediction modes including DC mode, planar mode, horizontal mode and vertical mode, and the size of the intra candidate list can be 3 or 4 depending on the shape of the block. When the CU width is greater than twice the CU height, the horizontal mode is not included in the intra mode list, and when the CU height is greater than twice the CU width, the vertical mode is removed from the intra mode list. A weighted average is used to combine the prediction of an intra prediction mode selected by the intra mode index and a Mege index selected by the Mege index. For chroma components, DM is always applied without additional signaling.
[0256] The weights of combined prediction are described as follows. When DC mode or planar mode is selected or CB width or height is less than 4, equal weights are applied. For those CBs whose CB width and height are greater than or equal to 4, when horizontal / vertical mode is selected, one CB is first divided vertically / horizontally into four equal-area regions. Each weight set (denoted as (w_intra i ,w_inter i), where i is 1 to 4, and (w_intra1, w_inter1) = (6, 2), (w_intra2, w_inter2) = (5, 3), (w_intra3, w_inter3) = (3, 5), and (w_intra4, w_inter4) = (2, 6)) will be applied to the corresponding areas. (w_intra1, w_inter1) is used for the area closest to the reference sample, while (w_intra4, w_inter4) is used for the area farthest from the reference sample. The combined prediction can then be calculated by adding the two weighted predictions and shifting right by 3 bits. In addition, the intra-prediction mode of the intra-hypothesis used for the prediction value can be saved for subsequent reference by neighboring CUs.
[0257] Assume that the intra-frame and inter-frame prediction values are PIntra and Pinter, and the weighting factors are w_intra and w_inter respectively. The prediction value at position (x, y) is calculated as (PIntra(x, y)*w_intra(x, y)+PInter(x, y)*w_inter(x, y))>>N, where w_intra(x, y)+w_iner(x, y)=2^N.
[0258] Signaling of intra prediction mode in IIP codec block
[0259] When using inter-intra mode, one of the four allowed intra prediction modes (DC mode, planar mode, horizontal mode and vertical mode) is selected and signaled. Three most probable modes (MPMs) are constructed from the neighboring blocks on the left and above. The intra prediction mode of an intra-coded neighboring block or an IIP-coded neighboring block is considered as one MPM. If the intra prediction mode is not one of the four allowed intra prediction modes, it will be rounded to a vertical mode or a horizontal mode depending on the angle difference. The neighboring block must be on the same CTU line as the current block.
[0260] Assume that the width and height of the current block are width and height. If W>2*H or H>2*W, only one of the three MPMs can be used in inter-intra mode. Otherwise, all four valid intra prediction modes can be used in inter-intra mode.
[0261] It should be noted that the intra prediction mode in inter-intra mode cannot be used to predict the intra prediction mode in a normal intra codec block.
[0262] Inter-intra prediction can only be used when W*H>=64.
[0263] 2.10 Example triangle prediction mode
[0264] The concept of triangular prediction mode (TPM) is to introduce a new triangle partitioning for motion compensation prediction. Figure 7A-7B As shown, it divides the CU into two triangular prediction units in the diagonal direction or the anti-diagonal direction. Each triangular prediction unit in the CU is inter-predicted using its own unidirectional prediction motion vector and reference frame index derived from the unidirectional prediction candidate list. After predicting the triangular prediction unit, adaptive weighting is performed on the diagonal edges. Then, the transform and quantization process is applied to the entire CU. Note that this mode is only applied to Skip and Merge modes.
[0265] 2.10.1 TPM’s One-Way Prediction Candidate List
[0266] The unidirectional prediction candidate list consists of five unidirectional prediction motion vector candidates. Figure 8 As shown, it is derived from seven neighboring blocks including five spatial neighboring blocks (1 to 5) and two temporal collocated blocks (6 to 7). The motion vectors of the seven neighboring blocks are collected and put into the unidirectional prediction candidate list in the order of unidirectional prediction motion vector, L0 motion vector of bidirectional prediction motion vector, L1 motion vector of bidirectional prediction motion vector and average motion vector of L0 and L1 motion vector of bidirectional prediction motion vector. If the number of candidates is less than five, zero motion vector is added to the list. Candidate motion added to the list is called TPM candidate motion.
[0267] More specifically, the following steps are involved:
[0268] 1) From A1, B1, B0, A0, B2, Col and Col2 (corresponding to Figure 8 Blocks 1-7 in ) obtain motion candidates without any pruning operation.
[0269] 2) Set the variable numCurrMergeCand = 0.
[0270] 3) For each motion candidate derived from A1, B1, B0, A0, B2, Col and Col2, if the motion candidate is unidirectionally predicted (from list 0 or list 1), add it to the Merge list, where numCurrMergeCand is increased by 1. This added candidate motion is named "original unidirectionally predicted candidate". Full pruning is applied.
[0271] 4) For each motion candidate derived from A1, B1, B0, A0, B2, Col, and Col2, and numCurrMergeCand is less than 5, if the motion candidate is bidirectionally predicted, the motion information from list 0 is added to the Merge list (i.e., modified to be unidirectionally predicted from list 0), and numCurrMergeCand is increased by 1. This added candidate motion is named "truncated list 0 predicted candidate". Full pruning is applied.
[0272] 5) For each motion candidate derived from A1, B1, B0, A0, B2, Col, and Col2, and numCurrMergeCand is less than 5, if the motion candidate is bidirectionally predicted, the motion information from list 1 is added to the Merge list (i.e., modified to be unidirectionally predicted from list 1), and numCurrMergeCand is increased by 1. This added candidate motion is named "truncated list 1 predicted candidate". Application Fully trimmed .
[0273] 6) For each candidate motion derived from A1, B1, B0, A0, B2, Col, and Col2, and numCurrMergeCand is less than 5, if the candidate motion is bidirectionally predicted,
[0274] - If the slice quantization parameter (QP) of the list 0 reference picture is less than the slice QP of the list 1 reference picture, the motion information of list 1 is first scaled to the list 0 reference picture, and the average of two MVs (one from the original list 0 and the other is the scaled MV from list 1) is added to the Merge list, i.e., the average unidirectional prediction from the list 0 motion candidate and numCurrMergeCand is increased by 1.
[0275] Otherwise, first scale the motion information of list 0 to the list 1 reference picture, and add the average of the two MVs (one from the original list 1 and the other the scaled maximum value from list 0) to the Merge list, i.e., the average unidirectional prediction from list 1 motion candidates and increase numCurrMergeCand by 1.
[0276] Apply full trim.
[0277] 7) If numCurrMergeCand is less than 5, add a zero motion vector candidate.
[0278] 2.11 Decoder-side Motion Vector Refinement (DMVR) in VVC
[0279] For DMVR in VVC, such as Fig.13 As shown, it is assumed that the MVD between list 0 and list 1 is mirrored, and bilateral matching is performed to refine the MV, for example, to find the best MVD among several MVD candidates. The MVs of the two reference picture lists are represented by MVL0 (L0X, L0Y) and MVL1 (L1X, L1Y). The MVD of list 0 represented by (MvdX, MvdY) that can minimize the cost function (e.g., SAD) is defined as the best MVD. For the SAD function, it is defined as the SAD between the reference block of list 0 derived with the motion vector (L0X+MvdX, L0Y+MvdY) in the list 0 reference picture and the reference block of list 1 derived with the motion vector (L1X-MvdX, L1Y-MvdY) in the list 1 reference picture.
[0280] The motion vector refinement process can be iterated twice. In each iteration, up to 6 MVDs (with integer pixel precision) can be checked in two steps, such as Fig.14 As shown. In the first step, the MVDs (0,0), (-1,0), (1,0), (0,-1), (0,1) are checked. In the second step, one of the MVDs (-1,-1), (-1,1), (1,-1), or (1,1) can be selected and further checked. Assume that the function Sad(x,y) returns the SAD value of MVD(x,y). The MVD checked in the second step (denoted by (MvdX,MvdY)) is determined as follows:
[0281] MvdX = -1;
[0282] MvdY=-1;
[0283] If (Sad(1,0) <Sad(-1,0))
[0284] MvdX = 1;
[0285] If (Sad(0,1) <Sad(0,-1))
[0286] MvdY=1;
[0287] In the first iteration, the starting point is the signaled MV, and in the second iteration, the starting point is the signaled MV plus the best MVD selected in the first iteration. DMVR is applied only when one reference picture is the previous image and the other reference picture is the next image, and both reference pictures have the same picture order count distance to the current picture.
[0288] To further simplify the DMVR process, the following key features may be implemented in some embodiments:
[0289] 1. Terminate early when the SAD at position (0, 0) between list 0 and list 1 is less than a threshold.
[0290] 2. When the SAD between list 0 and list 1 at a certain position is zero, terminate early.
[0291] 3. Block size of DMVR: W*H>=64&&H>=8, where W and H are the width and height of the block.
[0292] 4. For DMVR with CU size > 16*16, the CU is divided into multiples of 16x16 sub-blocks. If only the width or height of the CU is greater than 16, it is only divided in the vertical or horizontal direction.
[0293] 5. Reference block size (W+7)*(H+7) (for luma).
[0294] 6. Integer pixel search based on 25-point SAD (e.g. (+-)2 refinement search range, single level)
[0295] 7. DMVR based on bilinear interpolation.
[0296] 8. Sub-pixel refinement based on “parametric error surface equation”. This process is performed only when the minimum SAD cost is not equal to zero and the best MVD is (0,0) in the last MV refinement iteration.
[0297] 9. Luma / Chroma MC w / reference block padding (if needed).
[0298] 10. The refined MV is only used for MC and TMVP.
[0299] 2.11.1 Use of DMVR
[0300] DMVR can be enabled when all of the following conditions are true:
[0301] - The DMVR enabled flag in the SPS (eg, sps_dmvr_enabled_flag) is equal to 1.
[0302] -TPM flag, inter-frame affine flag, sub-block Merge flag (ATMVP or affine Merge), and MMVD flag are all equal to 0.
[0303] The -Merge flag is equal to 1.
[0304] - The current block is bidirectionally predicted, and the Picture Order Count (POC) distance between the current picture and the reference picture in list 1 is equal to the POC distance between the reference picture in list 0 and the current picture.
[0305] -The current CU height is greater than or equal to 8.
[0306] -The number of luma samples (CU width * height) is greater than or equal to 64.
[0307] 2.11.2 Sub-pixel refinement based on “parametric error surface equation”
[0308] The method is summarized as follows:
[0309] 1. The parameter error surface fit is calculated only if the center location is the best cost location in a given iteration.
[0310] 2. The cost at the center and the cost at the distances from the center (-1, 0), (0, -1), (1, 0), and (0, 1) are used to fit a 2-D parabolic error surface equation of the following form
[0311] E(x,y)=A(x-x0) 2 +B(y-y0) 2 +C
[0312] Where (x0, y0) corresponds to the location with the lowest cost, and C corresponds to the minimum cost value. By solving the 5 equations for the 5 unknowns, (x0, y0) is calculated as follows:
[0313] x0=(E(-1,0)-E(1,0)) / (2(E(-1,0)+E(1,0)-2E(0,0)))
[0314] y0=(E(0,-1)-E(0,1)) / (2((E(0,-1)+E(0,1)-2E(0,0))
[0315] (x0,y0) can be calculated to any desired sub-pixel precision by adjusting the precision with which the division is performed (e.g. the number of digits used to compute the quotient). th Pixel accuracy, only 4 bits of the absolute value of the quotient need to be calculated, which facilitates a fast shift-subtract based implementation of the 2 divisions required per CU.
[0316] 3. The calculated (x0, y0) is added to the integer distance refinement MV to obtain the sub-pixel accurate refinement increment MV.
[0317] 2.11.3 Reference Samples Required in DMVR
[0318] For a block of size W*H, assuming the maximum allowed MVD value is + / - offset (e.g. 2 in VVC), and the filter size is filteSize (e.g. 8 for luma and 4 for chroma in VVC), then (W+2*offSet+filterSize–1)*(H+2*offSet+filterSize–1) reference samples are required. To reduce memory bandwidth, only the center (W+filterSize–1)*(H+filterSize–1) reference samples are extracted, and other pixels are generated by repeating the boundaries of the extracted samples. An example of an 8*8 block is shown in Fig.15 As shown, 15*15 reference samples are extracted, and the boundaries of the extracted samples are repeated to generate a 17*17 area.
[0319] These reference samples are used to perform bilinear motion compensation during motion vector refinement and also to perform final motion compensation.
[0320] 2.12 Bandwidth calculation for different block sizes
[0321] Based on the current 8-tap luma interpolation filter and 4-tap chroma interpolation filter, the memory bandwidth of each block unit (4:2:0 color format, one MxN luma block has two M / 2x N / 2 chroma blocks) is shown in Table 1 below.
[0322] Table 1 Example memory bandwidth
[0323]
[0324] Similarly, based on the current 8-tap luma interpolation filter and 4-tap chroma interpolation filter, the memory bandwidth of each MxN luma block unit is shown in Table 2 below.
[0325] Table 2 Example memory bandwidth
[0326]
[0327]
[0328] Therefore, regardless of the color format, the bandwidth requirements for each block size, in descending order, are as follows:
[0329] 4*4Bi>4*8Bi>4*16Bi>4*4Uni>8*8Bi>4*32Bi>4*64Bi>4*128Bi>8*16Bi>4*8Uni>8*32Bi>….
[0330] 2.12 Motion vector accuracy issues in VTM-3.0
[0331] In VTM-3.0, the MV accuracy in storage is 1 / 16 brightness pixel. When MV is signaled, the best accuracy is 1 / 4 brightness pixel.
[0332] 3. Examples of Problems Solved by the Disclosed Embodiments
[0333] 1. The bandwidth control method for affine prediction is not clear enough and should be more flexible.
[0334] 2. Note that in HEVC design, the worst case for memory bandwidth requirement is 8x8 bi-directional prediction, and even codec units (CUs) can be split in asymmetric prediction modes, such as a 16x16 split into two PUs of size 4x16 and 12x16. In VVC, due to the new QTBT partitioning structure, a CU can be set to 4x16 and bi-directional prediction can be enabled. A bi-directionally predicted 4x16 CU requires even higher memory bandwidth than a bi-directionally predicted 8x8 CU. It is unknown how to handle block sizes that require higher bandwidth, such as 4x16 or 16x4.
[0335] 3. New codecs, such as GBi, introduce more line buffer issues
[0336] 4. Inter-Intra mode requires more memory and logic to signal the intra prediction mode used in the inter codec block.
[0337] 5.1 / 16 brightness pixel MV accuracy requires higher memory storage.
[0338] 6. To interpolate four 4x4 blocks in one 8x8 block, it needs to fetch (8+7+1)*(8+7+1) reference pixels, and requires about 14% more pixels when compared to non-affine / non-planar mode 8x8 blocks.
[0339] 7. The averaging operation in hybrid intra and inter prediction should be aligned with other codec tools such as weighted prediction, local illumination compensation, OBMC and triangle prediction, where the offset is added before the shift.
[0340] 4. Examples of Embodiments
[0341] The techniques disclosed herein can reduce the bandwidth and line buffers required in affine prediction and other new codec tools.
[0342] The following description should be considered as an example to explain the general concept and should not be interpreted in a narrow manner. In addition, these embodiments can be combined in any way.
[0343] In the following discussion, the width and height of the current CU of affine coding are w and h, respectively. Assume that the interpolation filter tap (in motion compensation) is N (eg, 8, 6, 4, or 2), and the current block size is WxH.
[0344] Bandwidth control for affine prediction
[0345] Example 1: Assume that the motion vector of the sub-block SB in the affine codec block is MV SB (expressed as (MVx, MVy)), MV SB It may be within a specific range relative to the representative motion vector MV' (MV'x, MV'y).
[0346] In some embodiments, MVx>=MV'x-DH0 and MVx<=MV'x+DH1 and MVy>=MV'y-DV0 and MVy<=MV'y+DV1, where MV'=(MV'x,MV'y). In some embodiments, DH0 may be equal to or not equal to DH1; DV0 may be equal to or not equal to DV1. In some embodiments, DH0 may be equal to or not equal to DV0; DH1 may be equal to or not equal to DV1. In some embodiments, DH0 may be equal to or not equal to DV0; DH1 may be equal to or not equal to DV1. In some embodiments, DH0 may be unequal to DH1; DV0 may be unequal to DV1. In some embodiments, DH0, DH1, DV0, and DV1 may be signaled from the encoder to the decoder, such as in a VPS / SPS / PPS / slice header / slice group header / slice / CTU / CU / PU. In some embodiments, DH0, DH1, DV0, and DV1 may be specified differently for different standard profiles / levels / tiers. In some embodiments, DH0, DH1, DV0, and DV1 may depend on the width and height of the current block. In some embodiments, DH0, DH1, DV0 and DV1 may depend on whether the current block is unidirectionally predicted or bidirectionally predicted. In some embodiments, DH0, DH1, DV0 and DV1 may depend on the position of the sub-block SB. In some embodiments, DH0, DH1, DV0 and DV1 may depend on how to obtain MV'.
[0347] In some embodiments, MV' may be a CPMV, such as MV0, MV1, or MV2.
[0348] In some embodiments, MV' may be the MV in the MC for one of the corner sub-blocks, such as Figure 3 MV0', MV1' or MV2' in.
[0349] In some embodiments, MV' may be an MV derived for any position inside or outside the current block using the affine model of the current block. For example, it may be derived for the center position of the current block (eg, x=w / 2 and y=h / 2).
[0350] In some embodiments, MV′ may be any sub-block for the current block (such as one of the center sub-blocks ( Figure 3 MV in the MC of C0, C1, C2 or C3)) as shown.
[0351] In some embodiments, if MV SB If the constraint is not satisfied, then MV SB Should be clipped to the valid range. In some embodiments, the clipped MV SB is stored in the MV buffer, which will be used to predict the MV of the subsequent codec block. In some embodiments, the MV before being pruned SB Stored in the MV buffer.
[0352] In some embodiments, if MV SB If the constraints are not met, the bitstream is considered non-compliant with the standard (invalid). In one example, the MV SB A constraint must or should be satisfied. Any conforming encoder shall follow the constraint, otherwise the encoder is considered non-conforming.
[0353] In some embodiments, MV SB and MV' may be expressed with a signaled MV precision (such as quarter pixel precision). In some embodiments, MV SB and MV' can be expressed with the stored MV precision (such as 1 / 16 precision). In some embodiments, MV SB The sum MV' may be rounded to a precision different from the signaled or stored precision (such as an integer precision).
[0354] Example 2: For affine codec blocks, each MxN (such as 8x4, 4x8 or 8x8) block within the block is considered as a basic unit. The MVs of all 4x4 sub-blocks within the MxN are constrained so that the maximum difference between the integer parts of the four 4x4 sub-block MVs does not exceed K pixels.
[0355] In some embodiments, whether and how to apply the constraint depends on whether the current block applies bidirectional prediction or unidirectional prediction. For example, the constraint is only applied to bidirectional prediction and not to unidirectional prediction. As another example, M, N, and K are different for bidirectional prediction and unidirectional prediction.
[0356] In some embodiments, M, N, and K may depend on the width and height of the current block.
[0357] In some embodiments, whether the constraints apply may be signaled from the encoder to the decoder, such as in a VPS / SPS / PPS / slice header / slice group header / slice / CTU / CU / PU. For example, an on / off flag is signaled to indicate whether the constraints apply. As another example, M, N, and K are signaled.
[0358] In some embodiments, M, N, and K may be specified differently for different standard profiles / levels / tiers.
[0359] Example 3: For different affine codec blocks, the width and height of the sub-block may be calculated differently.
[0360] In some embodiments, the calculation method is different for affine codec blocks with unidirectional prediction and bidirectional prediction. In one example, for blocks with unidirectional prediction, the subblock size is fixed (such as 4x4, 4x8 or 8x4). In another example, for blocks with bidirectional prediction, the subblock size is calculated. In this case, the subblock size can be different for two different bidirectionally predicted affine blocks.
[0361] In some embodiments, for a bidirectionally predicted affine block, the width and / or height of the sub-block from reference list 0 and the width and / or height of the sub-block from reference list 1 may be different. In one example, assume that the width and height of the sub-block from reference list 0 are derived as Wsb0 and Hsb0, respectively; the width and height of the sub-block from reference list 1 are derived as Wsb1 and Hsb1, respectively. Then, the final width and height of the sub-blocks of both reference list 0 and reference list 1 are calculated as Max(Wsb0, Wsb1) and Max(Hsb0, HSb1), respectively.
[0362] In some embodiments, the calculated width and height of the sub-block is only applied to the luma component. For the chroma component, it is always fixed, such as a 4x4 chroma sub-block corresponding to an 8x8 luma block with a 4:2:0 color format.
[0363] In some embodiments, MVx-MV'x and MVy-MV'y are calculated to determine the width and height of the sub-block. (MVx, MVy) and (MV'x, MV'y) are defined in Example 1.
[0364] In some embodiments, the MVs involved in the calculations may be represented with signaled MV precision (such as quarter pixel precision). In one example, these MVs may be represented with stored MV precision (such as 1 / 16 precision). As another example, these MVs may be rounded to a precision different from the signaled or stored precision (such as integer precision).
[0365] In some embodiments, the thresholds used in the calculation to decide the width and height of the sub-blocks may be signaled from the encoder to the decoder, such as in a VPS / SPS / PPS / slice header / slice group header / slice / CTU / CU / PU.
[0366] In some embodiments, the thresholds used in the calculation to determine the width and height of a sub-block may be different for different standard profiles / levels / tiers.
[0367] Example 4: To interpolate a W1xH1 subblock in a W2xH2 subblock / block, first extract a (W2+N–1–PW)*(H2+N–1–PH) block, then apply the pixel filling method (e.g., boundary pixel repetition method) described in Example
[00353] to generate a larger block, which is then used to interpolate the W1xH1 subblock. For example, W2=H2=8, W1=H1=4, and PW=PH=0.
[0368] In some embodiments, the integer part of the MV of any W1xH1 sub-block can be used to extract the entire W2xH2 sub-block / block, so different boundary pixel repetition methods may be required. For example, if the maximum difference between the integer parts of all W1xH1 sub-block MVs does not exceed 1 pixel, the integer part of the MV of the upper left W1xH1 sub-block is used to extract the entire W2xH2 sub-block / block. The right and bottom boundaries of the reference block are repeated once. As another example, if the maximum difference between the integer parts of all W1xH1 sub-block MVs does not exceed 1 pixel, the integer part of the MV of the lower right W1xH1 sub-block is used to extract the entire W2xH2 sub-block / block. The left and top boundaries of the reference block are repeated once.
[0369] In some embodiments, the MV of any W1xH1 sub-block may be modified first and then used to extract the entire W2xH2 sub-block / block, so different boundary pixel repetition methods may be required. For example, if the maximum difference between the integer parts of all W1xH1 sub-block MVs does not exceed 2 pixels, the integer part of the MV of the upper left W1xH1 sub-block may be added by (1,1) (where 1 means 1 integer pixel distance) and then used to extract the entire W2xH2 sub-block / block. In this case, the left, right, top, and bottom boundaries of the reference block are repeated once. As another example, if the maximum difference between the integer parts of all W1xH1 sub-block MVs does not exceed 2 pixels, the integer part of the MV of the lower right W1xH1 sub-block may be added by (-1,-1) (where 1 means 1 integer pixel distance) and then used to extract the entire W2xH2 sub-block / block. In this case, the left, right, top, and bottom boundaries of the reference block are repeated once.
[0370] Bandwidth control for specific block sizes
[0371] Example 5: If w and h of the current block satisfy one or more of the following conditions, bidirectional prediction is not allowed.
[0372] Aw is equal to T1 and h is equal to T2, or h is equal to T1 and w is equal to T2. In one example, T1=4 and T2=16.
[0373] Bw is equal to T1 and h is not greater than T2, or h is equal to T1 and w is not greater than T2. In one example, T1=4 and T2=16.
[0374] Cw is not greater than T1 and h is not greater than T2, or h is not greater than T1 and w is not greater than T2. In one example, T1=8 and T2=8. In another example, T1==8, T2==4. In yet another example, T1==4, T2==4.
[0375] In some embodiments, bidirectional prediction may be disabled for 4x8 blocks. In some embodiments, bidirectional prediction may be disabled for 8x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4x16 blocks. In some embodiments, bidirectional prediction may be disabled for 16x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4x8, 8x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4x16, 16x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4x8, 16x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4x16, 8x4 blocks. In some embodiments, bidirectional prediction may be disabled for 4xN blocks, for example, N<=16. In some embodiments, bidirectional prediction may be disabled for Nx4 blocks, for example, N<=16. In some embodiments, bidirectional prediction may be disabled for 8xN blocks, for example, N<=16. In some embodiments, bidirectional prediction may be disabled for Nx8 blocks, for example, N<=16. In some embodiments, bidirectional prediction may be disabled for 4x8, 8x4, 4x16 blocks. In some embodiments, bidirectional prediction may be disabled for 4x8, 8x4, 16x4 blocks. In some embodiments, bi-directional prediction may be disabled for 8x4, 4x16, 16x4 blocks. In some embodiments, bi-directional prediction may be disabled for 4x8, 8x4, 4x16, 16x4 blocks.
[0376] In some embodiments, the block sizes disclosed in this document may refer to one color component, such as the luma component, and the decision on whether to disable bidirectional prediction may apply to all color components. For example, if bidirectional prediction is disabled based on the block size of the luma component of a block, bidirectional prediction will also be disabled for corresponding blocks of other color components. In some embodiments, the block sizes disclosed in this document may refer to one color component, such as the luma component, and the decision on whether to disable bidirectional prediction may only apply to that color component.
[0377] In some embodiments, if bi-prediction is disabled for a block, and the selected Merge candidate is bi-predictive, only one MV from either reference list 0 or reference list 1 of the Merge candidate is assigned to the block.
[0378] In some embodiments, if bi-prediction is disabled for a block, then triangular prediction mode (TPM) is not allowed for the block.
[0379] In some embodiments, how to signal the prediction direction (unidirectional prediction from list 0 / 1, bidirectional prediction) may depend on the block dimension. In one example, when 1) block width * block height < 64 or 2) block width * block height = 64 but width is not equal to height, an indication of unidirectional prediction from list 0 / 1 may be signaled. As another example, when 1) block width * block height > 64 or 2) n width * block height = 64 and width is equal to height, an indication of unidirectional prediction or bidirectional prediction from list 0 / 1 may be signaled.
[0380] In some embodiments, both unidirectional prediction and bidirectional prediction can be disabled for 4x4 blocks. In some embodiments, it can be disabled for affine codec blocks. Alternatively, it can be disabled for non-affine codec blocks. In some embodiments, the indication of quadtree partitioning of 8x8 blocks, binary tree partitioning of 8x4 or 4x8 blocks, and ternary tree partitioning of 4x16 or 16x4 blocks can be skipped. In some embodiments, 4x4 blocks must be encoded and decoded as intra blocks. In some embodiments, the MV of 4x4 blocks must be integer precision. For example, the IMV flag of 4x4 blocks must be 1. As another example, the MV of 4x4 blocks must be rounded to integer precision.
[0381] In some embodiments, bidirectional prediction is allowed. However, assuming that the interpolation filter tap is N, only (W+N–1–PW)*(W+N–1–PH) reference pixels are extracted instead of (W+N–1)*(H+N–1) reference pixels. At the same time, the pixels at the reference block boundaries (top, left, bottom, and right boundaries) are repeated to generate Fig. 9The (W+N–1)*(H+N–1) block shown is used for the final interpolation. In some embodiments, PH is zero and only the left boundary or / and the right boundary are repeated. In some embodiments, PW is zero and only the top boundary or / and the bottom boundary are repeated. In some embodiments, both PW and PH are greater than zero and first the left boundary or / and the right boundary are repeated and then the top boundary or / and the bottom boundary are repeated. In some embodiments, both PW and PH are greater than zero and first the top boundary or / and the bottom boundary are repeated and then the left boundary and the right boundary are repeated. In some embodiments, the left boundary is repeated M1 times and the right boundary is repeated PW–M1 times. In some embodiments, the top boundary is repeated M2 times and the bottom boundary is repeated PH–M2 times. In some embodiments, such a boundary pixel repetition method may be applied to some or all reference blocks. In some embodiments, PW and PH may be different for different color components, such as Y, Cb, and Cr.
[0382] Fig. 9 An example of repeated boundary pixels of a reference block before interpolation is shown.
[0383] Example 6: In some embodiments, (W+N–1–PW)*(W+N–1–PH) reference pixels (instead of (W+N–1)*(H+N–1) reference pixels) may be extracted for motion compensation of WxH blocks. Samples outside the range (W+N–1–PW)*(W+N–1–PH) but inside the range (W+N–1)*(H+N–1) are padded for the interpolation process. In one padding method, pixels at the reference block boundaries (top, left, bottom, and right boundaries) are repeated to generate the following: Fig.11 The (W+N–1)*(H+N–1) block shown is used for the final interpolation.
[0384] In some embodiments, the PH is zero and only the left border or / and the right border are repeated.
[0385] In some embodiments, PW is zero and only the top border or / and the bottom border are repeated.
[0386] In some embodiments, 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.
[0387] In some embodiments, both PW and PH are greater than zero, and the top border or / and the bottom border are repeated first, and then the left border and the right border are repeated.
[0388] In some embodiments, the left border is repeated M1 times, and the right border is repeated PW-M1 times.
[0389] In some embodiments, the top border is repeated M2 times, and the bottom border is repeated PH-M2 times.
[0390] In some embodiments, such a boundary pixel repetition method may be applied to some or all reference blocks.
[0391] In some embodiments, PW and PH may be different for different color components, such as Y, Cb, and Cr.
[0392] In some embodiments, PW and PH may be different for different block sizes or shapes.
[0393] In some embodiments, PW and PH may be different for unidirectional prediction and bidirectional prediction.
[0394] In some embodiments, padding may not be performed in affine mode.
[0395] In some embodiments, samples outside the range (W+N–1–PW)*(W+N–1–PH) but inside the range (W+N–1)*(H+N–1) are set to a single value. In some embodiments, the single value is 1<<(BD-1), where BD is the bit depth of the sample, such as 8 or 10. In some embodiments, the single value is signaled from the encoder to the decoder in the VPS / SPS / PPS / slice header / slice group header / slice / CTU row / CTU / CU / PU. In some embodiments, the single value is derived from samples inside the range (W+N–1–PW)*(W+N–1–PH).
[0396] Example 7: Instead of extracting (W+filterSize–1)*(H+filterSize–1) reference samples in DMVR, (W+filterSize–1–PW)*(H+filterSize–1–PH) reference samples can be extracted, and all other required samples can be generated by repeating the boundaries of the extracted reference samples, where PW>=0 and PH>=0.
[0397] In some embodiments, the method presented in Example
[00353] can be used to fill in non-extracted sample points.
[0398] In some embodiments, padding may not be performed again in the final motion compensation of DMVR.
[0399] In some embodiments, whether to apply the above method may depend on the block dimension.
[0400] Example 8:The signaling method of inter_pred_idc may depend on whether w and h satisfy the conditions in Example 5. Table 3 below shows an example:
[0401] Table 3
[0402]
[0403] Table 4 below shows another example:
[0404] Table 4
[0405]
[0406]
[0407] Table 5 below shows yet another example:
[0408] Table 5
[0409]
[0410] Example 9: The Merge candidate list construction process may depend on whether w and h meet the conditions in Example 4. The following embodiment describes the case when w and h meet the conditions.
[0411] In some embodiments, if a Merge candidate uses bidirectional prediction, only the prediction from reference list 0 is retained, and the Merge candidate is considered as a unidirectional prediction referring to reference list 0.
[0412] In some embodiments, if a Merge candidate uses bidirectional prediction, only the prediction from reference list 1 is retained, and the Merge candidate is considered as a unidirectional prediction referring to reference list 1.
[0413] In some embodiments, if a Merge candidate uses bidirectional prediction, the candidate is considered unavailable, that is, such a Merge candidate is removed from the Merge list.
[0414] In some embodiments, the Merge candidate list construction process for triangle prediction mode is used instead.
[0415] Example 10: The codec tree partitioning process may depend on whether the width and height of the divided sub-CU meet the conditions in Example 5.
[0416] In some embodiments, if the width and height of the sub-CU after the split meet the conditions in Example 5, the split is not allowed. In some embodiments, the signaling notification of the codec tree split may depend on whether a split is allowed. In one example, if a split is not allowed, the codeword indicating the split is omitted.
[0417] Example 11: The signaling notification of the skip flag and / or the intra block copy (IBC) flag may depend on whether the width and / or height of the block meets certain conditions (eg, the conditions mentioned in Example 5).
[0418] In some embodiments, the condition is that the luma block contains no more than X samples. For example, X=16;
[0419] In some embodiments, the condition is that the luma block contains X samples. For example, X=16.
[0420] In some embodiments, the condition is that the width and height of the luminance block are both equal to X. For example, X=4;
[0421] In some embodiments, when one or some of the above conditions are true, inter mode and / or IBC mode are not allowed for such blocks.
[0422] In some embodiments, if inter-mode is not allowed for a block, a skip flag may not be signaled for it.Also, optionally, the skip flag may be inferred to be false.
[0423] In some embodiments, if inter mode and IBC mode are not allowed for a block, a skip flag may not be signaled for it and may be implicitly derived as false (eg, the block is derived to be encoded in non-skip mode).
[0424] In some embodiments, if inter mode is not allowed for a block, but IBC mode is allowed for the block, the skip flag may still be signaled. In some embodiments, if the block is encoded and decoded in skip mode, the IBC flag may not be signaled, and the IBC flag is implicitly derived as true (e.g., the block is derived to be encoded and decoded in IBC mode).
[0425] Example 12: The signaling of the prediction mode may depend on whether the width and / or height of the block satisfies certain conditions (eg, the conditions mentioned in Example 5).
[0426] In some embodiments, the condition is that the luma block contains no more than 1X6 samples, eg, X=16.
[0427] In some embodiments, the condition is that the luma block contains X samples, eg, X=16.
[0428] In some embodiments, the condition is that the width and height of the luma block are both equal to X, eg, X=4.
[0429] In some embodiments, when one or some of the above conditions are true, inter mode and / or IBC mode are not allowed for such blocks.
[0430] In some embodiments, signaling of an indication of a particular mode may be skipped.
[0431] In some embodiments, if inter mode and IBC mode are not allowed for a block, signaling of indications of inter mode and IBC mode is skipped, and the remaining allowed modes, such as intra mode or palette mode, may still be signaled.
[0432] In some embodiments, if inter mode and IBC mode are not allowed for a block, the prediction mode may not be signaled.Also, optionally, the prediction mode may be implicitly derived as intra mode.
[0433] In some embodiments, if inter-mode is not allowed for a block, the signaling of the indication of inter-mode is skipped, and the remaining allowed modes, such as intra-mode or IBC mode, can still be signaled. Optionally, the remaining allowed modes, such as intra-mode or IBC mode or palette mode, can still be signaled.
[0434] In some embodiments, if inter mode is not allowed for a block, but IBC mode and intra mode are allowed for it, an IBC flag may be signaled to indicate whether the block is encoded or decoded in IBC mode.Also, optionally, the prediction mode may not be signaled.
[0435] Example 13: Signaling of the triangle pattern may depend on whether the width and / or height of the block satisfies certain conditions (eg, the conditions mentioned in Example 5).
[0436] In some embodiments, the condition is that the luma block size is one of some specific sizes. For example, the specific sizes may include 4x16 or / and 16x4.
[0437] In some embodiments, when the above condition is true, triangle mode may not be allowed, and a flag indicating whether the current block is encoded in triangle mode may not be signaled and may be derived as false.
[0438] Example 14: The signaling notification of the inter-frame prediction direction may depend on whether the width and / or height of the block satisfies certain conditions (eg, the conditions mentioned in Example 5).
[0439] In some embodiments, the condition is that the luma block size is one of some specific sizes. For example, the specific sizes may include 8x4 or / and 4x8 or / and 4x16 or / and 16x4.
[0440] In some embodiments, when the above condition is true, the block may be unidirectionally predicted only, and the flag indicating whether the current block is bidirectionally predicted may not be signaled and may be derived as false.
[0441] Example 15: The signaling of the SMVD (Symmetrical MVD) flag may depend on whether the width and / or height of the block meets certain conditions (eg, the conditions mentioned in Example 5).
[0442] In some embodiments, the condition is that the luma block size is one of some specific sizes. In some embodiments, the condition is defined as whether the block size has no more than 32 samples. In some embodiments, the condition is defined as whether the block size is 4x8 or 8x4. In some embodiments, the condition is defined as whether the block size is 4x4, 4x8 or 8x4. In some embodiments, the specific sizes may include 8x4 or / and 4x8 or / and 4x16 or / and 16x4.
[0443] In some embodiments, when certain conditions are true, an indication of the use of SMVD (such as an SMVD flag) may not be signaled and may be inferred to be false. For example, the block may be set to be unidirectionally predicted.
[0444] In some embodiments, when certain conditions are true, an indication of the use of SMVD may still be signaled (such as an SMVD flag), however, only list 0 or list 1 motion information may be utilized in the motion compensation process.
[0445] Example 16: A motion vector (similar to the motion vector derived in conventional Merge mode, ATMVP mode, MMVD Merge mode, MMVD Skip mode, etc.) or a block vector for IBC may be modified depending on whether the width and / or height of the block meets certain conditions.
[0446] In some embodiments, the condition is that the luma block size is one of some specific sizes. For example, the specific sizes may include 8x4 or / and 4x8 or / and 4x16 or / and 16x4.
[0447] In some embodiments, when the above conditions are true, if the derived motion information is bidirectionally predicted (e.g., inherited from a neighboring block with some offset), the motion vector or block vector of the block can be changed to a unidirectional motion vector. Such a process is called a conversion process, and the final unidirectional motion vector is called a "converted unidirectional" motion vector. In some embodiments, the motion information of reference picture list X (e.g., X is 0 or 1) can be maintained, and the motion information and the motion information of list Y (Y is 1-X) can be discarded. In some embodiments, the motion information of reference picture list X (e.g., X is 0 or 1) and the motion information of list Y (Y is 1-X) can be jointly used to derive a new motion candidate point for list X. In one example, the motion vector of the new motion candidate can be the average motion vector of the two reference picture lists. As another example, the motion information of list Y can first be scaled to list X. Then the motion vector of the new motion candidate can be the average motion vector of the two reference picture lists. In some embodiments, the motion vector in the prediction direction X may not be used (e.g., the motion vector in the prediction direction X is changed to (0,0), and the reference index in the prediction direction X is changed to -1), and the prediction direction may be changed to 1-X, X=0 or 1. In some embodiments, the converted unidirectional motion vector may be used to update the HMVP lookup table. In some embodiments, the derived bidirectional motion information, such as the bidirectional MV before conversion to the unidirectional MV, may be used to update the HMVP lookup table. In some embodiments, the converted unidirectional motion vector may be stored and may be used for motion prediction, TMVP, deblocking, etc. of subsequent codec blocks. In some embodiments, the derived bidirectional motion information, such as the bidirectional MV before conversion to the unidirectional MV, may be stored and may be used for motion prediction, TMVP, deblocking, etc. of subsequent codec blocks. In some embodiments, the converted unidirectional motion vector may be used for motion refinement. In some embodiments, the derived bidirectional motion information may be used for motion refinement and / or sample refinement, such as using an optical flow method. In some embodiments, the prediction blocks generated according to the derived bi-directional motion information may be refined first, and then only one prediction block may be utilized to derive a final prediction and / or reconstructed block of a block.
[0448] In some embodiments, when certain conditions are true, a (bi-directionally predicted) motion vector may be converted to a uni-directional motion vector before being used as a base Merge candidate in MMVD.
[0449] In some embodiments, when certain conditions are true, (bi-directionally predicted) motion vectors may be converted to uni-directional motion vectors before being inserted into the Merge list.
[0450] In some embodiments, the converted unidirectional motion vector may only come from reference list 0. In some embodiments, when the current slice / slice group / picture is bi-directionally predicted, the converted unidirectional motion vector may come from reference list 0 or list 1. In some embodiments, when the current slice / slice group / picture is bi-directionally predicted, the converted unidirectional motion vectors from reference list 0 and list 1 may be interleaved in the Merge list or / and the MMVD basic Merge candidate list.
[0451] In some embodiments, how the motion information is converted to a unidirectional motion vector may depend on the reference pictures. In some embodiments, if all reference pictures of one video data unit (such as a slice / slice group) in display order are past pictures, list 1 motion information may be utilized. In some embodiments, if at least one of the reference pictures of one video data unit (such as a slice / slice group) in display order is a past picture and at least one is a future picture, list 0 motion information may be utilized. In some embodiments, how the motion information is converted to a unidirectional motion vector may depend on a low latency check flag.
[0452] In some embodiments, the conversion process can be called just before the motion compensation process. In some embodiments, the conversion process can be called just after the motion candidate list (e.g., Merge list) construction process. In some embodiments, the conversion process can be called before calling the add MVD process in the MMVD process. That is, the add MVD process follows the design of unidirectional prediction rather than bidirectional prediction. In some embodiments, the conversion process can be called before calling the sample refinement process in the PROF process. That is, the add MVD process follows the design of unidirectional prediction rather than bidirectional prediction. In some embodiments, the conversion process can be called before calling the BIO (also known as BDOF) process. That is, for some cases, BIO can be disabled because it has been converted to unidirectional prediction. In some embodiments, the conversion process can be called before calling the DMVR process. That is, for some cases, DMVR can be disabled because it has been converted to unidirectional prediction.
[0453] Example 17: In some embodiments, how the motion candidate list is generated may depend on the block dimension.
[0454] In some embodiments, for certain block dimensions, all motion candidates derived from spatial blocks and / or temporal blocks and / or HMVP and / or other types of motion candidates may be restricted to be unidirectionally predicted.
[0455] In some embodiments, for certain block dimensions, if a motion candidate derived from a spatial block and / or a temporal block and / or an HMVP and / or other types of motion candidates is bidirectionally predicted, it may first be converted to unidirectionally predicted before being added to the candidate list.
[0456] Example 18: Whether sharing of Merge lists is allowed may depend on the encoding mode.
[0457] In some embodiments, for blocks encoded and decoded in the normal Merge mode, sharing of the Merge list may not be allowed, and for blocks encoded and decoded in the IBC mode, sharing of the Merge list may be allowed.
[0458] In some embodiments, when a block split from a parent shared node is encoded / decoded in a normal Merge mode, the updating of the HMVP table may be disabled after encoding / decoding the block.
[0459] Example 19: In the examples disclosed above, the block size / width / height of the luma block may also be changed to the block size / width / height of the chroma block (such as Cb, Cr or G / B / R).
[0460] Line buffer reduction for GBi mode
[0461] Example 20: Whether the GBi weighted index can be inherited or predicted from neighboring blocks (including CABAC context selection) depends on the position of the current block.
[0462] In some embodiments, the GBi weighted index cannot be inherited or predicted from neighboring blocks that are not in the same codec tree unit (CTU, also known as largest codec unit LCU) as the current block.
[0463] In some embodiments, the GBi weighting index cannot be inherited or predicted from neighboring blocks that are not on the same CTU line or CTU row as the current block.
[0464] In some embodiments, the GBi weighted index cannot be inherited or predicted from neighboring blocks that are not in the MxN region as the current block. For example, M=N=64. In this case, the slice / slice / picture is divided into multiple non-overlapping MxN regions.
[0465] In some embodiments, the GBi weighted index cannot be inherited or predicted from a neighboring block that is not in the same M×N region line or M×N region row as the current block. For example, M=N=64. Fig.10 CTU lines / rows and regional lines / rows are depicted in FIG.
[0466] In some embodiments, assuming the upper left corner (or any other position) of the current block is (x, y) and the upper left corner (or any other position) of the neighboring block is (x', y'), then if one of the following conditions is met, it cannot be inherited or predicted from the neighboring block.
[0467] (1) x / M!=x' / M. For example, M=128 or 64.
[0468] (2) y / N!=y' / N. For example, N=128 or 64.
[0469] (3) ((x / M!=x' / M)&&(y / N!=y' / N)). For example, M=N=128 or M=N=64.
[0470] (4) ((x / M!=x' / M)||(y / N!=y' / N)) For example, M=N=128 or M=N=64.
[0471] (5) x>>M!=x'>>M. For example, M=7 or 6.
[0472] (6) y>>N!=y'>>N. For example, N=7 or 6.
[0473] (7) ((x>>M!=x'>>M)&&(y>>N!=y'>>N)). For example, M=N=7 or M=N=6.
[0474] (8) ((x>>M!=x'>>M)||(y>>N!=y'>>N)). For example, M=N=7 or M=N=6.
[0475] In some embodiments, a flag is signaled in the PPS or slice header or slice group header or slice to indicate whether GBi can be applied to a picture / slice / slice group / slice. In some embodiments, whether and how to use GBi (such as how many candidate weights and the value of the weights) can be derived for a picture / slice / slice group / slice. In some embodiments, the derivation can depend on information such as QP, temporal layer, POC distance, etc.
[0476] Fig.10 An example of CTU (region) lines is shown. A shaded CTU (region) is on one CTU (region) line and an unshaded CTU (region) is on another CTU (region) line.
[0477] Simplification of Inter-Intra Prediction (IIP)
[0478] Example 21: The intra prediction mode in the IIP coded block is coded independently of the intra prediction mode of the IIP coded neighboring blocks.
[0479] In some embodiments, only the intra prediction mode of an intra-coded block may be coded such as the intra prediction mode used for an IIP codec block during the MPM list construction process.
[0480] In some embodiments, the intra prediction mode in the IIP codec block is encoded without mode prediction from any neighboring blocks.
[0481] Example 22: When the intra prediction mode of the IIP codec block and the intra prediction mode of the intra codec block are both used to encode the intra prediction mode of the new IIP codec block, the priority of the intra prediction mode of the IIP codec block may be lower than the priority of the intra prediction mode of the intra codec block.
[0482] In some embodiments, when deriving the MPM of the IIP codec block, the intra prediction modes of both the IIP codec block and the intra-coded neighboring blocks are used. However, the intra prediction mode from the intra-coded neighboring block can be inserted into the MPM list before the intra prediction mode from the IIP codec neighboring block.
[0483] In some embodiments, the intra prediction modes of neighboring blocks from intra coding may be inserted into the MPM list after the intra prediction modes of neighboring blocks from IIP coding.
[0484] Example 23: The intra prediction mode in the IIP codec block can also be used to predict the intra prediction mode of the intra codec block.
[0485] In some embodiments, the intra prediction mode in the IIP codec block may be used to derive the MPM of the normal intra codec block. In some embodiments, when the intra prediction mode in the IIP codec block and the intra prediction mode in the intra codec block are used to derive the MPM of the normal intra codec block, the priority of the intra prediction mode in the IIP codec block may be lower than the priority of the intra prediction mode in the intra codec block.
[0486] In some embodiments, the intra prediction mode in the IIP codec block may also be used to predict the intra prediction mode of the normal intra codec block or the IIP codec block only when one or more of the following conditions are met:
[0487] 1. Both blocks are in the same CTU line.
[0488] 2. Both blocks are in the same CTU.
[0489] 3. The two blocks are in the same M×N area, such as M=N=64.
[0490] 4. Both blocks are in the same M×N region line, such as M=N=64.
[0491] Example 24: In some embodiments, the MPM construction process for IIP codec blocks should be the same as the MPM construction process for normal intra codec blocks.
[0492] In some embodiments, six MPMs are used for inter-coded blocks utilizing inter-intra prediction.
[0493] In some embodiments, only some of the MPMs are used for the IIP codec block. In some embodiments, the first one is always used. In addition, optionally, there is no need to signal the MPM flag and the MPM index. In some embodiments, the first four MPMs can be used. In addition, optionally, there is no need to signal the MPM flag, but the MPM index needs to be signaled.
[0494] In some embodiments, each block may select one from the MPM list according to the intra prediction modes included in the MPM list, such as selecting a mode with a smallest index compared to a given mode (eg, planar).
[0495] In some embodiments, each block may select a subset of modes from the MPM list and signal a mode index in the subset.
[0496] In some embodiments, the context used for encoding intra MPM mode is reused for encoding intra mode in IIP codec block.In some embodiments, a different context used for encoding intra MPM mode is used for encoding intra mode in IIP codec block.
[0497] Example 25: In some embodiments, for angular intra prediction modes excluding horizontal and vertical directions, equal weights are used for intra prediction blocks and inter prediction blocks generated for the IIP codec block.
[0498] Example 26: In some embodiments, for certain locations, zero weights may be applied during the IIP encoding and decoding process.
[0499] In some embodiments, zero weights may be applied to intra-prediction blocks used in the IIP encoding and decoding process.
[0500] In some embodiments, zero weights may be applied to inter-prediction blocks used in the IIP encoding and decoding process.
[0501] Example 27: In some embodiments, no matter what the size of the current block is, the intra prediction mode of the IIP coding block can only be selected as one of the MPMs.
[0502] In some embodiments, the MPM flag is not signaled and is inferred to be 1 regardless of the size of the current block.
[0503] Example 28: For the IIP codec block, the Luma-predict-chroma mode (LM) mode is used to perform intra-frame prediction of the chroma component instead of the Derived Mode (DM).
[0504] In some embodiments, both DM and LM may be allowed.
[0505] In some embodiments, chroma components may allow multiple intra prediction modes.
[0506] In some embodiments, whether multiple modes for chroma components are allowed may depend on the color format. In one example, for a 4:4:4 color format, the allowed chroma intra prediction modes may be the same as those for luma components.
[0507] Example 29: In one or more of the following specific cases, inter-intra prediction may not be allowed:
[0508] Aw==T1||h==T1, for example, T1=4
[0509] Bw>T1||h>T1, for example, T1=64
[0510] C.(w==T1&&h==T2)||(w==T2&&h==T1), for example, T1=4, T2=16.
[0511] Example 30: For blocks utilizing bi-directional prediction, inter-intra prediction may not be allowed.
[0512] In some embodiments, if the selected Merge candidate of the IIP codec block uses bidirectional prediction, it will be converted to a unidirectional prediction Merge candidate. In some embodiments, only the prediction from reference list 0 is retained, and the Merge candidate is considered to be a unidirectional prediction with reference to reference list 0. In some embodiments, only the prediction from reference list 1 is retained, and the Merge candidate is considered to be a unidirectional prediction with reference to reference list 1.
[0513] In some embodiments, a restriction is added that the selected Merge candidate should be a unidirectional prediction Merge candidate. Optionally, the Mege index of the signaled IIP codec block indicates the index of the unidirectional prediction Merge candidate (ie, the bidirectional prediction Merge candidates are not counted).
[0514] In some embodiments, the Merge candidate list construction process used in the triangle prediction mode can be used to derive the motion candidate list for the IIP coding block.
[0515] Example 31: When inter-intra prediction is applied, some codec tools may not be enabled.
[0516] In some embodiments, bidirectional optical flow (BIO) is not applied for bidirectional prediction.
[0517] In some embodiments, overlapped block motion compensation (OBMC) is not applied.
[0518] In some embodiments, the decoder side motion vector derivation / refinement process is not allowed.
[0519] Example 32: Inter-frame The intra prediction process used in intra prediction may be different from the intra prediction process used in normal intra coding blocks.
[0520] In some embodiments, the neighboring samples may be filtered in different ways. In some embodiments, the neighboring samples are not filtered before performing intra prediction used in inter-intra prediction.
[0521] In some embodiments, for intra prediction used in inter-intra prediction, position-dependent intra prediction sample filtering is not performed. In some embodiments, multiline intra prediction is not allowed in inter-intra prediction. In some embodiments, wide angle intra prediction is not allowed in inter-intra prediction.
[0522] Example 33: Assume that the intra and inter prediction values in hybrid intra and inter prediction are PIntra and Pinter, and the weighting factors are w_intra and w_inter, respectively. The prediction value at position (x, y) is calculated as (PIntra(x, y)*w_intra(x, y)+PInter(x, y)*w_inter(x, y)+offset(x, y))>>N, where w_intra(x, y)+w_iner(x, y)=2^N, and offset(x, y)=2^(N–1). In one example, N=3.
[0523] Example 34: In some embodiments, the MPM flag signaled in the normal intra codec block and the IIP codec block should share the same arithmetic codec context.
[0524] Example 35:In some embodiments, no MPM is needed to encode intra prediction modes in IIP codec blocks (assuming block width and height are w and h).
[0525] In some embodiments, the four modes {planar, DC, vertical, horizontal} are binarized as 00, 01, 10, and 11 (any mapping rule may be utilized, such as 00-planar, 01-DC, 10-vertical, 11-horizontal).
[0526] In some embodiments, the four modes {planar, DC, vertical, horizontal} are binarized into 0, 10, 110 and 111 (any mapping rule may be used, such as 0-planar, 10-DC, 110-vertical, 111-horizontal).
[0527] In some embodiments, the four modes {planar, DC, vertical, horizontal} are binarized as 1, 01, 001, and 000 (any mapping rule may be utilized, such as 1-planar, 01-DC, 001-vertical, 000-horizontal).
[0528] In some embodiments, when W>N*H (N is an integer such as 2) can be used, only three modes {planar, DC, vertical} can be used. These three modes are binarized to 1, 01, 11 (any mapping rules can be used, such as 1-planar, 01-DC, 11-vertical).
[0529] In some embodiments, when W>N*H (N is an integer such as 2) can be used, only three modes {planar, DC, vertical} can be used. These three modes are binarized to 0, 10, 00 (any mapping rules can be used, such as 0-planar, 10-DC, 00-vertical).
[0530] In some embodiments, when H>N*W (N is an integer such as 2) can be used, only three modes {plane, DC, horizontal} can be used. These three modes are binarized to 1, 01, 11 (any mapping rules can be used, such as 1-plane, 01-DC, 11-horizontal).
[0531] In some embodiments, when H>N*W (N is an integer such as 2) can be used, only three modes {plane, DC, horizontal} can be used. These three modes are binarized to 0, 10, 00 (any mapping rules can be used, such as 0-plane, 10-DC, 00-horizontal).
[0532] Example 36: In some embodiments, only DC mode and planar mode are used in the IIP codec block. In some embodiments, a flag is signaled to indicate whether DC or planar is used.
[0533] Example 37: In some embodiments, the IIP is performed differently for different color components.
[0534] In some embodiments, chroma components (such as Cb and Cr) are not inter-intra predicted.
[0535] In some embodiments, the intra prediction mode of the chrominance component in the IIP codec block is different from the intra prediction mode of the luminance component. In some embodiments, the DC mode is always used for chrominance. In some embodiments, the planar mode is always used for chrominance. In some embodiments, the LM mode is always used for chrominance.
[0536] In some embodiments, how the different color components are IIPed may depend on the color format (such as 4:2:0 or 4:4:4).
[0537] In some embodiments, how to perform IIP on different color components may depend on the block size. For example, when the width or height of the current block is equal to or less than 4, chrominance components (such as Cb and Cr) are not inter-intra predicted.
[0538] MV accuracy issue
[0539] In the following discussion, the precision of MVs stored for spatial motion prediction is denoted as P1, and the precision of MVs stored for temporal motion prediction is denoted as P2.
[0540] Example 38: P1 and P2 may be the same or different.
[0541] In some embodiments, P1 is a 1 / 16 brightness pixel and P2 is a 1 / 4 brightness pixel. In some embodiments, P1 is a 1 / 16 brightness pixel and P2 is a 1 / 8 brightness pixel. In some embodiments, P1 is a 1 / 8 brightness pixel and P2 is a 1 / 4 brightness pixel. In some embodiments, P1 is a 1 / 8 brightness pixel and P2 is a 1 / 8 brightness pixel. In some embodiments, P2 is a 1 / 16 brightness pixel and P1 is a 1 / 4 brightness pixel. In some embodiments, P2 is a 1 / 16 brightness pixel and P1 is a 1 / 8 brightness pixel. In some embodiments, P2 is a 1 / 8 brightness pixel and P1 is a 1 / 4 brightness pixel.
[0542] Example 39:P1 and P2 may not be fixed. In some embodiments, P1 / P2 may be different for different standard profiles / levels / hierarchies. In some embodiments, P1 / P2 may be different for pictures in different temporal layers. In some embodiments, P1 / P2 may be different for pictures with different widths / heights. In some embodiments, P1 / P2 may be signaled from the encoder to the decoder in the VPS / SPS / PPS / slice header / picture group header / picture / CTU / CU.
[0543] Example 40: For MV (MVx, MVy), the precisions of MVx and MVy may be different, denoted as Px and Py.
[0544] In some embodiments, Px / Py may be different for different standard profiles / levels / hierarchies. In some embodiments, Px / Py may be different for pictures in different temporal layers. In some embodiments, Px may be different for pictures with different widths. In some embodiments, Py may be different for pictures with different heights. In some embodiments, Px / Py may be signaled from the encoder to the decoder in the VPS / SPS / PPS / slice header / picture group header / picture / CTU / CU.
[0545] Example 41: Before putting MV (MVx, MVy) into the storage for temporal motion prediction, it should be changed to the correct precision.
[0546] In some embodiments, if P1 >= P2, then MVx = Shift(MVx, P1 - P2), MVy = Shift(MVy, P1 - P2). In some embodiments, if P1 >= P2, then MVx = SignShift(MVx, P1 - P2), MVy = SignShift(MVy, P1 - P2). In some embodiments, if P1 < P2, then MVx = MVx << (P2 - P1), MVy = MVy << (P2 - P1).
[0547] Example 42: Assume the precision of MV (MVx, MVy) is Px and Py, and MVx or MVy is stored as an integer with N bits. The range of MV (MVx, MVy) is MinX <= MVx <= MaxX, and MinY <= MVy <= MaxY.
[0548] In some embodiments, MinX may be equal to MinY, or it may not be equal to MinY. In some embodiments, MaxX may be equal to MaxY, or it may not be equal to MaxY. In some embodiments, {MinX, MaxX} may depend on Px. In some embodiments, {MinY, MaxY} may depend on Py. In some embodiments, {MinX, MaxX, MinY, MaxY} may depend on N. In some embodiments, {MinX, MaxX, MinY, MaxY} may be different for MVs stored for spatial motion prediction and MVs stored for temporal motion prediction. In some embodiments, {MinX, MaxX, MinY, MaxY} may be different for different standard profiles / levels / tiers. In some embodiments, {MinX, MaxX, MinY, MaxY} may be different for pictures in different temporal layers. In some embodiments, {MinX, MaxX, MinY, MaxY} may be different for pictures with different widths / heights. In some embodiments, {MinX, MaxX, MinY, MaxY} may be signaled from the encoder to the decoder in VPS / SPS / PPS / slice header / slice group header / slice / CTU / CU. In some embodiments, {MinX,MaxX} may be different for pictures with different widths. In some embodiments, {MinY,MaxY} may be different for pictures with different heights. In some embodiments, MVx is clipped to [MinX,MaxX] before being placed in storage for spatial motion prediction. In some embodiments, MVx is clipped to [MinX,MaxX] before being placed in storage for temporal motion prediction. In some embodiments, MVy is clipped to [MinY,MaxY] before being placed in storage for spatial motion prediction. In some embodiments, MVy is clipped to [MinY,MaxY] before being placed in storage for temporal motion prediction.
[0549] Line buffer reduction for affine merge mode
[0550] Example 43: The affine model (derived CPMV or affine parameters) that an affine merge candidate inherits from neighboring blocks is always a 6-parameter affine model.
[0551] In some embodiments, if the neighboring block is encoded with a 4-parameter affine model, the affine model is still inherited as a 6-parameter affine model.
[0552] In some embodiments, whether the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model or a 4-parameter affine model may depend on the position of the current block. In some embodiments, if the neighboring block is not in the same codec tree unit (CTU, also known as the largest codec unit LCU) as the current block, the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model. In some embodiments, if the neighboring block is not in the same CTU line or CTU row as the current block, the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model. In some embodiments, if the neighboring block is not in the M×N region as the current block, the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model. For example, M=N=64. In this case, the slice / strip / picture is divided into multiple non-overlapping MxN regions. In some embodiments, if the neighboring block is not in the same M×N region line or M×N region row as the current block, the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model. For example, M=N=64. Fig.10 CTU lines / rows and regional lines / rows are depicted in FIG.
[0553] In some embodiments, assuming that the upper left corner (or any other position) of the current block is (x, y) and the upper left corner (or any other position) of the neighboring block is (x', y'), then the 4-parameter affine model from the neighboring block is inherited as a 6-parameter affine model if the neighboring block satisfies one or more of the following conditions:
[0554] (a) x / M! = x' / M. For example, M = 128 or 64.
[0555] (b) y / N!=y' / N. For example, N=128 or 64.
[0556] (c) ((x / M!=x' / M)&& (y / N!=y' / N)). For example, M=N=128 or M=N=64.
[0557] (d) ((x / M!=x' / M)||(y / N!=y' / N)) For example, M=N=128 or M=N=64.
[0558] (e) x>>M!=x'>>M. For example, M=7 or 6.
[0559] (f) y>>N!=y'>>N. For example, N=7 or 6.
[0560] (g) ((x>>M!=x'>>M)&&(y>>N!=y'>>N)). For example, M=N=7 or M=N=6.
[0561] (h)((x>>M!=x'>>M)||(y>>N!=y'>>N)). For example, M=N=7 or M=N=6.
[0562] 5. Examples
[0563] The following description shows an example of how to implement the disclosed technology within the syntax structure of the current VVC standard. Newly added parts are indicated in bold, and deleted parts are indicated in italics.
[0564] 5.1 Embodiment #1 (4x4 inter prediction disabled, and bidirectional prediction disabled for 4x8, 8x4, 4x16, and 16x4 blocks)
[0565] 7.3.6.6 Codec unit syntax
[0566]
[0567]
[0568]
[0569] 7.4.7.6 Codec unit semantics
[0570] pred_mode_flag equal to 0 specifies that the current codec unit is encoded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current codec unit is encoded in intra prediction mode. For x = x0..x0+cbWidth-1 and y = y0..y0+cbHeight-1, the variable CuPredMode[x][y] is derived as follows:
[0571] - If pred_mode_flag is equal to 0, CuPredMode[x][y] is set equal to MODE_INTER.
[0572] - Otherwise (pred_mode_flag is equal to 1), CuPredMode[x][y] is set equal to MODE_INTRA.
[0573] When pred_mode_flag is not present, it is inferred to be equal to 1 when decoding an I slice group or when decoding a codec unit with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0574] pred_mode_ibc_flag equal to 1 specifies that the current codec unit is encoded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current codec unit is not encoded in IBC prediction mode.
[0575] When pred_mode_ibc_flag is not present, it is inferred to be equal to the value of sps_ibc_enabled_flag when decoding an I slice group, or when decoding a codec unit coded in skip mode with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0576] When pred_mode_ibc_flag is equal to 1, the variable CuPredMode[x][y] is set equal to MODE_IBC for x=x0..x0+cbWidth-1 and y=y0..y0+cbHeight-1.
[0577] inter_pred_idc[x0][y0] specifies whether list 0, list 1 or bidirectional prediction is used for the current codec unit according to Tables 7-9. Array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.
[0578] Table 7-9 – Inter prediction mode name association
[0579]
[0580] When inter_pred_idc[x0][y0] is not present, it is inferred to be equal to PRED_L0.
[0581] 8.5.2.1 Overview
[0582] The inputs to this process are:
[0583] - The luminance position (xCb, yCb) of the upper left sample of the current luminance codec block relative to the upper left luminance sample of the current picture,
[0584] - variable cbWidth, which specifies the width of the current codec block in units of luma samples,
[0585] - The variable cbHeight specifies the height of the current codec block in units of luma samples.
[0586] The output of this process is:
[0587] - 1 / 16 fractional sample precision of the luma motion vectors mvL0[0][0] and mvL1[0][0],
[0588] - reference indices refIdxL0 and refIdxL1,
[0589] - prediction list uses flags predFlagL0[0][0] and predFlagL1[0][0],
[0590] - Bidirectional prediction weight index gbiIdx.
[0591] Let variable LX be the RefPicList[X] of the current picture, where X is 0 or 1.
[0592] For the derivation of the variables mvL0[0][0] and mvL1[0][0], refIdxL0 and refIdxL1, and predFlagL0[0][0] and predFlagL1[0][0], the following applies:
[0593] -If merge_flag[xCb][yCb] is equal to 1, the derivation process of the luma motion vector for the Merge mode specified in clause 8.5.2.2 is called, where the luma position (xCb, yCb), variables cbWidth and cbHeight are input, and the output is the luma motion vector mvL0[0][0], mvL1[0][0], reference indices refIdxL0, refIdxL1, prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and bidirectional prediction weight index gbiIdx.
[0594] - Otherwise, the following applies:
[0595] - For X replaced by 0 or 1 in the variables predFlagLX[0][0], mvLX[0][0] and refIdxLX, in PRED_LX, and in the syntax elements ref_idx_lX and MvdLX, the following ordered steps apply:
[0596] 1. The variables refIdxLX and predFlagLX[0][0] are derived as follows:
[0597] - if inter_pred_idc[xCb][yCb] is equal to PRED_LX or PRED_BI,
[0598] refIdxLX = ref_idx_lX[ xCb ][ yCb ] (8-266)
[0599] predFlagLX[ 0 ][0 ] = 1 (8-267)
[0600] Otherwise, the variables refIdxLX and predFlagLX[0][0] are specified as follows:
[0601] refIdxLX = -1 (8-268)
[0602] predFlagLX[ 0 ][0 ] = 0 (8-269)
[0603] 2. The variable mvdLX is derived as follows:
[0604] mvdLX[ 0 ] = MvdLX[ xCb ][ yCb ][ 0 ] (8-270)
[0605] mvdLX[ 1 ] = MvdLX[ xCb ][ yCb ][ 1 ] (8-271)
[0606] 3. When predFlagLX[0][0] is equal to 1, the derivation process of luma motion vector prediction in clause 8.5.2.8 is called, with the luma codec block position (xCb, yCb), codec block width cbWidth, codec block height cbHeight and variable refIdxLX as input, and the output is mvpLX.
[0607] 4. When predFlagLX[0][0] is equal to 1, the luminance motion vector mvLX[0][0] is derived as follows:
[0608] uLX[ 0 ] = ( mvpLX[ 0 ] + mvdLX[ 0 ] + 2 18 ) % 2 18 (8-272)
[0609] mvLX[0][0][0]=(uLX[0]>=2 17 )? (uLX[0]-2 18 ):
[0610] uLX[0](8-273)
[0611] uLX[ 1 ] = ( mvpLX[ 1 ] + mvdLX[ 1 ] + 2 18 ) % 2 18 (8-274)
[0612] mvLX[0][0][1]=(uLX[1]>=217 )? (uLX[1]-2 18 ):
[0613] uLX[1](8-275)
[0614] NOTE 1 – The resulting value of mvLX[0][0][0] and mvLX[0][0][1] as specified above will always be between -2 17 to 2 17 -1(including -2 17 and 2 17 -1).
[0615] - The bidirectional prediction weight index gbiIdx is set equal to gbi_idx[xCb][yCb].
[0616] refIdxL1 is set equal to -1, predFlagL1 is set equal to 0, and gbiIdx is set equal to 0 when all of the following conditions are true:
[0617] -predFlagL0[0][0] is equal to 1.
[0618] -predFlagL1[0][0] is equal to 1.
[0619] -(cbWidth+cbHeight==8)||(cbWidth+cbHeight==12)||
[0620] (cbWidth+cbHeight==20)
[0621] =cbWidth is equal to 4; cbHeight is equal to 4.
[0622] The update process of the history-based motion vector prediction value list specified in clause 8.5.2.16 is called together with the luma motion vectors mvL0[0][0] and mvL1[0][0], the reference indices refIdxL0 and refIdxL1, the prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and the bidirectional prediction weight index gbiIdx.
[0623] 9.5.3.8 Binarization process of inter_pred_idc
[0624] The input to this process is a request for binarization of the syntax element inter_pred_idc, the current luma codec block width cbWidth and the current luma codec block height cbHeight.
[0625] The output of this process is the binarization of the syntax elements.
[0626] The binarization of the syntax element inter_pred_idc is specified in Table 9-9.
[0627] Table 9-9 – Binarization of inter_pred_idc
[0628]
[0629] 9.5.4.2.1 Overview
[0630] Table 9-10 – Assignment of ctxInc to the syntax elements with context coding bins
[0631]
[0632] 5.2 Example #2 (disable 4x4 inter prediction) 7.3.6.6 Codec Unit Syntax
[0633]
[0634]
[0635]
[0636] 7.4.7.6 Codec unit semantics
[0637] pred_mode_flag equal to 0 specifies that the current codec unit is encoded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current codec unit is encoded in intra prediction mode. For x = x0..x0+cbWidth-1 and y = y0..y0+cbHeight-1, the variable CuPredMode[x][y] is derived as follows:
[0638] - If pred_mode_flag is equal to 0, CuPredMode[x][y] is set equal to MODE_INTER.
[0639] - Otherwise (pred_mode_flag is equal to 1), CuPredMode[x][y] is set equal to MODE_INTRA.
[0640] When pred_mode_flag is not present, it is inferred to be equal to 1 when decoding an I slice group or when decoding a codec unit with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0641] pred_mode_ibc_flag equal to 1 specifies that the current codec unit is encoded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current codec unit is not encoded in IBC prediction mode.
[0642] When pred_mode_ibc_flag is not present, it is inferred to be equal to the value of sps_ibc_enabled_flag when decoding an I slice group, or when decoding a codec unit coded in skip mode with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0643] When pred_mode_ibc_flag is equal to 1, the variable CuPredMode[x][y] is set equal to MODE_IBC for x=x0..x0+cbWidth-1 and y=y0..y0+cbHeight-1.
[0644] 5.3 Example #3 (disabling bidirectional prediction for 4x8, 8x4, 4x16 and 16x4 blocks)
[0645] 7.4.7.6 Codec unit semantics
[0646] inter_pred_idc[x0][y0] specifies whether list 0, list 1 or bidirectional prediction is used for the current codec unit according to Tables 7-9. Array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.
[0647] Table 7-9 – Inter prediction mode name association
[0648]
[0649] When inter_pred_idc[x0][y0] is not present, it is inferred to be equal to PRED_L0.
[0650] 8.5.2.1 Overview
[0651] The inputs to this process are:
[0652] - The luminance position (xCb, yCb) of the upper left sample of the current luminance codec block relative to the upper left luminance sample of the current picture,
[0653] - variable cbWidth, which specifies the width of the current codec block in units of luma samples,
[0654] - The variable cbHeight specifies the height of the current codec block in units of luma samples.
[0655] The output of this process is:
[0656] - 1 / 16 fractional sample precision of the luma motion vectors mvL0[0][0] and mvL1[0][0],
[0657] - reference indices refIdxL0 and refIdxL1,
[0658] - prediction list uses flags predFlagL0[0][0] and predFlagL1[0][0],
[0659] - Bidirectional prediction weight index gbiIdx.
[0660] Let variable LX be the RefPicList[X] of the current picture, where X is 0 or 1.
[0661] For the derivation of the variables mvL0[0][0] and mvL1[0][0], refIdxL0 and refIdxL1, and predFlagL0[0][0] and predFlagL1[0][0], the following applies:
[0662] -If merge_flag[xCb][yCb] is equal to 1, the derivation process of the luma motion vector for the Merge mode specified in clause 8.5.2.2 is called, where the luma position (xCb, yCb), variables cbWidth and cbHeight are input, and the output is the luma motion vector mvL0[0][0], mvL1[0][0], reference indices refIdxL0, refIdxL1, prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and bidirectional prediction weight index gbiIdx.
[0663] - Otherwise, the following applies:
[0664] - For X replaced by 0 or 1 in the variables predFlagLX[0][0], mvLX[0][0] and refIdxLX, in PRED_LX, and in the syntax elements ref_idx_lX and MvdLX, the following ordered steps apply:
[0665] 5. The variables refIdxLX and predFlagLX[0][0] are derived as follows:
[0666] - if inter_pred_idc[xCb][yCb] is equal to PRED_LX or PRED_BI,
[0667] refIdxLX = ref_idx_lX[ xCb ][ yCb ] (8-266)
[0668] predFlagLX[ 0 ][0 ] = 1 (8-267)
[0669] Otherwise, the variables refIdxLX and predFlagLX[0][0] are specified as follows:
[0670] refIdxLX = -1 (8-268)
[0671] predFlagLX[ 0 ][0 ] = 0 (8-269)
[0672] 6. The variable mvdLX is derived as follows:
[0673] mvdLX[ 0 ] = MvdLX[ xCb ][ yCb ][ 0 ] (8-270)
[0674] mvdLX[ 1 ] = MvdLX[ xCb ][ yCb ][ 1 ] (8-271)
[0675] 7. When predFlagLX[0][0] is equal to 1, the derivation process of luma motion vector prediction in clause 8.5.2.8 is called, with the luma codec block position (xCb, yCb), codec block width cbWidth, codec block height cbHeight and variable refIdxLX as input, and the output is mvpLX.
[0676] 8. When predFlagLX[0][0] is equal to 1, the luminance motion vector mvLX[0][0] is derived as follows:
[0677] uLX[ 0 ] = ( mvpLX[ 0 ] + mvdLX[ 0 ] + 2 18 ) % 2 18 (8-272)
[0678] mvLX[0][0][0]=(uLX[0]>=2 17 )? (uLX[0]-2 18 ):
[0679] uLX[0](8-273)
[0680] uLX[ 1 ] = ( mvpLX[ 1 ] + mvdLX[ 1 ] + 218 ) % 2 18 (8-274)
[0681] mvLX[0][0][1]=(uLX[1]>=2 17 )? (uLX[1]-2 18 ):
[0682] uLX[1](8-275)
[0683] NOTE 1 – The resulting value of mvLX[0][0][0] and mvLX[0][0][1] as specified above will always be between -2 17 to 2 17 -1(including -2 17 and 2 17 -1).
[0684] - The bidirectional prediction weight index gbiIdx is set equal to gbi_idx[xCb][yCb].
[0685] refIdxL1 is set equal to -1, predFlagL1 is set equal to 0, and gbiIdx is set equal to 0 when all of the following conditions are true:
[0686] -predFlagL0[0][0] is equal to 1.
[0687] -predFlagL1[0][0] is equal to 1.
[0688] -(cbWidth+cbHeight==8)||(cbWidth+cbHeight==12)||
[0689] (cbWidth+cbHeight==20)
[0690] -cbWidth is equal to 4; cbHeight is equal to 4.
[0691] The update process of the history-based motion vector prediction value list specified in clause 8.5.2.16 is called together with the luma motion vectors mvL0[0][0] and mvL1[0][0], the reference indices refIdxL0 and refIdxL1, the prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and the bidirectional prediction weight index gbiIdx.
[0692] 9.5.3.8 Binarization process of inter_pred_idc
[0693] The input to this process is a request for binarization of the syntax element inter_pred_idc, the current luma codec block width cbWidth and the current luma codec block height cbHeight.
[0694] The output of this process is the binarization of the syntax elements.
[0695] The binarization of the syntax element inter_pred_idc is specified in Table 9-9.
[0696] Table 9-9 – Binarization of inter_pred_idc
[0697]
[0698] 9.5.4.2.1 Overview
[0699] Table 9-10 – Assignment of ctxInc to syntax elements with context coding bins
[0700]
[0701] Example #4 (disable 4x4 inter prediction and disable bidirectional prediction for 4x8, 8x4 blocks) 7.3.6.6 Codec Unit Syntax
[0702]
[0703]
[0704]
[0705] 7.4.7.6 Codec unit semantics
[0706] pred_mode_flag equal to 0 specifies that the current codec unit is encoded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current codec unit is encoded in intra prediction mode. For x = x0..x0+cbWidth-1 and y = y0..y0+cbHeight-1, the variable CuPredMode[x][y] is derived as follows:
[0707] - If pred_mode_flag is equal to 0, CuPredMode[x][y] is set equal to MODE_INTER.
[0708] - Otherwise (pred_mode_flag is equal to 1), CuPredMode[x][y] is set equal to MODE_INTRA.
[0709] When pred_mode_flag is not present, it is inferred to be equal to 1 when decoding an I slice group or when decoding a codec unit with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0710] pred_mode_ibc_flag equal to 1 specifies that the current codec unit is encoded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current codec unit is not encoded in IBC prediction mode.
[0711] When pred_mode_ibc_flag is not present, it is inferred to be equal to the value of sps_ibc_enabled_flag when decoding an I slice group, or when decoding a codec unit coded in skip mode with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0712] When pred_mode_ibc_flag is equal to 1, the variable CuPredMode[x][y] is set equal to MODE_IBC for x=x0..x0+cbWidth-1 and y=y0..y0+cbHeight-1.
[0713] inter_pred_idc[x0][y0] specifies whether list 0, list 1 or bidirectional prediction is used for the current codec unit according to Tables 7-9. Array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.
[0714] Table 7-9 – Inter prediction mode name association
[0715]
[0716] When inter_pred_idc[x0][y0] is not present, it is inferred to be equal to PRED_L0.
[0717] 8.5.2.1 Overview
[0718] The inputs to this process are:
[0719] - The luminance position (xCb, yCb) of the upper left sample of the current luminance codec block relative to the upper left luminance sample of the current picture,
[0720] - variable cbWidth, which specifies the width of the current codec block in units of luma samples,
[0721] - The variable cbHeight specifies the height of the current codec block in units of luma samples.
[0722] The output of this process is:
[0723] - 1 / 16 fractional sample precision of the luma motion vectors mvL0[0][0] and mvL1[0][0],
[0724] - reference indices refIdxL0 and refIdxL1,
[0725] - prediction list uses flags predFlagL0[0][0] and predFlagL1[0][0],
[0726] - Bidirectional prediction weight index gbiIdx.
[0727] Let variable LX be the RefPicList[X] of the current picture, where X is 0 or 1.
[0728] For the derivation of the variables mvL0[0][0] and mvL1[0][0], refIdxL0 and refIdxL1, and predFlagL0[0][0] and predFlagL1[0][0], the following applies:
[0729] -If merge_flag[xCb][yCb] is equal to 1, the derivation process of the luma motion vector for the Merge mode specified in clause 8.5.2.2 is called, where the luma position (xCb, yCb), variables cbWidth and cbHeight are input, and the output is the luma motion vector mvL0[0][0], mvL1[0][0], reference indices refIdxL0, refIdxL1, prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and bidirectional prediction weight index gbiIdx.
[0730] - Otherwise, the following applies:
[0731] - For X replaced by 0 or 1 in the variables predFlagLX[0][0], mvLX[0][0] and refIdxLX, in PRED_LX, and in the syntax elements ref_idx_lX and MvdLX, the following ordered steps apply:
[0732] 1. The variables refIdxLX and predFlagLX[0][0] are derived as follows:
[0733] - if inter_pred_idc[xCb][yCb] is equal to PRED_LX or PRED_BI,
[0734] refIdxLX = ref_idx_lX[ xCb ][ yCb ] (8-266)
[0735] predFlagLX[ 0 ][0 ] = 1 (8-267)
[0736] Otherwise, the variables refIdxLX and predFlagLX[0][0] are specified as follows:
[0737] refIdxLX = -1 (8-268)
[0738] predFlagLX[ 0 ][0 ] = 0 (8-269)
[0739] 2. The variable mvdLX is derived as follows:
[0740] mvdLX[ 0 ] = MvdLX[ xCb ][ yCb ][ 0 ] (8-270)
[0741] mvdLX[ 1 ] = MvdLX[ xCb ][ yCb ][ 1 ] (8-271)
[0742] 3. When predFlagLX[0][0] is equal to 1, the derivation process of luma motion vector prediction in clause 8.5.2.8 is called, with the luma codec block position (xCb, yCb), codec block width cbWidth, codec block height cbHeight and variable refIdxLX as input, and the output is mvpLX.
[0743] 4. When predFlagLX[0][0] is equal to 1, the luminance motion vector mvLX[0][0] is derived as follows:
[0744] uLX[ 0 ] = ( mvpLX[ 0 ] + mvdLX[ 0 ] + 2 18 ) % 2 18 (8-272)
[0745] mvLX[0][0][0]=(uLX[0]>=2 17 )? (uLX[0]-2 18 ):
[0746] uLX[0](8-273)
[0747] uLX[ 1 ] = ( mvpLX[ 1 ] + mvdLX[ 1 ] + 218 ) % 2 18 (8-274)
[0748] mvLX[0][0][1]=(uLX[1]>=2 17 )? (uLX[1]-2 18 ):
[0749] uLX[1](8-275)
[0750] NOTE 1 – The resulting value of mvLX[0][0][0] and mvLX[0][0][1] as specified above will always be between -2 17 to 2 17 -1(including -2 17 and 2 17 -1).
[0751] - The bidirectional prediction weight index gbiIdx is set equal to gbi_idx[xCb][yCb].
[0752] refIdxL1 is set equal to -1, predFlagL1 is set equal to 0, and gbiIdx is set equal to 0 when all of the following conditions are true:
[0753] -predFlagL0[0][0] is equal to 1.
[0754] -predFlagL1[0][0] is equal to 1.
[0755] -(cbWidth+cbHeight==8)||(cbWidth+cbHeight==12)
[0756] -cbWidth is equal to 4.
[0757] -cbHeight is equal to 4.
[0758] The update process of the history-based motion vector prediction value list specified in clause 8.5.2.16 is called together with the luma motion vectors mvL0[0][0] and mvL1[0][0], the reference indices refIdxL0 and refIdxL1, the prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and the bidirectional prediction weight index gbiIdx.
[0759] 9.5.3.8 Binarization process of inter_pred_idc
[0760] The input to this process is a request for binarization of the syntax element inter_pred_idc, the current luma codec block width cbWidth and the current luma codec block height cbHeight.
[0761] The output of this process is the binarization of the syntax elements.
[0762] The binarization of the syntax element inter_pred_idc is specified in Table 9-9.
[0763] Table 9-9 – Binarization of inter_pred_idc
[0764]
[0765] 9.5.4.2.1 Overview
[0766] Table 9-10 – Assignment of ctxInc to syntax elements with context coding bins
[0767]
[0768] Embodiment #5 (disable 4x4 inter prediction, disable bidirectional prediction for 4x8 and 8x4 blocks, disable the shared Merge list of the normal Merge mode)
[0769] 7.3.6.6 Codec unit syntax
[0770]
[0771]
[0772]
[0773] 7.4.7.6 Codec unit semantics
[0774] pred_mode_flag equal to 0 specifies that the current codec unit is encoded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current codec unit is encoded in intra prediction mode. For x = x0..x0+cbWidth-1 and y = y0..y0+cbHeight-1, the variable CuPredMode[x][y] is derived as follows:
[0775] - If pred_mode_flag is equal to 0, CuPredMode[x][y] is set equal to MODE_INTER.
[0776] - Otherwise (pred_mode_flag is equal to 1), CuPredMode[x][y] is set equal to MODE_INTRA.
[0777] When pred_mode_flag is not present, it is inferred to be equal to 1 when decoding an I slice group or when decoding a codec unit with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0778] pred_mode_ibc_flag equal to 1 specifies that the current codec unit is encoded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current codec unit is not encoded in IBC prediction mode.
[0779] When pred_mode_ibc_flag is not present, it is inferred to be equal to the value of sps_ibc_enabled_flag when decoding an I slice group, or when decoding a codec unit coded in skip mode with cbWidth equal to 4 and cbHeight equal to 4, respectively, and is inferred to be equal to 0 when decoding a P slice group or a B slice group.
[0780] When pred_mode_ibc_flag is equal to 1, the variable CuPredMode[x][y] is set equal to MODE_IBC for x=x0..x0+cbWidth-1 and y=y0..y0+cbHeight-1.
[0781] inter_pred_idc[x0][y0] specifies whether list 0, list 1 or bidirectional prediction is used for the current codec unit according to Tables 7-9. Array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.
[0782] Table 7-9 – Inter prediction mode name association
[0783]
[0784] When inter_pred_idc[x0][y0] is not present, it is inferred to be equal to PRED_L0.
[0785] 8.5.2.1 Overview
[0786] The inputs to this process are:
[0787] - The luminance position (xCb, yCb) of the upper left sample of the current luminance codec block relative to the upper left luminance sample of the current picture,
[0788] - variable cbWidth, which specifies the width of the current codec block in units of luma samples,
[0789] - The variable cbHeight specifies the height of the current codec block in units of luma samples.
[0790] The output of this process is:
[0791] - 1 / 16 fractional sample precision of the luma motion vectors mvL0[0][0] and mvL1[0][0],
[0792] - reference indices refIdxL0 and refIdxL1,
[0793] - prediction list uses flags predFlagL0[0][0] and predFlagL1[0][0],
[0794] - Bidirectional prediction weight index gbiIdx.
[0795] Let variable LX be the RefPicList[X] of the current picture, where X is 0 or 1.
[0796] For the derivation of the variables mvL0[0][0] and mvL1[0][0], refIdxL0 and refIdxL1, and predFlagL0[0][0] and predFlagL1[0][0], the following applies:
[0797] -If merge_flag[xCb][yCb] is equal to 1, the derivation process of the luma motion vector for the Merge mode specified in clause 8.5.2.2 is called, where the luma position (xCb, yCb), variables cbWidth and cbHeight are input, and the output is the luma motion vector mvL0[0][0], mvL1[0][0], reference indices refIdxL0, refIdxL1, prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and bidirectional prediction weight index gbiIdx.
[0798] - Otherwise, the following applies:
[0799] - For X replaced by 0 or 1 in the variables predFlagLX[0][0], mvLX[0][0] and refIdxLX, in PRED_LX, and in the syntax elements ref_idx_lX and MvdLX, the following ordered steps apply:
[0800] 5. The variables refIdxLX and predFlagLX[0][0] are derived as follows:
[0801] - if inter_pred_idc[xCb][yCb] is equal to PRED_LX or PRED_BI,
[0802] refIdxLX = ref_idx_lX[ xCb ][ yCb ] (8-266)
[0803] predFlagLX[ 0 ][0 ] = 1 (8-267)
[0804] Otherwise, the variables refIdxLX and predFlagLX[0][0] are specified as follows:
[0805] refIdxLX = -1 (8-268)
[0806] predFlagLX[ 0 ][0 ] = 0 (8-269)
[0807] 6. The variable mvdLX is derived as follows:
[0808] mvdLX[ 0 ] = MvdLX[ xCb ][ yCb ][ 0 ] (8-270)
[0809] mvdLX[ 1 ] = MvdLX[ xCb ][ yCb ][ 1 ] (8-271)
[0810] 7. When predFlagLX[0][0] is equal to 1, the derivation process of luma motion vector prediction in clause 8.5.2.8 is called, with the luma codec block position (xCb, yCb), codec block width cbWidth, codec block height cbHeight and variable refIdxLX as input, and the output is mvpLX.
[0811] 8. When predFlagLX[0][0] is equal to 1, the luminance motion vector mvLX[0][0] is derived as follows:
[0812] uLX[ 0 ] = ( mvpLX[ 0 ] + mvdLX[ 0 ] + 2 18 ) % 2 18 (8-272)
[0813] mvLX[0][0][0]=(uLX[0]>=2 17 )? (uLX[0]-2 18 ):
[0814] uLX[0](8-273)
[0815] uLX[ 1 ] = ( mvpLX[ 1 ] + mvdLX[ 1 ] + 2 18 ) % 2 18 (8-274)
[0816] mvLX[0][0][1]=(uLX[1]>=2 17 )? (uLX[1]-2 18 ):
[0817] uLX[1](8-275)
[0818] NOTE 1 – The resulting value of mvLX[0][0][0] and mvLX[0][0][1] as specified above will always be between -2 17 to 2 17 -1(including -2 17 and 2 17 -1).
[0819] - The bidirectional prediction weight index gbiIdx is set equal to gbi_idx[xCb][yCb].
[0820] refIdxL1 is set equal to -1, predFlagL1 is set equal to 0, and gbiIdx is set equal to 0 when all of the following conditions are true:
[0821] -predFlagL0[0][0] is equal to 1.
[0822] -predFlagL1[0][0] is equal to 1.
[0823] -(cbWidth+cbHeight==8)||(cbWidth+cbHeight==12)
[0824] -cbWidth is equal to 4.
[0825] -cbHeight is equal to 4.
[0826] The update process of the history-based motion vector prediction value list specified in clause 8.5.2.16 is called together with the luma motion vectors mvL0[0][0] and mvL1[0][0], the reference indices refIdxL0 and refIdxL1, the prediction list utilization flags predFlagL0[0][0] and predFlagL1[0][0], and the bidirectional prediction weight index gbiIdx.
[0827] 8.5.2.2 Derivation of Luma Motion Vectors in Merge Mode
[0828] This process is called only when merge_flag[xCb][yPb] is equal to 1, where (xCb, yCb) specifies the upper left sample of the current luma codec block relative to the upper left luma sample of the current picture.
[0829] The inputs to this process are:
[0830] - The luminance position (xCb, yCb) of the upper left sample of the current luminance codec block relative to the upper left luminance sample of the current picture,
[0831] - variable cbWidth, which specifies the width of the current codec block in units of luma samples,
[0832] - The variable cbHeight specifies the height of the current codec block in units of luma samples.
[0833] The output of this process is:
[0834] - 1 / 16 fractional sample precision of the luma motion vectors mvL0[0][0] and mvL1[0][0],
[0835] - reference indices refIdxL0 and refIdxL1,
[0836] - prediction list uses flags predFlagL0[0][0] and predFlagL1[0][0],
[0837] - Bidirectional prediction weight index gbiIdx.
[0838] The bidirectional prediction weight index gbiIdx is set equal to 0.
[0839] The variables xSmr, ySmr, smrWidth, smrHeight, and smrNumHmvpCand are derived as follows:
[0840] xSmr = IsInSmr[xCb][yCb]? SmrX[ xCb ][ yCb ] : xCb (8-276)
[0841] ySmr = IsInSmr[xCb][yCb]? SmrY[ xCb ][ yCb ] : yCb (8-277)
[0842] smrWidth = IsInSmr[xCb][yCb]? SmrW[ xCb ][ yCb ] : cbWidth (8-278)
[0843] smrHeight = IsInSmr[xCb][yCb]? SmrH[ xCb ][ yCb ] : cbHeight(8-279)
[0844] smrNumHmvpCand=
[0845] IsInSmr[xCb][yCb]? NumHmvpSmrCand:NumHmvpCand(8-280)
[0846] 8.5.2.6 The derivation process of history-based merge candidates
[0847] The inputs to this process are:
[0848] -Merge candidate list mergeCandList,
[0849] - the variable isInSmr, which specifies whether the current codec unit is inside the shared merge candidate region,
[0850] - The number of available merge candidates in the list numCurrMergeCand.
[0851] The output of this process is:
[0852] - The modified Merge candidate list mergeCandList,
[0853] - The modified number of merge candidates in the list numCurrMergeCand.
[0854] The variables isPrunedA1 and isPrunedB1 are both set equal to FALSE.
[0855] The array smrHmvpCandList and the variable smrNumHmvpCand are derived as follows:
[0856] smrHmvpCandList = isInSmr? HmvpSmrCandList : HmvpCandList (8-353)smrNumHmvpCand = isInSmr? NumHmvpSmrCand : NumHmvpCand (8-354)
[0857] For each candidate in smrHmvpCandList[hMvpIdx] with index hMvpIdx=1..smrNumHmvpCand, repeat the following ordered steps until numCurrMergeCand equals (MaxNumMergeCand-1):
[0858] 1. The variable sameMotion is derived as follows:
[0859] - If all of the following conditions are true for any Merge candidate N, where N is A1 or B1, then sameMotion and isPrunedN are both set equal to TRUE:
[0860] -hMvpIdx is less than or equal to 2.
[0861] -CandidatesmrHmvpCandList[smrNumHmvpCand-hMvpIdx] is equal to MergeCandidateN.
[0862] -isPrunedN is equal to FALSE.
[0863] Otherwise, sameMotion is set equal to FALSE.
[0864] 2. When sameMotion is equal to FFALSE, the candidate smrHmvpCandList[smrNumHmvpCand-hMvpIdx] is added to the Merge candidate list as follows:
[0865] mergeCandList[numCurrMergeCand++]=
[0866] smrHmvpCandList[smrNumHmvpCand-hMvpIdx](8-355)
[0867] 9.5.3.8 Binarization process of inter_pred_idc
[0868] The input to this process is a request for binarization of the syntax element inter_pred_idc, the current luma codec block width cbWidth and the current luma codec block height cbHeight.
[0869] The output of this process is the binarization of the syntax elements.
[0870] The binarization of the syntax element inter_pred_idc is specified in Table 9-9.
[0871] Table 9-9 – Binarization of inter_pred_idc
[0872]
[0873] 9.5.4.2.1 Overview
[0874] Table 9-10 – Assignment of ctxInc to syntax elements with context coding bins
[0875]
[0876] Fig.11 1 is a block diagram of a video processing device 1100. The device 1100 can be used to implement one or more methods described herein. The device 1100 can be embodied in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. The device 1100 may include one or more processors 1102, one or more memories 1104, and video processing hardware 1106. The (multiple) processors 1102 can be configured to implement one or more methods described in this document. The memory (multiple memories) 1104 can be used to store data and code for implementing the methods and techniques described herein. The video processing hardware 1106 can be used to implement some of the techniques described in this document in hardware circuits.
[0877] Fig.12 12 is a flow chart of an example method 1200 of video processing. The method 1200 includes determining (1202) a size constraint between a representative motion vector of a current video block and a motion vector of a sub-block of the current video block that is affine-coded, and performing (1204) a conversion between a bitstream representation and a pixel value of the current video block or the sub-block by using the size constraint.
[0878] In this document, the term "video processing" may refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm may be applied during the conversion from a pixel representation of a video to a corresponding bitstream representation, or vice versa. The bitstream representation of the current video block may, for example, correspond to bits that are concatenated or distributed at different locations within the bitstream, as defined by the syntax. For example, a macroblock may be encoded based on the error residual values of the transform and codec and also using bits in the header and other fields in the bitstream.
[0879] It should be appreciated that the disclosed techniques are useful for implementing embodiments in which the implementation complexity of video processing is reduced through reduced memory requirements or line buffer size requirements.Some of the presently disclosed techniques can be described using the following clause-based description.
[0880] 1. A video processing method, comprising:
[0881] Determining a size limit between a representative motion vector of a current video block being affine-coded and a motion vector of a sub-block of the current video block; and
[0882] The conversion between the bitstream representation and the pixel values of the current video block or sub-block is performed by using the size constraints.
[0883] 2. A method according to clause 1, wherein performing the conversion includes generating a bitstream representation from the pixel values.
[0884] 3. A method according to clause 1, wherein performing the conversion includes generating pixel values from a bitstream representation.
[0885] 4. A method according to any of clauses 1 to 3, wherein the size restriction comprises constraining the value of the motion vector (MVx, MVy) of the sub-block according to: MVx>=MV'x-DH0 and MVx<=MV'x+DH1 and MVy>=MV'y-DV0 and MVy<=MV'y+DV1, where MV'=(MV'x, MV'y);
[0886] wherein MV′ denotes a representative motion vector; and wherein DH0, DH1, DV0, and DV1 denote positive numbers.
[0887] 5. The method of clause 4, wherein the size restriction comprises at least one of:
[0888] i.DH0 is equal to DH1, or DV0 is equal to DV1
[0889] ii.DH0 is equal to DV0, or DH1 is equal to DV1
[0890] iii.DH0 and DH1 are different, or DV0 and DV1 are different
[0891] iv. DH0, DH1, DV0 and DV1 are signaled in the bitstream representation at the video parameter set level or sequence parameter set level or picture parameter set level or slice header level or slice group header level or slice level or codec tree unit level or codec unit level or prediction unit level
[0892] v.DH0, DH1, DV0 and DV1 are functions of the video processing mode
[0893] vi.DH0, DH1, DV0 and DV1 depend on the width and height of the current video block
[0894] vii. DH0, DH1, DV0 and DV1 depend on whether the current video block is encoded or decoded using unidirectional prediction or bidirectional prediction. viii. DH0, DH1, DV0 and DV1 depend on the position of the sub-block.
[0895] 6. A method according to any of clauses 1 to 5, wherein the representative motion vector corresponds to a control point motion vector of the current video block.
[0896] 7. A method according to any of clauses 1 to 5, wherein the representative motion vector corresponds to a motion vector of a corner sub-block of the current video block.
[0897] 8. A method according to any of clauses 1 to 7, wherein the precision of the motion vectors and the representative motion vectors for the sub-blocks corresponds to the motion vector signalling precision in the bitstream representation.
[0898] 9. A method according to any of clauses 1 to 7, wherein the precision of the motion vectors and the representative motion vectors for the sub-blocks corresponds to a storage precision used for storing the motion vectors.
[0899] 10. A video processing method, comprising:
[0900] Determining one or more sub-blocks of the current video block for the affine-encoded current video block, wherein each sub-block has a size of MxN pixels, where M and N are multiples of 2 or 4;
[0901] Adapting the motion vectors of the sub-blocks to a size constraint; and
[0902] By using size constraints, conversion between the bitstream representation and pixel values of the current video block is performed conditionally based on a trigger.
[0903] 11. A method according to clause 10, wherein performing the conversion includes generating a bitstream representation from the pixel values.
[0904] 12. The method of clause 10, wherein performing the conversion comprises generating pixel values from a bitstream representation.
[0905] 13. A method according to any of clauses 10 to 12, wherein the size limit limits the maximum difference between the integer parts of the sub-block motion vectors of the current video block to be less than or equal to K pixels, where K is an integer.
[0906] 14. A method according to any of clauses 10-13, wherein the method is applied only if the current video block is coded using bi-directional prediction.
[0907] 15. A method according to any of clauses 10-13, wherein the method is applied only if the current video block is encoded using uni-directional prediction.
[0908] 16. A method according to any of clauses 10-13, wherein the value of M, N or K is a function of a uni-prediction or bi-prediction mode of the current video block.
[0909] 17. A method according to any of clauses 10-13, wherein the value of M, N or K is a function of the height or width of the current video block.
[0910] 18. A method according to any one of clauses 10 to 17, wherein the trigger is included in the bitstream representation at the video parameter set level or the sequence parameter set level or the picture parameter set level or the slice header level or the slice group header level or the slice level or the codec tree unit level or the codec unit level or the prediction unit level.
[0911] 19. A method according to clause 18, wherein the trigger signalling informs the value of M, N or K.
[0912] 20. A method according to any of clauses 10 to 19, wherein the one or more sub-blocks of the current video block are calculated based on a type of affine codec used for the current video block.
[0913] 21. A method according to clause 20, wherein two different methods are used to calculate sub-blocks for uni-predictive and bi-predictive affine prediction modes.
[0914] 22. The method of clause 21, wherein if the current video block is a bi-predicted affine block, the widths or heights of the sub-blocks from different reference lists are different.
[0915] 23. A method according to any of clauses 20-22, wherein one or more sub-blocks correspond to a luma component.
[0916] 24. A method according to any of clauses 10 to 23, wherein the width and height of one of the one or more sub-blocks are determined using a motion vector difference between a motion vector value of the current video block and a motion vector value of one of the one or more sub-blocks.
[0917] 25. A method according to any of clauses 20 to 23, wherein the calculation is based on a pixel precision signalled in the bitstream representation.
[0918] 26. A method for video processing, comprising:
[0919] Determining that the current video block meets a size condition; and
[0920] Based on the determination, conversion between a bitstream representation and pixel values of the current video block is performed by excluding a bi-directional predictive coding mode for the current video block.
[0921] 27. A method for video processing, comprising:
[0922] Determining that the current video block meets a size condition; and
[0923] Based on the determination, a conversion between a bitstream representation and pixel values of the current video block is performed, wherein the inter prediction mode is signaled in the bitstream representation according to the size condition.
[0924] 28. A method for video processing, comprising:
[0925] Determining that the current video block meets a size condition; and
[0926] Based on the determination, a conversion between a bitstream representation and a pixel value of the current video block is performed, wherein generation of a Merge candidate list during the conversion depends on a size condition.
[0927] 29. A method for video processing, comprising:
[0928] Determining that a sub-codec unit of the current video block satisfies a size condition; and
[0929] Based on the determination, a conversion between a bitstream representation and pixel values of the current video block is performed, wherein a codec tree partitioning process for generating sub-codec units depends on a size condition.
[0930] 30. A method according to any of clauses 26 to 29, wherein the size condition is one of the following, where w is the width and h is the height:
[0931] (a) w is equal to T1 and h is equal to T2, or h is equal to T1 and w is equal to T2;
[0932] (b) w is equal to T1 and h is not greater than T2, or h is equal to T1 and w is not greater than T2;
[0933] (c) w is not greater than T1 and h is not greater than T2, or h is not greater than T1 and w is not greater than T2.
[0934] 31. The method of clause 30, wherein T1=8 and T2=8, or T1=8, T2=4, or T1=4 and T2=4, or T1=4 and T2=16.
[0935] 32. A method according to any of clauses 26 to 29, wherein the converting comprises generating a bitstream representation from pixel values of the current video block or generating pixel values of the current video block from the bitstream representation.
[0936] 33. A method for video processing, comprising:
[0937] determining a weight index for a generalized bi-directional prediction (GBi) process for the current video block based on the position of the current video block; and
[0938] The conversion between the current video block and its bitstream representation is performed using the weight index to implement the GBi process.
[0939] 34. A method according to any clause 33, wherein the converting comprises generating a bitstream representation from pixel values of the current video block or generating pixel values of the current video block from the bitstream representation.
[0940] 35. A method according to any of clauses 33 or 34, wherein the determining comprises, for a current video block at a first position, inheriting or predicting another weight index of a neighboring block, and for a current video block at a second position, calculating the GBI without inheriting from the neighboring block.
[0941] 36. The method of clause 35, wherein the second position comprises the current video block being located in a different codec tree unit than the neighboring blocks.
[0942] 37. The method of clause 35, wherein the second position corresponds to the current video block being in a different codec tree unit line than a neighboring block or in a different codec tree unit row than a neighboring block.
[0943] 38. A method for video processing, comprising:
[0944] Determining whether the current video block is coded as an intra-inter prediction (IIP) coded block; and
[0945] The conversion between the current video block and its bitstream representation is performed using simplified rules for determining the intra prediction mode or the Most Probable Mode (MPM) for the current video block.
[0946] 39. A method according to clause 38, wherein the converting comprises generating a bitstream representation from pixel values of the current video block or generating pixel values of the current video block from the bitstream representation.
[0947] 40. A method according to any of clauses 38-39, wherein the simplified rule specifies determining an intra prediction codec mode of a current video block that is intra-inter prediction (IIP) coded independently of another intra prediction codec mode of a neighboring video block.
[0948] 41. A method according to any of clauses 38 to 39, wherein the intra prediction codec mode is represented in the bitstream representation using a codec that is independent of the codecs of neighbouring blocks.
[0949] 42. A method according to any of clauses 38 to 40, wherein the simplification rule specifies a preference for selection of a codec mode for intra-coded blocks over a codec mode for intra-prediction codec blocks.
[0950] 43. The method of clause 38, wherein the simplified rule specifies that the MPM is determined by inserting the intra prediction modes of neighboring blocks from the intra codec before inserting the intra prediction modes of neighboring blocks from the IIP codec.
[0951] 44. The method of clause 38, wherein the simplification rule specifies using the same construction process for determining the MPM as for another normal intra-coded block.
[0952] 45. A method of video processing, comprising:
[0953] Determining that the current video block satisfies a simplification criterion; and
[0954] The conversion is performed by disabling the use of the inter-intra prediction mode for conversion between the current video block and the bitstream representation or by disabling additional codec tools for the conversion.
[0955] 46. A method according to clause 45, wherein the converting comprises generating a bitstream representation from pixel values of the current video block or generating pixel values of the current video block from the bitstream representation.
[0956] 47. A method according to any of clauses 45-46, wherein the simplification criterion comprises that a width or a height of the current video block is equal to T1, where T1 is an integer.
[0957] 48. A method according to any of clauses 45-46, wherein the simplification criterion comprises that a width or a height of the current video block is greater than T1, where T1 is an integer.
[0958] 49. The method of any of clauses 45-46, wherein the simplification criterion comprises that a width of the current video block is equal to T1 and a height of the current video block is equal to T2.
[0959] 48. A method according to any of clauses 45-46, wherein the simplified criteria specifies that the current video block uses a bi-prediction mode.
[0960] 49. A method according to any of clauses 45-46, wherein the additional codec tools include a Bidirectional Optical Flow (BIO) codec.
[0961] 50. A method according to any of clauses 45-46, wherein the additional codec tools include an overlapped block motion compensation mode.
[0962] 51. A method for video processing, comprising:
[0963] The conversion between the current video block and a bitstream representation of the current video block is performed using a motion vector based encoding process, where:
[0964] (a) During the conversion process, precision P1 is used to store the spatial motion prediction results, and precision P2 is used to store the temporal motion prediction results, where P1 and P2 are fractional values, or
[0965] (b) Precision Px is used to store the x motion vector, and precision Py is used to store the y motion vector, where Px and Py are fractional values.
[0966] 52. The method of clause 51, wherein P1, P2, Px and Py are different numbers.
[0967] 53. A method according to clause 52, wherein:
[0968] P1 is a 1 / 16 brightness pixel, and P2 is a 1 / 4 brightness pixel, or
[0969] P1 is a 1 / 16 brightness pixel, and P2 is a 1 / 8 brightness pixel, or
[0970] P1 is a 1 / 8 brightness pixel, and P2 is a 1 / 4 brightness pixel, or
[0971] P1 is a 1 / 8 brightness pixel, and P2 is a 1 / 8 brightness pixel, or
[0972] P2 is a 1 / 16 brightness pixel, and P1 is a 1 / 4 brightness pixel, or
[0973] P2 is a 1 / 16 brightness pixel, and P1 is a 1 / 8 brightness pixel, or
[0974] P2 is a 1 / 8 brightness pixel, and P1 is a 1 / 4 brightness pixel.
[0975] 54. A method according to clauses 51-52, wherein P1 and P2 are different for different pictures in different temporal layers included in the bitstream representation.
[0976] 55. A method according to clauses 51-52, wherein the calculated motion vector is processed through a precision correction process before being stored as the temporal motion prediction.
[0977] 56. A method according to clauses 51-52, wherein the storing comprises storing the x motion vector and the y motion vector as N-bit integers, and wherein the range of values of the x motion vector is [MinX, MaxX], and the range of values of the y motion vector is [MinY, MaxY], wherein the ranges satisfy one or more of the following:
[0978] a.MinX is equal to MinY,
[0979] b.MaxX is equal to MaxY,
[0980] c.{MinX,MaxX} depends on Px;
[0981] d.{MinY,MaxY} depends on Py;
[0982] e.{MinX,MaxX,MinY,MaxY} depends on N.
[0983] f. For an MV stored for spatial motion prediction and another MV stored for temporal motion prediction, {MinX, MaxX, MinY, MaxY} are different.
[0984] g. For pictures in different temporal layers, {MinX, MaxX, MinY, MaxY} is different.
[0985] h. For images with different width or height, {MinX,MaxX,MinY,MaxY} is different.
[0986] i. For images with different widths, {MinX,MaxX} is different.
[0987] j. For images with different heights, {MinY,MaxY} is different.
[0988] k. MVx is clipped to [MinX,MaxX] before being stored for spatial motion prediction.
[0989] l. MVx is clipped to [MinX,MaxX] before being stored for temporal motion prediction.
[0990] m. MVy is clipped to [MinY,MaxY] before being stored for spatial motion prediction.
[0991] n. MVy is clipped to [MinY,MaxY] before being stored for temporal motion prediction.
[0992] 59. A method for video processing, comprising: interpolating a small sub-block of size W2xH2 in a large sub-block of a current video block by extracting a (W2+N–1–PW)*(H2+N–1–PH) block, pixel padding the extracted block, performing boundary pixel repetition on the pixel-padded block, and obtaining pixel values of a small sub-block of size W1xH1, wherein W1, W2, H1, H2, PW and PH are integers; and performing conversion between a current video block and a bitstream representation of the current video block using the interpolated pixel values of the small sub-block.
[0993] 60. The method of clause 59, wherein the converting comprises generating the current video block from a bitstream representation or generating a bitstream representation from a current sub-block.
[0994] 61. A method according to any of clauses 59-60, wherein W2=H2=8, W1=H1=4, and PW=PH=0.
[0995] 62. A method for video processing, comprising:
[0996] During conversion of a current video block of dimension WxH and a bitstream representation of the current video block, performing a motion compensation operation by fetching (W+N–1–PW)*(W+N–1–PH) reference pixels during the motion compensation operation and padding reference pixels outside the fetched reference pixels; and
[0997] The conversion between the current video block and the bitstream representation of the current video block is performed using the result of the motion compensation operation, where W, H, N, PW, and PH are integers.
[0998] 63. A method according to clause 62, wherein the converting comprises generating the current video block from a bitstream representation or generating a bitstream representation from a current sub-block.
[0999] 64. A method according to any of clauses 62-63, wherein the padding comprises repeating the left or right border of the extracted pixels.
[1000] 65. A method according to any of clauses 62-63, wherein the padding comprises repeating a top boundary or a bottom boundary of the extracted pixels.
[1001] 66. A method according to any of clauses 62-63, wherein the filling comprises setting the pixel value to a constant.
[1002] 67. A method according to clause 38, wherein the rules specify that the same arithmetic codec context is used during the conversion as used for other intra-frame codec blocks.
[1003] 68. The method of clause 38, wherein the converting of the current video block does not include using an MPM for the current video block.
[1004] 69. The method of clause 38, wherein the simplification rule specifies the use of only DC and planar modes for the bitstream representation of the current video block as an IIP codec block.
[1005] 70. The method of clause 38, wherein the simplified rule specifies different intra-prediction modes for luma and chroma components.
[1006] 71. The method of clause 44, wherein a subset of the MPMs is used for a current video block being encoded by an IIP.
[1007] 72. A method as described in clause 38, wherein the simplified rule indicates that the MPM is selected based on the intra-frame prediction mode included in the MPM list.
[1008] 73. A method according to clause 38, wherein the simplification rule indicates that a subset of MPMs is to be selected from the MPM list, and the mode index associated with the subset is signalled.
[1009] 74. The method of clause 38, wherein the context used for encoding an intra-MPM mode is used for encoding an intra-mode of a current video block that is encoded by an IIP.
[1010] 75. The method of clause 44, wherein equal weights are used for intra-prediction blocks and inter-prediction blocks generated for a current video block, the current video block being an IIP codec block.
[1011] 76. The method of clause 44, wherein a zero weight is used for a position in the IIP encoding and decoding process of the current video block.
[1012] 77. The method of clause 77, wherein zero weights are applied to intra-prediction blocks used in an IIP encoding and decoding process.
[1013] 78. A method as described in clause 77, wherein zero weights are applied to inter-frame prediction blocks used in the IIP encoding and decoding process.
[1014] 79. A method for video processing, comprising:
[1015] Determining, based on a size of the current video block, that bi-directional prediction or uni-directional prediction of the current video block is not allowed; and
[1016] Based on the determination, a conversion between a bitstream representation and pixel values of the current video block is performed by disabling a bi-directional prediction or uni-directional prediction mode. For example, the disallowed mode is not used to encode or decode the current video block. The conversion operation may represent video encoding or compression, or video decoding or decompression.
[1017] 80. The method of clause 79, wherein the current video block is 4x8, and determining comprises determining that bi-prediction is not allowed. Further examples are given in Example 5.
[1018] 81. The method of clause 79, wherein the current video block is 4x8 or 8x4, and determining comprises determining that bi-directional prediction is not allowed.
[1019] 82. The method of clause 79, wherein the current video block is 4xN, where N is an integer <= 16, and determining comprises determining that bi-prediction is not allowed.
[1020] 83. A method according to any of clauses 26-29 or 79-82, wherein the size of the current block corresponds to the size of a color component or a luma component of the current block.
[1021] 84. The method of clause 83, wherein disabling bi-directional prediction or uni-directional prediction is applied to all three components of the current video block.
[1022] 85. A method according to clause 83, wherein disabling bi-directional prediction or uni-directional prediction is applied only to the color component whose size is used as the size of the current block.
[1023] 86. A method according to any of clauses 79 to 85, wherein the conversion is performed by disabling bi-prediction and further using Merge candidates of bi-prediction and then assigning only one motion vector from only one reference list to the current video block.
[1024] 87. The method of clause 79, wherein the current video block is 4x4 and the determining comprises determining that neither bi-directional prediction nor uni-directional prediction is allowed.
[1025] 88. The method of clause 87, wherein the current video block is encoded as an intra block.
[1026] 89. The method of clause 87, wherein the current video block is restricted to use integer-pixel motion vectors.
[1027] Additional examples and embodiments of clauses 78-89 are described in Example 5.
[1028] 90. A method for processing a video, comprising:
[1029] Determining a video encoding and decoding condition of the current video block based on the size of the current video block; and
[1030] Converting between the current video block and a bitstream representation of the current video block is performed based on the video codec condition.
[1031] 91. A method according to clause 90, wherein the video codec condition specifies selective signaling of a skip flag or an intra-block codec flag in the bitstream representation.
[1032] 92. A method according to clause 90 or 91, wherein the video codec condition specifies selective signaling of a prediction mode for a current video block.
[1033] 93. A method according to any of clauses 90 to 92, wherein the video codec condition specifies selectively signalling a triangle mode codec for the current video block.
[1034] 94. A method according to any of clauses 90 to 93, wherein the video codec condition specifies selective signalling of an inter prediction direction for a current video block.
[1035] 95. A method according to any of clauses 90 to 94, wherein the video codec condition specifies selectively modifying a motion vector or a block vector for intra block copying of a current video block.
[1036] 96. A method according to any of clauses 90-95, wherein the video condition depends on the pixel height of the current video block.
[1037] 97. A method according to any of clauses 90-96, wherein the video condition depends on the pixel width of the current video block.
[1038] 98. A method according to any of clauses 90-95, wherein the video condition depends on whether the current video block is square.
[1039] Items 11 to 16 listed in Section 4 of this document provide additional examples of clauses 90 to 98.
[1040] 99. A video encoder apparatus comprising a processor, wherein the processor is configured to perform one or more of the methods described in clauses 1 to 98.
[1041] 100. A video decoder device comprising a processor, wherein the processor is configured to perform one or more of the methods described in clauses 1 to 98.
[1042] 101. A computer readable medium having stored thereon code which, when executed by a processor, causes the processor to implement the method of any one or more of clauses 1 to 98.
[1043] Some of the presently disclosed technologies may also be described using the following clause-based description.
[1044] 1. A video processing method, comprising:
[1045] For conversion between a block of video and a bitstream of video, determining whether a bidirectional prediction coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and
[1046] Performing the conversion based on the determination;
[1047] In response to the bidirectional prediction coding technology being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
[1048] 2. A method according to clause 1, wherein the bidirectional predictive coding technique is not applicable if at least one of the conditions is met, wherein the at least one condition includes one of the following:
[1049] W=T1 and H≤T2, T1 and T2 are positive integers;
[1050] W≤T2 and H=T1, T1 and T2 are positive integers; or
[1051] W≤T1 and H≤T2, T1 and T2 are positive integers.
[1052] 3. The method according to clause 2, wherein T1=8 and T2=4.
[1053] 4. The method according to clause 2, wherein T1=4 and T2=4.
[1054] 5. The method according to clause 1, wherein, in case the block size is one of 4x8 or 8x4 or 4x4, the bidirectional predictive coding technique is not applicable.
[1055] 6. The method according to clause 1, wherein, in case the bidirectional predictive coding technique is applicable, an indicator indicating information about the bidirectional predictive coding technique is signaled in the bitstream.
[1056] 7. The method according to clause 1, wherein a signaling method of the indicator indicating the bidirectional predictive coding technique or the unidirectional predictive coding technique is based on the size of the block.
[1057] 8. A method according to clause 7, wherein, in blocks of the first size range, the indicator has three values corresponding to bidirectional prediction, unidirectional prediction from list 0 and unidirectional prediction from list 1, respectively; and
[1058] In blocks of the second size range, the indicator has two values corresponding to unidirectional prediction from list 0 and unidirectional prediction from list 1, respectively.
[1059] 9. The method of clause 1, wherein the size of the block corresponds to a first color component of the block, and whether a bidirectional predictive coding technique is applicable is determined for the first color component and the remaining color components of the block.
[1060] 10. The method of clause 9, wherein the first color component is a luminance component.
[1061] 11. The method of clause 1, wherein, in case bi-directional predictive coding techniques are not applicable, triangular prediction mode is not applicable to the block.
[1062] 12. A method according to clause 1, wherein the bidirectional predictive coding technique is applied to a block, wherein the size of the prediction block is (W+N-1-PW)x(H+N-1-PH), and wherein the boundary pixels of the prediction block are repeated to generate a second block of size (W+N-1)x(H+N-1) for interpolation operation, N represents the interpolation filter tap, and N, PW and PH are integers.
[1063] 13. The method according to clause 1, wherein the Merge candidate list construction process is performed based on the size of the block.
[1064] 14. A method according to clause 1, wherein whether the codec tree partitioning process is applicable to the block is based on the size of a sub-block as a sub-codec unit of the block according to the codec tree partitioning process, the width of the sub-block is W1 and the height is H1, W1 and H1 are positive integers.
[1065] 15. The method of clause 1, wherein performing the conversion comprises encoding the block into a bitstream.
[1066] 16. The method of clause 1, wherein performing the conversion comprises decoding the blocks from the bitstream.
[1067] 17. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to:
[1068] For conversion between a block of video and a bitstream of video, determining whether a bidirectional prediction coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and
[1069] Performing the conversion based on the determination;
[1070] In response to the bidirectional prediction coding technology being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
[1071] 18. The apparatus of clause 17, wherein the bidirectional predictive coding technique is not applied if at least one of the conditions is satisfied, wherein the at least one condition comprises one of the following:
[1072] W=T1 and H≤T2, T1 and T2 are positive integers;
[1073] W≤T2 and H=T1, T1 and T2 are positive integers; or
[1074] W≤T1 and H≤T2, T1 and T2 are positive integers.
[1075] 19. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
[1076] For conversion between a block of video and a bitstream of video, determining whether a bidirectional prediction coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and
[1077] Performing the conversion based on the determination;
[1078] In response to the bidirectional prediction coding technology being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
[1079] 20. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises:
[1080] For conversion between a block of video and a bitstream of video, determining whether a bidirectional prediction coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and
[1081] generating a bitstream from the block according to the determination;
[1082] In response to the bidirectional prediction coding technology being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
[1083] 21. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises:
[1084] For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional prediction coding technique is applicable to the block is based on a size of the block having a width W and a height H, where W and H are positive integers;
[1085] generating a bitstream from the block based on the determination; and
[1086] storing the bitstream in a non-transitory computer-readable recording medium,
[1087] In response to the bidirectional prediction coding technology being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
[1088] Fig.16 1 is a block diagram illustrating an example video processing system 1600 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 1600. System 1600 may include an input 1602 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. Input 1602 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a Passive Optical Network (PON), and the like, and wireless interfaces such as Wi-Fi or cellular interfaces.
[1089] System 1600 may include a codec component 1604 that can implement various codecs or encoding methods described in this document. Codec component 1604 can reduce the average bit rate of the video from input 1602 to the output of codec component 1604 to generate a codec representation of the video. Codec technology is therefore sometimes referred to as video compression or video transcoding technology. The output of codec component 1604 can be stored or sent via a communication connection such as represented by component 1606. The bitstream (or codec) representation of the storage or communication transmission of the video received at input 1602 can be used by component 1608 to generate pixel values or transmit to a displayable video of display interface 1610. The process of generating user-visible video from the bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it will be understood that the codec tool or operation is used at the encoder, and the corresponding decoding tool or operation of the inverse codec result will be performed by the decoder.
[1090] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), or Displayport, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be embodied in various electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and / or video display.
[1091] Fig.17 1 is a flowchart representation of a method 1700 for video processing according to the present disclosure. The method 1700 includes, at operation 1702, determining that a first motion vector of a sub-block of the current block and a second motion vector as a representative motion vector of the current block meet a size constraint for conversion between a current block of a video and a bitstream representation of the video using an affine codec tool. The method 1700 also includes, at operation 1704, performing the conversion based on the determination.
[1092] In some embodiments, the first motion vector of the sub-block is represented as (MVx, MVy), and the second motion vector is represented as (MV'x, MV'y). The size constraints indicate that MVx>=MV'x-DH0, MVx<=MV'x+DH1, MVy>=MV'y-DV0, and MVy<=MV'y+DV1, where DH0, DH1, DV0, and DV1 are positive numbers. In some embodiments, DH0=DH1. In some embodiments, DH0≠DH1. In some embodiments, DV0=DV1. In some embodiments, DV0≠DV0. In some embodiments, DH0=DV0. In some embodiments, DH0≠DV0. In some embodiments, DH1=DV1. In some embodiments, DH1≠DV1.
[1093] In some embodiments, at least one of DH0, DH1, DV0 or DV1 is signaled in a bitstream representation at a video parameter set level, a sequence parameter set level, a picture parameter set level, a slice header, a slice group header, a slice level, a codec tree unit level, a codec unit level or a prediction unit level. In some embodiments, DH0, DH1, DV0 and DV1 are different for different profiles, levels or levels of conversion. In some embodiments, DH0, DH1, DV0 and DV1 are based on the weight or height of the current block. In some embodiments, DH0, DH1, DV0 and DV1 are based on a prediction mode of the current block, and the prediction mode is a unidirectional prediction mode or a bidirectional prediction mode. In some embodiments, DH0, DH1, DV0 and DV1 are based on the position of a sub-block in the current block.
[1094] In some embodiments, the second motion vector comprises a control point motion vector of the current block. In some embodiments, the second motion vector comprises a motion vector of a second sub-block of the current block. In some embodiments, the second sub-block comprises a center sub-block of the current block. In some embodiments, the second sub-block comprises a corner sub-block of the current block. In some embodiments, the second motion vector comprises a motion vector derived for a position inside or outside the current block, the position being encoded and decoded using the same affine model as the current block. In some embodiments, the position comprises a center position of the current block.
[1095] In some embodiments, the first motion vector is adjusted to satisfy a size constraint. In some embodiments, the bitstream is invalid if the first motion vector does not satisfy the size constraint about the second motion vector. In some embodiments, the first motion vector and the second motion vector are represented according to a motion vector signaling precision in the bitstream representation. In some embodiments, the first motion vector and the second motion vector are represented according to a storage precision for storing the motion vector. In some embodiments, the first motion vector and the second motion vector are represented according to a precision different from a motion vector signaling precision or a storage precision for storing the motion vector.
[1096] Fig.18 1 is a flowchart representation of a method 1800 for video processing according to the present disclosure. The method 1800 includes, at operation 1802, determining an affine model including six parameters for a conversion between a current block of a video and a bitstream representation of the video. The affine model is inherited from affine codec information of neighboring blocks of the current block. The method 1800 includes, at operation 1804, performing a conversion based on the affine model.
[1097] In some embodiments, the neighboring block is encoded and decoded using a second affine model having six parameters, the affine model being the same as the second affine model. In some embodiments, the neighboring block is encoded and decoded using a third affine model having four parameters. In some embodiments, the affine model is determined based on the position of the current block. In some embodiments, if the neighboring block is not in the same codec tree unit (CTU) as the current block, the affine model is determined according to the third affine model. In some embodiments, if the neighboring block is not in the same CTU line or the same CTU row as the current block, the affine model is determined according to the third affine model.
[1098] In some embodiments, the slice, strip or picture is divided into a plurality of non-overlapping regions. In some embodiments, if the neighboring block is not in the same region as the current block, the affine model is determined according to a third affine model. In some embodiments, if the neighboring block is not in the same region line or the same region row as the current block, the affine model is determined according to a third affine model. In some embodiments, the size of each region is 64x64. In some embodiments, the upper left corner of the current block is represented as (x, y), the upper left corner of the neighboring block is represented as (x', y'), and if the conditions about x, y, x' and y' are met, the affine model is determined according to the third affine model. In some embodiments, the condition indicates x / M≠x' / M, and M is a positive integer. In some embodiments, M is 128 or 64. In some embodiments, the condition indicates y / N≠y' / N, and N is a positive integer. In some embodiments, N is 128 or 64. In some embodiments, the condition indicates x / M≠x' / M and y / N≠y' / N, and M and N are positive integers. In some embodiments, M=N=128 or M=N=64. In some embodiments, the condition indicates x>>M≠x'>>M, and M is a positive integer. In some embodiments, M is 6 or 7. In some embodiments, the condition indicates y>>N≠y'>>N, and N is a positive integer. In some embodiments, N is 6 or 7. In some embodiments, the condition indicates x>>M≠x'>>M and y>>N≠y'>>N, and M and N are positive integers. In some embodiments, M=N=6 or M=N=7.
[1099] Fig.19 1 is a flowchart representation of a method 1900 for video processing according to the present disclosure. The method 1900 includes, at operation 1902, for conversion between a block of video and a bitstream representation of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on the size of the block having a width W and a height H, where W and H are positive integers. The method 1900 includes, at operation 1904, performing the conversion based on the determination.
[1100] In some embodiments, if W=T1 and H=T2, the bidirectional prediction coding and decoding technology is not applicable, where T1 and T2 are positive integers. In some embodiments, if W=T2 and H=T1, the bidirectional prediction coding and decoding technology is not applicable, where T1 and T2 are positive integers. In some embodiments, if W=T1 and H≤T2, the bidirectional prediction coding and decoding technology is not applicable, where T1 and T2 are positive integers. In some embodiments, if W≤T2 and H=T1, the bidirectional prediction coding and decoding technology is not applicable, where T1 and T2 are positive integers. In some embodiments, T1=4 and T2=16. In some embodiments, if W≤T1 and H≤T2, the bidirectional prediction coding and decoding technology is not applicable, where T1 and T2 are positive integers. In some embodiments, T1=T2=8. In some embodiments, T1=8 and T2=4. In some embodiments, T1=T2=4. In some embodiments, T1=4 and T2=8.
[1101] In some embodiments, if the bidirectional predictive coding and decoding technology is applicable, an indicator indicating information about the bidirectional predictive coding and decoding technology is signaled in the bitstream. In some embodiments, if the bidirectional predictive coding and decoding technology is not applicable to the block, an indicator indicating information about the bidirectional predictive coding and decoding technology used for the block is excluded from the bitstream. In some embodiments, if the size of the block is one of 4x8 or 8x4, the bidirectional predictive coding and decoding technology is not applicable. In some embodiments, if the size of the block is 4xN or Nx4, the bidirectional predictive coding and decoding technology is not applicable, where N is a positive integer and N≤16. In some embodiments, the size of the block corresponds to the first color component of the block, and whether the bidirectional predictive coding and decoding technology is applicable is determined for the first color component and the remaining color components of the block. In some embodiments, the size of the block corresponds to the first color component of the block, and whether the bidirectional predictive coding and decoding technology is applicable is determined only for the first color component. In some embodiments, the first color component includes a brightness component.
[1102] In some embodiments, the method further comprises, if the bidirectional prediction codec technology is not applicable to the current block, assigning a single motion vector from the first reference list or the second reference list when determining that the selected Merge candidate is encoded using the bidirectional prediction codec technology. In some embodiments, the method further comprises, if the bidirectional prediction codec technology is not applicable to the current block, determining that the triangular prediction mode is not applicable to the block. In some embodiments, whether the bidirectional prediction codec technology is applicable is associated with a prediction direction, and the prediction direction is also associated with the unidirectional prediction codec technology, and wherein the prediction direction is signaled in the bitstream based on the size of the block. In some embodiments, if (1) WxH<64 or (2) WxH=64, information about the unidirectional prediction codec technology is signaled in the bitstream, where W is not equal to H. In some embodiments, if (1) WxH>64 or (2) WxH=64, information about the unidirectional prediction codec technology or the bidirectional prediction codec technology is signaled in the bitstream, where W is equal to H.
[1103] In some embodiments, a restriction indicates that if the size of the block is 4x4, then neither the bidirectional coding technique nor the unidirectional technique is applicable to the block. In some embodiments, the restriction applies if the block is affine coded. In some embodiments, the restriction applies if the block is not affine coded. In some embodiments, the restriction applies if the block is intra coded. In some embodiments, the restriction does not apply if the motion vector of the block has integer precision.
[1104] In some embodiments, signaling of the parent block partitioning for a block is skipped in the bitstream, (1) for a quadtree partitioning, the parent block size is 8x8, (2) for a binary tree partitioning, the parent block size is 8x4 or 4x8, (3) or for a ternary tree partitioning, the parent block size is 4x16 or 16x4. In some embodiments, an indicator indicating that the motion vector has integer precision is set to 1 in the bitstream. In some embodiments, the motion vector of the block is rounded to integer precision.
[1105] In some embodiments, the bidirectional prediction coding technique is applied to the block. The size of the reference block is (W+N-1-PW)x(H+N-1-PH), and the boundary pixels of the reference block are repeated to generate a second block of size (W+N-1)x(H+N-1) for interpolation operation, N represents the interpolation filter tap, and N, PW and PH are integers. In some embodiments, PH=0, and the pixels of at least the left or right boundary are repeated to generate the second block. In some embodiments, PW=0, and the pixels of at least the top or bottom boundary are repeated to generate the second block. In some embodiments, PW>0 and PH>0, and the second block is generated by repeating at least the pixels of the left or right boundary, followed by repeating at least the pixels of the top or bottom boundary. In some embodiments, PW>0 and PH>0, and the second block is generated by repeating at least the pixels of the top or bottom boundary, followed by repeating at least the pixels of the left or right boundary. In some embodiments, the pixels of the left boundary are repeated M1 times, and wherein the pixels of the right boundary are repeated (PW-M1) times. In some embodiments, the pixels of the top border are repeated M2 times, and wherein the pixels of the bottom border are repeated (PH-M2) times. In some embodiments, how the border pixels of the reference block are repeated is applied to some or all reference blocks for the conversion. In some embodiments, PW and PH are different for different components of the block.
[1106] In some embodiments, the Merge candidate list construction process is performed based on the size of the block. In some embodiments, if (1) the Merge candidate is encoded and decoded using a bidirectional prediction codec technique, and (2) the bidirectional prediction is not applicable to the block based on the size of the block, the Merge candidate is considered to be a unidirectional prediction candidate that refers to a first reference list in a unidirectional prediction codec technique. In some embodiments, the first reference list includes reference list 0 or reference list 1 of the unidirectional prediction codec technique. In some embodiments, if (1) the Merge candidate is encoded and decoded using a bidirectional prediction codec technique, and (2) the bidirectional prediction is not applicable to the block based on the size of the block, the Merge candidate is considered to be unavailable. In some embodiments, during the Merge candidate list construction process, the unavailable Merge candidate is removed from the Merge candidate list. In some embodiments, if the bidirectional prediction is not applicable to the block based on the size of the block, the Merge candidate list construction process for the triangle prediction mode is called.
[1107] Fig. 202 is a flowchart representation of a method 2000 for video processing according to the present disclosure. The method 2000 includes, at operation 2002, for conversion between a block of video and a bitstream representation of the video, determining whether a codec tree partitioning process is applicable to the block based on the size of a sub-block that is a sub-codec unit of the block according to the codec tree partitioning process. The sub-block has a width of W and a height of H, where W and H are positive integers. The method 2000 also includes, at operation 2004, performing the conversion based on the determination.
[1108] In some embodiments, if W=T1 and H=T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers. In some embodiments, if W=T2 and H=T1, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers. In some embodiments, if W=T1 and H≤T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers. In some embodiments, if W≤T2 and H=T1, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers. In some embodiments, T1=4 and T2=16. In some embodiments, if W≤T1 and H≤T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers. In some embodiments, T1=T2=8. In some embodiments, T1=8 and T2=4. In some embodiments, T1=T2=4. In some embodiments, T1=4. In some embodiments, T2=4. In some embodiments, if the codec tree partitioning process is not applicable for the current block, the signaling of the codec tree partitioning process is omitted from the bitstream.
[1109] Fig.21 21 is a flowchart representation of a method 2100 for video processing according to the present disclosure. The method 2100 includes, at operation 2102, for a conversion between a current block of a video and a bitstream representation of the video, determining whether to derive an index of a codec-unit-level weighted bidirectional prediction (BCW) codec mode based on a rule regarding the position of the current block. In the BCW codec mode, a weight set including a plurality of weights is used to generate a bidirectional prediction value for the current block. The method 2100 also includes, at operation 2104, performing the conversion based on the determination.
[1110] In some embodiments, if at least one weight in the weight set is applied, the bidirectional prediction value of the current block is generated as a non-average weighted sum of two motion vectors. In some embodiments, the rule specifies that if the current block and the neighboring block are located in different codec tree units or maximum codec units, the index is not derived from the neighboring block. In some embodiments, the rule specifies that if the current block and the neighboring block are located in different lines or rows in the codec tree unit, the index is not derived from the neighboring block. In some embodiments, the rule specifies that if the current block and the neighboring block are located in different non-overlapping areas of a slice, strip, or picture of the video, the index is not derived from the neighboring block. In some embodiments, the rule specifies that if the current block and the neighboring block are located in different rows of a non-overlapping area of a slice, strip, or picture of the video, the index is not derived from the neighboring block. In some embodiments, the size of each area is 64x64.
[1111] In some embodiments, the top angle of the current block is represented as (x, y), and the top angle of the neighboring block is represented as (x', y'). The rule specifies that if (x, y) and (x', y') meet the condition, then the index is not derived from the neighboring block. In some embodiments, the condition indicates x / M≠x' / M, and M is a positive integer. In some embodiments, M is 128 or 64. In some embodiments, the condition indicates y / N≠y' / N, and N is a positive integer. In some embodiments, N is 128 or 64. In some embodiments, the condition indicates (x / M≠x' / M) and (y / N≠y' / N), and M and N are positive integers. In some embodiments, M=N=128 or M=N=64. In some embodiments, the condition indicates x>>M≠x'>>M, and M is a positive integer. In some embodiments, M is 6 or 7. In some embodiments, the condition indicates y>>N≠y'>>N, and N is a positive integer. In some embodiments, where N is 6 or 7. In some embodiments, the condition indicates (x>>M≠x'>>M) and (y>>N≠y'>>N), M and N are positive integers. In some embodiments, M=N=6 or M=N=7.
[1112] In some embodiments, whether the BCW codec mode is applicable to a picture, a slice, a slice group or a slice is signaled in a picture parameter set, a slice header, a slice group header or a slice in the bitstream, respectively. In some embodiments, whether the BCW codec mode is applicable to a picture, a slice, a slice group or a slice is derived based on information associated with the picture, the slice, the slice group or the slice. In some embodiments, the information includes at least a quantization parameter (QP), a temporal layer or a picture order count distance.
[1113] Fig. 2222 is a flowchart representation of a method 2200 for video processing according to the present disclosure. The method 2200 includes, at operation 2202, for a conversion between a current block of a video encoded and decoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique and a bitstream representation of the video, determining an intra-frame prediction mode of the current block independently of intra-frame prediction modes of neighboring blocks. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The method 2200 also includes, at operation 2204, performing the conversion based on the determination.
[1114] In some embodiments, the intra prediction mode of the current block is determined without reference to the intra prediction mode of any neighboring block. In some embodiments, the neighboring blocks are encoded and decoded using the CIIP codec technique. In some embodiments, the intra prediction of the current block is determined based on the intra prediction mode of a second neighboring block encoded and decoded using the intra prediction codec technique. In some embodiments, whether to determine the intra prediction mode of the current block according to the second intra prediction mode is based on whether a condition is satisfied, which specifies a relationship between the current block as the first block and the second neighboring block as the second block. In some embodiments, the determination is part of a most probable mode (MPM) construction process for the current block that derives a MPM mode list.
[1115] Fig.23 23 is a flowchart representation of a method 2300 for video processing according to the present disclosure. The method 2300 includes, at operation 2302, for a conversion between a current block of a video encoded and decoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique and a bitstream representation of the video, determining an intra-frame prediction mode of the current block based on a first intra-frame prediction mode of a first neighboring block and a second intra-frame prediction mode of a second neighboring block. The first neighboring block is encoded and decoded using the intra-frame prediction codec technique, and the second neighboring block is encoded and decoded using the CIIP codec technique. The first intra-frame prediction mode is given a priority different from the second intra-frame prediction mode. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value of the current block. The method 2300 also includes, at operation 2304, performing the conversion based on the determination.
[1116] In some embodiments, the determination is part of a most probable mode (MPM) construction process for the current block that derives a most probable mode (MPM) mode list. In some embodiments, in the MPM candidate list, the first intra-frame prediction mode is located before the second intra-frame prediction mode. In some embodiments, in the MPM candidate list, the first intra-frame prediction mode is located after the second intra-frame prediction mode. In some embodiments, the encoding and decoding of the intra-frame prediction mode bypasses the most probable mode (MPM) construction process of the current block. In some embodiments, the method also includes determining the intra-frame prediction mode of a subsequent block based on the intra-frame prediction mode of the current block, wherein the subsequent block is encoded and decoded using an intra-frame prediction encoding and decoding technology, and the current block is encoded and decoded using a CIIP encoding and decoding technology. In some embodiments, the determination is part of a most probable mode (MPM) construction process for the subsequent block. In some embodiments, in the MPM construction process of the subsequent block, the intra-frame prediction mode of the current block is given a lower priority than the intra-frame prediction mode of another neighboring block encoded and decoded using an intra-frame prediction encoding and decoding technology. In some embodiments, whether to determine the intra-prediction mode of the subsequent block according to the intra-prediction mode of the current block is based on whether a condition is satisfied, the condition specifying a relationship between the subsequent block as the first block and the current block as the second block. In some embodiments, the condition includes at least one of the following: (1) the first block and the second block are located in the same row of a codec tree unit (CTU), (2) the first block and the second block are located in the same CTU, (3) the first block and the second block are located in the same region, or (4) the first block and the second block are located in the same row of the region. In some embodiments, the width of the region is the same as the height of the region. In some embodiments, the size of the region is 64x64.
[1117] In some embodiments, only a subset of the most probable mode (MPM) list of normal intra-frame coding technology is used for the current block. In some embodiments, the subset includes a single MPM mode in the MPM mode list of normal intra-frame coding technology. In some embodiments, the single MPM mode is the first MPM mode in the list. In some embodiments, the index indicating the single MPM mode is omitted in the bitstream. In some embodiments, the subset includes the first four MPM modes in the MPM mode list. In some embodiments, the index indicating the MPM mode in the subset is signaled in the bitstream. In some embodiments, the coding context for coding the intra-frame coding block is reused for coding the current block. In some embodiments, the first MPM flag for the intra-frame coding block and the second MPM flag for the current block share the same coding context in the bitstream. In some embodiments, the intra-frame prediction mode of the current block is selected from the MPM mode list regardless of the size of the current block. In some embodiments, the MPM construction process is enabled by default, and the flag indicating the MPM construction process is omitted in the bitstream. In some embodiments, the current block does not require the MPM list construction process.
[1118] In some embodiments, the luminance prediction chrominance mode is used to process the chrominance component of the current block. In some embodiments, the derived mode is used to process the chrominance component of the current block. In some embodiments, multiple intra-frame prediction modes are used to process the chrominance component of the current block. In some embodiments, multiple intra-frame prediction modes are used based on the color format of the chrominance component. In some embodiments, if the color format is 4:4:4, the multiple intra-frame prediction modes are the same as the intra-frame prediction modes of the luminance component of the current block. In some embodiments, each of the four intra-frame prediction modes is encoded and decoded using one or more bits, and the four intra-frame prediction modes include a plane mode, a DC mode, a vertical mode, and a horizontal mode. In some embodiments, the four intra-frame prediction modes are encoded and decoded using 00, 01, 10, and 11. In some embodiments, the four intra-frame prediction modes are encoded and decoded using 0, 10, 110, and 111. In some embodiments, the four intra-frame prediction modes are encoded and decoded using 1, 01, 001, and 000. In some embodiments, if the width W and height H of the current block meet the conditions, only a subset of the four intra-frame prediction modes are available. In some embodiments, if W>N×H, the subset includes a plane mode, a DC mode, and a vertical mode, where N is an integer. In some embodiments, the plane mode, the DC mode, and the vertical mode are encoded and decoded using 1, 01, and 11. In some embodiments, the plane mode, the DC mode, and the vertical mode are encoded and decoded using 0, 10, and 00. In some embodiments, if H>N×W, the subset includes a plane mode, a DC mode, and a horizontal mode, where N is an integer. In some embodiments, the plane mode, the DC mode, and the horizontal mode are encoded and decoded using 1, 01, and 11. In some embodiments, the plane mode, the DC mode, and the horizontal mode are encoded and decoded using 0, 10, and 00. In some embodiments, N=2. In some embodiments, only the DC mode and the plane mode are used for the current block. In some embodiments, an indicator indicating the DC mode or the plane mode is signaled in the bitstream.
[1119] Fig.24 24 is a flowchart representation of a method 2400 for video processing according to the present disclosure. The method 2400 includes, at operation 2402, for a conversion between a current block of video and a bitstream representation of the video, determining whether a combined inter-frame intra-frame prediction (CIIP) process is applicable to a color component of the current block based on the size of the current block. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The method 2400 also includes, at operation 2404, performing the conversion based on the determination.
[1120] In some embodiments, the color component includes a chroma component, and wherein if the width of the current block is less than 4, the CIIP process is not performed on the chroma component. In some embodiments, the color component includes a chroma component, and wherein if the height of the current block is less than 4, the CIIP process is not performed on the chroma component. In some embodiments, the intra-frame prediction mode of the chroma component of the current block is different from the intra-frame prediction mode of the luminance component of the current block. In some embodiments, the chroma component uses one of the following: DC mode, planar mode, or luminance prediction chroma mode. In some embodiments, the intra-frame prediction mode of the chroma component is determined based on the color format of the chroma component. In some embodiments, the color format includes 4:2:0 or 4:4:4.
[1121] Fig.25 25 is a flowchart representation of a method 2500 for video processing according to the present disclosure. The method 2500 includes, at operation 2502, for a conversion between a current block of video and a bitstream representation of the video, based on characteristics of the current block, determining whether to apply a combined inter-frame and intra-frame prediction (CIIP) codec technique to the current block. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The method 2500 also includes, at operation 2504, performing the conversion based on the determination.
[1122] In some embodiments, the characteristic includes the size of the current block with a width of W and a height of H, W and H being integers, and if the size of the block satisfies the condition, the inter-intra prediction codec technique is disabled for the current block. In some embodiments, the condition indicates that W is equal to T1, and T1 is an integer. In some embodiments, the condition indicates that H is equal to T1, and T1 is an integer. In some embodiments, T1=4. In some embodiments, T1=2. In some embodiments, the condition indicates that W is greater than T1 or H is greater than T1, and T1 is an integer. In some embodiments, T1=64 or 128. In some embodiments, the condition indicates that W is equal to T1 and H is equal to T2, and T1 and T2 are integers. In some embodiments, the condition indicates that W is equal to T2 and H is equal to T1, and T1 and T2 are integers. In some embodiments, T1=4 and T2=16.
[1123] In some embodiments, the characteristic includes a codec technology applied to the current block, and if the codec technology meets the condition, the CIIP codec technology is disabled for the current block. In some embodiments, the condition indicates that the codec technology is a bidirectional prediction codec technology. In some embodiments, the bidirectional prediction codec Merge candidate is converted to a unidirectional prediction codec Merge candidate to allow the inter-frame-intra prediction codec technology to be applied to the current block. In some embodiments, the converted Merge candidate is associated with a reference list 0 of the unidirectional prediction codec technology. In some embodiments, the converted Merge candidate is associated with a reference list 1 of the unidirectional prediction codec technology. In some embodiments, only the unidirectional prediction codec Merge candidate of the block is selected for the conversion. In some embodiments, the bidirectional prediction codec Merge candidate is discarded to determine the Mege index indicating the Merge candidate in the bitstream representation. In some embodiments, the inter-frame-intra prediction codec technology is applied to the current block according to the determination. In some embodiments, the Merge candidate list construction process for the triangle prediction mode is used to derive the motion candidate list of the current block.
[1124] Fig.26 is a flowchart representation of a method 2600 for video processing according to the present disclosure. The method 2600 includes, at operation 2602, for a conversion between a current block of a video and a bitstream representation of the video, determining whether to disable a codec tool for the current block based on whether the current block is encoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique. The CIIP codec technique uses intermediate inter-frame prediction values and intermediate intra-frame prediction values to derive a final prediction value for the current block. The codec tool includes at least one of the following: bidirectional optical flow (BDOF), overlapped block motion compensation (OBMC), or a decoder-side motion vector refinement process (DMVR). The method 2500 also includes, at operation 2604, performing the conversion based on the determination.
[1125] In some embodiments, the intra prediction process for the current block is different from the intra prediction process for a second block encoded using the intra prediction codec technique. In some embodiments, in the intra prediction process for the current block, filtering of neighboring samples is skipped. In some embodiments, in the intra prediction process for the current block, a position-dependent intra prediction sample filtering process is disabled. In some embodiments, in the intra prediction process for the current block, a multi-line intra prediction process is disabled. In some embodiments, in the intra prediction process for the current block, a wide-angle intra prediction process is disabled.
[1126] Fig. 2727 is a flowchart representation of a method 2700 for video processing according to the present disclosure. The method 2700 includes, at operation 2702, determining a first precision P1 of a motion vector for spatial motion prediction and a second precision P2 of a motion vector for temporal motion prediction for conversion between a block of a video and a bitstream representation of the video. P1 and / or P2 are fractional. P1 and P2 are different from each other. The method 2600 also includes, at operation 2704, performing the conversion based on the determination.
[1127] In some embodiments, the first precision is 1 / 16 brightness pixel, and the second precision is 1 / 4 brightness pixel. In some embodiments, the first precision is 1 / 16 brightness pixel, and the second precision is 1 / 8 brightness pixel. In some embodiments, the first precision is 1 / 8 brightness pixel, and the second precision is 1 / 4 brightness pixel. In some embodiments, the first precision is 1 / 16 brightness pixel, and the second precision is 1 / 4 brightness pixel. In some embodiments, the first precision is 1 / 16 brightness pixel, and the second precision is 1 / 8 brightness pixel. In some embodiments, the first precision is 1 / 8 brightness pixel, and the second precision is 1 / 4 brightness pixel. In some embodiments, at least one of the first precision or the second precision is lower than 1 / 16 brightness pixel.
[1128] In some embodiments, at least one of the first precision or the second precision is variable. In some embodiments, the first precision or the second precision is a variable according to a profile, level, or hierarchy of the video. In some embodiments, the first precision or the second precision is a variable according to a temporal layer of a picture in the video. In some embodiments, the first precision or the second precision is a variable according to a size of a picture in the video.
[1129] In some embodiments, at least one of the first precision or the second precision is signaled in a video parameter set, a sequence parameter set, a picture parameter set, a slice header, a slice group header, a slice, a codec tree unit, or a codec unit in a bitstream representation. In some embodiments, the motion vector is represented as (MVx, MVy), and the precision of the motion vector is represented as (Px, Py), and wherein Px is associated with MVx and Py is associated with MVy. In some embodiments, Px and Py are variables according to a profile, level, or hierarchy of the video. In some embodiments, Px and Py are variables according to the temporal layer of a picture in the video. In some embodiments, Px and Py are variables according to the width of a picture in the video. In some embodiments, Px and Py are signaled in a video parameter set, a sequence parameter set, a picture parameter set, a slice header, a slice group header, a slice, a codec tree unit, or a codec unit in a bitstream representation. In some embodiments, the decoded motion vector is represented as (MVx, MVy), and wherein the motion vector is adjusted according to the second precision before the motion vector is stored as a temporal motion prediction motion vector. In some embodiments, the temporal motion prediction motion vector is adjusted to (Shift(MVx, P1-P2), Shift(MVy, P1-P2)), where P1 and P2 are integers and P1≥P2, and Shift represents a right shift operation on an unsigned number. In some embodiments, the temporal motion prediction motion vector is adjusted to (SignShift(MVx, P1-P2), SignShift(MVy, P1-P2)), where P1 and P2 are integers and P1≥P2, and SignShift represents a right shift operation on a signed number. In some embodiments, the temporal motion prediction motion vector is adjusted to (MVx<<(P1-P2)), MVy<<(P1-P2)), where P1 and P2 are integers and P1≥P2, and << represents a left shift operation on a signed or unsigned number.
[1130] Fig.28 28 is a flowchart representation of a method 2800 for video processing according to the present disclosure. The method 2800 includes, at operation 2802, for a conversion between a block of a video and a bitstream representation of the video, determining a motion vector (MVx, MVy) with a precision of (Px, Py). Px is associated with MVx, and Py is associated with MVy. MVx and MVy are represented using N bits, and MinX≤MVx≤MaxX and MinY≤MVy≤MaxY, where MinX, MaxX, MinY, and MaxY are real numbers. The method 2700 also includes, at operation 2804, performing the conversion based on the determination.
[1131] In some embodiments, MinX = MinY. In some embodiments, MinX≠MinY. In some embodiments, MaxX = MaxY. In some embodiments, MaxX≠MaxY.
[1132] In some embodiments, at least one of MinX or MaxX is based on Px. In some embodiments, the motion vector has a precision expressed as (Px, Py), and wherein at least one of MinY or MaxY is based on Py. In some embodiments, at least one of MinX, MaxX, MinY or MaxY is based on N. In some embodiments, at least one of MinX, MaxX, MinY or MaxY of the spatial motion prediction motion vector is different from the corresponding MinX, MaxX, MinY or MaxY of the temporal motion prediction motion vector. In some embodiments, at least one of MinX, MaxX, MinY or MaxY is a variable according to the profile, level or hierarchy of the video. In some embodiments, at least one of MinX, MaxX, MinY or MaxY is a variable according to the temporal layer of the picture in the video. In some embodiments, at least one of MinX, MaxX, MinY or MaxY is a variable according to the size of the picture in the video. In some embodiments, at least one of MinX, MaxX, MinY or MaxY is signaled in a video parameter set, a sequence parameter set, a picture parameter set, a slice header, a slice group header, a slice, a codec tree unit or a codec unit in a bitstream representation. In some embodiments, MVx is clipped to [MinX, MaxX] before being used for spatial motion prediction or temporal motion prediction. In some embodiments, MVy is clipped to [MinY, MaxY] before being used for spatial motion prediction or temporal motion prediction.
[1133] Fig.29 2 is a flowchart representation of a method 2900 for video processing according to the present disclosure. The method 2900 includes, at operation 2902, for a conversion between a current block of a video and a bitstream representation of the video, determining whether a shared Merge list is applicable to the current block according to a codec mode of the current block. The method 2800 includes, at operation 2904, performing the conversion based on the determination.
[1134] In some embodiments, if the current block is encoded and decoded using the normal Merge mode, the shared Merge list is not applicable. In some embodiments, if the current block is encoded and decoded using the intra-block copy (IBC) mode, the shared Merge list is applicable. In some embodiments, the method further includes: maintaining a motion candidate table based on past conversions represented by the video and bitstream before performing the conversion; and disabling updating of the motion candidate table after performing the conversion if the current block is a child block of a parent block to which the shared Merge list is applicable and the current block is encoded and decoded using the normal Merge mode.
[1135] Fig.30 3000 is a flowchart representation of a method 3000 for video processing according to the present disclosure. The method 3000 includes, at operation 3002, for a conversion between a current block of a video of size WxH and a bitstream representation of the video, determining a second block of dimensions (W+N-1)x(H+N-1) for motion compensation during the conversion. The second block is determined based on a reference block of dimensions (W+N-1-PW)x(H+N-1-PH). N represents a filter size, and W, H, N, PW, and PH are non-negative integers. PW and PH are not both equal to 0. The method 3000 also includes, at operation 3004, performing the conversion based on the determination.
[1136] In some embodiments, pixels in the second block that are outside the reference block are determined by repeating one or more boundaries of the reference block. In some embodiments, PH=0, and at least the left boundary or the right boundary of the reference block is repeated to generate the second block. In some embodiments, PW=0, and at least the top boundary or the bottom boundary of the reference block is repeated to generate the second block. In some embodiments, PW>0 and PH>0, and the second block is generated by repeating at least the left boundary or the right boundary of the reference block, and then repeating at least the top boundary or the bottom boundary of the reference block. In some embodiments, PW>0 and PH>0, and the second block is generated by repeating at least the top boundary or the bottom boundary of the reference block, and then repeating at least the left boundary or the right boundary of the reference block.
[1137] In some embodiments, the left boundary of the reference block is repeated M1 times, and the right boundary of the reference block is repeated (PW-M1) times, M1 is a positive integer. In some embodiments, the top boundary of the reference block is repeated M2 times, and the bottom boundary of the reference block is repeated (PH-M2) times, M2 is a positive integer. In some embodiments, for different color components of the current block, at least one of PW or PH is different, and the color component includes at least a luminance component or one or more chrominance components. In some embodiments, at least one of PW or PH is a variable according to the size or shape of the current block. In some embodiments, at least one of PW or PH is a variable according to the codec characteristics of the current block, which codec characteristics include unidirectional prediction codec or bidirectional prediction codec.
[1138] In some embodiments, pixels in the second block that are outside the reference block are set to a single value. In some embodiments, the single value is 1<<(BD-1), BD is the bit depth of the pixel samples in the reference block. In some embodiments, BD is 8 or 10. In some embodiments, the single value is derived based on the pixel samples of the reference block. In some embodiments, the single value is signaled in a video parameter set, a sequence parameter set, a picture parameter set, a slice header, a slice group header, a slice, a codec tree unit row, a codec tree unit, a codec unit, or a prediction unit. In some embodiments, if the current block is an affine codec, padding of pixels in the second block that are outside the reference block is disabled.
[1139] Fig.31 is a flowchart representation of a method 3000 for video processing according to the present disclosure. The method 3000 includes, at operation 3102, for a conversion between a current block of a video of size WxH and a bitstream representation of the video, determining a second block of dimensions (W+N-1)x(H+N-1) for motion compensation during the conversion. W, H are non-negative integers, and wherein N is a non-negative integer and is based on a filter size. During the conversion, based on a motion vector refinement operation on an original motion vector, a refined motion vector is determined based on a multi-point search, and wherein a pixel-length boundary of a reference block is determined by repeating one or more non-boundary pixels. The method 3100 also includes, at operation 3104, performing the conversion based on the determination.
[1140] In some embodiments, processing the current block includes filtering the current block in a motion vector refinement operation. In some embodiments, whether the reference block is applicable to processing of the current block is determined based on the dimension of the current block. In some embodiments, interpolating the current block includes: interpolating multiple sub-blocks of the current block based on the second block. The size of each sub-block is W1xH1, W1, H1 are non-negative integers. In some embodiments, W1=H1=4, W=H=8, and PW=PH=0. In some embodiments, the second block is determined entirely based on the integer part of the motion vector of at least one of the multiple sub-blocks. In some embodiments, if the maximum difference between the integer parts of the motion vectors of all the multiple sub-blocks is equal to or less than 1 pixel, the reference block is determined based on the integer part of the motion vector of the upper left sub-block of the current block, and each of the right boundary and the bottom boundary of the reference block is repeated once to obtain the second block. In some embodiments, if the maximum difference between the integer parts of the motion vectors of all the multiple sub-blocks is equal to or less than 1 pixel, the reference block is determined based on the integer part of the motion vector of the lower right sub-block of the current block, and each of the left boundary and the top boundary of the reference block is repeated once to obtain the second block. In some embodiments, the second block is determined entirely based on the modified motion vector of one of the plurality of sub-blocks.
[1141] In some embodiments, if the maximum difference between the integer parts of the motion vectors of all the plurality of sub-blocks is equal to or less than two pixels, the motion vector of the upper left sub-block of the current block is modified by adding an integer pixel distance to each component to obtain a modified motion vector. A reference block is determined based on the modified motion vector, and each of the left boundary, the right boundary, the top boundary, and the bottom boundary of the reference block is repeated once to obtain a second block.
[1142] In some embodiments, if the maximum difference between the integer parts of the motion vectors of all the plurality of sub-blocks is equal to or less than two pixels, the motion vector of the sub-block below the current block is modified by subtracting an integer pixel distance from each component to obtain a modified motion vector. A reference block is determined based on the modified motion vector, and each of the left boundary, the right boundary, the top boundary, and the bottom boundary of the reference block is repeated once to obtain a second block.
[1143] Fig.323200 is a flowchart representation of a method 3200 for video processing according to the present disclosure. The method 3200 includes, at operation 3202, for a block of a video encoded and decoded using a combined inter-frame and intra-frame prediction (CIIP) codec technique and a conversion of a bitstream representation of the video, determining a prediction value at a position in the block based on a weighted sum of an inter-frame prediction value and an intra-frame prediction value at the position. The weighted sum is based on adding an offset to an initial sum obtained based on the inter-frame prediction value and the intra-frame prediction value, and the offset is added before performing a right shift operation to determine the weighted sum. The method 3200 also includes, at operation 3204, performing the conversion based on the determination.
[1144] In some embodiments, the position in the block is represented as (x, y), the inter-frame prediction value at the position (x, y) is represented as Pinter(x, y), the intra-frame prediction value at the position (x, y) is represented as Pintra(x, y), the inter-frame prediction weight at the position (x, y) is represented as w_inter(x, y), and the intra-frame prediction weight at the position (x, y) is represented as w_intra(x, y). The prediction value at the position (x, y) is determined as (Pintra(x, y)×w_intra(x, y)+Pinter(x, y)×w_inter(x, y)+offset(x, y))>>N, where w_intra(x, y)+w_inter(x, y)=2^N and offset(x, y)=2^(N-1), and N is a positive integer. In some embodiments, N=2.
[1145] In some embodiments, the weighted sum is determined using equal weights for the inter-prediction value and the intra-prediction value at the position. In some embodiments, the weighted sum is determined using zero weights depending on the position in the block. In some embodiments, zero weights are applied to the inter-prediction values. In some embodiments, zero weights are applied to the intra-prediction values.
[1146] In some embodiments, performing the conversion in the above method comprises generating a bitstream representation based on the current block of the video. In some embodiments, performing the conversion in the above method comprises generating the current block of the video from the bitstream representation.
[1147] The disclosed and other solutions, examples, embodiments, modules and functional operations described in this document can 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 can be implemented as one or more computer program products, such as one or more modules of computer program instructions encoded on a computer-readable medium, which are used to be run by a data processing device or control the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of substances that affect machine-readable propagation signals, or a combination of one or more of them. The term "data processing device" includes 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 generated to encode information for transmission to a suitable receiver device, such as a machine-generated electrical signal, an optical signal, or an electromagnetic signal.
[1148] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language (including compiled or interpreted languages), and it can 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 code portions). A computer program may be deployed to run on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[1149] The processes and logic flows described in this document can 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 can also be performed by special purpose logic circuits, and the apparatus can also be implemented as special purpose logic circuits, such as FPGAs (Field Programmable Gate Arrays) or ASICs (Application Specific Integrated Circuits).
[1150] Processors suitable for running computer programs include, for example, general-purpose 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 (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, or be operably coupled to receive data from or transfer data to or from the one or more mass storage devices. 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, including, for example, 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.
[1151] Although this patent document contains many details, these details should not be interpreted as limitations on any subject matter or the scope of possible protection, but as descriptions of features of specific embodiments of specific technologies. Certain features described in the context of separate embodiments in this patent document may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in multiple embodiments or in any suitable sub-combination, respectively. In addition, although features may be described above as working in certain combinations and even initially claimed as such, one or more features from the claimed combination may be excluded from the combination in some cases, and the claimed combination may be directed to a sub-combination or a variation of the sub-combination.
[1152] Similarly, although operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or that all of the operations shown be performed, to achieve the desired results. In addition, 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.
[1153] Only a few implementations and examples are described, and other implementations, enhancements, and variations may be made based on what is described and shown in this patent document.
Claims
1. A video processing method, comprising: For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and performing said converting in accordance with said determining; In response to the bidirectional prediction coding and decoding technology being applicable to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
2. The method according to claim 1, wherein: The bidirectional predictive coding technology is not applicable if at least one of the conditions is met, wherein the at least one condition includes one of the following: W=T1 and H≤T2, T1 and T2 are positive integers; W≤T2 and H=T1, T1 and T2 are positive integers; or W≤T1 and H≤T2, T1 and T2 are positive integers.
3. The method according to claim 2, wherein: T1=8, and T2=4.
4. The method according to claim 2, wherein: T1=4, and T2=4.
5. The method according to claim 1, wherein: In the case where the size of the block is one of 4x8, 8x4 or 4x4, the bidirectional prediction coding technology is not applicable.
6. The method according to claim 1, wherein: In case the bidirectional predictive coding technique is applicable, an indicator indicating information about the bidirectional predictive coding technique is signaled in the bitstream.
7. The method according to claim 1, wherein: A signaling method of an indicator indicating the bidirectional prediction coding technique or the unidirectional prediction coding technique is based on the size of the block.
8. The method according to claim 7, wherein: In blocks of a first size range, the indicator has three values corresponding to bidirectional prediction, unidirectional prediction from list 0, and unidirectional prediction from list 1, respectively; as well as In blocks of the second size range, the indicator has two values corresponding to unidirectional prediction from list 0 and unidirectional prediction from list 1, respectively.
9. The method according to claim 1, wherein: The size of the block corresponds to a first color component of the block, and whether the bidirectional prediction coding technique is applicable is determined for the first color component and a remaining color component of the block.
10. The method according to claim 9, wherein: The first color component is a luminance component.
11. The method according to claim 1, wherein: In the case where the bi-directional prediction coding technique is not applicable, the triangular prediction mode is not applicable to the block.
12. The method according to claim 1, wherein: The bidirectional prediction coding technology is applicable to the block, wherein the size of the prediction block is (W+N-1-PW)x(H+N-1-PH), and wherein the boundary pixels of the prediction block are repeated to generate a second block of size (W+N-1)x(H+N-1) for interpolation operation, N represents the interpolation filter tap, and N, PW and PH are integers.
13. The method according to claim 1, wherein: The Merge candidate list construction process is performed based on the size of the block.
14. The method according to claim 1, wherein: Whether the codec tree partitioning process is applicable to the block is based on the size of a sub-block as a sub-codec unit of the block according to the codec tree partitioning process, where the sub-block has a width W1 and a height H1, where W1 and H1 are positive integers.
15. The method according to claim 1, wherein: Performing the conversion includes encoding the block into the bitstream.
16. The method according to claim 1, wherein: Performing the conversion includes decoding the block from the bitstream.
17. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and performing said converting in accordance with said determining; in, In response to the bidirectional prediction coding technique being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
18. The device according to claim 17, wherein: The bidirectional predictive coding technology is not applicable if at least one of the conditions is met, wherein the at least one condition includes one of the following: W=T1 and H≤T2, T1 and T2 are positive integers; W≤T2 and H=T1, T1 and T2 are positive integers; or W≤T1 and H≤T2, T1 and T2 are positive integers.
19. A non-transitory computer-readable storage medium storing instructions that cause a processor to: For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and performing said converting in accordance with said determining; in, In response to the bidirectional prediction coding technique being applied to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
20. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises: For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and generating the bitstream from the block based on the determination; In response to the bidirectional prediction coding and decoding technology being applicable to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
21. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises: For conversion between a block of a video and a bitstream of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; generating the bitstream from the block based on the determination; as well as storing the bitstream in a non-transitory computer-readable recording medium, In response to the bidirectional prediction coding and decoding technology being applicable to the block, the prediction block of reference list 0 and the prediction block of reference list 1 are used to derive the prediction block of the block.
22. A method for video processing, comprising: For conversion between a block of video and a bitstream representation of the video, determining whether a bidirectional predictive coding technique is applicable to the block based on a size of the block having a width W and a height H, where W and H are positive integers; and The converting is performed based on the determination.
23. The method according to claim 22, wherein: If W=T1 and H=T2, the bidirectional predictive coding technique is not applicable, where T1 and T2 are positive integers.
24. The method according to claim 22, wherein: If W=T2 and H=T1, the bidirectional predictive coding technique is not applicable, where T1 and T2 are positive integers.
25. The method according to claim 22, wherein: If W=T1 and H≤T2, the bidirectional predictive coding technique is not applicable, where T1 and T2 are positive integers.
26. The method of claim 22, wherein: If W≤T2 and H=T1, the bidirectional predictive coding technique is not applicable, where T1 and T2 are positive integers.
27. The method according to one or more of claims 22 to 26, wherein: T1=4 and T2=16.
28. The method of claim 22, wherein: If W≤T1 and H≤T2, the bidirectional predictive coding technique is not applicable, where T1 and T2 are positive integers.
29. The method according to claim 28, wherein: T1=T2=8.
30. The method of claim 28, wherein: T1=8 and T2=4.
31. The method of claim 28, wherein: T1=T2=4.
32. The method of claim 28, wherein: T1=4 and T2=8.
33. The method according to one or more of claims 23 to 32, wherein: If the bidirectional predictive coding technique is applicable, an indicator indicating information about the bidirectional predictive coding technique is signaled in a bitstream.
34. The method according to one or more of claims 23 to 32, wherein: If the bidirectional predictive coding technique is not applicable to a block, an indicator indicating information on the bidirectional predictive coding technique used for the block is excluded from a bitstream.
35. The method of claim 22, wherein: If the block size is one of 4x8 or 8x4, the bidirectional predictive coding technique is not applicable.
36. The method of claim 22, wherein: If the size of the block is 4xN or Nx4, the bidirectional prediction coding technique is not applicable, where N is a positive integer and N≤16.
37. The method according to any one or more of claims 22 to 36, wherein: The size of the block corresponds to a first color component of the block, and whether a bidirectional predictive coding technique is applicable is determined for the first color component and the remaining color components of the block.
38. The method according to any one or more of claims 22 to 36, wherein: The size of the block corresponds to a first color component of the block, and whether the bidirectional prediction coding technique is applicable is determined only for the first color component.
39. The method according to claim 37 or 38, wherein: The first color component includes a luminance component.
40. The method according to any one or more of claims 22 to 39, comprising, if the bidirectional predictive coding technique is not applicable to the current block: When it is determined that the selected Merge candidate is encoded using a bi-directional prediction encoding technique, a single motion vector from the first reference list or the second reference list is assigned.
41. The method according to any one or more of claims 22 to 40, comprising, if the bidirectional predictive coding technique is not applicable to the current block: It is determined that triangle prediction mode is not applicable for the block.
42. The method according to any one or more of claims 22 to 41, wherein: Whether the bidirectional prediction coding and decoding technology is applicable is associated with a prediction direction, and the prediction direction is also associated with a unidirectional prediction coding and decoding technology, and wherein the prediction direction is signaled in a bit stream based on a block size.
43. The method of claim 32, wherein: If (1) WxH<64 or (2) WxH=64, information about the unidirectional prediction coding technique is signaled in the bitstream, where W is not equal to H.
44. The method of claim 42, wherein: If (1) WxH>64 or (2) WxH=64, information about unidirectional predictive coding technology or bidirectional coding technology is signaled in the bitstream, where W is equal to H.
45. The method of claim 42, wherein: One restriction indicates that if the size of a block is 4x4, neither the bidirectional encoding and decoding technique nor the unidirectional technique is applicable to the block.
46. The method of claim 45, wherein: If the block is affine coded, the restrictions apply.
47. The method of claim 45, wherein: If the block is not affine coded, the restrictions apply.
48. The method of claim 45, wherein: If the block is intra-coded, the restrictions apply.
49. The method according to one or more of claims 45 to 48, wherein: If the motion vectors of the block have integer precision, the restriction does not apply.
50. The method according to one or more of claims 22 to 49, wherein: The signaling notification generated for the block based on the partitioning of the parent block is skipped in the bitstream, (1) for quadtree partitioning, the size of the parent block is 8x8, (2) for binary tree partitioning, the size of the parent block is 8x4 or 4x8, (3) or for ternary tree partitioning, the size of the parent block is 4x16 or 16x4.
51. The method of claim 50, wherein: An indicator indicating that the motion vector has integer precision is set to 1 in the bitstream.
52. The method according to claim 50 or 51, wherein: The motion vectors for the block are rounded to integer precision.
53. The method of claim 22, wherein: The bidirectional predictive coding technique is applied to the block, the size of the reference block is (W+N-1-PW)x(H+N-1-PH), and wherein the boundary pixels of the reference block are repeated to generate a second block of size (W+N-1)x(H+N-1) for interpolation operation, N represents the interpolation filter tap, and N, PW and PH are integers.
54. The method of claim 53, wherein: PH=0, and at least the pixels of the left boundary or the right boundary are repeated to generate the second block.
55. The method of claim 53 or 54, wherein: PW=0, and pixels of at least the top boundary or the bottom boundary are repeated to generate a second block.
56. The method of claim 53, wherein: PW>0 and PH>0, and the second block is generated by repeating pixels of at least the left boundary or the right boundary, and then repeating pixels of at least the top boundary or the bottom boundary.
57. The method of claim 53, wherein: PW>0 and PH>0, and the second block is generated by repeating pixels of at least the top boundary or the bottom boundary, and then repeating pixels of at least the left boundary or the right boundary.
58. The method according to any one or more of claims 53 to 57, wherein: The pixels of the left border are repeated M1 times, and wherein the pixels of the right border are repeated (PW-M1) times.
59. The method according to any one or more of claims 53 to 58, wherein: The pixels of the top border are repeated M2 times, and wherein the pixels of the bottom border are repeated (PH-M2) times.
60. The method according to any one or more of claims 53 to 59, wherein: How repeated boundary pixels of reference blocks are applied to some or all reference blocks for the conversion.
61. The method according to any one or more of claims 53 to 60, wherein: For different components of the block, PW and PH are different.
62. The method according to any one or more of claims 22 to 61, wherein: The Merge candidate list construction process is performed based on the size of the block.
63. The method of claim 62, wherein: If (1) the Merge candidate is encoded using the bidirectional prediction codec technique and (2) bidirectional prediction is not applicable to the block depending on the size of the block, the Merge candidate is considered to be a unidirectional prediction candidate that refers to the first reference list in the unidirectional prediction codec technique.
64. The method of claim 63, wherein: The first reference list includes reference list 0 or reference list 1 of the unidirectional prediction coding technique.
65. The method of claim 62, wherein: A Merge candidate is considered unavailable if (1) the Merge candidate is encoded using a bi-prediction encoding technique and (2) bi-prediction is not applicable to the block depending on the size of the block.
66. The method of claim 65, wherein: During the Merge candidate list construction process, unavailable Merge candidates are removed from the Merge candidate list.
67. The method according to any one or more of claims 62 to 66, wherein: If bidirectional prediction is not applicable for the block according to the size of the block, the Merge candidate list construction process for triangle prediction mode is called.
68. A method of video processing, comprising: For conversion between a block of video and a bitstream representation of the video, determining whether a codec tree partitioning process is applicable to the block based on a size of a sub-block as a sub-codec unit of the block according to the codec tree partitioning process, the sub-block having a width W and a height H, W and H being positive integers; and The converting is performed based on the determination.
69. The method of claim 68, wherein: If W=T1 and H=T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers.
70. The method of claim 68, wherein: If W=T2 and H=T1, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers.
71. The method of claim 68, wherein: If W=T1 and H≤T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers.
72. The method of claim 68, wherein: If W≤T2 and H=T1, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers.
73. The method according to one or more of claims 69 to 72, wherein: T1=4 and T2=16.
74. The method of claim 68, wherein: If W≤T1 and H≤T2, the codec tree partitioning process is not applicable, where T1 and T2 are positive integers.
75. The method of claim 74, wherein: T1=T2=8.
76. The method of claim 74, wherein: T1=8 and T2=4.
77. The method of claim 74, wherein: T1=T2=4.
78. The method of claim 74, wherein: T1=4。 79. The method of claim 74, wherein: T2=4。 80. The method according to any one or more of claims 68 to 79, wherein: If the codec tree partitioning process is not applicable to the current block, the signaling of the codec tree partitioning process is omitted from the bitstream.
81. The method according to any one or more of claims 22 to 80, wherein: Performing the conversion includes generating the bitstream representation based on a current block of the video.
82. The method according to any one or more of claims 22 to 80, wherein: Performing the conversion includes generating a current block of the video from the bitstream representation.
83. A video processing apparatus comprising a processor, wherein the processor is configured to perform the method of one or more of claims 1 to 16 and 21 to 82.
84. A computer readable medium having stored thereon code which, when executed by a processor, causes the processor to implement the method of any one or more of claims 1 to 16 and 21 to 82.
