Method and device for video processing and medium
Through geometric adjustment and inverse geometric adjustment, the problem of insufficient encoding and decoding efficiency in the prior art is solved, and more efficient video block encoding and decoding is achieved.
Patent Information
- Application Number
- CN202380052236.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-07-06
- Filing Date
- 2023-07-05
- Publication Date
- 2025-02-18
AI Technical Summary
The encoding and decoding efficiency of existing video encoding and decoding technologies has not yet reached the best, especially in terms of adapting to video signals and texture distribution.
The video block is generated and processed by performing geometric adjustments and inverse geometric adjustments, thereby optimizing the codec of the video block. The specific method includes acquiring a video block, performing adjustments toward or sample positions, generating a new video block, and performing conversion of the video block based on these adjustments.
The encoding and decoding efficiency of video blocks is improved, making the encoding and decoding scheme more suitable for video signals and texture distribution, thereby improving the overall video processing performance.
Smart Images

Figure CN119487843A_ABST
Abstract
Description
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. Provisional Application No. 63 / 358,704, filed on July 6, 2022, which has been assigned to the assignee of this application and the entire contents of which are incorporated by reference into this application. Technical Field
[0002] Embodiments of the present disclosure relate generally to video processing techniques, and more particularly, to adjustment of video blocks for video encoding and decoding. Background Art
[0003] Nowadays, digital video functions are being used in all aspects of people's lives. For video encoding / decoding, various types of video compression technologies have been proposed, such as MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Codec (AVC), ITU-T H.265 High Efficiency Video Codec (HEVC), and Versatile Video Codec (VVC). However, the encoding and decoding efficiency of video encoding and decoding technologies is generally expected to be further improved. Summary of the invention
[0004] Embodiments of the present disclosure provide a solution for video processing.
[0005] In a first aspect, a method for video processing is provided. The method comprises: for conversion between a video and a bitstream of the video, obtaining a first video block, the first video block being generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting the orientation of the current video block or adjusting the position of a sample in the current video block; generating a second video block based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment; and performing conversion based on the second video block.
[0006] According to the method of the first aspect of the present disclosure, geometric adjustment and corresponding inverse geometric adjustment are performed for encoding and decoding video blocks. Compared with traditional solutions, the proposed method can advantageously adapt the encoding and decoding scheme of the video block to its signal and texture distribution. As a result, the encoding and decoding efficiency can be improved.
[0007] In a second aspect, a device for video processing is provided. The device includes a processor and a non-volatile memory having instructions thereon. When the instructions are executed by the processor, the processor performs the method according to the first aspect of the present disclosure.
[0008] In a third aspect, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions for causing a processor to execute the method according to the first aspect of the present disclosure.
[0009] In a fourth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a code stream of a video generated by a method performed by a device for video processing. The method includes: obtaining a first video block, the first video block is generated based on a first adjustment of a current video block of the video, the first adjustment includes adjusting the orientation of the current video block or adjusting at least one of the positions of samples in the current video block; generating a second video block based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment; and generating a code stream based on the second video block.
[0010] In a fifth aspect, a method for storing a bitstream of a video is provided. The method comprises: obtaining a first video block, the first video block being generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting the orientation of the current video block or adjusting the position of a sample in the current video block; generating a second video block based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment; generating a bitstream based on the second video block; and storing the bitstream in a non-transitory computer-readable recording medium.
[0011] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings. In the exemplary embodiments of the present disclosure, the same reference numerals generally refer to the same components.
[0014] Figure 1 A block diagram showing an example video encoding and decoding system according to some embodiments of the present disclosure is shown;
[0015] Figure 2 A block diagram of a first example video encoder according to some embodiments of the present disclosure is shown;
[0016] Figure 3 A block diagram of an example video decoder according to some embodiments of the present disclosure is shown;
[0017] Figure 4 The nominal vertical and horizontal positions of 4:2:2 luma and chroma samples in the picture are shown;
[0018] Figure 5 An example of an encoder block diagram is shown;
[0019] Figure 667 intra prediction modes are shown;
[0020] Figure 7 Reference samples for wide-angle intra prediction are shown;
[0021] Figure 8 The problem of discontinuity is shown in the case of orientations exceeding 45°;
[0022] Fig. 9 The locations of the samples used to derive α and β are shown;
[0023] Fig.10 An example of classifying neighboring samples into two groups is shown;
[0024] Fig.11A is a schematic diagram showing the definition of samples used by PDPC applied to a diagonal upper right mode;
[0025] Fig. 11B is a schematic diagram showing the definition of samples used by PDPC applied to a diagonal lower left mode;
[0026] Fig. 11C is a schematic diagram showing the definition of samples used by PDPC applied to an adjacent diagonal upper right mode;
[0027] Fig.11D is a schematic diagram showing the definition of samples used by PDPC applied to an adjacent diagonal lower left mode;
[0028] Fig.12 A gradient method for non-vertical / non-horizontal modes is shown;
[0029] Fig.13 The value of nScale is shown in relation to nTbH and the number of modes; for all cases where nScale<0, the gradient method is used;
[0030] Fig.14 Flowcharts are shown: current PDPC (left) and proposed PDPC (right);
[0031] Fig.15 Neighboring blocks (L, A, BL, AR, AL) used to derive the common MPM list are shown;
[0032] Fig.16 An example of the proposed intra reference mapping is shown;
[0033] Fig.17 An example of four reference rows of a neighboring prediction block is shown;
[0034] Fig.18Ais a diagram showing examples of sub-partitioning for 4x8 and 8x4 CUs;
[0035] Fig.18B is a diagram showing an example of sub-partitioning for a CU other than 4×8, 8×4, and 4×4;
[0036] Fig.19 The matrix-weighted intra prediction process is shown;
[0037] Fig. 20 shows a target sample, a template sample, and a reference sample of a template used in DIMD;
[0038] Fig.21 The proposed intra-block decoding process is shown;
[0039] Fig. 22 HoG computation from a template with a width of 3 pixels is shown;
[0040] Fig.23 shows the prediction fusion by weighted averaging of two HoG modes and planes;
[0041] Fig.24 The MMVD search point is shown;
[0042] Fig.25 A symmetric MVD pattern is shown;
[0043] Fig.26 shows the extended CU area used in BDOF;
[0044] Fig. 27 An affine motion model based on control points is shown;
[0045] Fig.28 The affine MVF of each sub-block is shown;
[0046] Fig.29 The positions of the inherited affine motion predictors are shown;
[0047] Fig.30 Control point motion vector inheritance is shown;
[0048] Fig.31 The positioning of candidate positions for constructing an affine merge pattern is shown;
[0049] Fig.32 is an illustration of the motion vector usage of the proposed combined method;
[0050] Fig.33 Sub-block MV VSB and pixel Δv(i, j) are shown (grey arrows);
[0051] Fig.34A shows the spatially adjacent blocks used by ATVMP;
[0052] Fig.34B shows the derivation of a sub-CU motion field by applying motion shifts from spatial neighbors and scaling motion information from corresponding co-located sub-CUs;
[0053] Fig.35 Positional illumination compensation is shown;
[0054] Fig.36 It is shown that subsampling for the short edges is not performed;
[0055] Fig.37 Decoding side motion vector refinement is shown;
[0056] Fig.38 A diamond-shaped area in the search area is shown;
[0057] Fig.39 The positions of spatial merging candidates are shown;
[0058] Fig.40 shows candidate pairs considered for redundancy check of spatial merging candidates;
[0059] Fig.41 is an illustration of motion vector scaling for temporal merging candidates;
[0060] Fig.42 Candidate positions for temporal merging candidates C0 and C1 are shown;
[0061] Fig.43 The VVC spatial neighboring blocks of the current block are shown;
[0062] Fig.44 is a diagram of the virtual blocks in the i-th search round;
[0063] Fig.45 An example of GPM segmentation grouped at the same angle is shown;
[0064] Fig.46 Unidirectional prediction MV selection for geometric partitioning mode is shown;
[0065] Fig.47 An exemplary generation of warp weights w0 using a geometric partitioning pattern is shown;
[0066] Fig.48 shows spatial neighboring blocks used to derive spatial merging candidates;
[0067] Fig.49 It is shown that template matching is performed on the search area around the initial MV;
[0068] Fig.50 is a diagram of the sub-blocks of the OBMC application;
[0069] Fig.51 The SBT position, type and transformation type are shown;
[0070] Fig.52 Neighboring samples used to calculate SAD are shown;
[0071] Fig.53 Neighboring samples used to calculate SAD for sub-CU level motion information are shown;
[0072] Fig.54 The classification process is shown;
[0073] Fig.55 shows the reordering process in the encoder;
[0074] Fig.56 shows the reordering process in the decoder;
[0075] Fig.57 Shows vertical flip;
[0076] Fig.58 Show horizontal flip;
[0077] Fig.59 A 180° rotation is shown;
[0078] Fig.60 A 90° clockwise rotation is shown;
[0079] Fig.61 A 270° clockwise rotation is shown;
[0080] Fig.62A The original reconstruction used to illustrate the CCLM-derived brightness sample adjustment in the horizontal flip is shown;
[0081] Fig.62B A horizontally flipped reconstruction is shown to illustrate the CCLM-derived brightness sample adjustment in the horizontal flip;
[0082] Fig.63A The original reconstruction is shown to illustrate the CCLM-derived brightness sample adjustment in a 180° rotation;
[0083] Fig.63B A rotational reconstruction is shown to illustrate the CCLM-derived brightness sample adjustment in a 180° rotation;
[0084] Fig.64 A flowchart showing a method for video processing according to an embodiment of the present disclosure; and
[0085] Fig.65A block diagram of a computing device is shown in which various embodiments of the present disclosure may be implemented.
[0086] In the drawings, same or similar reference numbers generally refer to same or similar elements. DETAILED DESCRIPTION
[0087] The principle of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described only for the purpose of illustrating and helping those skilled in the art to understand and implement the present disclosure, without implying any limitation on the scope of the present disclosure. In addition to the methods described below, the disclosure described herein can also be implemented in various ways.
[0088] In the following description and claims, unless defined otherwise, all scientific and technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present disclosure belongs.
[0089] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment must include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, whether or not explicitly described, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in relation to other embodiments.
[0090] It should be understood that although the terms "first" and "second" etc. can be used to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the scope of the exemplary embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.
[0091] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms "including", "comprising", and / or "having" when used herein indicate the presence of the features, elements, and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof. Example Environment
[0092] Figure 11 is a block diagram illustrating an example video codec system 100 that may utilize the techniques of the present disclosure. As shown, the video codec system 100 may include a source device 110 and a destination device 120. The source device 110 may also be referred to as a video encoding device, and the destination device 120 may also be referred to as a video decoding device. In operation, the source device 110 may be configured to generate encoded video data, and the destination device 120 may be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.
[0093] Video source 112 may include a source such as a video capture device. Examples of a video capture device include, but are not limited to, an interface that receives video data from a video content provider, a computer graphics system for generating video data, and / or combinations thereof.
[0094] The video data may include one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a code stream. The code stream may include a bit sequence that forms a coded representation of the video data. The code stream may include coded pictures and associated data. The coded picture is a coded representation of the picture. The associated data may include a sequence parameter set, a picture parameter set, and other grammatical structures. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The coded video data may be directly transmitted to the destination device 120 via the network 130A via the I / O interface 116. The coded video data may also be stored on a storage medium / server 130B for access by the destination device 120.
[0095] The destination device 120 may include an I / O interface 126, a video decoder 124, and a display device 122. The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may obtain encoded video data from the source device 110 or the storage medium / server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to the user. The display device 122 may be integrated with the destination device 120, or may be outside the destination device 120, which is configured to be connected to an external display device interface.
[0096] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Codec (HEVC) standard, the Versatile Video Codec (VVC) standard, and other existing and / or future standards.
[0097] Figure 2 is a block diagram showing an example of a video encoder 200 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video encoder 114 in the system 100 is shown.
[0098] Video encoder 200 may be configured to implement any or all of the techniques of this disclosure. Figure 2 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.
[0099] In some embodiments, the video encoder 200 may include a partitioning unit 201, a prediction unit 202, a residual generation unit 207, a transformation unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transformation unit 211, a reconstruction unit 212, a buffer 213 and an entropy coding unit 214, and the prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.
[0100] In other examples, the video encoder 200 may include more, fewer, or different functional components. In one example, the prediction unit 202 may include an intra-block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode, where at least one reference picture is a picture where the current video block is located.
[0101] Furthermore, although some components (such as the motion estimation unit 204 and the motion compensation unit 205) may be integrated, for the purpose of explanation, these components are described in detail below. Figure 2 are shown separately in the example.
[0102] The partitioning unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.
[0103] The mode selection unit 203 may select one of a plurality of coding modes (intra-frame coding or inter-frame coding), for example, based on the error result, and provide the generated intra-frame coded block or inter-frame coded block to the residual generation unit 207 to generate residual block data, and to the reconstruction unit 212 to reconstruct the coded block for use as a reference picture. In some examples, the mode selection unit 203 may select a combination of intra-frame and inter-frame prediction (CIIP) modes, where the prediction is based on an inter-frame prediction signal and an intra-frame prediction signal. In the case of inter-frame prediction, the mode selection unit 203 may also select a resolution for the motion vector (e.g., sub-pixel precision or integer pixel precision) for the block.
[0104] To perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing the current video block with one or more reference frames from the buffer 213. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.
[0105] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations on the current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice. As used herein, an "I slice" may refer to a portion of a picture consisting of macroblocks, all of which are based on macroblocks within the same picture. Furthermore, as used herein, in some aspects, a "P slice" and a "B slice" may refer to a portion of a picture consisting of macroblocks that are independent of macroblocks in the same picture.
[0106] In some examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference pictures of list 0 or list 1 to find the reference video block for the current video block. The motion estimation unit 204 may then generate a reference index and a motion vector, the reference index indicating the reference picture in list 0 or list 1 containing the reference video block, and the motion vector indicating the spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, the prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information of the current video block.
[0107] Alternatively, in other examples, the motion estimation unit 204 may perform bidirectional prediction on the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block, and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate a plurality of reference indexes and a plurality of motion vectors, the plurality of reference indexes indicating a plurality of reference pictures in list 0 and list 1 containing a plurality of reference video blocks, and the plurality of motion vectors indicating a plurality of spatial displacements between the plurality of reference video blocks and the current video block. The motion estimation unit 204 may output the plurality of reference indexes and the plurality of motion vectors of the current video block as motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the plurality of reference video blocks indicated by the motion information of the current video block.
[0108] In some examples, motion estimation unit 204 may output a complete set of motion information for use in a decoding process by a decoder. Alternatively, in some embodiments, motion estimation unit 204 may signal motion information of a current video block with reference to motion information of another video block. For example, motion estimation unit 204 may determine that motion information of a current video block is sufficiently similar to motion information of a neighboring video block.
[0109] In one example, motion estimation unit 204 may indicate to video decoder 300 a value in a syntax structure associated with the current video block that indicates that the current video block has the same motion information as another video block.
[0110] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.
[0111] As discussed above, the video encoder 200 may signal motion vectors in a predictive manner.Two examples of prediction signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and merge mode signaling.
[0112] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a prediction video block and various syntax elements.
[0113] The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) the prediction video block(s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks corresponding to different sample portions of samples in the current video block.
[0114] In other examples, such as in skip mode, there may be no residual data for the current video block, and the residual generation unit 207 may not perform a subtraction operation.
[0115] Transform processing unit 208 may generate one or more transform coefficient video blocks for a current video block by applying one or more transforms to the residual video block associated with the current video block.
[0116] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.
[0117] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transform to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more prediction video blocks generated by the prediction unit 202 to generate a reconstructed video block associated with the current video block for storage in the buffer 213.
[0118] After reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video blocking artifacts in the video block.
[0119] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy coded data and output a code stream including the entropy coded data.
[0120] Figure 3 is a block diagram showing an example of a video decoder 300 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video decoder 124 in the system 100 is shown.
[0121] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Figure 3 In the example of , video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.
[0122] exist Figure 3 In the example of , the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, and a reconstruction unit 306 and a buffer 307. In some examples, the video decoder 300 can perform a decoding process that is generally opposite to the encoding process described with respect to the video encoder 200.
[0123] The entropy decoding unit 301 can retrieve the encoded code stream. The encoded code stream may include entropy encoded video data (e.g., encoded video data blocks). The entropy decoding unit 301 can decode the entropy encoded video data, and the motion compensation unit 302 can determine motion information from the entropy decoded video data, the motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine the information, for example, by performing AMVP and merge mode. AMVP is used, including deriving several most likely candidates based on data and reference pictures of neighboring PBs. The motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indexes, and in the case of prediction areas in B stripes, also includes an identification of which reference picture list is associated with each index. As used herein, in some aspects, "merge mode" may refer to deriving motion information from blocks that are adjacent in space or time.
[0124] The motion compensation unit 302 may generate motion compensated blocks, possibly performing interpolation based on interpolation filters.Identifiers for the interpolation filters used with sub-pixel precision may be included in the syntax elements.
[0125] The motion compensation unit 302 may calculate interpolated values for sub-integer pixels of a reference block using interpolation filters used by the video encoder 200 during encoding of the video block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 based on received syntax information, and the motion compensation unit 302 may use the interpolation filters to generate a prediction block.
[0126] The motion compensation unit 302 may use at least part of the syntax information to determine the size of blocks used to encode (multiple) frames and / or (multiple) slices of the encoded video sequence, partition information describing how each macroblock of a picture of the encoded video sequence is partitioned, a mode indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-frame coding block, and other information for decoding the encoded video sequence. As used herein, in some aspects, a "slice" may refer to a data structure that can be decoded independently of other slices of the same picture in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice may be an entire picture, or it may be a region of a picture.
[0127] The intra prediction unit 303 may use, for example, an intra prediction mode received in a bitstream to form a prediction block from spatially neighboring blocks. The inverse quantization unit 304 inversely quantizes (i.e., dequantizes) the quantized video block coefficients provided in the bitstream and decoded by the entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.
[0128] The reconstruction unit 306 may obtain the decoded block, for example, by adding the residual block to the corresponding prediction block generated by the motion compensation unit 302 or the intra prediction unit 303. If necessary, a deblocking filter may also be applied to filter the decoded block in order to remove blocking artifacts. The decoded video block is then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction, and the buffer 307 also generates the decoded video for presentation on a display device.
[0129] Some exemplary embodiments of the present disclosure will be described in detail below. It should be noted that the section titles used in this document are for ease of understanding, rather than limiting the embodiments disclosed in the section to that section. In addition, although some embodiments are described with reference to general video codecs or other specific video codecs, the disclosed technology is also applicable to other video codec technologies. In addition, although some embodiments describe the video encoding steps in detail, it should be understood that the corresponding decoding steps of the unencoding will be implemented by the decoder. In addition, the term video processing includes video encoding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at different compression bit rates. 1. Overview The present disclosure relates to video coding techniques. Specifically, it is related to a coding tool that repositions frames and adjusts corresponding cross-component linear models in blocks of the repositioned frames to obtain better coding efficiency. It can be applied to existing video coding standards such as HEVC or Universal Video Codec (VVC). It can also be applied to future video coding standards or video codecs. 2. Introduction Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Visual, and the two organizations jointly developed H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC), as well as the H.265 / HEVC standard. Since H.262, video codec standards have been based on a hybrid video codec structure that utilizes temporal prediction plus transform codec. 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 incorporated them into reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Group (JVET) between VCEG (Q6 / 16) and ISO / IEC JTC1SC29 / WG11 (MPEG) was created to work on the VVC standard with the goal of reducing bitrate by 50% compared to HEVC. 2.1. Color Space and Chroma Subsampling A color space, also called a color model (or color system), is an abstract mathematical model that simply describes the range of colors as tuples of numbers, usually 3 or 4 values or color components (such as RGB). Basically, a color space is a development of coordinate systems and subspaces. For video compression, the most frequently used color spaces are YCbCr and RGB. YCbCr, Y'CbCr or Y Pb / Cb Pr / Cr (also written as YCBCR or Y'CBCR) is a family of color spaces used as part of the color image pipeline in video and digital photography systems. Y' is the luminance component, CB and CR are the blue difference and red difference chrominance components. Y' (with a radian sign) is distinguished from Y, which is brightness, meaning that the light intensity is non-linearly encoded based on the gamma-corrected RGB primaries. Chroma subsampling is the practice of encoding an image with less resolution for chroma information than for luma information, taking advantage of the human visual system's lower sharpness for color differences than for luma. 2.1.1.4:4:4 Each of the three Y'CbCr components has the same sampling rate, so there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and film post-production. 2.1.2.4:2:2 The two chroma components are sampled at half the sampling rate of luma: the horizontal chroma resolution is halved, while the vertical chroma resolution remains unchanged. This reduces the bandwidth of the uncompressed video signal by one third with almost no visual difference. Figure 4 Examples of nominal vertical and horizontal positions for a 4:2:2 color format are depicted in . 2.1.3.4:2:0 In 4:2:0, the horizontal sampling is doubled compared to 4:1:1, but the vertical resolution is halved because the Cb and Cr channels are sampled only on every alternate line in this scheme. Therefore, the data rate is the same. Cb and Cr are each subsampled horizontally and vertically at a factor of 2. There are three variants of the 4:2:0 scheme with different horizontal and vertical locations. In MPEG-2, Cb and Cr are arranged horizontally in the same position. Cb and Cr are arranged between pixels in the vertical direction (arranged with a gap). In JPEG / JFIF, H261, and MPEG-1, Cb and Cr are set intermittently, halfway between alternate luma samples. In 4:2:0 DV, Cb and Cr are co-located horizontally. In the vertical direction, they are co-located on alternate lines. Table 2-1 SubWidthC and SubHeightC values derived from chroma_format_idc and separate_colour_plane_flag 2.2. Encoding and decoding process of typical video codecs Figure 5 An example of a VVC encoder block diagram is shown, which contains three in-loop filtering blocks: deblocking filter (DF), sample adaptive offset (SAO), and ALF. Unlike DF, which uses a predefined filter, SAO and ALF use the original samples of the current picture to reduce the mean square error between the original and reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, where the coding side information signals the offset and filter coefficients. ALF is located at the last processing stage of each picture and can be seen as a tool that tries to pick up and repair artifacts produced by previous stages. 2.3. Intra-mode codec with 67 intra-prediction modes To capture arbitrary edge directions present in natural videos, the number of directional intra modes is expanded from 33 used in HEVC to 65, as shown in Figure 6As shown, planar mode and DC mode remain unchanged. These dense directional intra prediction modes are applicable to all block sizes and to both luma intra prediction and chroma intra prediction. In HEVC, each intra-coded block has a square shape, and the length of each of its sides is a power of 2. Therefore, no division operation is required to generate the intra predictor using the DC mode. In VVC, blocks can have a rectangular shape, which in general requires the use of a division operation for each block. To avoid division operations for DC prediction, only the longer sides are used to calculate the average value for non-square blocks. 2.3.1. Wide-angle intra prediction Although 67 modes are defined in VVC, the precise prediction direction for a given intra prediction mode index further depends on the block shape. The traditional angular intra prediction direction is defined as from 45 degrees to -135 degrees in a clockwise direction. In VVC, several traditional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for non-square blocks. The replaced mode is notified using the original mode index, which is remapped to the index of the wide-angle mode after parsing. The total number of intra prediction modes remains unchanged, i.e. 67, and the intra mode encoding and decoding method remains unchanged. To support these predictions, Figure 7 As shown, a top reference with a length of 2W+1 and a left reference with a length of 2H+1 are defined. The number of modes replaced in the wide-angle direction mode depends on the aspect ratio of the block. The replaced intra-frame prediction modes are shown in Table 2-2. Table 2-2 Intra-frame prediction modes replaced by wide-angle mode Aspect Ratio Alternative intra prediction modes W / H==16 Mode 2,3,4,5,6,7,8,9,10,11,12,13,14,15 W / H==8 Mode 2,3,4,5,6,7,8,9,10,11,12,13 W / H==4 Mode 2,3,4,5,6,7,8,9,10,11 W / H==2 Mode 2,3,4,5,6,7,8,9 W / H==1 none W / H==1 / 2 Mode 59,60,61,62,63,64,65,66 W / H==1 / 4 Mode 57,58,59,60,61,62,63,64,65,66 W / H==1 / 8 Mode 55,56,57,58,59,60,61,62,63,64,65,66 W / H==1 / 16 Mode 53,54,55,56,57,58,59,60,61,62,63,64,65,66 like Figure 8 As shown, in the case of wide-angle intra prediction, two vertically adjacent predicted samples can use two non-adjacent reference samples. Therefore, a low-pass reference sample filter and side smoothing are applied to wide-angle prediction to reduce the added gap Δp α The negative impact brought by this. If the wide-angle mode represents a non-fractional offset. There are 8 modes in the wide-angle mode that meet this condition, which are [-14, -12, -10, -6, 72, 76, 78, 80]. When predicting a block through these modes, the samples in the reference buffer are directly copied without applying any interpolation. With this modification, the number of samples that need to be smoothed is reduced. In addition, it will align the design of non-fractional modes in the traditional prediction mode and the wide-angle mode. In VVC, 4:2:2 and 4:4:4 chroma formats are supported, as well as the 4:2:0 chroma format. The chroma derivation mode (DM) derivation table for the 4:2:2 chroma format was originally ported from HEVC, expanding the number of entries from 35 to 67 to align with the expansion of intra prediction modes. Since the HEVC specification does not support prediction angles below -135 degrees and above 45 degrees, the luma intra prediction modes ranging from 2 to 5 are mapped to 2. Therefore, the chroma DM derivation table for the 4:2:2 chroma format is updated by replacing some values of the entries of the mapping table to more accurately convert the prediction angles of the chroma blocks. 2.4. Intra-frame prediction mode encoding and decoding for chroma components For the chroma component of an intra PU, the encoder selects the best chroma prediction mode among five modes including planar, DC, horizontal, vertical, and a direct copy of the intra prediction mode for the luma component. The mapping between the intra prediction direction for chroma and the intra prediction mode number is shown in Table 2-3. When the intra prediction mode number of the chroma component is 4, the intra prediction direction for the luma component is used for intra prediction sample generation for the chroma component. When the intra prediction mode number of the chroma component is not 4 and it is the same as the intra prediction mode number for the luma component, the intra prediction direction 66 is used for intra prediction sample generation for the chroma component. 2.5. Inter-frame prediction For each inter-frame prediction CU, the motion parameters include motion vectors, reference picture indices, and reference picture list usage indices, as well as additional information required for the new coding features of VVC that will be used for inter-frame prediction sample generation. The motion parameters can be signaled in an explicit or implicit manner. When a CU is encoded in skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector differences (delta) or reference picture indices. A merge mode is specified in which the motion parameters of the current CU are obtained from neighboring CUs, including spatial candidates and temporal candidates, as well as additional timetables introduced in VVC. The merge mode can be applied to any inter-frame prediction CU, not just the skip mode. An alternative to the merge mode is the explicit transmission of motion parameters, in which the motion vector, the corresponding reference picture index and reference picture list usage flag for each reference picture list, and other required information are explicitly signaled per CU. 2.6. Intra-block copy (IBC) Intra-block copying (IBC) is a tool adopted in the HEVC extension on SCC. It is well known that it significantly improves the encoding and decoding efficiency of screen content materials. Since the IBC mode is implemented as a block-level codec mode, block matching (BM) is performed at the encoder to find the best block vector (or motion vector) for each CU. Here, the block vector is used to indicate the displacement from the current block to the reference block, which has been reconstructed within the current picture. The luminance block vector of the CU encoded and decoded by IBC has integer precision. The chrominance block vector is also rounded to integer precision. When used in conjunction with AMVR, the IBC mode can switch between 1-pixel and 4-pixel motion vector precision. The CU encoded and decoded by IBC is regarded as a third prediction mode in addition to the intra or inter prediction mode. The IBC mode is applicable to CUs with a width and height that are both less than or equal to 64 luminance samples. On the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD checks on blocks with a width or height no greater than 16 luma samples. For non-merge mode, a block vector search is first performed using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching is performed. In hash-based search, the hash key matching (32-bit CRC) between the current block and the reference blocks is extended to all allowed block sizes. The hash key calculation for each position in the current picture is based on 4×4 sub-blocks. For current blocks of larger size, the hash key is determined to match the hash key of the reference block when all hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference positions. If the hash keys of multiple reference blocks are found to match the hash key of the current block, the block vector cost of each matching reference is calculated and the one with the minimum cost is selected. In the block matching search, the search range is set to cover the previous CTU and the current CTU. At the CU level, the IBC mode is signaled using a flag, which can be signaled as IBC AMVP mode or IBC Skip / Merge mode as shown below: – IBC skip / merge mode: The merge candidate index is used to indicate which block vector from the list of neighboring candidate IBC codec blocks is used to predict the current block. The merge list includes spatial candidates, HMVP candidates, and pairwise candidates. – IBC AMVP mode: Block vector differences are encoded and decoded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one from the left neighbor and one from the top neighbor (if IBC coded). When either neighbor is not available, the default block vector is used as predictor. A flag is signaled to indicate the block vector predictor index. 2.7. Cross-component linear model prediction In order to reduce cross-component redundancy, a cross-component linear model (CCLM) prediction mode is used in VVC. For this CCLM prediction mode, chroma samples are predicted based on the reconstructed luma samples of the same CU by using the following linear model: pred C (i,j)=α·rec L ′(i,j)+β (2-1) where pred C (i,j) represents the predicted chroma sample in the CU, and rec L ′(i,j) represents the down-sampled reconstructed luma sample of the same CU. The CCLM parameters (α and β) are derived using up to four neighboring chroma samples and their corresponding downsampled luma samples. Assuming the current chroma block size is W×H, W' and H' are set to - When LM mode is applied, W'=W, H'=H; -When LM_T mode is adopted, W'=W+H; - When LM_L mode is applied, H'=H+W. The upper neighboring position is denoted as S[0, -1] ... S[W'-1, -1], and the left neighboring position is denoted as S[-1, 0] ... S[-1, H'-1]. Then, four samples are selected as: - When LM mode is applied and both the upper and left neighboring samples are available, S[W' / 4,-1], S[3*W' / 4,-1], S[-1,H' / 4], S[-1,3*H' / 4]; - When LM_T mode is applied or only upper neighbor samples are available, S[W' / 8,-1], S[3*W' / 8,-1], S[5*W' / 8,-1], S[7*W' / 8,-1]; - S[-1,H' / 8], S[-1,3*H' / 8], S[-1,5*H' / 8], S[-1,7*H' / 8] when LM_L mode is applied or only left neighbor samples are available. The four neighboring brightness samples at the chosen position are downsampled and compared four times to find the two larger values: x 0 A and x 1 A , and two smaller values: x 0 B and x 1 B Their corresponding chrominance sample values are represented by y 0 A.y 1 A.y0 B and y 1 B. Then x A 、x B ,y A and B Export as: X a =(x 0 A +x 1 A +1)>>1;X b =(x 0 B +x 1 B +1)>>1;Y a =(y 0 A +y 1 A +1)>>1;Y b =(y 0 B +y 1 B +1)>>1(2-2) Finally, the parameters α and β of the linear model are obtained according to the following formula. β=Y b -α·X b (2-4) Fig. 9 Examples of the positions of the left and upper samples and the samples of the current block involved in CCLM mode are shown. The division operation is implemented using a lookup table to calculate the parameter α. In order to reduce the memory required to store the table, the diff value (the difference between the maximum and minimum values) and the parameter α are expressed as exponents. For example, diff is approximated by a 4-bit significant part and an exponent. Therefore, the table for 1 / diff is reduced to 16 elements for 16 values of the significant bit, as shown below: DivTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} (2-5) This will help reduce the complexity of the calculations and the memory size required to store the required tables. In addition to the upper and left templates being used together to calculate linear model coefficients, they can also be used alternately in two other LM modes, called LM_T and LM_L modes. In LM_T mode, only the upper template is used to calculate the linear model coefficients. To obtain more samples, the upper template is expanded to (W+H) samples. In LM_L mode, only the left template is used to calculate the linear model coefficients. To obtain more samples, the left template is expanded to (H+W) samples. In LM mode, the left template and the upper template are used to calculate the linear model coefficients. To match the chroma sample positions for 4:2:0 video sequences, two types of downsampling filters are applied to luma samples to achieve a 2 to 1 downsampling ratio in both horizontal and vertical directions. The choice of downsampling filter is specified by the SPS level flag. The two downsampling filters are as follows, corresponding to "type-0" and "type-2" content, respectively. Note that when the upper reference row is at a CTU boundary, only one luma row (common row buffer in intra prediction) is used for downsampling luma samples. This parameter calculation is performed as part of the decoding process, not just as an encoder search operation. Therefore, no syntax is used to pass the α and β values to the decoder. For chroma intra mode coding and decoding, a total of 8 intra modes are allowed for chroma intra mode coding and decoding. These modes include five traditional intra modes and three cross-component linear model modes (LM, LM_T and LM_L). The chroma mode signal transmission and derivation process are shown in Table 2-3. Chroma mode coding and decoding depends directly on the intra prediction mode of the corresponding luminance block. Since separate block partitioning structures for luminance and chrominance components are enabled in the I stripe, one chroma block can correspond to multiple luminance blocks. Therefore, for the chroma DM mode, the intra prediction mode of the corresponding luminance block covering the center position of the current chroma block is directly inherited. Table 2-3 Chroma prediction modes derived from luma mode when CCLM is enabled Regardless of the value of sps_cclm_enabled_flag, a single binarization table is used, as shown in Table 2-4. Table 2-4 Unified binarization table for chroma prediction mode Value of intra_chroma_pred_mode Binary value string 4 00 0 0100 1 0101 2 0110 3 0111 5 10 6 110 7 111 In Table 2-4, the first binary value indicates whether it is normal mode (0) or LM mode (1). If it is LM mode, the next binary value indicates whether it is LM_CHROMA (0). If it is not LM_CHROMA, the next binary value indicates whether it is LM_L (0) or LM_T (1). For this case, when sps_cclm_enabled_flag is 0, the first binary value of the corresponding intra_chroma_pred_mode binarization table can be discarded before entropy encoding and decoding. Or, in other words, the first binary value is inferred to be 0 and therefore not encoded and decoded. This single binarization table is used for both cases where sps_cclm_enabled_flag is equal to 0 and 1. The first two binary values in Table 2-4 are context encoded and decoded with their own context models, and the remaining binary values are bypass encoded and decoded. Additionally, to reduce luma-chroma latency in dual trees, when a 64×64 luma codec tree node is split with NotSplit (and ISP is not used for 64×64 CUs) or QT, chroma CUs in 32×32 / 32×16 chroma codec tree nodes are allowed to use CCLM in the following manner: If a 32x32 chroma node is not split or has a QT split, all chroma CUs in the 32x32 node can use CCLM. - If a 32×32 chroma node is split with horizontal BT and the 32×16 child node is not split or uses vertical BT split, all chroma CUs in the 32×16 chroma node can use CCLM. In all other luma and chroma codec tree partitioning conditions, CCLM is not allowed for chroma CUs. 2.8. Multi-model linear model (MMLM) For MMLM, there can be more than one linear model between luma samples and chroma samples in a CU. In this method, the neighboring luma samples and neighboring chroma samples of the current block are classified into several groups, each of which is used as a training set to derive a linear model (i.e., derive a specific α and β for a specific group). In addition, the samples of the current luma block are also classified based on the same rules used for the classification of neighboring luma samples. Neighboring samples can be classified into M groups, where M is 2 or 3. The MMLM method with M=2 and M=3 is designed as two additional chroma prediction modes named MMLM2 and MMLM3 in addition to the original LM mode. The encoder selects the best mode in the RDO process and transmits it through the signal. When M is equal to 2, Fig.10An example of classifying neighboring samples into two groups is shown. The threshold is calculated as the average of neighboring reconstructed brightness samples. Neighboring samples with Rec'L[x, y] <= threshold are classified into group 1; while neighboring samples with Rec'L[x, y]> threshold are classified into group 2. Similar to CCLM, there are 3 modes in MMLM, namely MMLM, MMLM_T and MMLM_L. The two models are derived as: The threshold is the average of neighboring samples of the luminance reconstruction. A linear model for each class is derived using the Least Mean Squares (LMS) method (if enabled) or the Min / Max method of VVC. 2.9. Position-dependent intra prediction combination In VVC, the results of intra prediction for DC, planar, and several angular modes are further modified by the Position Dependent Intra Prediction Combination (PDPC) method. PDPC is an intra prediction method that calls for a combination of boundary reference samples and HEVC-style intra prediction with filtered boundary reference samples. PDPC is applied to the following intra modes without signaling: planar, DC, intra angles less than or equal to horizontal, and intra angles greater than or equal to vertical and less than or equal to 80. PDPC is not applied if the current block is in BDPCM mode or the MRL index is greater than 0. The prediction sample pred(x', y') is predicted using a linear combination of the intra prediction mode (DC, planar, angular) and the reference sample according to the following equation 2-8: pred(x',y')=Clip(0.(1< <BitDepth)-1,(wL×R -1,y +wT×R x’,-1 +(64-wL-wT)×pred(x',y')+32)>>6) (2-9) Its R x,-1 ,R -1,y Respectively represent the reference samples located at the top and left boundaries of the current sample (x, y). If PDPC is applied to DC, planar, horizontal and vertical intra modes, no additional boundary filters are required, as required in the case of HEVC DC mode boundary filters or horizontal / vertical mode edge filters. The PDPC process is identical for DC mode and planar modes. For angular modes, if the current angular mode is HOR_IDX or VER_IDX, the left or top reference samples are not used, respectively. The PDPC weights and scaling factors depend on the prediction mode and block size. PDPC is applied to blocks with width and height both greater than or equal to 4. Figures 11A-11D The reference samples (Rx,-1 and R -1,y ) definition. Fig.11A is a diagram showing the definition of samples used by PDPC applied to the diagonal upper right mode. Fig. 11B is a diagram showing the definition of samples used by PDPC applied to the diagonal lower-left mode. Fig. 11C is a schematic diagram showing the definition of samples used by PDPC applied to the adjacent diagonal upper right mode. Fig.11D is a schematic diagram showing the definition of samples used by PDPC applied to the adjacent diagonal bottom left mode. The prediction sample pred(x',y') is located at (x',y') within the prediction block. For example, for the diagonal mode, the reference sample R x,-1 The coordinate x of is given by: x=x'+y'+1, and the reference sample R -1,y The coordinate y of is similarly given by: y = x' + y' + 1. For other angular modes, the reference sample R x,-1 and R -1,y Can be at a fractional sample position. In this case, the sample value at the nearest integer sample position will be used. 2.10. Gradient PDPC like Fig.12 As shown in Figure 1, the gradient-based approach is extended to non-vertical / non-horizontal modes. Here, the gradient is calculated as r(-1,y)–r(-1+d,-1), where d is the horizontal displacement depending on the angular direction. A few points to note here: The gradient term r(-1,y)–r(-1+d,-1) needs to be calculated once per row because it does not depend on the x position. The calculation of d is already part of the original intra prediction process which can be reused, so there is no need to calculate d separately. Therefore, the accuracy of d is 1 / 32 pixel. When d is in fractional position, two-tap (linear) filtering is used, i.e., if dPos is the displacement with 1 / 32 pixel precision, dInt is the (rounded down) integer part (dPos>>5), and dFract is the fractional part with 1 / 32 pixel precision (dPos&31), then r(-1+d) is calculated as: r(-1+d)=(32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1) As described in a, this 2-tap filtering is performed once per row (if necessary). Finally, the prediction signal is calculated: p(x,y)=Clip(((64–wL(x))*p(x,y)+wL(x)*(r(-1,y)-r(-1+d,-1))+32)>>6), where wL(x)=32>>((x<<1)>>nScale2), and nScale2=(log2(nTbH)+log2(nTbW)–2)>>2, which are the same as the vertical / horizontal mode. In short, the same process is applied compared to the vertical / horizontal mode (in fact, d=0 indicates the vertical / horizontal mode). Secondly, in non-vertical / non-horizontal modes, when (nScale < 0) or when PDPC cannot be applied due to the unavailability of auxiliary reference samples, the gradient-based method is activated. The value of nScale with respect to TB size and angular mode is shown in Figure 11 to better visualize the case of using the gradient method. In addition, Fig.14 Flowcharts for the existing PDPC and the proposed PDPC are shown. 2.11. Auxiliary MPM A secondary MPM list is introduced. The existing primary MPM (PMPM) list includes 6 entries, while the secondary MPM (SMPM) list includes 16 entries. First, a general MPM list with 22 entries is constructed, and then the first 6 entries in the general MPM list are included in the PMPM list, and the remaining entries form the SMPM list. The first entry in the general MPM list is the plane mode. Fig.15 As shown, the remaining entries consist of the intra modes of the left (L), above (A), lower left (BL), upper right (AR), and upper left (AL) neighboring blocks, the directional mode with an offset added from the first two available directional modes of the neighboring blocks, and the default mode. If the CU block is vertically oriented, the order of neighboring blocks is A, L, BL, AR, AL; otherwise, it is L, A, BL, AR, AL. First parse the PMPM flag, if it is equal to 1, parse the PMPM index to determine which entry of the PMPM list is selected, otherwise parse the SPMPM flag to determine whether to parse the SMPM index or the remaining modes. 2.12.6 Tapped Intra-frame Interpolation Filter In order to improve the prediction accuracy, it is proposed to replace the 4-tap cubic interpolation filter with a 6-tap interpolation filter. The filter coefficients are derived based on the same polynomial regression model, but the polynomial order is 6. The filter coefficients are shown below, {0,0,256,0,0,0}, / / 0 / 32 position {0,-4,253,9,-2,0}, / / 1 / 32 position {1,-7,249,17,-4,0}, / / 2 / 32 position {1,-10,245,25,-6,1}, / / 3 / 32 position {1,-13,241,34,-8,1}, / / 4 / 32 position {2,-16,235,44,-10,1}, / / 5 / 32 position {2,-18,229,53,-12,2}, / / 6 / 32 position {2,-20,223,63,-14,2}, / / 7 / 32 position {2,-22,217,72,-15,2}, / / 8 / 32 position {3,-23,209,82,-17,2}, / / 9 / 32 position {3,-24,202,92,-19,2}, / / 10 / 32 position {3,-25,194,101,-20,3}, / / 11 / 32 position {3,-25,185,111,-21,3}, / / 12 / 32 position {3,-26,178,121,-23,3}, / / 13 / 32 position {3,-25,168,131,-24,3}, / / 14 / 32 position {3,-25,159,141,-25,3}, / / 15 / 32 position {3,-25,150,150,-25,3}, / / half pixel position The reference samples used for interpolation come from the reconstructed samples or the padding samples in HEVC, so no conditional check on the reference sample availability is required. It is recommended to use a 4-tap cubic interpolation filter instead of using the nearest rounding operation to derive the extended intra reference samples. Fig.16 As shown in the example in , a four-tap interpolation filter is used to derive the value of the reference sample P, while in JEM-3.0 or HM, P is directly set to X1. 2.13. Multiple Reference Line (MRL) Intra Prediction Multiple reference line (MRL) intra prediction uses more reference lines for intra prediction. Fig.17In Figure 1, an example of 4 reference lines is depicted, where the samples of segments A and F are not extracted from the reconstructed neighboring samples, but are filled with the closest samples from segments B and E, respectively. HEVC intra picture prediction uses the nearest reference line (i.e., reference line 0). In MRL, 2 additional lines are used (reference line 1 and reference line 3). The index of the selected reference row (mrl_idx) is signaled and used to generate the intra predictor. For reference row indices greater than 0, only additional reference row modes are included in the MPM list, and only the MPM index is signaled without the remaining modes. The reference row index is signaled before the intra prediction mode, and in case a non-zero reference row index is signaled, the planar mode is excluded from the intra prediction mode. MRL is disabled for the first row of a block within a CTU to prevent the use of extended reference samples outside the current CTU row. In addition, PDPC will be disabled when additional rows are used. For MRL mode, the derivation of DC values in DC intra-frame prediction mode for non-zero reference row indexes is aligned with the derivation of reference row index 0. MRL requires 3 neighboring luma reference rows stored by the CTU to generate predictions. The downsampling filter of the Cross Component Linear Model (CCLM) tool also requires 3 neighboring luma reference rows. The definition of MRL using the same 3 rows is consistent with CCLM to reduce the storage requirements of the decoder. 2.14. Intra-frame sub-partitioning (ISP) Intra sub-partitioning (ISP) divides the luma intra prediction block into 2 or 4 sub-partitions vertically or horizontally depending on the block size. For example, the minimum block size of ISP is 4×8 (or 8×4). If the block size is larger than 4×8 (or 8×4), the corresponding block will be divided into 4 sub-partitions. We note that M×128 (M≤64) and 128×N (N≤64) ISP blocks may generate potential problems for 64×64 VDPU. For example, an M×128 CU in the single-tree case has one M×128 luma TB and two corresponding Chroma TB. If the CU uses ISP, then the luma TB will be divided into 4 M×32TBs (can only be split horizontally), each of which is smaller than a 64×64 block. However, in the current ISP design, the chroma block is indivisible. Therefore, the size of both chroma components will be larger than a 32×32 block. Similarly, a 128×NCU using ISP can also create a similar situation. Therefore, these two situations are problems for the 64×64 decoder pipeline. Therefore, the CU size that can use ISP is limited to a maximum value of 64×64. Figures 18A-18B Examples of both possibilities are shown. Fig.18A is a diagram showing examples of sub-partitioning for 4x8 and 8x4 CUs. Fig.18Bis a diagram showing an example of sub-partitioning for a CU other than 4×8, 8×4, and 4×4. All sub-partitions satisfy the condition of having at least 16 samples. In ISP, 1×N / 2×N sub-block prediction is not allowed to rely on the reconstructed values of previously decoded 1×N / 2×N sub-blocks of the codec block, so that the minimum prediction width of the sub-block becomes four samples. For example, an 8×N (N>4) codec block decoded using vertical partitioning ISP is partitioned into two prediction regions, each of size 4×N, and the size of the four transforms is 2×N. Similarly, a 4×N codec block decoded using vertical partitioning ISP uses a full 4×N block for prediction; four transforms are used, each of size 1×N. Although 1×N and 2×N transform sizes are allowed, it can be asserted that the transforms of these blocks within the 4×N region can be performed in parallel. For example, when a 4×N prediction region contains four 1×N transforms, there is no transform in the horizontal direction; the transform in the vertical direction can be performed as a single 4×N transform in the vertical direction. Similarly, when a 4×N prediction region contains two 2×N transform blocks, the transform operations of two 2×N blocks in each direction (horizontally and vertically) can be performed in parallel. Therefore, there is no added latency when processing these smaller blocks compared to processing intra blocks for a 4x4 regular codec. Table 2-5 Entropy encoding and decoding coefficient group size Block size Coefficient group size 1×N,N≥16 1×16 N×1,N≥16 16×1 2×N,N≥8 2×8 N×2,N≥8 8×2 All other possible M×N situations 4×4 For each sub-partition, a reconstructed sample is obtained by adding the residual signal to the prediction signal. Here, the residual signal is generated by processes such as entropy decoding, inverse quantization, and inverse transformation. Therefore, the reconstructed sample values of each sub-partition can be used to generate a prediction for the next sub-partition, and each sub-partition is processed repeatedly. In addition, the first sub-partition to be processed is the upper left sample containing the CU, and then the sub-partitions continue downward (horizontal partitioning) or to the right (vertical partitioning). Therefore, the reference samples used to generate the sub-partition prediction signal are located only on the left and above the row. All sub-partitions share the same intra-frame mode. The following is a summary of the interaction of ISP with other codec tools. – Multiple Reference Line (MRL): If the MRL index of a block is not 0, the ISP codec mode will be inferred to be 0, so the ISP mode information will not be sent to the decoder. – Entropy Codec Coefficient Group Size: As shown in Table 2-5, the size of the entropy codec sub-blocks has been modified to have 16 samples in all possible cases. It is worth noting that the new size only affects the blocks generated by the ISP where one of the dimensions is less than 4 samples. In all other cases, the coefficient group remains 4×4 in size. – CBF encoding: It is assumed that at least one subpartition has a non-zero CBF. Thus, if n is the number of subpartitions, and the first n-1 subpartitions have yielded zero CBFs, the CBF of the nth subpartition is inferred to be 1. – Transform size restriction: All ISP transforms with length greater than 16 points use DCT-II. –MTS flag: If the CU uses ISP codec mode, the MTS CU flag will be set to 0 and will not be sent to the decoder. Therefore, the encoder will not perform RD tests on the different available transforms for each result sub-partition. The transform selection for ISP mode will instead be fixed and will be selected based on the intra mode used, the processing order and the block size. Therefore, no signaling is required. For example, let t H and t V and are the horizontal and vertical transforms selected for the w×h subpartition, respectively, where w is the width and h is the height. The transforms are then selected according to the following rules: - If w=1 or h=1, there is no horizontal transform or vertical transform, respectively. – If w ≥ 4 and w ≤ 16, t H =DST-VII, otherwise t H =DCT-II. – If h≥4 and h≤16, t V =DST-VII, otherwise t V =DCT-II. In ISP mode, all 67 intra prediction modes are allowed. PDPC is also applied if the corresponding width and height are at least 4 samples long. In addition, the conditions for the reference sample filtering process (reference smoothing) and intra interpolation filter selection no longer exist, and in ISP mode, the cubic (DCT-IF) filter is always applied for fractional position interpolation. 2.15. Matrix Weighted Intra Prediction (MIP) The matrix weighted intra prediction (MIP) method is a new intra prediction technique added to VVC. In order to predict the samples of a rectangular block of width W and height H, the matrix weighted intra prediction (MIP) takes a row of H reconstructed neighboring boundary samples on the left side of the block and a row of W reconstructed neighboring boundary samples above the block as input. If the reconstructed samples are not available, they are generated as in traditional intra prediction. Fig.19 The generation of the shown prediction signal is based on three steps, namely averaging, matrix-vector multiplication and linear interpolation. 2.15.1. Average Neighboring Samples Among the boundary samples, four samples or eight samples are selected by averaging based on the block size and shape. Specifically, input boundary bdry top and bdryleft is reduced to smaller boundaries by averaging neighboring boundary samples according to predefined rules that depend on the size of the block. and Then, the two reduced boundaries and Connect to the reduced boundary vector bdry red , for blocks of 4×4 shape, its size is 4, and for blocks of all other shapes, its size is 8. If mode refers to MIP mode, the connection is defined as follows: Matrix multiplication Taking the average sample as input, we perform a matrix-vector multiplication and then add the offset. The result is a downscaled prediction signal over a subsampled set of samples in the original block. red In the above example, the reduced prediction signal pred is generated. red , the reduced prediction signal is of width W red and height H red Here, W red and H red is defined as: The reduced prediction signal pred is calculated by computing the matrix-vector product and adding an offset red : pred red =A.dbry red +b (2-13) Here, A is a matrix with W red ·H red rows, and if W=H=4, it has 4 columns, in all other cases 8 columns. b is W red ·H red The matrix A and the offset vector b are taken from one of the sets S0, i1, S2. The index idx = idx (W, H) is defined as follows: Here, each coefficient of matrix A is represented with 8 bits of precision. Set S0 consists of 16 matrices i∈{0,…,15}, each matrix has 16 rows and 4 columns, and 16 offset vectors i∈{0,…,16}, each offset vector has a size of 16. The matrices and offset vectors of this set are used for blocks of size 4×4. Set S1 consists of 8 matrices i∈{0,…,7}, each matrix has 16 rows and 8 columns, and 8 offset vectors i∈{0,…,7}, each offset vector has a size of 16. The set S2 consists of 6 matrices i∈{0,…,5}, each matrix has 64 rows and 8 columns, and 6 offset vectors i∈{0,…,5}, the size of each offset vector is 64. 2.15.3. Interpolation The prediction signals at the remaining positions are generated from the prediction signals on the subsampled set by linear interpolation, which is a single-step linear interpolation in each direction. The interpolation is performed first in the horizontal direction and then in the vertical direction, regardless of the shape of the block or the size of the block. 2.15.4.MIP mode signaling and coordination with other codec tools For each codec unit (CU) in intra mode, a flag indicating whether the MIP mode is to be applied is sent. If the MIP mode is to be applied, the MIP mode (predModeIntra) is signaled. For the MIP mode, the transposed flag (isTransposed) (which determines whether the mode is transposed) and the MIP mode Id (modeId) (which determines which matrix to use for a given MIP mode) are derived as follows: isTransposed=predModeIntra&1 modeId=predModeIntra>>1 (2-15) The MIP codec mode is coordinated with other codecs by taking into account the following aspects: – Enable LFNST for MIPs on large blocks. Here the LFNST transform in planar mode is used. - Reference sample derivation for MIP is performed exactly as reference sample derivation for conventional intra prediction modes. – For the upsampling step used in MIP prediction, the original reference samples are used instead of the downsampled samples. – Perform clipping before upsampling instead of after. – Regardless of the maximum transform size, MIP is allowed to be up to 64×64. The number of MIP modes is 32 for sizeId=0, 16 for sizeId=1, and 12 for sizeId=2. 2.16. Decoder-side intra-mode derivation In JEM-2.0, intra modes are extended to 67 modes from 35 in HEVC, and they are derived at the encoder and explicitly signaled to the decoder. In JEM-2.0, a lot of overhead is spent on intra mode encoding and decoding. For example, in all intra codec configurations, the intra mode signaling overhead can be as high as 5-10% of the total bitrate. This paper proposes an intra mode derivation method on the decoder side to reduce the intra mode encoding and decoding overhead while maintaining prediction accuracy. In order to reduce the overhead of intra mode signaling, this paper proposes a decoder-side intra mode derivation (DIMD) method. In the proposed method, instead of explicitly signaling the intra mode, the information is derived from the neighboring reconstructed samples of the current block at the encoder and decoder. The intra mode derived by DIMD can be used in two ways: 1) For a 2N×2N CU, when the corresponding CU-level DIMD flag is turned on, the DIMD mode is used as the intra mode for intra prediction; 2) For an N×N CU, the DIMD mode is used to replace a candidate in the existing MPM list to improve the efficiency of intra-mode encoding and decoding. 2.16.1. Template-based intra-mode export like Fig. 20 As shown, the target represents the current block (block size is N) whose intra prediction mode is to be estimated. The template (composed of Fig. 20 The pattern area in the image specifies a set of reconstructed samples that are used to derive the intra mode. The template size is expressed as the number of samples in the template that extend above and to the left of the target block, i.e., L. In the current implementation, the template size for 4×4 and 8×8 blocks is 2 (i.e., L=2), and the template size for 16×16 and larger blocks is 4 (i.e., L=4). According to the definition of JEM-2.0, the reference of the template (given by Fig. 20 The dotted area in the figure refers to a set of neighboring samples above and to the left of the template. Unlike template samples that are always from the reconstructed area, the reference samples of the template may not have been reconstructed when encoding / decoding the target block. In this case, the existing reference sample replacement algorithm of JEM-2.0 is used to replace the unavailable reference samples with available reference samples. For each intra prediction mode, DIMD calculates the absolute difference (SAD) between the reconstructed template samples and its predicted samples obtained from the reference samples of the template. The intra prediction mode that produces the smallest SAD is selected as the final intra prediction model for the target block. 2.16.2. DIMD of Intra-frame 2N×2N CU For intra 2N×2N CUs, DIMD is used as an additional intra mode, which is adaptively selected by comparing the DIMD intra mode with the best normal intra mode (explicitly signaled). For each intra 2N×2NCU, a flag is signaled to indicate the use of DIMD. If the flag is 1, the intra mode derived by DIMD is used to predict the CU; otherwise, DIMD is not applied, and the intra mode explicitly signaled in the bitstream is used to predict the CU. When DIMD is enabled, the chroma components always reuse the same intra mode derived for the luma component, i.e., the DM mode. In addition, for each DIMD-encoded CU, blocks in the CU can adaptively choose to derive their intra modes at the PU level or the TU level. Specifically, when the DIMD flag is 1, another CU-level DIMD control flag is transmitted by signal to indicate at which level DIMD is performed. If the flag is 0, it means that DIMD is performed at the PU level, and all TUs in the PU use the same derived intra mode for intra prediction; otherwise (that is, the DIMD control flag is 1), it means that DIMD is performed at the TU level, and each TU in the PU derives its own intra mode. In addition, when DIMD is enabled, the number of angular directions increases to 129, and DC mode and planar mode remain unchanged. To accommodate the increased granularity of angular intra modes, the precision of intra interpolation filtering for DIMD-coded CUs is increased from 1 / 32 pixel to 1 / 64 pixel. In addition, in order to use the derived intra modes of a DIMD-coded CU as MPM candidates for neighboring intra blocks, the 129 directions of the DIMD-coded CU are converted to "normal" intra modes (i.e., 65 angular intra directions) before being used as MPMs. 2.16.3. DIMD of Intra-N×N CU In the proposed method, the intra mode of an N×N CU is always signaled. However, to improve the efficiency of intra mode encoding and decoding, the intra mode derived from DIMD is used as the MPM candidate for predicting the intra mode of the four PUs in the CU. In order not to increase the overhead of MPM index signaling, the DIMD candidate is always placed first in the MPM list and the last existing MPM candidate mode is deleted. In addition, a pruning operation is performed so that if the DIMD candidate is redundant, it will not be added to the MPM list. 2.16.4.DIMD Intra-frame Pattern Search Algorithm In order to reduce the complexity of encoding / decoding, a direct and fast intra mode search algorithm is used for DIMD. First, an initial estimation process is performed to provide a good starting point for the intra mode search. Specifically, an initial candidate list is created by selecting N fixed modes from the allowed intra modes. Then, the SAD is calculated for all candidate intra modes, and the intra mode that minimizes the SAD is selected as the starting intra mode. In order to achieve a good complexity / performance trade-off, the initial candidate list consists of 11 intra modes, including DC, planar, and every 4th mode in the 33 angular intra directions defined in HEVC, i.e., intra modes 0, 1, 2, 6, 10…30, 34. If the starting Intra mode is DC mode or Planar mode, it is used as the DIMD mode. Otherwise, based on the starting Intra mode, a refinement process is then applied where the best Intra mode is identified through an iterative search. It works by comparing the SAD values of three Intra modes separated by a given search interval at each iteration and keeping the Intra mode that minimizes the SAD. The search interval is then reduced to half and the Intra mode selected from the previous iteration is used as the center Intra mode for the current iteration. For the current DIMD implementation with 129 angular Intra directions, a maximum of 4 iterations are used in the refinement process to find the best DIMD Intra mode. 2.17. Decoder-side Intra-mode derivation by computing gradients of neighboring samples Three angular modes are selected from the Histogram of Gradients (HoG) calculated from the neighboring pixels of the current block. Once these three modes are selected, their predictors are calculated normally and then their weighted average is used as the final predictor for the block. To determine the weights, for each of the three modes, the corresponding magnitude in the HoG is used. The DIMD mode is used as an alternative prediction mode, which is always checked in FullRD mode. The current version of DIMD has been modified in some aspects in signaling, HoG calculation and prediction fusion. The purpose of this modification is to improve the codec performance and address the complexity issues raised during the last meeting (i.e., throughput of 4×4 blocks). The following sections describe the modifications in each aspect. 2.17.1. Signaling Fig.21 The order of parsing flags / indexes integrated with the proposed DIMD in VTM5 is shown. It can be seen that the DIMD flag of the block is first parsed using a single CABAC context, which is initialized to a default value of 154. If flag == 0, parsing will continue normally. Otherwise (if flag == 1), only the ISP index is parsed, and the following flags / indexes are inferred to be zero: BDPCM flag, MIP flag, MRL index. In this case, the entire IPM parsing is also skipped. During the parsing phase, when a regular non-DIMD block queries the IPM of its DIMD neighbors, the pattern PLANAR_IDX is used as a virtual IPM for the DIMD block. 2.17.2. Texture analysis DIMD's texture analysis includes the calculation of the Histogram of Gradients (HoG) ( Fig. 22 ). Gradient histogram calculation is performed by applying horizontal and vertical Sobel filters to the pixels in a template of width 3 around the block. However, if the above template pixels belong to different CTUs, they will not be used for texture analysis. Once calculated, the IPMs corresponding to the two highest histogram bins are selected for the block. In previous versions, all pixels in the middle row of the template participated in the HoG calculation. However, the current version improves the throughput of this process by applying the Sobel filter more sparsely over 4x4 blocks. For this purpose, only one pixel from the left and one pixel from the top are used. Fig. 22 shown. Besides reducing the number of operations for gradient computation, this feature also simplifies the selection of the best 2 patterns from the HoG, since the resulting HoG cannot have more than two non-zero magnitudes. 2.17.3. Prediction Fusion Like the previous version, the current version of the method also uses a fusion of three predictors for each block. However, the choice of prediction mode is different and a combined hypothetical intra prediction method is used, where planar mode is considered to be used in combination with other modes when calculating candidates for intra prediction. In the current version, the two IPMs corresponding to the two highest HoG stripes are combined with planar mode. Prediction fusion is applied as a weighted average of the three predictors described above. For this purpose, the weight of the plane is fixed to 21 / 64 (~1 / 3). The remaining 43 / 64 (~2 / 3) of the weight is then shared between the two HoG IPMs in proportion to the amplitude of their HoG stripes. Fig.23 Shows this process. 2.18. Template-based Intra Mode Derivation (TIMD) This paper proposes a template-based intra mode derivation (TIMD) method using MPM, where the TIMD mode is derived from the MPM using neighboring templates. The TIMD mode is used as an additional intra prediction method for a CU. 2.18.1.TIMD mode export For each intra prediction mode in the MPM, the SATD between the prediction and reconstructed samples of the template is calculated. The intra prediction mode with the smallest SATD is selected as the TIMD mode and is used for intra prediction of the current CU. Position-dependent intra prediction combination (PDPC) is included in the derivation of TIMD modes. 2.18.2.TIMD Signaling A flag is signaled in the sequence parameter set (SPS) to enable / disable the proposed method. When the flag is true, a CU level flag is signaled to indicate whether the proposed TIMD method is used. The TIMD flag is signaled after the MIP flag. If the TIMD flag is equal to true, the remaining syntax elements related to the luma intra prediction mode, including MRL, ISP, and the normal parsing stage for the luma intra prediction mode are skipped. 2.18.3. Interaction with new codec tools The DIMD method using planar prediction fusion is integrated into EE2. When the EE2 DIMD flag is true, the proposed TIMD flag is not transmitted through the signal and is set to false. Similar to PDPC, gradient PDPC is also included in the derivation of TIMD mode. When the secondary MPM is enabled, both the primary MPM and the secondary MPM are used to derive the TIMD mode. The 6-tap interpolation filter is not used for the TIMD mode export. 2.18.4. Modification of MPM list construction in TIMD mode export During the construction of the MPM list, the intra prediction mode of the neighboring block is derived as a plane when it is inter-coded. In order to improve the accuracy of the MPM list, when the neighboring block is inter-coded, the propagated intra prediction mode is derived using the motion vector and the reference picture and is used in the construction of the MPM list. This modification is only used for the derivation of TIMD mode. 2.18.5. TIMD with Fusion This paper proposes that, for the intra-frame modes derived using the TIMD method, instead of selecting only one mode with the smallest SATD cost, the first two modes with the smallest SATD cost are selected, and then they are fused through weights, and this weighted intra-frame prediction is used to encode and decode the current CU. The costs of the two selected modes are compared to the threshold, applying a cost factor of 2 in the test as follows: costMode2<2′costMode1. If this condition is true, then fusion is applied, otherwise only mode1 is used. The weight of a mode is calculated based on its SATD cost as follows: weight1=costMode2 / (costMode 1+costMode2) weight 2 = 1 - weight 1 2.19. Merge Mode with MVD (MMVD) In addition to the merge mode, a merge mode with motion vector difference (MMVD) is introduced in VVC, where the implicitly derived motion information is directly used for prediction sample generation of the current CU. The MMVD flag is signaled immediately after the regular merge flag is sent to specify whether the MMVD mode is used for the CU. In MMVD, after a merge candidate is selected, it is further refined by MVD information transmitted by signal. Further information includes a merge candidate flag, an index for specifying the magnitude of motion, and an index for indicating the direction of motion. In MMVD mode, one of the first two candidates in the merge list is selected to be used as the MV basis. The MMVD candidate flag is transmitted by signal to specify which one to use between the first merge candidate and the second merge candidate. The distance index specifies the motion magnitude information and indicates a predefined offset from the starting point. Fig.24 As shown, the offset is added to the horizontal component or the vertical component of the starting MV. The relationship between the distance index and the predefined offset is specified in Table 2-6. Table 2-6 Relationship between distance index and predefined offset The direction index indicates the direction of the MVD relative to the starting point. The direction index can represent four directions as shown in Table 2-7. It should be noted that the meaning of the MVD symbol may change according to the information of the starting MV. When the starting MV is a non-predicted MV or a bidirectionally predicted MV with two lists pointing to the same side of the current picture (that is, the POCs of both references are greater than the POC of the current picture, or both are less than the POC of the current picture), the symbol in Table 2-7 specifies the sign of the MV offset added to the starting MV. When the starting MV is a bidirectionally predicted MV with two MVs to different sides of the current picture (that is, the POC of one reference is greater than the POC of the current picture, and the POC of the other reference is less than the POC of the current picture), and the POC difference in list 0 is greater than the POC difference in list 1, the symbol in Table 2-7 specifies the sign of the MV offset added to the list 0 MV component of the starting MV, and the sign of the list 1 MV has an opposite value. Otherwise, if the POC difference in list 1 is greater than the POC difference in list 0, then the sign in Table 2-7 specifies the sign of the MV offset added to the list 1 MV component of the starting MV, and the sign of the list 0 MV has the opposite value. The MVD is scaled based on the difference in POC in each direction. If the POC difference in both lists is the same, no scaling is required. Otherwise, if the POC difference in list 0 is greater than the POC difference in list 1, then Fig.26 As described in , the MVD of list 1 is scaled by defining the POC difference of L0 as td and the POC difference of L1 as tb. If the POC difference of L1 is greater than the POC difference of L0, the MVD of list 0 is scaled in the same way. If the starting MV is unidirectionally predicted, the MVD is added to the available MVs. Table 2-7 Signs of MV offsets specified by direction index Directions to IDX 00 01 10 11 x-axis + - N / A N / A y-axis N / A N / A + - 2.20. Symmetric MVD encoding and decoding In VVC, in addition to conventional unidirectional prediction mode MVD signaling and bidirectional prediction mode MVD signaling, symmetric MVD mode is applied for bidirectional prediction MVD signaling. In symmetric MVD mode, motion information including reference picture indexes of both list 0 and list 1 and MVD of list 1 is not transmitted by signal but derived. The decoding process of the symmetric MVD mode is as follows: 1. At the stripe level, the variables BiDirPredFlag, RefIdxSymL0, and RefIdxSymL1 are derived as follows: – If mvd_l1_zero_flag is 1, BiDirPredFlag is set equal to 0. – Otherwise, if the nearest reference picture in list 0 and the nearest reference picture in list 1 form a forward and backward reference picture pair or a backward and forward reference picture pair, then BiDirPredFlag is set to 1, and both the list 0 reference picture and the list 1 reference picture are short-term reference pictures. Otherwise, BiDirPredFlag is set to 0. 2. At the CU level, if the CU is bidirectionally predicted and BiDirPredFlag is equal to 1, the symmetric mode flag indicating whether the symmetric mode is used is explicitly signaled. When the symmetric mode flag is true, only mvp_l0_flag, mvp_l1_flag and MVD0 are explicitly signaled. The reference indexes of list 0 and list 1 are set equal to the reference picture pair, respectively. MVD1 is set equal to (-MVD0). The final motion vector is shown in the following formula. Fig.25is an illustration for the symmetric MVD mode. In the encoder, symmetric MVD motion estimation starts with an initial MV evaluation. A set of initial MV candidates includes MVs obtained from unidirectional prediction search, MVs obtained from bidirectional prediction search, and MVs from the AMVP list. The one with the lowest distortion cost is selected as the initial MV for the symmetric MVD motion search. 2.21. Bidirectional Optical Flow (BDOF) The Bidirectional Optical Flow (BDOF) tool is included in VVC. BDOF, formerly known as BIO, is included in JEM. Compared to the JEM version, BDOF in VVC is a simpler version that requires much less computation, especially in terms of the number of multiplications and the size of the multipliers. BDOF is used to refine the bidirectional prediction signal of a CU at the 4×4 sub-block level. BDOF is applied to a CU if all of the following conditions are met: - The CU is encoded using "true" bi-prediction mode, ie, one of the two reference pictures precedes the current picture in display order, and the other of the two reference pictures follows the current picture in display order. – The distances from the two reference images to the current image (i.e., POC difference) are the same. – Both reference images are short-term reference images. –The CU is not encoded or decoded using affine mode or SbTMVP merge mode. – CU has more than 64 luma samples. – Both CU height and CU width are greater than or equal to 8 luma samples. – BCW weight index indicates equal weight. – The current CU does not have WP enabled. –CIIP mode is not used for the current CU. BDOF is applied only to the luma component. As its name suggests, BDOF mode is based on the concept of optical flow, which assumes that the motion of objects is smooth. For each 4×4 sub-block, motion refinement (vx, vy) is calculated by minimizing the difference between L0 prediction samples and L1 prediction samples. Then the motion refinement is used to adjust the dual prediction sample values in the 4x4 sub-block. The following steps are applied in the BDOF process. First, by directly calculating the difference between two adjacent samples, the horizontal and vertical gradients of the two prediction signals, and k=0,1,is calculated, that is, Among them I (k)(i, j) is the sample value at the prediction signal coordinate (i, j) in list k, k=0,1, and shift1 is calculated based on the luma bit depth bitDepth as shift1=max(6, bitDepth-6). Then, the autocorrelations and cross-correlations of the gradients S1, S2, S3, S5, and S6 are calculated as follows: in, where Ω is a 6×6 window around a 4×4 sub-block, and n a and n b The values are set to min(1, bitDepth-11) and min(4, bitDepth-8) respectively. Then, using the cross-correlation and autocorrelation terms, motion refinement (v x ,v y ) is exported using: in th′ BIO =2 max(5,BD-7) . is the round-down (floor) function, and Based on the motion refinement and gradients, the following adjustments are computed for each sample in the 4×4 sub-block: Finally, the BDOF samples of the CU are calculated by adjusting the bidirectional prediction samples as shown below: pred BDOF (x,y)=(I (0) (x,y)+I (1) (x,y)+b(x,y)+o offset )>>shift (2-7) These values are chosen so that the multipliers in the BDOF process do not exceed 15 bits and the maximum bit width of the intermediate parameters in the BDOF process remains within 32 bits. In order to derive the gradient value, some prediction samples I in the list k (k = 0, 1) outside the current CU boundary are (k) (i,j) needs to be generated. Fig.26As depicted, BDOF in VVC uses an extended row / column around the boundary of the CU. In order to control the computational complexity of generating prediction samples outside the boundary, the prediction samples in the extended area (white positions) are generated by directly taking the reference samples of the nearby integer positions (using the floor() operation on the coordinates) without interpolation, and a conventional 8-tap motion compensated interpolation filter is used to generate the prediction samples within the CU (gray positions). These extended sample values are only used for gradient calculations. For the rest of the steps in the BDOF process, if any sample values and gradient values outside the CU boundary are needed, these sample values and gradient values are filled (i.e. repeated) from their nearest neighbors. When the width and / or height of a CU is greater than 16 luma samples, it will be split into sub-blocks with width and / or height equal to 16 luma samples, and the sub-block boundaries are regarded as CU boundaries in the BDOF process. The maximum unit size of the BDOF process is limited to 16x16. For each sub-block, the BDOF process can be skipped. When the SAD between the initial L0 prediction sample and the L1 prediction sample is less than a threshold, the BDOF process is not applied to the sub-block. The threshold is set equal to (8*W*(H>>1), where W represents the sub-block width and H represents the sub-block height. In order to avoid the additional complexity of SAD calculation, the SAD between the initial L0 prediction sample and the L1 prediction sample calculated in the DVMR process is reused here. If BCW is enabled for the current block, i.e., the BCW weight index indicates unequal weights, bidirectional optical flow is disabled. Similarly, if WP is enabled for the current block, i.e., luma_weight_lx_flag is 1 for either of the two reference pictures, BDOF is also disabled. BDOF is also disabled when the CU is encoded or decoded using symmetric MVD mode or CIIP mode. 2.22. Combined Inter and Intra Prediction (CIIP) 2.23. Affine Motion Compensated Prediction In HEVC, only the translational motion model is applied to 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, block-based affine transformation motion compensation prediction is applied. Fig. 27 As shown, the affine motion field of the block is described by the motion information of two control points (4 parameters, as shown in sub-figure 2700) or three control point motion vectors (6 parameters, as shown in sub-figure 2702). For the 4-parameter affine motion model, the motion vector at the sample position (x, y) in the block is derived as: For the 6-parameter affine motion model, the motion vector at the sample position (x, y) in the block is derived as: Where (mv 0x ,mv 0y ) is the motion vector of the upper left control point, (mv 1x ,mv 1y ) is the motion vector of the upper right control point, and (mv 2x ,mv 2y ) is the motion vector of the lower left control point. To simplify motion compensated prediction, block-based affine transform prediction is applied. To derive the motion vector for each 4×4 luminance sub-block, the motion vector of the center sample of each sub-block is calculated according to the above equation (e.g. Fig.28 The MV of a 4×4 chroma subblock is calculated as the average of the MVs of the 4 corresponding 4×4 luminance subblocks. Like translational motion inter prediction, there are two affine motion inter prediction modes: affine merge mode and affine AMVP mode. 2.23.1. Affine Merge Prediction AF_MERGE mode can be applied to CUs with width and height greater than or equal to 8. In this mode, the CPMV of the current CU is generated based on the motion information of spatially neighboring CUs. There can be up to five CPMVP candidates, and the one to be used for the current CU is indicated by a signal transmission index. The following three types of CPVM candidates are used to form the affine merge candidate list: – Inherited affine merge candidates inferred from the CPMV of neighboring CUs. – The constructed affine merged candidate CPMVP derived using the translated MV of the neighboring CU. – Zero MV. In VVC, there are at most two inherited affine candidates, which are derived from the affine motion models of neighboring blocks, one from the left neighboring CU and one from the upper neighboring CU. Fig.29 As shown. For the left predictor, the scan order is A0->A1, and for the upper predictor, the scan order is B0->B1->B2. Only the first inherited candidate from each side is selected. No pruning check is performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vectors are used to derive the CPMVP candidate in the affine merge list of the current CU. As shown Fig.30As shown in the figure, if the adjacent lower left block A is encoded and decoded in affine mode, the motion vectors v2, v3 and v4 of the upper left corner, upper right corner and lower left corner of the CU containing block A are obtained. When block A is encoded and decoded using a 4-parameter affine model, two CPMVs of the current CU are calculated based on v2 and v3. When block A is encoded and decoded using a 6-parameter affine model, three CPMVs of the current CU are calculated based on v2, v3 and v4. The constructed affine candidate is constructed by combining the neighboring translation motion information of each control point. The motion information of the control point is obtained from Fig.31 The specified spatial and temporal neighbors shown in are derived, CPMV k (k=1,2,3,4) indicates the kth control point. For CPMV1, B2->B3->A2 blocks are checked and the MV of the first available block is used. For CPMV2, B1->B0 blocks are checked, and for CPMV3, A1->A0 blocks are checked. TMVP is used as CPMV4 (if available). After getting the MVs of the four control points, an affine merge candidate is constructed based on the motion information. The following combinations of control point MVs are used to construct in order: {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}. The combination of 3 CPMVs constructs a 6-parameter affine merge candidate, and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid the motion scaling process, the relevant combination of control point MVs is discarded if the reference indexes of the control points are different. Fig.31 The positioning of candidate positions for the constructed affine merge mode is shown.After checking the inherited affine merge candidates and the constructed affine merge candidates, if the list is still not full, a zero MV is inserted to the end of the list. 2.23.2. Affine AMVP prediction Affine AMVP mode can be applied to CUs with width and height greater than or equal to 16. A CU-level affine flag is signaled in the bitstream to indicate whether the affine AMVP mode is used, and then another flag is signaled to indicate whether it is 4-parameter affine or 6-parameter affine. In this mode, the difference between the CPMV of the current CU and its predicted sub-CPMVP is signaled in the bitstream. The affine AVMP candidate list size is 2 and is generated by using the following four types of CPVM candidates in order: – Inherited affine AMVP candidates inferred from the CPMV of neighboring CUs. – The constructed affine AMVP candidate CPMVP derived using the translated MV of the neighboring CU. – Translated MV from neighboring CU. – Zero MV. The order in which inherited affine AMVP candidates are checked is the same as that of inherited affine merge candidates. The only difference is that for AVMP candidates, only affine CUs with the same reference picture as in the current block are considered. When an inherited affine motion predictor is inserted into the candidate list, the pruning process is not applied. The AMVP candidates constructed from Fig.31 The specified spatial neighbors shown are derived. The same check order as in the affine merge candidate construction is used. In addition, the reference picture index of the neighboring blocks is also checked. The first block in the check order is used, which is inter-coded and has the same reference picture as in the current CU. There is only one. When the current CU is encoded and decoded using a 4-parameter affine mode and both mv0 and mv1 are available, they are added as a candidate in the affine AMVP list. When the current CU is encoded and decoded using a 6-parameter affine mode and all three CPMVs are available, they are added as a candidate in the affine AMVP list. Otherwise, the constructed AMVP candidate is set to unavailable. If the affine AMVP list candidate is still less than 2 after inserting the valid inherited affine AMVP candidate and the constructed AMVP candidate, mv0, mv1 and mv2 will be added as translation MVs in order to predict all control point MVs of the current CU when available. Finally, if the affine AMVP list is still not full, the list is filled with zero MVs. 2.23.3. Affine motion information storage In VVC, the CPMV of an affine CU is stored in a separate buffer. The stored CPMV is only used to generate the inherited CPMV in affine merge mode and the inherited CPMV in affine AMVP mode for the most recently encoded CU. The sub-block MV derived from the CPMV is used for motion compensation, merging of translation MVs / MV derivation of AMVP lists, and deblocking. To avoid picture line buffering for additional CPMV, the affine motion data inheritance from the CU above the CTU is handled differently from the inheritance from the normal neighboring CU. If the candidate CU for affine motion data inheritance is in the row above the CTU, the bottom left and bottom right sub-block MVs in the line buffer are used for affine MVP derivation instead of CPMV. In this way, CPMV is only stored in the local buffer. If the candidate CU is 6-parameter affine coded, the affine model is downgraded to a 4-parameter model. Fig.32 As shown, along the top boundary of the CTU, the bottom left and bottom right sub-block motion vectors of the CU are used for affine inheritance of the CU in the bottom of the CTU. 2.23.4. Prediction Refinement Using Optical Flow for Affine Mode (PROF) Compared with pixel-based motion compensation, sub-block based affine motion compensation can save memory access bandwidth and reduce computational complexity, but at the expense of prediction accuracy. In order to achieve finer motion compensation granularity, prediction refinement using optical flow (PROF) is used to refine sub-block based affine motion compensation predictions without increasing the memory access bandwidth for motion compensation. In VVC, after sub-block based affine motion compensation is performed, the brightness prediction samples are refined by adding the differences derived from the optical flow equation. PROF is described as the following four steps: Step 1) Sub-block based affine motion compensation is performed to generate a sub-block prediction I(i,j). Step 2) Using a 3-tap filter [-1, 0, 1], the spatial gradient g of the sub-block prediction x (i,j) and g y (i,j) is calculated at each sample position. The gradient calculation is exactly the same as the gradient calculation in BDOF. g x (i,j)=(I(i+1,j)>>shift1)-(I(i-1,j)>>shift1) (2-10) g y (i,j)=(I(i,j+1)>>shift1)-(I(i,j-1)>>shift1) (2-11) Shift1 is used to control the precision of the gradient. The sub-block (i.e. 4x4) prediction is extended by one sample on each side of the gradient calculation. To avoid extra memory bandwidth and extra interpolation calculations, those extended samples on the extended boundary are copied from the nearest integer pixel position in the reference picture. Step 3) The brightness prediction refinement is calculated by following the optical flow equation. ΔI(i,j)=g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j) (2-12) Among them Fig.33 As shown, Δv(i,j) is the difference between the sample MV calculated for the sample position (i,j), denoted as v(i,j), and the sub-block MV of the sub-block to which the sample (i,j) belongs. Δv(i,j) is quantized in units of 1 / 32 luma sample precision. Since the affine model parameters and the sample positions relative to the sub-block center do not change from sub-block to sub-block, Δv(i,j) can be calculated for the first sub-block and reused for other sub-blocks in the same CU. Let dx(i,j) and dy(i,j) be the distance from the sample position (i,j) to the sub-block center (x SB ,y SB )’s horizontal and vertical offsets, Δv(x,y) can be derived from the following equations: To maintain accuracy, the sub-block (x SB ,y SB ) is calculated as ((W SB -1) / 2,(H SB -1) / 2), where W SB and H SB are the width and height of the sub-block respectively. For the 4-parameter affine model, For the 6-parameter affine model, Where (v 0x ,v 0y ), (v 1x ,v 1y ), (v 2x ,v 2y ) are the control point motion vectors of the upper left, upper right and lower left, and w and h are the width and height of the CU. Step 4) Finally, the luma prediction refinement ΔI(i,j) is added to the sub-block prediction I(i,j). The final prediction I' is generated as follows. I'(i,j)=I(i,j)+ΔI(i,j) (2-17) PROF is not applicable to affine codec CUs in two cases: 1) all control point MVs are the same, which indicates that the CU has only translational motion; 2) the affine motion parameters are larger than the specified limit, because the sub-block based affine MC is downgraded to CU based MC to avoid large memory access bandwidth requirements. A fast codec method is applied to reduce the codec complexity of affine motion estimation using PROF. PROF is not applied to the affine motion estimation stage in the following two cases: a) If the CU is not a root block and the parent block of the CU does not select the affine mode as its best mode, PROF is not applied because the possibility that the current CU selects the affine mode as the best mode is low; b) If the magnitudes of the four affine parameters (C, D, E, F) are all less than a predefined threshold and the current picture is not a low-latency picture, PROF is not applied because the improvement introduced by PROF for this case is small. In this way, affine motion estimation using PROF can be accelerated. 2.24. Sub-block based temporal motion vector prediction (SbTMVP) VVC supports the sub-block-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the co-located picture to improve the motion vector prediction and merge mode of the CU in the current picture. The same co-located picture used by TMVP is used for SbTMVP. SbTMVP differs from TMVP in the following two main aspects: –TMVP predicts motion at CU level, but SbTMVP predicts motion at sub-CU level; – While TMVP pre-fetches the temporal motion vector from the co-located block in the co-located picture (the co-located block is the lower right block or the center block relative to the current CU), SbTMVP applies motion offset before pre-fetching temporal motion information from the co-located picture. Wherein the motion offset is obtained from the motion vector from one of the spatially neighboring blocks of the current CU. The SbTVMP process Fig.34A and Fig.34B is shown in . Fig.34A The spatially neighboring blocks used by ATVMP are shown. Fig.34B It is shown that the sub-CU motion field is derived by applying motion shifts from spatial neighbors and scaling the motion information from the corresponding co-located sub-CU. SbTMVP predicts the motion vector of the sub-CU within the current CU in two steps. In the first step, check Fig.34A The spatial neighbor A1 in . If A1 has a motion vector that uses the co-located picture as its reference picture, then that motion vector is selected as the motion offset to be applied. If no such motion is identified, then the motion offset is set to (0, 0). In the second step, the motion offset identified in step 1 is applied (i.e., added to the coordinates of the current picture) to obtain Fig.34B The co-located picture shown obtains sub-CU level motion information (motion vector and reference index). Fig.34BThe example in assumes that the motion offset is set to the motion of block A1. Then, for each sub-CU, the motion information of its corresponding block in the co-located picture (the minimum motion grid covering the center sample) is used to derive the motion information of the sub-CU. After the motion information of the co-located sub-CU is identified, it is converted into the motion vector and reference index of the current sub-CU in a manner similar to the TMVP process of HEVC, where temporal motion scaling is applied to align the reference picture of the temporal motion vector with the reference picture of the current CU. In VVC, a combined sub-block based merge list containing both SbTMVP candidates and affine merge candidates is used for signaling of sub-block based merge mode. The SbTMVP mode is enabled / disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry in the list of sub-block based merge candidates, followed by the affine merge candidates. The size of the sub-block based merge list is signaled in the SPS, and the maximum allowed size of the sub-block based merge list in VVC is 5. The sub-CU size used in SbTMVP is fixed to 8x8, and like the affine merge mode, the SbTMVP mode is only applicable to CUs whose width and height are both greater than or equal to 8. The encoding and decoding logic of the additional SbTMVP merge candidate is the same as that of other merge candidates, that is, for each CU in a P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate. 2.25. Adaptive Motion Vector Resolution (AMVR) In HEVC, when use_integer_mv_flag in the slice header is equal to 0, the motion vector difference (MVD) (between the CU's motion vector and the predicted motion vector) is transmitted by signal in units of quarter-luminance samples. In VVC, the CU-level adaptive motion vector resolution (AMVR) scheme is introduced. AMVR allows the CU's MVD to be encoded and decoded with different precisions. Depending on the current CU mode (normal AMVP mode or affine AVMP mode), the current CU's MVD can be adaptively selected as follows: – Normal AMVP mode: quarter brightness samples, half brightness samples, full brightness samples, or four brightness samples. – Affine AMVP mode: quarter brightness samples, full brightness samples, or 1 / 16 brightness samples. If the current CU has at least one non-zero MVD component, the CU-level MVD resolution indication is conditionally signaled.If all MVD components (i.e. both horizontal and vertical MVD for reference list L0 and reference list L1) are zero, then quarter luma sample MVD resolution is inferred. For a CU with at least one non-zero MVD component, a first flag is transmitted by a signal to indicate whether quarter brightness sample MVD precision is used for the CU. If the first flag is 0, no further signal is required, and quarter brightness sample MVD precision is used for the current CU. Otherwise, a second flag is transmitted by a signal to indicate that half brightness samples or other MVD precision (integer or four brightness samples) are used for normal AMVP CUs. In the case of half brightness samples, a 6-tap interpolation filter is used for the half brightness sample position instead of the default 8-tap interpolation filter. Otherwise, a third flag is transmitted by a signal to indicate whether integer brightness samples or four brightness sample MVD precision are used for normal AMVP CUs. In the case of an affine AMVP CU, the second flag is used to indicate whether integer brightness sample MVD precision or 1 / 16 brightness sample MVD precision is used. In order to ensure that the reconstructed MV has the expected accuracy (quarter brightness sample, half brightness sample, integer brightness sample, or four brightness samples), the motion vector predictor of the CU will be rounded to the same accuracy as the MVD before being added to the MVD. The motion vector predictor is rounded towards zero (that is, a negative motion vector predictor is rounded towards positive infinity and a positive motion vector predictor is rounded towards negative infinity). The encoder uses RD check to determine the motion vector resolution of the current CU. In order to avoid always performing four CU-level RD checks for each MVD resolution, in VTM11, only the RD check of MVD precision other than quarter brightness samples is conditionally called. For normal AVMP mode, the RD cost of quarter brightness sample MVD precision and the RD cost of full brightness sample MV precision are first calculated. Then, the RD cost of full brightness sample MVD precision is compared with the RD cost of quarter brightness sample MVD precision to determine whether it is necessary to further check the RD cost of four brightness sample MVD precision. When the RD cost of quarter brightness sample MVD precision is much smaller than the RD cost of full brightness sample MVD precision, the RD check of four brightness sample MVD precision is skipped. Then, if the RD cost of full brightness sample MVD precision is significantly greater than the best RD cost of the previously tested MVD precision, the check of half brightness sample MVD precision is skipped. For the affine AMVP mode, if the affine inter mode is not selected after checking the rate-distortion cost of the affine merge / skip mode, merge / skip mode, quarter luma sample MVD accuracy normal AMVP mode, and quarter luma sample MVD accuracy affine AMVP mode, the 1 / 16 luma sample MV accuracy and 1 pixel MV accuracy affine inter modes are not checked. In addition, in the 1 / 16 luma sample and quarter luma sample MV accuracy affine inter modes, the affine parameters obtained in the quarter luma sample MV accuracy affine inter mode are used as the starting search point. 2.26. Bidirectional Prediction with CU-Level Weights (BCW) In HEVC, a bidirectional prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In VVC, the bidirectional prediction mode is extended beyond simple averaging to allow a weighted average of the two prediction signals: P bi-pred =((8-w)*P0+w*P1+4)>>3 (2-18) Five weights are allowed in weighted average bidirectional prediction, w∈{-2,3,4,5,10}. For each bidirectional prediction CU, the weight w is determined in one of two ways: 1) For non-merged CUs, the weight index is signaled after the motion vector difference; 2) For merged CUs, the weight index is inferred from neighboring blocks based on the merge candidate index. BCW is only applied to CUs with 256 or more luma samples (i.e., the CU width multiplied by the CU height is greater than or equal to 256). For low-latency pictures, all 5 weights will be used. For non-low-latency pictures, only 3 weights (w∈{3,4,5}) are used. – At the encoder, a fast search algorithm is applied to find the weight index without significantly increasing the encoder complexity. These algorithms are summarized below. The reader is referred to the VTM software for further details. When combined with AMVR, unequal weights for 1-pixel and 4-pixel motion vector precision are only conditionally checked if the current picture is a low-latency picture. - When combined with affine, affine ME will be performed for unequal weights if and only if the affine mode is selected as the current best mode. – When the two reference pictures in bidirectional prediction are the same, unequal weights are only checked conditionally. – Do not search for unequal weights when certain conditions are met, which depend on the POC distance between the current picture and its reference pictures, the codec QP, and the temporal level. The BCW weight index is encoded using one context encoded bit followed by a bypass encoded bit. The first context encoded bit indicates whether equal weights are used; and if unequal weights are used, an additional bit is signaled using the bypass codec to indicate which unequal weights are used. Weighted prediction (WP) is a codec tool supported by the H.264 / AVC and HEVC standards for efficient encoding and decoding of video content in fading conditions. Support for WP has also been added to the VVC standard. WP allows weighting parameters (weights and offsets) to be transmitted by signal for each reference picture list L0 and each reference picture in list L1. Then, during motion compensation, the weights and offsets of the corresponding reference pictures are applied. WP and BCW are designed for different types of video content. In order to avoid interaction between WP and BCW (which will complicate the VVC decoder design), if the CU uses WP, the BCW weight index is not transmitted by signal, and w is inferred to be 4 (ie, equal weights are applied). For the merged CU, the weight index is inferred from the neighboring blocks based on the merge candidate index. This can be applied to the normal merge mode and the inherited affine merge mode. For the constructed affine merge mode, affine motion information is constructed based on the motion information of up to 3 blocks. The BCW index of the CU using the constructed affine merge mode is simply set equal to the BCW index of the first control point MV. In VVC, CIIP and BCW cannot be applied jointly to a CU. When a CU is encoded and decoded using CIIP mode, the BCW index of the current CU is set to 2, i.e., equal weight. 2.27. Local Illumination Compensation (LIC) Local illumination compensation (LIC) is a codec tool used to address the problem of local illumination changes between a current picture and its temporal reference picture. LIC is based on a linear model where a scaling factor and an offset are applied to a reference sample to obtain a predicted sample for the current block. Specifically, LIC can be mathematically modeled by the following equation: P(x,y)=α·P r (x+v x ,y+v y )+β Where P(x,y) is the prediction signal of the current block at the coordinate (x,y); P r (x+v x ,y+v y ) is the motion vector (v x ,v y ) points to the reference block; α and β are the corresponding scaling factor and offset applied to the reference block. Fig.35 The LIC process is shown in FIG. Fig.35 In , when LIC is applied to a block, the minimum mean square error (LMSE) method is adopted to minimize the neighboring samples of the current block (i.e., Fig.35 The template T in the temporal reference picture) and its corresponding reference sample in the temporal reference picture (ie, Fig.35The values of the LIC parameters (i.e., α and β) are derived by taking the difference between the template samples and the reference template samples (T0 or T1 in ). In addition, in order to reduce the computational complexity, both the template samples and the reference template samples are subsampled (adaptive subsampling) to derive the LIC parameters, i.e., only Fig.35 α and β are derived from the shadow samples in . In order to improve the encoding and decoding performance, such as Fig.36 As shown, the short sides are not subsampled. 2.28. Decoder-side Motion Vector Refinement (DMVR) To improve the accuracy of the merge mode MV, decoder-side motion vector refinement based on bilateral matching (BM) is applied in VVC. In the bidirectional prediction operation, the refined MV is searched around the initial MV in the reference picture list L0 and the reference picture list L1. The BM method calculates the distortion between two candidate blocks in the reference picture list L0 and the list L1. Fig.37 As shown, the SAD between two blocks based on each MV candidate (eg, MV0' and MV1') around the initial MV is calculated. The MV candidate with the lowest SAD becomes the refined MV and is used to generate a bidirectional prediction signal. In VVC, the application of DMVR is restricted and is only applied to CUs that are coded and decoded using the following modes and functions: – CU level merge mode with bi-predictive MV; – relative to the current picture, one reference picture is in the past and the other reference picture is in the future; – The distances from the two reference pictures to the current picture (i.e., POC difference) are the same; – Both reference images are short-term reference images; – CU has more than 64 luminance samples; – CU height and CU width are both greater than or equal to 8 luma samples; – BCW weight index indicates equal weight; – The current block is not WP enabled; –CIIP mode is not used for the current block. The refined MV derived by the DMVR process is used to generate inter-frame prediction samples and is also used for temporal motion vector prediction for future picture coding. The original MV is used in the deblocking process and is also used for spatial motion vector prediction for future CU coding. Additional features of DMVR are mentioned in the following sub-clauses. 2.28.1. Search Scheme In DVMR, the search point is around the initial MV, and the MV offset obeys the MV difference mirror rule. In other words, any point examined by DMVR represented by the candidate MV pair (MV0, MV1) follows the following two equations: MV0′=MV0+MV_offset (2-19) MV1′=MV1-MV_offset (2-20) Wherein, MV_offset represents the refinement offset between the initial MV and the refinement MV in one of the reference pictures. The refinement search range is two integer luma samples starting from the initial MV. The search includes an integer sample offset search phase and a fractional sample refinement phase. The integer sample offset search uses a 25-point full search. First, the SAD of the initial MV pair is calculated. If the SAD of the initial MV pair is less than the threshold, the integer sample stage of DMVR is terminated. Otherwise, the SAD of the remaining 24 points is calculated and checked in raster scan order. The point with the smallest SAD is selected as the output of the integer sample offset search stage. In order to reduce the impact of DMVR refinement uncertainty, it is proposed to support the original MV in the DMVR process. The SAD between the reference blocks pointed to by the initial MV candidate reference is reduced by 1 / 4 of the SAD value. The integer sample search is followed by fractional sample refinement. To save computational complexity, fractional sample refinement is derived using the parametric error surface equation instead of an additional search using SAD comparison. Fractional sample refinement is conditionally called based on the output of the integer sample search stage. When the integer sample search stage ends with a center with minimum SAD in the first or second iteration search, fractional sample refinement is further applied. In the sub-pixel offset estimation based on the parametric error surface, the cost at the center position and the costs at the four neighboring positions from the center are used to fit a two-dimensional parabolic error surface equation of the following form: E(x,y)=A(x min ) 2 +B(yy min ) 2 +C (2-21) Where (x min ,y min ) corresponds to the fractional position with the minimum cost, and C corresponds to the minimum cost value. By solving the above equation using the cost values of the five search points, (x min ,y min ) is calculated as: x min =(E(-1,0)-E(1,0)) / (2(E(-1,0)+E(1,0)-2E(0,0))) (2-22) ymin =(E(0,-1)-E(0,1)) / (2((E(0,-1)+E(0,1)-2E(0,0))) (2-23) x min and min The value of is automatically clamped between -8 and 8, since all cost values are positive, and the minimum value is E(0,0). This corresponds to a half-pixel offset with 1 / 16 pixel MV precision in VVC. The calculated fraction (x min ,y min ) is added to the integer distance refinement MV to obtain a sub-pixel accurate refinement delta MV. 2.28.2. Bilinear interpolation and sample padding In VVC, the resolution of MV is 1 / 16 luma sample. Samples at fractional positions are interpolated using an 8-tap interpolation filter. In DMVR, the search points are around the initial fractional pixel MV with integer sample offsets, so samples at these fractional positions need to be interpolated for the DMVR search process. In order to reduce computational complexity, a bilinear interpolation filter is used to generate fractional samples for the search process in DMVR. Another important effect is that by using a bilinear filter, DVMR does not access more reference samples than the normal motion compensation process within a 2-sample search range. After the refined MV is obtained through the DMVR search process, an ordinary 8-tap interpolation filter is applied to generate the final prediction. In order not to access more reference samples for the normal MC process, samples will be filled from those available samples, which are not required for the interpolation process based on the original MV, but are required for the interpolation process based on the refined MV. 2.28.3. Maximum DMVR Processing Unit When the width and / or height of a CU is greater than 16 luma samples, it will be further split into sub-blocks with width and / or height equal to 16 luma samples. The maximum unit size of the DMVR search process is limited to 16x16. 2.29. Multi-pass decoder-side motion vector refinement In this paper, instead of DMVR, multi-pass decoder side motion vector refinement is applied. In the first pass, bilateral matching (BM) is applied to the codec block. In the second pass, BM is applied to each 16x16 sub-block within the codec block. In the third pass, the MV in each 8x8 sub-block is refined by applying bidirectional optical flow (BDOF). The refined MVs are stored for spatial and temporal motion vector prediction. 2.29.1. First pass - Block-based bilateral matching MV refinement In the first pass, refined MVs are derived by applying BM to the codec blocks. Similar to decoder-side motion vector refinement (DMVR), refined MVs are searched around two initial MVs (MV0 and MV1) in reference picture lists L0 and L1. Refined MVs (MV0_pass1 and MV1_pass1) are derived around the initial MVs based on the minimum bilateral matching cost between the two reference blocks in L0 and L1. BM performs a local search to derive the integer sample precision intDeltaMV and the half pixel sample precision halfDeltaMV. The local search applies a 3×3 square search pattern to loop in the horizontal search range [–sHor, sHor] and the vertical search range [–sVer, sVer], where the values of sHor and sVer are determined by the block size and the maximum values of sHor and sVer are 8. The bilateral matching cost is calculated as: bilCost = mvDistanceCost + sadCost. When the block size cbW*cbH is greater than 64, the MRSAD cost function is applied to remove the DC effect of the distortion between the reference blocks. When the bilCost of the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV or halfDeltaMV local search terminates. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern and continues to search for the minimum cost until it reaches the end of the search range. The current fractional sample refinement is further applied to derive the final deltaMV. Then, the refined MV after the first pass is derived as: MV0_pass1 = MV0 + deltaMV; ·MV1_pass1=MV1–deltaMV. 2.29.2. Second pass - sub-block based bilateral matching MV refinement In the second pass, refined MVs are derived by applying BM to 16×16 grid sub-blocks. For each sub-block, the refined MVs are searched around the two MVs (MV0_pass1 and MV1_pass1) obtained in the first pass in the reference picture lists L0 and L1. Refined MVs (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)) are derived based on the minimum bilateral matching cost between the two reference sub-blocks in L0 and L1. For each sub-block, BM performs a full search to derive the integer sample precision intDeltaMV. The full search has a search range of [–sHor, sHor] in the horizontal direction and a search range of [–sVer, sVer] in the vertical direction, where the values of sHor and sVer are determined by the block size and the maximum values of sHor and sVer are 8. The bilateral matching cost is calculated by applying the cost factor to the SATD cost between the two reference sub-blocks, such as: bilCost = satdCost * costFactor. The search area (2*sHor+1)*(2*sVer+1) is divided into 5 diamond search areas, such as Fig.28 As shown. Each search area is assigned a costFactor, which is determined by the distance (intDeltaMV) between each search point and the starting MV, and each diamond area is processed in order starting from the center of the search area. In each area, the search points are processed in raster scan order starting from the upper left corner of the area to the lower right corner. When the minimum bilCost in the current search area is less than a threshold equal to sbW*sbH, the integer pixel full search is terminated, otherwise, the integer pixel full search continues to the next search area until all search points are checked. BM performs a local search to derive the half-sample accuracy halfDeltaMv. The search style and cost function are the same as defined in Section 2.9.1. The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV (sbIdx2). Then, the refined MV of the second pass is exported as: ·MV0_pass2(sbIdx2)=MV0_pass 1+deltaMV(sbIdx2); ·MV1_pass2(sbIdx2)=MV1_pass1-deltaMV(sbIdx2). 2.29.3. Third pass - sub-block-based bidirectional optical flow MV refinement In the third pass, refined MVs are derived by applying BDOF to 8×8 grid sub-blocks. For each 8×8 sub-block, BDOF refinement is applied to derive scaled Vx and Vy without clipping from the refined MV of the parent sub-block of the second pass. The derived bioMv(Vx, Vy) is rounded to 1 / 16 sample precision and clipped between -32 and 32. The refined MVs of the third pass (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) are derived as: ·MV0_pass3(sbIdx3)=MV0_pass 2(sbIdx2)+bioMv; ·MV1_pass3(sbIdx3)=MV0_pass2(sbIdx2)–bioMv. 2.30. Sample-based BDOF In sample-based BDOF, instead of deriving motion refinements (Vx, Vy) on a block basis, BDOF is performed for each sample. The codec block is divided into 8×8 sub-blocks. For each sub-block, it is determined whether to apply BDOF by checking the SAD between the two reference sub-blocks against a threshold. If it is decided to apply BDOF to a sub-block, for each sample in the sub-block, a sliding 5x5 window is used, and the existing BDOF process is applied for each sliding window to derive Vx and Vy. The derived motion refinement (Vx, Vy) is applied to adjust the bidirectional prediction sample value for the center sample of the window. 2.31. Extended Merger Forecast In VVC, the merge candidate list is constructed by including the following five types of candidates in order: 1) Spatial MVP from spatially neighboring CUs; 2) Time MVP from the same CU; 3) History-based MVP from FIFO table; 4) Paired average MVP; 5) Zero MV. The size of the merge list is signaled in the sequence parameter set header, and the maximum allowed size of the merge list is 6. For each CU code in merge mode, the index of the best merge candidate is encoded and decoded using truncated unary binarization (TU). The first bin of the merge index is encoded and decoded using context, while bypass encoding and decoding is used for other bins. The derivation process of merge candidates for each category is provided in this section. As in HEVC, VVC also supports parallel derivation of merge candidate lists for all CUs within a certain size region. 2.31.1. Spatial candidate export The derivation of spatial merge candidates in VVC is the same as that in HEVC, except that the positions of the first two merge candidates are swapped. Fig.39Among the candidates at the positions shown, up to four merge candidates are selected. The derivation order is B0, A0, B1, A1 and B2. Position B2 is considered only when one or more CUs at positions B0, A0, B1 and A1 are not available (for example, because it belongs to another slice or tile) or is intra-coded. After the candidate at position A1 is added, a redundancy check is performed on the addition of the remaining candidates. The redundancy check ensures that candidates with the same motion information are excluded from the list, thereby improving the coding efficiency. In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead, only the possible candidate pairs are considered. Fig.40 The pairs are linked by arrows in , and candidates are added to the list only if the corresponding candidates used for redundancy checking do not have the same motion information. 2.31.2. Time candidate export In this step, only one candidate is added to the list. In particular, in the derivation of this temporal merge candidate, the scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. The reference picture list to be used for deriving the co-located CU is explicitly signaled in the slice header. Fig.41 As shown by the dotted line in , a scaled motion vector for the temporal merge candidate is obtained, which is scaled from the motion vector of the co-located CU using the POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero. like Fig.42 As shown, the position of the temporal candidate is selected between candidates C0 and C1. If the CU at position C0 is not available, intra-coded, or outside the current row of the CTU, position C1 is used. Otherwise, position C0 is used in the derivation of the temporal merge candidate. 2.31.3. History-based Merge Candidate Derivation History-based MVP (HMVP) merge candidates are added to the merge list after spatial MVP and TMVP. In this method, the motion information of the previous codec block is stored in a table and used as the MVP of the current CU. A table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (cleared) when a new CTU row is encountered. Whenever there is a non-sub-block inter-coded CU, the associated motion information is added as a new HMVP candidate to the last entry of the table. The HMVP table size S is set to 6, which indicates that up to 6 history-based MVP (HMVP) candidates can be added to the table. When a new motion candidate is inserted into the table, a constrained first-in-first-out (FIFO) rule is used, where a redundancy check is first applied to find if there is an identical HMVP in the table. If found, the identical HMVP is removed from the table, and then all HMVP candidates are moved forward. HMVP candidates can be used in the merge candidate list construction process. The nearest few HMVP candidates in the table are checked in order and inserted into the candidate list after the TMVP candidate. Redundancy check is applied to HMVP candidates for spatial or temporal merge candidates. To reduce the number of redundant checking operations, the following simplifications are introduced: The number of HMPV candidates for merge list generation is set to (N<=4)?M:(8-N), where N indicates the number of existing candidates in the merge list and M indicates the number of available HMVP candidates in the table. Once the total number of available merge candidates reaches the maximum allowed merge candidates minus 1, the merge candidate list construction process from HMVP is terminated. 2.31.4. Pairwise Average Merge Candidate Derivation The pairwise average candidate is generated by averaging the predefined candidate pairs in the existing merge candidate list, and the predefined pairs are defined as {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)}, where the number represents the merge index of the merge candidate list. The average motion vector is calculated separately for each reference list. If two motion vectors are available in one list, they are averaged even if they point to different reference pictures; if only one motion vector is available, it is used directly; if no motion vector is available, this list is kept invalid. When the merge list is not full after adding pairwise average merge candidates, zero MVPs will be inserted at the end until the maximum number of merge candidates is encountered. 2.31.5. Merging Estimated Regions The merge estimation region (MER) allows the merge candidate list to be derived independently for a CU in the same merge estimation region (MER). For generating the merge candidate list for the current CU, candidate blocks in the same MER as the current CU are not included. In addition, the update process for the history-based motion vector prediction candidate list is updated only when (xCb+cbWidth)>>Log2ParMrgLevel is greater than xCb>>Log2ParMrgLevel and (yCb+cbHeight)>>Log2parMrglevel is greater than (yCb>>Log2ParMrgLevel), and where (xCb, yCb) is the top left luma sample position of the current CU in the picture, and (cbWidth, cbHeight) is the CU size. The MER size is selected at the encoder end and signaled in the sequence parameter set as log2_parallel_merge_level_minus2. 2.32. New Merge Candidates 2.32.1. Non-adjacent merge candidate export In VVC, Fig.43 The five spatial neighboring blocks and one temporal neighboring block shown are used to derive merge candidates. It is proposed to derive additional merge candidates from positions non-adjacent to the current block using the same style as in VVC. To achieve this, for each search round i, a virtual block is generated based on the current block as follows: First, the relative position of the virtual block to the current block is calculated using the following formula: Offsetx=-i×gridX, Offsety=-i×gridY, Where Offsetx and Offsety represent the offset of the upper left corner of the virtual block relative to the upper left corner of the current block, and gridX and gridY are the width and height of the search grid. Second, the width and height of the virtual block are calculated using the following formula: newWidth=i×2×gridX+currWidth newHeight=i×2×gridY+currHeight. Where currWidth and currHeight are the width and height of the current block. newWidth and newHeight are the width and height of the new virtual block. gridX and gridY are currently set to currWidth and currHeight respectively. Fig.44 is a diagram of the virtual blocks in the i-th search round. After generating the virtual block, block A i , B i , C i , D i and E i can be considered as the VVC spatial neighbors of the virtual block, and their positions are obtained using the same pattern as in VVC. Obviously, if the search round i is 0, the virtual block is the current block. In this case, block A i , B i , C i , D i and E i is the spatial neighboring block used in VVC merge mode. When constructing the merge candidate list, pruning is performed to ensure that each element in the merge candidate list is unique. The maximum search round is set to 1, which means that five non-adjacent spatial neighboring blocks are used. Non-adjacent spatial merging candidates are inserted into the merging list after the temporal merging candidates in the order of B1->A1->C1->D1->E1. 2.32.2.STMVP It is proposed to use three spatial merging candidates and one temporal merging candidate to derive an average candidate as the STMVP candidate. The STMVP is inserted before the top left spatial merge candidate. The STMVP candidate is pruned along with all previous merge candidates in the merge list. For spatial candidates, the first three candidates in the current merge candidate list are used. For temporal candidates, the same positions as the VTM / HEVC co-location positions are used. For spatial candidates, the first, second, and third candidates inserted before STMVP in the current merge candidate list are denoted as F, S, and T. The temporal candidate having the same position as the VTM / HEVC co-location position used in TMVP is denoted Col. The motion vector of the STMVP candidate in prediction direction X (denoted as mvLX) is derived as follows: 1) If the reference indices of the four merge candidates are all valid and equal to zero in the prediction direction X (X=0 or 1), mvLX=(mvLX_F+mvLX_S+mvLX_T+mvLX_Col)>>2 2) If the reference indexes of three of the four merge candidates are valid and equal to zero in the prediction direction X (X=0 or 1), mvLX=(mvLX_F×3+mvLX_S×3+mvLX_Col×2)>>3 or mvLX=(mvLX_F×3+mvLX_T×3+mvLX_Col×2)>>3 or mvLX=(mvLX_S×3+mvLX_T×3+mvLX_Col×2)>>3. 3) If the reference indexes of two of the four merge candidates are valid and equal to zero in the prediction direction X (X=0 or 1), mvLX=(mvLX_F+mvLX_Col)>>1 or mvLX=(mvLX_S+mvLX_Col)>>1 or mvLX=(mvLX_T+mvLX_Col)>>1. NOTE: If time candidate is not available, STMVP mode is turned off. 2.32.3. Merge list size If both non-adjacent merging candidates and STMVP merging candidates are considered, the size of the merging list is signaled in the sequence parameter set header, and the maximum allowed size of the merging list is 8. 2.33. Geometric Partitioning Model (GPM) In VVC, geometric partitioning mode is supported for inter prediction. The CU level flag is used as a merge mode to signal the geometric partitioning mode. Other merge modes include normal merge mode, MMVD mode, CIIP mode, and sub-block merge mode. For each possible CU size w×h=2 m ×2 n , where m,n∈{3…6} does not include 8x64 and 64x8, and the geometric partitioning mode supports a total of 64 partitions. When this mode is used, the CU is divided into two parts by a straight line located geometrically ( Fig.45 ). The position of the partition line is mathematically derived from the angle and offset parameters of the specific partition. Each part of the geometric partition in the CU is inter-predicted using its own motion; only unidirectional prediction is allowed for each partition, i.e. each part has a motion vector and a reference index. Unidirectional prediction motion constraints are applied to ensure that only two motion compensated predictions are required for each CU, the same as traditional bidirectional prediction. The unidirectional prediction motion for each partition is derived using the process described in 2.19.1. If a geometric partitioning mode is used for the current CU, a geometric partitioning index (angle and offset) indicating the partitioning mode of the geometric partitioning and two merge indices (one for each partition) are further transmitted through a signal. The number of maximum GPM candidate sizes is explicitly transmitted through a signal in the SPS, and the syntax binary for the GPM merge index is specified. After predicting each part of the geometric partitioning, as in 2.19.2, a hybrid process with adaptive weights is used to adjust the sample values along the edges of the geometric partitioning. This is the prediction signal for the entire CU, and the transformation process and quantization process will be applied to the entire CU as in other prediction modes. Finally, the motion field of the CU predicted using the geometric partitioning mode is stored, as described in 2.19.3. 2.33.1 One-way prediction candidate list construction In 2.17, the unidirectional prediction candidate list is derived directly from the merge candidate list constructed according to the extended merge prediction process. Denote n as the index of the unidirectional prediction motion in the geometric unidirectional prediction candidate list. The LX motion vector (x equals parity of n) of the nth extended merge candidate is used as the nth unidirectional prediction motion vector of the geometric partitioning mode. These motion vectors are Fig.46 If the corresponding LX motion vector of the n-th extended merge candidate does not exist, the L(1-X) motion vector of the same candidate is used as the unidirectional prediction motion vector of the geometric partitioning mode. 2.33.2 Blending Along Geometric Partition Edges After predicting each part of the geometric partition using its own motion, blending is applied to the two prediction signals to derive samples around the geometric partition edges. The blending weights for each position of the CU are derived based on the distance between the independent position and the partition edge. The distance from position (x,y) to the partition edge is derived as: where i,j are the angle and offset indices of the geometric partition, which depend on the geometric partition index transmitted by the signal. x,j and ρ y,j The sign of depends on the angle index i. The weights for each part of the geometric partition are derived as follows: w1(x,y)=1-w0(x,y) (2-30) partIdx depends on the angle index i. An example of weight w0 is Fig.47 is shown in . 2.33.3. Motion Field Storage for Geometry Partitioning Mode Mv1 from the first part of the geometric partitioning, Mv2 from the second part of the geometric partitioning, and the combination Mv of Mv1 and Mv2 are stored in the motion field of the CU encoded in the geometric partitioning mode. The type of motion vector stored for each individual position in the motion field is determined as: sType=abs(motionIdx)<32? 2: (motionIdx≤0? (1-partIdx):partIdx) (2-31) Where motionIdx is equal to d(4x+2,4y+2), which is recalculated from equation (2-18). partIdx depends on the angle index i. If sType is equal to 0 or 1, then Mv0 or Mv1 is stored in the corresponding motion field, otherwise, if sType is equal to 2, the combined Mv from Mv1 and Mv2 is stored. The combined Mv is generated using the following process: 1) If Mv1 and Mv2 are from different reference picture lists (one from L0 and the other from L1), then Mv1 and Mv2 are simply combined to form a bi-directional prediction motion vector. Otherwise, if Mv1 and Mv2 are from the same list, only the unidirectional predicted motion Mv2 is stored. 2.34. Multiple Hypothesis Prediction (MHP) In Multiple Hypothesis Prediction (MHP), up to two additional predictors are signaled on top of the Inter AMVP mode, Normal Merge mode, Affine Merge and MMVD modes. The resulting overall prediction signal is iteratively accumulated with each additional prediction signal. p n+1 =(1-α n+1 ) n +α n+1 h n+1 The weight factor α is specified according to the following Table 2-8: Table 2-8 Weight factors for MHP add_hyp_weight_idx α 0 1 / 4 1 -1 / 8 For inter-AMVP mode, MHP is applied only when unequal weights in BCW are selected in bi-prediction mode. Additional assumptions may be merge mode or AMVP mode. In merge mode, motion information is indicated by a merge index, and the merge candidate list is the same as in geometry partitioning mode. In AMVP mode, reference index, MVP index, and MVD are transmitted by signal. 2.35. Non-adjacent spatial candidates Non-adjacent spatial merge candidates are inserted after the TMVP in the regular merge candidate list. The pattern of spatial merge candidates is Fig.48 The distance between the non-neighboring spatial candidates and the current codec block is based on the width and height of the current codec block. 2.36. Template Matching (TM) Template Matching (TM) is a decoder-side MV derivation method used to refine the motion information of the current CU by finding the closest match between a template in the current picture (i.e., the top and / or left neighboring blocks of the current CU) and a block in a reference picture (i.e., the same size as the template). Fig.49 As shown, in the [-8, +8] pixel search range, a better MV is searched around the initial motion of the current CU. The previously proposed template matching is adopted in this paper with two modifications: the search step size is determined based on the AMVR mode, and the TM can be cascaded using the bilateral matching process in the merge mode. In AMVP mode, the MVP candidate is determined based on the template matching error by selecting the one that achieves the minimum difference between the current block template and the reference block template, and then TM performs MV refinement only on this specific MVP candidate. TM refines the MVP candidate by using an iterative diamond search, starting with full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode) within the [-8, +8] pixel search range. The AMVP candidate can be further refined by using a cross search with full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode), and then using half-pixels and quarter-pixels in turn according to the AMVR mode specified in Table 2-9. This search process ensures that the MVP candidate still maintains the same MV accuracy as indicated by the AMVR mode after the TM process. Table 2-9 AMVR search patterns and merge patterns using AMVR In merge mode, a similar search method is applied to the merge candidates indicated by the merge index. As shown in Table 2-9, TM can be performed all the way down to 1 / 8 pixel MVD accuracy, or skip those accuracies exceeding half-pixel MVD accuracy, depending on whether an alternative interpolation filter is used based on the merged motion information (i.e., used when AMVR is in half-pixel mode). In addition, when TM mode is enabled, template matching can work as an independent process between a block-based bilateral matching (BM) method and a sub-block-based bilateral matching method, or as an additional MV refinement process, depending on whether BM can be enabled according to its enabling condition check. 2.37. Overlapped Block Motion Compensation (OBMC) Overlapped block motion compensation (OBMC) has been previously used in H.263. In JEM, unlike H.263, OBMC can be turned on and off using CU-level syntax. When OBMC is used in JEM, OBMC is performed on all motion compensated (MC) block boundaries except the right and bottom boundaries of the CU. In addition, it also applies to luma and chroma components. In JEM, an MC block corresponds to a codec block. When a CU is encoded and decoded with sub-CU modes (including sub-CU merging, affine, and FRUC modes), each sub-block of the CU is an MC block. In order to handle CU boundaries in a unified manner, OBMC is performed on all MC block boundaries at the sub-block level, where the sub-block size is set equal to 4×4, as Fig.50 shown. When OBMC is applied to the current sub-block, in addition to the current motion vector, the motion vectors of the four connected neighboring sub-blocks, if available and different from the current motion vector, are also used to derive the prediction block of the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal of the current sub-block. The prediction block based on the motion vector of the neighboring sub-block is represented as P N , where N indicates the index of the neighboring upper, lower, left, and right sub-blocks, and the prediction block based on the motion vector of the current sub-block is represented as P C When P N When based on the motion information of the neighboring sub-block containing the same motion information as the current sub-block, OBMC is not N Otherwise, P N Each sample of is added to P C The same sample in P N Four rows / columns are added to P C The weighting factors {1 / 4, 1 / 8, 1 / 16, 1 / 32} are used for P N , and weighting factors {3 / 4, 7 / 8, 15 / 16, 31 / 32} are used for P C . Except for small MC blocks (i.e., when the height or width of the codec block is equal to 4, or when the CU is encoded and decoded using sub-CU mode), only P N Two rows / columns are added to P C In this case, weighting factors {1 / 4, 1 / 8} are used for P N , and the weighting factors {3 / 4, 7 / 8} are used for P C For P generated based on the motion vectors of vertically (horizontally) adjacent sub-blocks N , P N Samples in the same row (column) of are added to P with the same weighting factor C . In JEM, for CUs with a size less than or equal to 256 luma samples, a CU-level flag is signaled to indicate whether OBMC is applied to the current CU. For CUs with a size greater than 256 luma samples or not encoded and decoded using AMVP mode, OBMC is applied by default. At the encoder, when OBMC is applied to a CU, its impact is taken into account in the motion estimation stage. The prediction signal formed by OBMC using the motion information of the top neighboring blocks and the left neighboring blocks is used to compensate the top and left boundaries of the original signal of the current CU, and then the normal motion estimation process is applied. 2.38. Multiple Transform Selection (MTS) for Core Transformations In addition to DCT-II, which has been adopted in HEVC, the Multiple Transform Selection (MTS) scheme is also used to encode and decode the residual of the blocks that are inter- and intra-coded. It uses multiple selected transforms in DCT8 / DST7. The newly introduced transform matrices are DST-VII and DCT-VIII. Table 2-10 shows the basic functions of the selected DST / DCT. Table 2-10 Transformation basis functions of DCT-II / VIII and DSTVII for N-point input To maintain the orthogonality of the transform matrix, the quantization of the transform matrix is more accurate than that in HEVC. To keep the intermediate values of the transform coefficients within 16 bits, all coefficients are 10 bits after horizontal and vertical transforms. To control the MTS scheme, separate enable flags are specified at the SPS level for intra and inter frames respectively. When MTS is enabled at SPS, a CU level flag is signaled to indicate whether MTS is applied. Here, MTS applies only to luma. MTS signaling will be skipped when one of the following conditions applies: - The position of the last significant coefficient of the luma TB is less than 1 (ie DC only). -The last significant coefficient of the luminance TB is located within the MTS zero region. If the MTS CU flag is equal to 0, DCT2 is applied in both directions. However, if the MTS CU flag is equal to 1, two other flags are additionally signaled to indicate the transform types in the horizontal and vertical directions, respectively. The transform and signaling mapping table is shown in Table 2-11. By eliminating intra-mode and block shape dependencies, a unified transform selection for ISP and implicit MTS is used. If the current block is in ISP mode or if the current block is an intra-block and both intra- and inter-frame explicit MTS are turned on, only DST7 is used for horizontal and vertical transform cores. In terms of transform matrix accuracy, an 8-bit main transform core is used. Therefore, all transform cores used in HEVC remain the same, including 4-point DCT-2 and DST-7, 8-point, 16-point and 32-point DCT-2. In addition, other transform cores (including 64-point DCT-2, 4-point DCT-8, 8-point, 16-point, 32-point DST-7 and DCT-8) all use 8-bit main transform cores. Table 2-11 Transformation and signaling mapping table To reduce the complexity of large-size DST-7 and DCT-8, high-frequency transform coefficients are cleared to zero for DST-7 and DCT-8 blocks with size (width or height, or width and height) equal to 32. Only coefficients in the 16×16 low-frequency region are retained. As in HEVC, the residual of a block can be coded or decoded using transform skip mode. To avoid syntax coding redundancy, the transform skip flag is not signaled when the CU level MTS_CU_flag is not equal to 0. Note that when LFNST or MIP is activated for the current CU, the implicit MTS transform is set to DCT2. In addition, when MTS is enabled for an inter-coded block, implicit MTS can still be enabled. 2.39. Sub-Block Transform (SBT) In VTM, sub-block transform is introduced for inter-predicted CUs. In this transform mode, only a sub-part of the residual block is encoded and decoded for the CU. When cu_cbf is equal to 1 for an inter-predicted CU, cu_sbt_flag can be signaled to indicate whether the entire residual block or a sub-part of the residual block is encoded and decoded. For the former case, the inter-MTS information is further parsed to determine the transform type of the CU. In the latter case, a part of the residual block is encoded and decoded by inferring the adaptive transform, while the other part of the residual block is cleared. When SBT is used for inter-coded CU, the SBT type and SBT position information are signaled in the bitstream. There are two SBT types and two SBT positions, such as Fig.51As shown. For SBT-V (or SBT-H), the TU width (or height) can be equal to half of the CU width (or height) or 1 / 4 of the CU width (or height), resulting in 2:2 partitioning or 1:3 / 3:1 partitioning. 2:2 partitioning is similar to binary tree (BT) partitioning, while 1:3 / 3:1 partitioning is similar to asymmetric binary tree (ABT) partitioning. In ABT partitioning, only small areas contain non-zero residuals. If one dimension of the CU is 8 (in units of luminance samples), 1:3 / 3:1 partitioning along that dimension is not allowed. A CU has a maximum of 8 SBT modes. Position-dependent transform kernel selection is applied to luma transform blocks in SBT-V and SBT-H (chroma TBs always use DCT-2). Different kernel transforms are associated with the two positions, SBT-H and SBT-V. More specifically, the horizontal and vertical transforms for each SBT position are in Fig.51 For example, the horizontal and vertical transforms for SBT-V position 0 are DCT-8 and DST-7, respectively. When one side of the residual TU is larger than 32, the transforms for both dimensions are set to DCT-2. Therefore, the sub-block transforms jointly specify the TU tiling, cbf, and the horizontal and vertical core transform types for the residual block. SBT is not applied to CUs coded in combined inter-intra mode. 2.40. Adaptive Merging Candidate Reordering Based on Template Matching In order to improve the encoding and decoding efficiency, after constructing the merge candidate list, the order of each merge candidate is adjusted according to the template matching cost. The merge candidates are arranged in the list according to the template matching cost in ascending order. It is operated in the form of subgroups. The template matching cost is measured by the SAD (sum of absolute differences) between the neighboring samples of the current CU and its corresponding reference samples. If the merge candidate includes motion information of bidirectional prediction, then Fig.52 As shown, the corresponding reference sample is the average of the corresponding reference sample in reference list 0 and the corresponding reference sample in reference list 1. If the merge candidate contains motion information at the sub-CU level, then Fig.53 As shown, the corresponding reference sample is composed of neighboring samples of the corresponding reference sub-block. like Fig.54 As shown, the sorting process is operated in the form of subgroups. The first three merge candidates are sorted together. The next three merge candidates are sorted together. The template size (width of the left template or height of the upper template) is 1. The subgroup size is 3. 2.41. Adaptive Merge Candidate List Assume that the number of merging candidates is 8. The first 5 merging candidates are used as the first subgroup, and the following 3 merging candidates are used as the second subgroup (ie, the last subgroup). For encoders, such as Fig.55 As shown, after the merge candidate list is constructed, some merge candidates are adaptively reordered in ascending order of merge candidate cost. More specifically, the template matching costs of the merging candidates in all subgroups except the last subgroup are calculated; then, the merging candidates in their own subgroups except the last subgroup are reordered; finally, a final merging candidate list will be obtained. For the decoder, after the merge candidate list is constructed, such as Fig.56 As shown, some / no merge candidates are adaptively reordered in ascending order of merge candidate cost. Fig.56 In the example, the subgroup in which the selected (signaled) merging candidate is located is called the selected subgroup. More specifically, if the selected merge candidate is located in the last subgroup, the merge candidate list construction process is terminated after the selected merge candidate is derived, no reordering is performed and the merge candidate list is not changed; otherwise, the execution process is as follows: After all merge candidates in the selected subgroup are derived, the merge candidate list construction process is terminated; the template matching costs of the merge candidates in the selected subgroup are calculated; the merge candidates in the selected subgroup are reordered; finally, a new merge candidate list will be obtained. For both encoder and decoder: The template matching cost is derived as a function of T and RT, where T is the set of samples in the template and RT is the set of reference samples for the template. When deriving the reference samples of the template of the merge candidate, the motion vector of the merge candidate is rounded to integer pixel precision. The reference samples (RT) of the templates used for bidirectional prediction are derived by weighted averaging the reference samples (RT0) of the templates in reference list 0 and the reference samples (RT1) of the templates in reference list 1 as follows. RT=((8-w)*RT0+w*RT1+4)>>3 (2-32) The weight (8-w) of the reference template in reference list 0 and the weight (w) of the reference template in reference list 1 are determined by the BCW index of the merge candidate. The BCW index equal to {0, 1, 2, 3, 4} corresponds to w equal to {-2, 3, 4, 5, 10} respectively. If the local illumination compensation (LIC) flag of the merge candidate is true, the reference sample of the template is derived using the LIC method. The template matching cost is calculated based on the sum of absolute differences (SAD) between T and RT. The template size is 1. This means that the width of the left template and / or the height of the template above is 1. If the codec mode is MMVD, the merge candidates used to derive the base merge candidate are not reordered. If the coding mode is GPM, the merge candidates used to derive the unidirectional prediction candidate list are not reordered. 2.42. Geometric prediction mode with motion vector difference In the geometric prediction mode with motion vector difference (GMVD), each geometric partition in GPM can decide whether to use GMVD. If GMVD is selected for a geometric region, the MV of the region is calculated as the sum of the MV and MVD of the merge candidate. All other processing remains the same as in GPM. With GMVD, the MVD is signaled as a direction and distance pair. There are nine candidate distances (1 / 4-pixel, 1 / 2-pixel, 1-pixel, 2-pixel, 3-pixel, 4-pixel, 6-pixel, 8-pixel, 16-pixel), and eight candidate directions (four horizontal / vertical directions and four diagonal directions). In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, the MVD in GMVD is also shifted left by 2 bits like in MMVD. 2.43. Affine MMVD In affine MMVD, an affine merge candidate (called base affine merge candidate) is selected and the MV of a control point is further refined by the signaled MVD information. The MVD information of the MVs of all control points is the same in one prediction direction. When the starting MV is a bidirectional prediction MV in which the two MVs point to different sides of the current picture (i.e., the POC of one reference is greater than the POC of the current picture, and the POC of the other reference is less than the POC of the current picture), the MV offset added to the list 0MV component of the starting MV and the MV offset of the list 1MV have opposite values; otherwise, when the starting MV is a bidirectional prediction MV in which both lists point to the same side of the current picture (i.e., the POCs of the two references are both greater than the POC of the current picture, or both are less than the POC of the current picture), the MV offset added to the list 0MV component of the starting MV and the MV offset of the list 1MV are the same. 2.44. Adaptive Decoder-side Motion Vector Refinement (ADMVR) In ECM-2.0, a multi-pass decoder-side motion vector refinement (DMVR) method is applied in regular merge mode if the selected merge candidate satisfies the DMVR condition. In the first pass, bilateral matching (BM) is applied to the codec block. In the second pass, BM is applied to each 16x16 sub-block within the codec block. In the third pass, the MV in each 8x8 sub-block is refined by applying bidirectional optical flow (BDOF). The adaptive decoder-side motion vector refinement method consists of two new merge modes that are introduced to refine the MV in only one direction (L0 or L1) of the bidirectional prediction of the merge candidate that meets the DMVR condition. A multi-pass DMVR process is applied to refine the motion vector for the selected merge candidate, however, in the first pass (i.e., PU level) DMVR, MVD0 or MVD1 is set to zero. Similar to the conventional merge mode, the merge candidates for the proposed merge mode are derived from spatially adjacent coded blocks, TMVP, non-adjacent blocks, HMVP, and paired candidates. The difference is that only those that satisfy the DMVR condition are added to the candidate list. The same merge candidate list (i.e., ADMVR merge list) is used by both proposed merge modes, and the merge index is encoded and decoded in the conventional merge mode. 3. Question 1. In the current design of the codec, frames are encoded and decoded to their original relative positions and orientations. However, this approach may limit compression efficiency because this fixed encoding sequence is not always beneficial for frames with different signal and texture distributions. 2. In the current design of CCLM, it is assumed that frames are encoded and decoded in a fixed same encoding and decoding order. However, when repositioning frames for better encoding and decoding efficiency, the positional relationship between the chrominance components and the luminance components adopted by the CCLM filter has changed. 4. Detailed solution The detailed solutions below should be considered as examples to explain the general concept. These solutions should not be interpreted in a narrowing way. In addition, these solutions can be combined in any way. In the present disclosure, the term "block" may refer to a codec block (CB), or a codec unit (CU), or a prediction block (PB), or a prediction unit (PU), or a transform block (TB), or a transform unit (TU), or a codec tree block (CTB), or a codec tree unit (CTU), or a rectangular area of samples / pixels. In the following discussion, SatShift(x,n) is defined as: Shift(x,n) is defined as Shift(x,n)=(x+offset0)>>n. In one example, offset0 and / or offset1 are set to (1 <<n)> >1 or (1<<(n-1)). In another example, offset0 and / or offset1 are set to 0. In another example, offset0=offset1=((1<<n)> >1)-1 or ((1<<(n-1)))-1. Clip3(min, max, x) is defined as: In the following discussion, "picture," "image," and "frame" may have the same meaning. Frame Modification 1. It is proposed that a video unit (e.g., a picture / slice / tile / block) with a size (width, height) can be modified in a first way before it is encoded, and / or a decoded video unit can be modified in a second way before it is output or used as a reference picture. a. In one example, assuming that P(x, y) represents a video unit, P′(x, y) = F(P(x, y)) can be encoded, where F is any function that can be applied to modify the picture. b. In one example, assuming that P" (x, y) represents the decoded video unit, P" (x, y) = G (P' (x, y)) can be output and / or stored and / or used as a reference video unit, where G is any function that can be applied to modify the picture. c. In one example, G should be the inverse operation of F, that is, G(F(X))=X, where X is a picture. d. In one example, F and G may be flipped and / or rotated. e. In one example, the video unit is flipped vertically. Fig.57 As shown, the content is flipped vertically and then the flipped video unit is used in the codec encoding and decoding pipeline. Vertical flip is defined as: F(P(x,y))=P(x,height-y-1). f. In one example, the decoded video unit is flipped vertically. Fig.57 As shown, the content is flipped vertically and then the flipped decoded video unit is output / stored / used as a reference video unit. Vertical flip is defined as: G(P'(x, y))=P'(x, height-y-1). g. In one example, the video unit is flipped horizontally. Fig.58 As shown, the content is flipped horizontally, and then the flipped video unit is used in the codec encoding and decoding pipeline. Horizontal flip is defined as: F(P(x,y))=P(width-x-1,y). h. In one example, the decoded video unit is flipped horizontally. Fig.58As shown, the content is flipped horizontally, and then the flipped decoded video unit is output / stored / used as a reference video unit. Horizontal flip is defined as: G(P'(x, y))=P'(width-x-1, y). i. In one example, the video unit is rotated 180°. Fig.59 As shown, the content is rotated 180° and the rotated video unit is then used in the codec encoding and decoding pipeline. A 180° rotation is defined as: F(P(x, y))=P(width-x-1, height-y-1). j. In one example, the decoded video unit is rotated 180°. Fig.59 As shown, the content is rotated 180° and then the rotated video unit is output / stored / used as a reference video unit. A 180° rotation is defined as: G(P'(x, y))=P'(width-x-1, height-y-1). k. In one example, the video unit is rotated 90° clockwise. Fig.60 As shown, the content is rotated 90° clockwise and the rotated video unit is then used in the codec encoding and decoding pipeline. A 90° clockwise rotation is defined as: F(P(x,y))=P(height-y-1,x). 1. In one example, the decoded video unit is rotated 90° clockwise. Fig.60 As shown, the content is rotated 90° clockwise, and then the rotated video unit is output / stored / used as a reference video unit. A 90° clockwise rotation is defined as: G(P'(x,y))=P'(height-y-1,x). m. In one example, the video unit is rotated 270° clockwise. Fig.61 As shown, the content is rotated 270° clockwise and the rotated video unit is then used in the codec encoding and decoding pipeline. A 270° clockwise rotation is defined as: F(P(x,y))=P(y,width-x-1). n. In one example, the decoded video unit is rotated 270° clockwise. Fig.61 As shown, the content is rotated 270° clockwise, and then the rotated video unit is output / stored / used as a reference video unit. A 270° clockwise rotation is defined as: G(P'(x, y))=P'(y, width-x-1). o. If the modified video unit has a different size than the original video unit, the width and / or height before and / or after modification may be transmitted by a signal, such as in an SPS / PPS / picture header / slice header / CTU / CU / etc. Luma / Chroma sample position adjustment 2. If a modified picture is encoded, and / or a picture is decoded that will be modified after decoding, the luma / chroma sample correspondence may be modulated for cross-component prediction codecs (e.g. CCLM, L-CCLM, T-CCLM, MM-CCLM, etc.). a. In one example, whether and / or how to adjust may depend on the color format, such as 4:4:4 or 4:2:2 or 4:2:0. i. For example, for the format 4:4:4, no adjustment may be performed. ii. For example, different adjustments may be performed for formats 4:2:0 and 4:2:2. b. In one example, adjusting which type of filter to use depends on the block position and / or color format. i. For example, a 6-tap filter may be used in blocks with color format 4:2:0 that are not located on the boundary of a CTU. ii. For example, a 3-tap filter may be used in a block with color format 4:2:0, which is located on the boundary of a CTU. iii. For example, a 3-tap filter may be used in blocks with color format 4:2:2. c. In one example, Fig.62A and 62B As shown in , the correspondence between the luminance samples and the chrominance samples is adjusted in the horizontal flip. Specifically, as Figures 62A-62B As shown in , the rectangular blocks represent luma samples, while the black dots represent chroma samples. Fig.62A As shown, a 6-tap filter with coefficients 1-2-1-1-2-1 is used on the luma pixels in the area bounded by the dashed rectangle. For example, the 2nd, 3rd, 4th, 6th, 7th, and 8th luma samples have coefficients 1, 2, 1, 1, 2, and 1, respectively. In the horizontally flipped reconstruction, Fig.62B As shown, a 6-tap filter with 1-2-1-1-2-1 coefficients is used to adjust the corresponding samples using the 4th, 3rd, 2nd, 8th, 7th and 6th pixels. d. In one example, the correspondence between the luminance samples and the chrominance samples is adjusted in a 180° rotation. Specifically, Fig.63A and 63B As shown in , the rectangular blocks represent luma samples, while the black dots represent chroma samples. Fig.63A As shown, a 6-tap filter with coefficients 1-2-1-1-2-1 is used on the luma pixels in the area bounded by the dashed rectangle. For example, the 2nd, 3rd, 4th, 6th, 7th, and 8th luma samples have coefficients 1, 2, 1, 1, 2, and 1, respectively. In a 180° reconstruction, Fig.63B As shown, a 6-tap filter with 1-2-1-1-2-1 coefficients is used to adjust the corresponding samples using the 8th, 7th, 6th, 4th, 3rd and 2nd pixels. Signaling and Rate-Distortion Optimization (RDO) 3. RDO can be applied at the picture level to determine the picture modification method. a. In one example, all luma and chroma rate-distortion (RD) costs for each original and modified picture are calculated, and then the encoder can choose the modification or non-modification with the smallest cost. 4. In one example, whether modification of a decoded video unit is allowed or enabled may depend on codec information, such as picture / slice type, temporal layer, QP, color format, color component, codec mode, size of the video unit, etc. a. In one example, modifications are only allowed on I stripes. b. In one example, if the height of the video unit >= T, then modification is not allowed, where T is a threshold such as 1080. 5. In one example, whether and / or how to apply modifications on a decoded video unit may be signaled from the encoder to the decoder by at least one syntax element (SE), such as in SPS / PPS / APS / picture header / slice header / CTU / CU / etc. a. In one example, a first syntax element may be transmitted via a signal to indicate whether the modification method is applied. b. In one example, a second syntax element may be transmitted via a signal to indicate which modification method is applied or not applied. c. The second syntax element may be signaled only when the first syntax indicates that the modification method is applied. d. A single SE can be transmitted via a signal. e.SE can be coded using fixed length codec, EG codec, truncated (unary) codec, etc. f. SE can be coded using at least one context in arithmetic coding. g.SE can be bypassed. h. SE can be transmitted via signal only when modification is allowed. 6. In one example, when attempting to encode a picture using a modified method, the encoder may be simplified. a. In one example, the fast algorithm encodes a frame with a CU size of 128 partitioned by a quadtree, while skipping all other CU sizes and codec tree structures. b. In one example, the fast algorithm encodes frames with a CU size of 64 partitioned by a quadtree, while skipping all other CU sizes and codec tree structures. c. In one example, the fast algorithm encodes frames with a CU size of 32 partitioned by a quadtree, while skipping all other CU sizes and codec tree structures. d. In one example, the fast algorithm encodes frames with a CU size of 16 partitioned by a quadtree, while skipping all other CU sizes and codec tree structures. e. In one example, the fast algorithm encodes frames with a CU size of 8 partitioned by a quadtree, while skipping all other CU sizes and codec tree structures. General Aspects 7. Whether and / or how to apply the method disclosed above can be transmitted by a signal at the sequence level / picture group level / picture level / slice level / tile group level, for example in the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. 8. Whether and / or how to apply the method disclosed above may depend on the coded information, such as block size, color format, single / dual tree partitioning, color component, slice / picture type. 9. The proposed method disclosed in this article can be used in other codec tools that require frame relocation or CCLM adjustment.
[0130] More details of embodiments of the present disclosure related to the adjustment of video blocks for video coding and decoding will be described below. The embodiments of the present disclosure should be considered as examples to explain general concepts and should not be interpreted in a narrow manner. In addition, these embodiments can be applied individually or in combination in any way.
[0131] As used herein, the term "block" may refer to a color component, a sub-picture, a picture, a slice, a tile, a codec tree unit (CTU), a CTU row, a CTU group, a codec unit (CU), a prediction unit (PU), a transform unit (TU), a codec tree block (CTB), a codec block (CB), a prediction block (PB), a transform block (TB), a sub-block of a video block, a sub-region within a video block, a video processing unit including multiple samples / pixels, etc. A block may be rectangular or non-rectangular.
[0132] Fig.64FIG. 6 is a flowchart of a method 6400 for video processing according to some embodiments of the present disclosure. The method 6400 may be implemented during conversion between a video and a bitstream of the video. Fig.64 As shown, method 6400 begins at 6402, where a first video block is acquired. The first video block is generated based on a first adjustment of a current video block of the video. The first adjustment includes at least one of adjusting the orientation of the current video block or adjusting the position of samples in the current video block. As used in the disclosure, the first adjustment may also be referred to as a geometric adjustment.
[0133] As an example and not limitation, the first video block can be generated at an encoder and encoded into a bitstream. In addition, at a decoder, the first video block can be obtained from the bitstream.
[0134] At 6404, a second video block is generated based on a second adjustment of the first video block. The second adjustment is the inverse of the first adjustment. As used in the disclosure, the second adjustment may also be referred to as an inverse geometric adjustment. As an example and not limitation, in a case where the first adjustment is to rotate the current video block by 90° clockwise, the second adjustment may be to rotate the first video block by 270° clockwise. In another case where the first adjustment is to rotate the current video block by 180° clockwise, the second adjustment may be to rotate the first video block by 180° clockwise.
[0135] At 6406, the conversion may be performed based on the second video block. In some embodiments, the second video block may be output or stored. Additionally or alternatively, the second video block may be used as a reference video block for encoding another video block of the video that is different from the current video block.
[0136] In some embodiments, the conversion may include encoding the video into a bitstream. Alternatively or additionally, the conversion may include decoding the video from the bitstream. It should be understood that the above illustrations and / or examples are described for illustrative purposes only. The scope of the present disclosure is not limited in this regard.
[0137] In view of the above, geometric adjustment and corresponding inverse geometric adjustment are performed to encode and decode video blocks. Compared with traditional solutions, the proposed method can advantageously adapt the encoding scheme of a video block to its signal and texture distribution. Thereby, the encoding and decoding efficiency can be improved.
[0138] In some embodiments, the position of the samples in the current video block may be adjusted by flipping the current video block.In addition, the second adjustment may include adjusting the position of the samples in the first video block by flipping the first video block.
[0139] In some embodiments, the current video block may be flipped vertically. As an example and not limitation, in a first adjustment, the position of a first sample in the current video block may be adjusted based on: x1'=x1, y1'=H1-y1-1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
[0140] In addition, the first video block may be flipped vertically. As an example and not limitation, in the second modulation, the position of the second sample in the first video block may be adjusted based on: x2'=x2, y2'=H2-y2-1, Wherein x2′ denotes the adjusted horizontal position of the second sample, y2′ denotes the adjusted vertical position of the second sample, x2 denotes the original horizontal position of the second sample, y2 denotes the original vertical position of the second sample, and H2 denotes the height of the first video block.
[0141] In some embodiments, the current video block may be flipped horizontally. As an example and not limitation, in a first adjustment, the position of a first sample in the current video block may be adjusted based on: x1'=W1-x1-1, y1'=y1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
[0142] In addition, the first video block may be flipped horizontally. As an example and not limitation, in the second adjustment, the position of the second sample in the first video block may be adjusted based on: x2'=W2-x2-1, y2'=y2, Wherein x2′ represents the adjusted horizontal position of the second sample, y2′ represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
[0143] In some embodiments, the orientation of the current video block may be adjusted by rotating the current video block. In addition, the second adjustment may include adjusting the position of the samples in the first video block by rotating the first video block.
[0144] In some embodiments, the current video block may be rotated 180°. As an example and not limitation, in a first adjustment, the position of a first sample in the current video block may be adjusted based on: x1'=W1-x1-1, y1'=H1-y1-1, Wherein x1' denotes the adjusted horizontal position of the first sample, y1' denotes the adjusted vertical position of the first sample, x1 denotes the original horizontal position of the first sample, y1 denotes the original vertical position of the first sample, W1 denotes the width of the current video block, and H1 denotes the height of the current video block.
[0145] Thus, the first video block may be rotated 180°. As an example and not limitation, in the second adjustment, the position of the second sample in the first video block may be adjusted based on: x2'=W2-x2-1, y2'=H2-y2-1, Wherein x2' denotes the adjusted horizontal position of the second sample, y2' denotes the adjusted vertical position of the second sample, x2 denotes the original horizontal position of the second sample, y2 denotes the original vertical position of the second sample, W2 denotes the width of the first video block, and H2 denotes the height of the first video block.
[0146] In some embodiments, the current video block may be rotated 90° clockwise. As an example and not limitation, in a first adjustment, the position of the first sample in the current video block may be adjusted based on: x1'=H1-y1-1, y1'=x1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
[0147] In addition, the first video block may be rotated 270° clockwise. As an example and not limitation, in the second adjustment, the position of the second sample in the first video block may be adjusted based on: x2'=y2, y2'=W2-x2-1, Wherein x2′ represents the adjusted horizontal position of the second sample, y2′ represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
[0148] In some embodiments, the current video block may be rotated 270° clockwise. As an example and not limitation, in a first adjustment, the position of the first sample in the current video block may be adjusted based on: x1'=y1, y1'=W1-x1-1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
[0149] Thus, the first video block may be rotated 90° clockwise. As an example and not limitation, in the second adjustment, the position of the second sample in the first video block may be adjusted based on: x2'=H2-y2-1, y2'=x2, Wherein x2′ denotes the adjusted horizontal position of the second sample, y2′ denotes the adjusted vertical position of the second sample, x2 denotes the original horizontal position of the second sample, y2 denotes the original vertical position of the second sample, and H2 denotes the height of the first video block.
[0150] In some embodiments, if the size of the first video block is different from the size of the current video block, size information about at least one of the following may be indicated in the bitstream: the width of the current video block, the height of the current video block, the width of the first video block, or the height of the first video block. In addition, the size information may be indicated in a sequence parameter set (SPS), a picture parameter set (PPS), a picture header, a slice header, a coding tree unit (CTU), a codec unit (CU), etc.
[0151] In some embodiments, the correspondence between the luma samples and the chroma samples of the first video block can be adjusted for the cross-component prediction codec tool. Alternatively, information about at least one of the following may depend on the color format of the current video block: whether to adjust the correspondence between the luma samples and the chroma samples of the first video block for the cross-component prediction codec tool, or how to adjust the correspondence. As an example and not limitation, the cross-component prediction codec tool may include a cross-component linear model (CCLM) mode, an L-CCLM mode, a T-CCLM mode, an MM-CCLM mode, etc.
[0152] In some embodiments, if the color format is format 4:4:4, the correspondence may not be adjusted. Additionally or alternatively, if the color format is format 4:2:0 or format 4:2:2, the correspondence may be adjusted. Furthermore, if the color format is format 4:2:0, the correspondence may be adjusted in a first manner, and if the color format is format 4:2:2, the correspondence may be adjusted in a second manner different from the first manner. In other words, different adjustments may be performed for formats 4:2:0 and 4:2:2.
[0153] In some embodiments, the type of filter used to adjust the correspondence may depend on the position of the current video block, the color format of the current video block, etc. As an example and not limitation, if the color format is format 4:2:0 and the current video block is not located on the boundary of the CTU of the video, the filter may be a 6-tap filter. If the color format is format 4:2:0 and the current video block is located on the boundary of the CTU of the video, the filter may be a 3-tap filter. If the color format is format 4:2:2, the filter may be a 3-tap filter. It should be understood that the above examples are described for illustrative purposes only. The scope of the present disclosure is not limited in this regard.
[0154] In some embodiments, the adjusted correspondence between luma samples and chroma samples of the first video block may be the same as the correspondence between luma samples and chroma samples of the current video block. Fig.62A , in the original state (corresponding to the state of the current video block), a set of luma samples used for the cross-component prediction codec for the chroma sample 6210 includes 6 luma samples surrounding the chroma sample 6210, namely the 2nd, 3rd, 4th, 6th, 7th and 8th luma samples with coefficients 1, 2, 1, 1, 2 and 1 for the 6-tap filter.
[0155] And for Fig.62B , in the horizontally flipped state (the state corresponding to the first video block), if the correspondence is not adjusted, a set of luma samples used for the cross-component prediction codec for the chroma sample 6210 will include 6 luma samples surrounding the chroma sample 6210, that is, the 17th, 4th, 3rd, 18th, 8th and 7th luma samples having coefficients 1, 2, 1, 1, 2 and 1, respectively. To assist in adjusting the correspondence, a set of luma samples used for the cross-component prediction codec for the chroma sample 6210 still includes the 4th, 3rd, 2nd, 8th, 7th and 6th luma samples having coefficients 1, 2, 1, 1, 2 and 1 for the 6-tap filter, respectively, as shown in FIG. Fig.62B as shown in .
[0156] Reference Fig.63A, in the original state (corresponding to the state of the current video block), a set of luma samples used for the cross-component prediction codec for the chroma sample 6310 includes 6 luma samples surrounding the chroma sample 6210, i.e., the 2nd, 3rd, 4th, 6th, 7th and 8th luma samples with coefficients 1, 2, 1, 1, 2 and 1, respectively. Fig.63B As shown, in the 180° rotated state (the state corresponding to the first video block), in order to assist in adjusting the correspondence, a set of luma samples used for the cross-component prediction codec for the chroma sample 6210 still includes the 8th, 7th, 6th, 4th, 3rd and 2nd luma samples having coefficients 1, 2, 1, 1, 2 and 1 for the 6-tap filter, respectively, as shown in FIG. Fig.62B Therefore, the encoding and decoding quality of the cross-component prediction codec will not be degraded by the geometry adjustment.
[0157] In some embodiments, the first adjustment can be determined based on a rate-distortion optimization (RDO) process. For example, the luminance and chrominance rate-distortion (RD) costs can be determined for multiple candidate adjustment schemes, and the first adjustment can include the candidate adjustment scheme with the lowest cost. As an example and not limitation, the RDO process can be applied at the picture level. All luminance and chrominance RD costs of each original and adjusted picture are calculated, and then the encoder can choose whether to perform the adjustment and how to perform the adjustment according to the cost. In one example, the adjustment with the lowest cost can be selected.
[0158] In some embodiments, the information about whether the second adjustment is allowed or enabled for the third video block may depend on the codec information of the third video block. The third video block is obtained from the bitstream and is different from the second video block. As an example and not limitation, the codec information may include picture type, slice type, temporal layer, quantization parameter (QP), color format, color component, codec mode, size, etc.
[0159] In some embodiments, if the third video block can be on the I slice, the second adjustment can be allowed for the third video block. Additionally or alternatively, if the height of the third video block can be greater than or equal to a threshold, the second adjustment can be not allowed for the third video block. As an example, the threshold can be 1080 pixels. It should be understood that the above examples are described for illustrative purposes only. The scope of the present disclosure is not limited in this regard.
[0160] In some embodiments, at least one syntax element indicating information about at least one of the following may be included in the bitstream: whether to apply the second adjustment to the first video block, or how to apply the second adjustment to the first video block. For example, the at least one syntax element may be included in a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a picture header, a slice header, a codec tree unit (CTU), a codec unit (CU), etc.
[0161] In some embodiments, the at least one syntax element may include a first syntax element indicating whether to apply the second adjustment to the first video block. Additionally or alternatively, the at least one syntax element may include a second syntax element indicating how to apply the second adjustment to the first video block. In some further embodiments, if the first syntax element indicates that the second adjustment is applied to the first video block, the at least one syntax element may further include a second syntax element indicating how to apply the second adjustment to the first video block. In some alternative embodiments, the at least one syntax element may include a single syntax element indicating whether to apply the second adjustment to the first video block and how to apply the second adjustment to the first video block.
[0162] In some embodiments, at least one syntax element may be encoded using fixed length codec, exponential Golomb (EG) codec, truncated unary codec, unary codec, etc. In some embodiments, at least one syntax element may be encoded using at least one context in an arithmetic codec. Alternatively, at least one syntax element may be bypass coded.
[0163] In some embodiments, if the second adjustment is allowed for the first video block, at least one syntax element indicating information about at least one of whether to apply the second adjustment to the first video block or how to apply the second adjustment to the first video block may be included in the codestream.
[0164] In some embodiments, the current video block may be included in the current frame of the video. In addition, the current frame may be encoded and decoded using a predetermined CU size and a predetermined segmentation scheme. As a result, the encoding and decoding process may be simplified, further improving the encoding and decoding efficiency. As an example and not a limitation, the predetermined segmentation scheme may include quadtree segmentation. In addition, the predetermined CU size may include 128 pixels × 128 pixels, 64 pixels × 64 pixels, 32 pixels × 32 pixels, 16 pixels × 16 pixels, 8 pixels × 8 pixels, etc. It should be understood that the above examples are described for illustrative purposes only. The scope of the present disclosure is not limited in this regard.
[0165] In some embodiments, whether and / or how to apply the method may be indicated at a sequence level, a group of picture level, a picture level, a slice level, a tile group level, etc. In some embodiments, whether and / or how to apply the method may be indicated in a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a dependency parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, a tile group header, etc.
[0166] In some embodiments, whether and / or how to apply the method may depend on the coded information of the current video block. As an example and not limitation, the coded information may include block size, color format, single tree partition, dual tree partition, color component, slice type, picture type, etc.
[0167] In some embodiments, the above method may be applied to any other suitable codec tool requiring frame relocation or CCLM adjustment.
[0168] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a code stream of a video generated by a method performed by a device for video processing. In the method, a first video block is acquired. The first video block is generated based on a first adjustment of a current video block of the video, and the first adjustment includes adjusting the orientation of the current video block or adjusting at least one of the positions of samples in the current video block. In addition, a second video block is generated based on a second adjustment of the first video block, and the second adjustment is the inverse process of the first adjustment. In addition, a code stream is generated based on the second video block.
[0169] According to some other embodiments of the present disclosure, a method for storing a code stream of a video is provided. In the method, a first video block is acquired. The first video block is generated based on a first adjustment of a current video block of the video, the first adjustment including at least one of adjusting the orientation of the current video block or adjusting the position of a sample in the current video block. In addition, a second video block is generated based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment. In addition, a code stream is generated based on the second video block and is stored in a non-transitory computer-readable recording medium.
[0170] Embodiments of the present disclosure may be described according to the following clauses, features of which may be combined in any reasonable way.
[0171] Clause 1. A method for video processing, comprising: obtaining a first video block for conversion between a video and a bitstream of the video, wherein the first video block is generated based on a first adjustment of a current video block of the video, wherein the first adjustment includes at least one of adjusting the orientation of the current video block or adjusting the positions of samples in the current video block; generating a second video block based on a second adjustment of the first video block, wherein the second adjustment is an inverse process of the first adjustment; and performing the conversion based on the second video block.
[0172] Clause 2. The method of clause 1, wherein the first video block is generated at an encoder and encoded into the bitstream.
[0173] Clause 3. The method according to any one of clauses 1-2, wherein obtaining the first video block comprises: obtaining the first video block from the bitstream.
[0174] Clause 4. The method of any of clauses 1-3, wherein the second video block is used as a reference video block for encoding and decoding another video block of the video that is different from the current video block.
[0175] Clause 5. The method of any of clauses 1-4, wherein the second video block is output or stored.
[0176] Clause 6. A method according to any one of clauses 1-5, wherein the position of the sample in the current video block is adjusted by flipping the current video block, and the second adjustment includes: adjusting the position of the sample in the first video block by flipping the first video block.
[0177] Clause 7. The method of clause 6, wherein the current video block is flipped vertically.
[0178] Clause 8. A method according to Clause 7, wherein in the first adjustment, the position of the first sample in the current video block is adjusted based on the following: x1'=x1, y1'=H1-y1-1, wherein x1' represents the adjusted horizontal position of the first sample, y1' represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
[0179] Clause 9. The method of any of clauses 7-8, wherein the first video block is flipped vertically.
[0180] Clause 10. A method according to Clause 9, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on the following: x2'=x2, y2'=H2-y2-1, wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and H2 represents the height of the first video block.
[0181] Clause 11. The method of Clause 6, wherein the current video block is flipped horizontally.
[0182] Clause 12. A method according to clause 11, wherein in the first adjustment, the position of the first sample in the current video block is adjusted based on the following: x1'=W1-x1-1, y1'=y1, wherein x1' represents the adjusted horizontal position of the first sample, y1' represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
[0183] Clause 13. The method of any of clauses 11-12, wherein the first video block is flipped horizontally.
[0184] Clause 14. A method according to clause 13, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on the following: x2'=W2-x2-1, y2'=y2, wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
[0185] Clause 15. The method of any of clauses 1-5, wherein the orientation of the current video block is adjusted by rotating the current video block, and the second adjustment comprises adjusting positions of samples in the first video block by rotating the first video block.
[0186] Clause 16. The method of clause 15, wherein the current video block is rotated 180°.
[0187] Clause 17. A method according to Clause 16, wherein in the first adjustment, the position of the first sample in the current video block is adjusted based on the following: x1'=W1-x1-1, y1'=H1-y1-1, wherein x1' represents the adjusted horizontal position of the first sample, y1' represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, W1 represents the width of the current video block, and H1 represents the height of the current video block.
[0188] Clause 18. The method of any of clauses 16-17, wherein the first video block is rotated 180°.
[0189] Clause 19. A method according to clause 18, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on the following: x2'=W2-x2-1, y2'=H2-y2-1, wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, W2 represents the width of the first video block, and H2 represents the height of the first video block.
[0190] Clause 20. The method of clause 15, wherein the current video block is rotated 90° clockwise.
[0191] Clause 21. A method according to clause 20, wherein in the first adjustment, the position of the first sample in the current video block is adjusted based on the following: x1'=H1-y1-1, y1'=x1, wherein x1' represents the adjusted horizontal position of the first sample, y1' represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
[0192] Clause 22. The method of any of clauses 20-21, wherein the first video block is rotated 270° clockwise.
[0193] Clause 23. A method according to clause 22, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on the following: x2'=y2, y2'=W2-x2-1, wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
[0194] Clause 24. The method of clause 15, wherein the current video block is rotated 270° clockwise.
[0195] Clause 25. A method according to clause 24, wherein in the first adjustment, the position of the first sample in the current video block is adjusted based on the following: x1'=y1, y1'=W1-x1-1, wherein x1' represents the adjusted horizontal position of the first sample, y1' represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
[0196] Clause 26. The method of any of clauses 24-25, wherein the first video block is rotated 90° clockwise.
[0197] Clause 27. A method according to clause 26, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on the following: x2'=H2-y2-1, y2'=x2, wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and H2 represents the height of the first video block.
[0198] Clause 28. A method according to any one of clauses 1-27, wherein if the size of the first video block is different from the size of the current video block, size information about at least one of the following is indicated in the bitstream: the width of the current video block, the height of the current video block, the width of the first video block, or the height of the first video block.
[0199] Clause 29. The method of clause 28, wherein the size information is indicated in one of: a sequence parameter set (SPS), a picture parameter set (PPS), a picture header, a slice header, a codec tree unit (CTU), or a codec unit (CU).
[0200] Clause 30. The method of any of clauses 1-29, wherein the correspondence between luma samples and chroma samples of the first video block is adjusted for a cross-component prediction codec.
[0201] Clause 31. A method according to any one of clauses 1-29, wherein information about at least one of the following depends on the color format of the current video block: whether to adjust the correspondence between luma samples and chroma samples of the first video block for a cross-component prediction codec, or how to adjust the correspondence.
[0202] Clause 32. A method according to any one of clauses 30-31, wherein the cross-component prediction codec comprises at least one of: a cross-component linear model (CCLM) mode, an L-CCLM mode, a T-CCLM mode, or an MM-CCLM mode.
[0203] Clause 33. A method according to any one of clauses 31-32, wherein if the color format is the format 4:4:4, the correspondence is not adjusted.
[0204] Clause 34. A method according to any one of clauses 31-33, wherein if the color format is format 4:2:0 or format 4:2:2, the correspondence is adjusted.
[0205] Clause 35. A method according to any one of clauses 30-34, wherein if the color format is format 4:2:0, the correspondence is adjusted in a first manner, and if the color format is format 4:2:2, the correspondence is adjusted in a second manner different from the first manner.
[0206] Clause 36. The method of any of clauses 30-35, wherein the type of filter used to adjust the correspondence depends on at least one of: the position of the current video block, or the color format.
[0207] Clause 37. The method of clause 36, wherein if the color format is format 4:2:0 and the current video block is not located on a boundary of a CTU of the video, then the filter is a 6-tap filter.
[0208] Clause 38. A method according to any of clauses 36-37, wherein if the color format is format 4:2:0 and the current video block is located on the boundary of a CTU of the video, then the filter is a 3-tap filter.
[0209] Clause 39. A method according to any of clauses 36-38, wherein if the color format is the format 4:2:2, the filter is a 3-tap filter.
[0210] Clause 40. The method of any of clauses 30-39, wherein the adjusted correspondence is the same as the correspondence between luma samples and chroma samples of the current video block.
[0211] Clause 41. The method of any of clauses 1-40, wherein the first adjustment is determined based on a rate-distortion optimization (RDO) process.
[0212] Clause 42. The method of clause 41, wherein luma and chroma rate distortion (RD) costs are determined for a plurality of candidate adjustment schemes, and the first adjustment comprises the candidate adjustment scheme having the lowest cost.
[0213] Clause 43. A method according to any one of clauses 1-42, wherein the information about whether the second adjustment is allowed or enabled for a third video block depends on codec information of the third video block, the third video block is obtained from the code stream and is different from the second video block.
[0214] Clause 44. The method of clause 43, wherein the codec information comprises at least one of: picture type, slice type, temporal layer, quantization parameter (QP), color format, color component, codec mode, or size.
[0215] Clause 45. The method of clauses 43-44, wherein the second adjustment is allowed for the third video block if the third video block is on an I slice.
[0216] Clause 46. The method of any of clauses 43-45, wherein the second adjustment is not permitted for the third video block if a height of the third video block is greater than or equal to a threshold.
[0217] Clause 47. The method of clause 46, wherein the threshold is 1080 pixels.
[0218] Clause 48. A method according to any of clauses 1-47, wherein at least one syntax element indicating information about at least one of the following is included in the codestream: whether to apply the second adjustment to the first video block, or how to apply the second adjustment to the first video block.
[0219] Clause 49. A method according to clause 48, wherein the at least one syntax element is included in one of the following: a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a picture header, a slice header, a codec tree unit (CTU), or a codec unit (CU).
[0220] Clause 50. The method of any of clauses 48-49, wherein the at least one syntax element comprises a first syntax element indicating whether the second adjustment is to be applied to the first video block.
[0221] Clause 51. The method of any of clauses 48-50, wherein the at least one syntax element comprises a second syntax element indicating how to apply the second adjustment to the first video block.
[0222] Clause 52. The method of clause 50, wherein if the first syntax element indicates that the second adjustment is applied to the first video block, the at least one syntax element further comprises a second syntax element indicating how to apply the second adjustment to the first video block.
[0223] Clause 53. The method of any of clauses 48-49, wherein the at least one syntax element comprises a single syntax element indicating whether and how to apply the second adjustment to the first video block.
[0224] Clause 54. The method of any of clauses 48-53, wherein the at least one syntax element is encoded using one of: a fixed length codec, an Exponential Golomb (EG) codec, a truncated unary codec, or a unary codec.
[0225] Clause 55. The method of any of clauses 48-53, wherein the at least one syntax element is encoded using at least one context in arithmetic coding.
[0226] Clause 56. The method of any of clauses 48-53, wherein the at least one syntax element is bypass coded.
[0227] Clause 57. A method according to any one of clauses 1-47, wherein if the second adjustment is allowed for the first video block, at least one syntax element indicating information about at least one of the following is included in the codestream: whether the second adjustment is applied to the first video block, or how the second adjustment is applied to the first video block.
[0228] Clause 58. The method of any of clauses 1-57, wherein the current video block is included in a current frame of the video, and the current frame is encoded and decoded using a predetermined CU size and a predetermined partitioning scheme.
[0229] Clause 59. The method of clause 58, wherein the predetermined partitioning scheme comprises quadtree partitioning.
[0230] Clause 60. The method of any one of clauses 58-59, wherein the predetermined CU size comprises one of: 128 pixels×128 pixels, 64 pixels×64 pixels, 32 pixels×32 pixels, 16 pixels×16 pixels, or 8 pixels×8 pixels.
[0231] Clause 61. The method of any of clauses 1-60, wherein the current video block is a picture.
[0232] Clause 62. A method according to any of clauses 1-61, wherein whether to apply the method and / or how to apply the method is indicated at one of the following: sequence level, picture group level, picture level, slice level, or tile group level.
[0233] Clause 63. A method according to any one of clauses 1-61, wherein whether the method is applied and / or how the method is applied is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a dependency parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a tile group header.
[0234] Clause 64. The method of any of clauses 1-63, wherein whether to apply the method and / or how to apply the method depends on encoded information of the current video block.
[0235] Clause 65. The method of clause 64, wherein the encoded information comprises at least one of: block size, color format, single tree partitioning, dual tree partitioning, color component, slice type, or picture type.
[0236] Clause 66. A method according to any of clauses 1-65, wherein the method is applicable to codec tools that require frame relocation or CCLM adjustment.
[0237] Clause 67. The method of any one of clauses 1-66, wherein the converting comprises encoding the video into the bitstream.
[0238] Clause 68. The method of any of clauses 1-66, wherein the converting comprises decoding the video from the codestream.
[0239] Clause 69. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any of clauses 1-68.
[0240] Clause 70. A non-transitory computer-readable storage medium storing instructions for causing a processor to perform the method of any of clauses 1-68.
[0241] Clause 71. A non-transitory computer-readable recording medium storing a code stream of a video generated by a method performed by a device for video processing, wherein the method comprises: obtaining a first video block, the first video block being generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting the orientation of the current video block or adjusting the positions of samples in the current video block; generating a second video block based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment; and generating the code stream based on the second video block.
[0242] Clause 72. A method for storing a bitstream of a video, comprising: obtaining a first video block, wherein the first video block is generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting the orientation of the current video block or adjusting the positions of samples in the current video block; generating a second video block based on a second adjustment of the first video block, the second adjustment being an inverse process of the first adjustment; generating the bitstream based on the second video block; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device
[0243] Fig.65 A block diagram of a computing device 6500 in which various embodiments of the present disclosure may be implemented is shown. The computing device 6500 may be implemented as a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300), or may be included in a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300).
[0244] It should be understood that Fig.65 The computing device 6500 shown in the figure is for illustrative purposes only and is not intended to in any way imply any limitation on the functionality and scope of the embodiments of the present disclosure.
[0245] like Fig.65 As shown, computing device 6500 includes a general computing device 6500. Computing device 6500 may include at least one or more processors or processing units 6510, memory 6520, storage unit 6530, one or more communication units 6540, one or more input devices 6550, and one or more output devices 6560.
[0246] In some embodiments, the computing device 6500 can be implemented as any user terminal or server terminal with computing power. The server terminal can be a server provided by a service provider, a large computing device, etc. The user terminal can be, for example, any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet computer, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, and includes accessories and peripherals of these devices, or any combination thereof. It is conceivable that the computing device 6500 can support any type of interface to the user (such as a "wearable" circuit device, etc.).
[0247] The processing unit 6510 may be a physical processor or a virtual processor and may implement various processes based on a program stored in the memory 6520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the computing device 6500. The processing unit 6510 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.
[0248] The computing device 6500 typically includes various computer storage media. Such media can be any media accessible by the computing device 6500, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 6520 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (such as a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory) or any combination thereof. The storage unit 6530 can be any removable or non-removable medium, and can include machine-readable media, such as a memory, a flash drive, a disk or other media that can be used to store information and / or data and can be accessed in the computing device 6500.
[0249] The computing device 6500 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Fig.65 Although not shown in the figure, a magnetic disk drive for reading from and / or writing to a removable nonvolatile magnetic disk and an optical disk drive for reading from and / or writing to a removable nonvolatile optical disk may be provided. In this case, each drive may be connected to the bus (not shown) via one or more data medium interfaces.
[0250] The communication unit 6540 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 6500 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 6500 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general network nodes.
[0251] The input device 6550 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. The output device 6560 may be one or more of various output devices, such as a display, a speaker, a printer, etc. With the aid of the communication unit 6540, the computing device 6500 may also communicate with one or more external devices (not shown), such as storage devices and display devices, and the computing device 6500 may also communicate with one or more devices that enable a user to interact with the computing device 6500, or any device that enables the computing device 6500 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), if necessary. Such communication may be performed via an input / output (I / O) interface (not shown).
[0252] In some embodiments, some or all components of the computing device 6500 may also be arranged in a cloud computing architecture rather than being integrated in a single device. In a cloud computing architecture, components may be provided remotely and work together to implement the functions described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage services, which will not require the end user to know the physical location or configuration of the system or hardware that provides these services. In various embodiments, cloud computing provides services via a wide area network (such as the Internet) using a suitable protocol. For example, a cloud computing provider provides applications via a wide area network, which can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a remote server. The computing resources in a cloud computing environment may be merged or distributed at the location of a remote data center. Cloud computing infrastructures may provide services through a shared data center, although they appear as a single access point for users. Therefore, cloud computing architectures may be used to provide components and functions described herein from a service provider at a remote location. Alternatively, they may be provided by a conventional server, or installed directly or otherwise on a client device.
[0253] In an embodiment of the present disclosure, the computing device 6500 may be used to implement video encoding / decoding. The memory 6520 may include one or more video codec modules 6525 having one or more program instructions. These modules can be accessed and executed by the processing unit 6510 to perform the functions of the various embodiments described herein.
[0254] In an example embodiment of performing video encoding, the input device 6550 may receive video data as input 6570 to be encoded. The video data may be processed by, for example, a video codec module 6525 to generate an encoded bitstream. The encoded bitstream may be provided as output 6580 via an output device 6560.
[0255] In an example embodiment of performing video decoding, the input device 6550 may receive an encoded bitstream as input 6570. The encoded bitstream may be processed by, for example, a video codec module 6525 to generate decoded video data. The decoded video data may be provided as output 6580 via an output device 6560.
[0256] Although the present disclosure has been specifically shown and described with reference to the preferred embodiments of the present disclosure, it will be understood by those skilled in the art that various changes can be made in form and detail without departing from the spirit and scope of the present application as defined by the appended claims. These changes are intended to be encompassed by the scope of the present application. Therefore, the foregoing description of the embodiments of the present application is not intended to be limiting.
Claims
1. A method for video processing, comprising: For conversion between a video and a bitstream of the video, obtaining a first video block, where the first video block is generated based on a first adjustment of a current video block of the video, where the first adjustment includes at least one of adjusting a direction of the current video block or adjusting a position of a sample in the current video block; generating a second video block based on a second adjustment of the first video block, wherein the second adjustment is an inverse process of the first adjustment; as well as The conversion is performed based on the second video block. 2 . The method according to claim 1 , wherein the first video block is generated at an encoder and encoded into the bitstream.
3. The method according to any one of claims 1-2, wherein obtaining the first video block comprises: The first video block is obtained from the bitstream. 4 . The method according to claim 1 , wherein the second video block is used as a reference video block for encoding and decoding another video block of the video different from the current video block.
5. The method according to any one of claims 1-4, wherein the second video block is output or stored.
6. The method according to any one of claims 1 to 5, wherein the position of samples in the current video block is adjusted by flipping the current video block, and the second adjustment comprises: By flipping the first video block, positions of samples in the first video block are adjusted. The method of claim 6 , wherein the current video block is flipped vertically.
8. The method of claim 7, wherein in the first adjustment, a position of a first sample in the current video block is adjusted based on: x1'=x1, y1'=H1-y1-1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
9. The method of any one of claims 7-8, wherein the first video block is flipped vertically.
10. The method of claim 9, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on: x2'=x2, y2'=H2-y2-1, Wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and H2 represents the height of the first video block. The method of claim 6 , wherein the current video block is flipped horizontally.
12. The method of claim 11, wherein in the first adjustment, a position of a first sample in the current video block is adjusted based on: x1'=W1-x1-1, y1'=y1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
13. The method of any one of claims 11-12, wherein the first video block is flipped horizontally.
14. The method of claim 13, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on: x2'=W2-x2-1, y2'=y2, Wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
15. The method according to any one of claims 1 to 5, wherein the orientation of the current video block is adjusted by rotating the current video block, and the second adjustment comprises: By rotating the first video block, positions of samples in the first video block are adjusted. The method of claim 15 , wherein the current video block is rotated 180°.
17. The method of claim 16, wherein in the first adjustment, a position of a first sample in the current video block is adjusted based on: x1'=W1-x1-1, y1'=H1-y1-1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, W1 represents the width of the current video block, and H1 represents the height of the current video block.
18. The method of any one of claims 16-17, wherein the first video block is rotated 180°.
19. The method of claim 18, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on: x2'=W2-x2-1, y2'=H2-y2-1, Wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, W2 represents the width of the first video block, and H2 represents the height of the first video block.
20. The method of claim 15, wherein the current video block is rotated 90° clockwise.
21. The method of claim 20, wherein in the first adjustment, a position of a first sample in the current video block is adjusted based on: x1'=H1-y1-1, y1'=x1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and H1 represents the height of the current video block.
22. The method of any one of claims 20-21, wherein the first video block is rotated 270° clockwise.
23. The method of claim 22, wherein in the second adjustment, the position of the second sample in the first video block is adjusted based on: x2'=y2, y2'=W2-x2-1, Wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and W2 represents the width of the first video block.
24. The method of claim 15, wherein the current video block is rotated 270° clockwise.
25. The method of claim 24, wherein in the first adjustment, a position of a first sample in the current video block is adjusted based on: x1'=y1, y1'=W1-x1-1, Wherein x1′ represents the adjusted horizontal position of the first sample, y1′ represents the adjusted vertical position of the first sample, x1 represents the original horizontal position of the first sample, y1 represents the original vertical position of the first sample, and W1 represents the width of the current video block.
26. The method of any one of claims 24-25, wherein the first video block is rotated 90° clockwise.
27. The method of claim 26, wherein in the second adjustment, a position of a second sample in the first video block is adjusted based on: x2'=H2-y2-1, y2'=x2, Wherein x2' represents the adjusted horizontal position of the second sample, y2' represents the adjusted vertical position of the second sample, x2 represents the original horizontal position of the second sample, y2 represents the original vertical position of the second sample, and H2 represents the height of the first video block.
28. The method according to any one of claims 1 to 27, wherein if the size of the first video block is different from the size of the current video block, size information about at least one of the following is indicated in the bitstream: the width of the current video block, The height of the current video block, the width of the first video block, or The height of the first video block.
29. The method of claim 28, wherein the size information is indicated in one of the following: Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture header, Strip head, Codec Tree Unit (CTU), or Codec Unit (CU).
30. The method of any one of Claims 1-29, wherein correspondence between luma samples and chroma samples of the first video block is adjusted for a cross-component prediction codec.
31. The method of any one of claims 1-29, wherein information about at least one of the following depends on a color format of the current video block: whether to adjust the correspondence between luma samples and chroma samples of the first video block for a cross-component prediction codec, or How to adjust the corresponding relationship.
32. The method according to any one of claims 30-31, wherein the cross-component prediction codec tool comprises at least one of the following: Cross-Component Linear Model (CCLM) mode, L-CCLM mode, T-CCLM mode, or MM-CCLM mode.
33. The method according to any one of claims 31-32, wherein if the color format is the format 4:4:4, the corresponding relationship is not adjusted.
34. The method according to any one of claims 31-33, wherein if the color format is the format 4:2:0 or the format 4:2:2, the corresponding relationship is adjusted.
35. The method according to any one of claims 30-34, wherein if the color format is the format 4:2:0, the correspondence is adjusted in a first manner, and if the color format is the format 4:2:2, the correspondence is adjusted in a second manner different from the first manner.
36. The method according to any one of claims 30 to 35, wherein the type of filter used to adjust the correspondence depends on at least one of the following: the position of the current video block, or The color format.
37. The method of claim 36, wherein if the color format is format 4:2:0 and the current video block is not located on a boundary of a CTU of the video, then the filter is a 6-tap filter.
38. The method of any one of claims 36-37, wherein if the color format is format 4:2:0 and the current video block is located on a boundary of a CTU of the video, the filter is a 3-tap filter.
39. The method according to any one of claims 36-38, wherein if the color format is the format 4:2:2, the filter is a 3-tap filter.
40. The method of any one of claims 30-39, wherein the adjusted correspondence is the same as the correspondence between luma samples and chroma samples of the current video block.
41. The method of any one of claims 1-40, wherein the first adjustment is determined based on a rate-distortion optimization (RDO) process.
42. The method of claim 41, wherein luma and chroma rate distortion (RD) costs are determined for a plurality of candidate adjustment schemes, and the first adjustment comprises the candidate adjustment scheme having the lowest cost.
43. The method according to any one of claims 1-42, wherein the information about whether the second adjustment is allowed or enabled for a third video block depends on codec information of the third video block, the third video block being obtained from the code stream and different from the second video block.
44. The method according to claim 43, wherein the codec information comprises at least one of the following: Image type, Strip type, Time layer, Quantization Parameter (QP), Color format, Color components, Codec mode, or size.
45. The method of claims 43-44, wherein the second adjustment is allowed for the third video block if the third video block is on an I slice.
46. The method of any one of claims 43-45, wherein the second adjustment is not allowed for the third video block if a height of the third video block is greater than or equal to a threshold.
47. The method of claim 46, wherein the threshold is 1080 pixels.
48. The method according to any one of claims 1-47, wherein at least one syntax element indicating information about at least one of the following is included in the codestream: whether to apply the second adjustment to the first video block, or How to apply the second adjustment to the first video block.
49. The method of claim 48, wherein the at least one syntax element is included in one of: Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Picture header, Strip head, Codec Tree Unit (CTU), or Codec Unit (CU).
50. The method of any of claims 48-49, wherein the at least one syntax element comprises a first syntax element indicating whether the second adjustment is applied to the first video block.
51. The method of any of claims 48-50, wherein the at least one syntax element comprises a second syntax element indicating how to apply the second adjustment to the first video block.
52. The method of claim 50, wherein if the first syntax element indicates that the second adjustment is applied to the first video block, the at least one syntax element further comprises a second syntax element indicating how to apply the second adjustment to the first video block.
53. The method of any of claims 48-49, wherein the at least one syntax element comprises a single syntax element that indicates whether and how the second adjustment is applied to the first video block.
54. The method of any one of claims 48-53, wherein the at least one syntax element is encoded using one of: Fixed length codec, Exponential Columbus (EG) codec, truncated unary codec, or Unary codec.
55. The method according to any one of claims 48-53, wherein the at least one syntax element is encoded using at least one context in arithmetic coding.
56. The method of any one of claims 48-53, wherein the at least one syntax element is bypass coded.
57. The method of any one of claims 1-47, wherein if the second adjustment is allowed for the first video block, at least one syntax element indicating information about at least one of: whether to apply the second adjustment to the first video block, or How to apply the second adjustment to the first video block.
58. The method of any one of claims 1-57, wherein the current video block is included in a current frame of the video, and the current frame is encoded and decoded using a predetermined CU size and a predetermined partitioning scheme.
59. The method of claim 58, wherein the predetermined partitioning scheme comprises quadtree partitioning.
60. The method according to any one of claims 58-59, wherein the predetermined CU size comprises one of the following: 128 pixels × 128 pixels, 64 pixels × 64 pixels, 32 pixels × 32 pixels, 16 pixels x 16 pixels, or 8 pixels x 8 pixels.
61. The method of any one of claims 1-60, wherein the current video block is a picture.
62. The method of any one of claims 1-61, wherein whether to apply the method and / or how to apply the method is indicated at one of: Sequence level, Picture group level, Picture level, Stripe level, or Tile group level.
63. The method according to any one of claims 1-61, wherein whether to apply the method and / or how to apply the method is indicated in one of the following: Sequence header, Picture header, Sequence Parameter Set (SPS), Video Parameter Set (VPS), Dependent Parameter Set (DPS), Decoding Capability Information (DCI), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), Strip header, or Tile group header.
64. The method according to any one of claims 1-63, wherein whether to apply the method and / or how to apply the method depends on coded information of the current video block.
65. The method of claim 64, wherein the encoded information comprises at least one of: Block size, Color format, Single tree partitioning, Double tree partitioning, Color components, Strip type, or Image type.
66. The method according to any one of claims 1-65, wherein the method is applicable to codec tools that require frame relocation or CCLM adjustment.
67. The method of any one of claims 1-66, wherein the converting comprises encoding the video into the bitstream.
68. The method of any one of claims 1-66, wherein the converting comprises decoding the video from the bitstream.
69. An apparatus for video processing, comprising a processor and a non-volatile memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1-68.
70. A non-transitory computer-readable storage medium storing instructions for causing a processor to execute the method according to any one of claims 1-68.
71. A non-transitory computer-readable recording medium storing a code stream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: Obtaining a first video block, the first video block being generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting an orientation of the current video block or adjusting a position of a sample in the current video block; generating a second video block based on a second adjustment of the first video block, wherein the second adjustment is an inverse process of the first adjustment; as well as The code stream is generated based on the second video block.
72. A method for storing a video code stream, comprising: Obtaining a first video block, the first video block being generated based on a first adjustment of a current video block of the video, the first adjustment comprising at least one of adjusting an orientation of the current video block or adjusting a position of a sample in the current video block; generating a second video block based on a second adjustment of the first video block, wherein the second adjustment is an inverse process of the first adjustment; generating the bitstream based on the second video block; as well as The code stream is stored in a non-transitory computer-readable recording medium.