Method and device for video processing and medium

By introducing geometric segmentation mode and affine motion compensation into video encoding and decoding, the problem of insufficient encoding and decoding efficiency in existing technologies is solved, and more efficient video encoding and decoding is achieved.

CN121909648APending Publication Date: 2026-04-21DOUYIN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DOUYIN CO LTD
Filing Date
2024-09-25
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The efficiency of existing video encoding and decoding technologies needs to be further improved, especially in the conversion process between video units and bitstreams.

Method used

A geometric segmentation mode (GPM) is used in combination with affine motion compensation and overlap block motion compensation (OBMC) to improve encoding and decoding efficiency and performance.

Benefits of technology

By coordinating affine motion compensation and OBMC, the encoding and decoding efficiency and performance of video codecs are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121909648A_ABST
    Figure CN121909648A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a solution for video processing. A method for video processing is presented. The method comprises: for a conversion between a video unit of a video and a bitstream of the video, generating a prediction for the video unit by applying affine motion compensation, where the video unit is encoded and decoded using a geometric partition mode (GPM) mode; applying overlapped block motion compensation (OBMC) to the prediction; and performing a conversion based on the prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure generally relate to video processing techniques, and more specifically, to methods for geometric prediction patterns. Background Technology

[0002] Today, digital video capabilities are being applied to all aspects of people's lives. Various video compression technologies have been proposed for video encoding / decoding, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264 / MPEG-4 Part 10 Advanced Video Codec (AVC), ITU-TH.265 High Efficiency Video Codec (HEVC) standard, and Multi-Functional Video Codec (VVC) standard. However, the encoding and decoding efficiency of video encoding and decoding technologies is generally expected to be further improved. Summary of the Invention

[0003] Embodiments of this disclosure provide a solution for video processing.

[0004] In a first aspect, a method for video processing is proposed. This method includes: a conversion between video units and the video bitstream for video processing; generating predictions for video units by applying affine motion compensation, wherein the video units are encoded and decoded using a geometrically segmented mode (GPM); applying overlapping block motion compensation (OBMC) to the predictions; and performing the conversion based on the predictions. In this way, the affine motion in the GPM is coordinated with the OBMC, thereby improving encoding / decoding efficiency and performance.

[0005] Secondly, another method for video processing is proposed. This method includes: a conversion between video units and the video bitstream; determining whether the motion information of a segment has been modified based on whether the segmentation in the Geometric Segmentation Mode (GPM) of the video unit is encoded and decoded using affine motion compensation; and performing the conversion based on the determination. In this way, encoding and decoding efficiency and performance can be improved.

[0006] Thirdly, another method for video processing is proposed. This method includes: a conversion between video units and the video bitstream; determining a candidate list for application in the geometrical segmentation mode (GPM) of the video units based on conditions related to the video units; and performing the conversion based on the candidate list. This approach can improve encoding / decoding efficiency and performance.

[0007] Fourthly, another method for video processing is proposed. This method includes: for the conversion between video units and the video bitstream, determining whether GPM is applicable to video units, based on the applicability of Geometric Partitioning Mode (GPM) with affine motion compensation; and performing the conversion based on the determination. In this way, encoding and decoding efficiency and performance can be improved.

[0008] Fifthly, another method for video processing is proposed. This method includes: conversion between video units and video bitstreams for a given video; determining, based on the encoding / decoding information of the video units, whether and / or how to apply template-matching reordering for the GPM partitioning pattern; and performing the conversion based on the determination. In this way, encoding / decoding efficiency and performance can be improved.

[0009] In a sixth aspect, an apparatus for video processing is provided. The apparatus includes a processor and a non-transitory memory having instructions thereon. When executed by the processor, the instructions cause the processor to perform the methods according to the first, second, third, fourth, or fifth aspects of this disclosure.

[0010] In a seventh aspect, a non-transitory computer-readable storage medium is provided. This non-transitory computer-readable storage medium stores instructions that cause a processor to execute the method according to the first, second, third, fourth, or fifth aspect of this disclosure.

[0011] In the eighth aspect, another non-transitory computer-readable recording medium is proposed. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: generating predictions of video units for the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM); applying overlap block motion compensation (OBMC) to the predictions; and generating a bitstream based on the predictions.

[0012] In a ninth aspect, another non-transitory computer-readable recording medium is proposed. This non-transitory computer-readable recording medium stores video data generated as a bitstream by a method performed by an apparatus for video processing. The method includes: determining whether motion information of a segment has been modified based on whether the segmentation in a geometric segmentation pattern (GPM) of the video unit is encoded and decoded using affine motion compensation; and generating a bitstream based on the determination.

[0013] In a tenth aspect, another non-transitory computer-readable recording medium is proposed. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: determining a candidate list of video units to be applied in a geometrical segmentation mode (GPM) based on conditions relating to encoding / decoding information of video units; and generating a bitstream based on the candidate list.

[0014] In the eleventh aspect, another non-transitory computer-readable recording medium is proposed. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to video units of the video, based on whether the GPM is applicable; and generating the bitstream based on the determination.

[0015] In a twelfth aspect, another non-transitory computer-readable recording medium is proposed. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: determining, based on encoding / decoding information of video units of the video, whether and / or how to apply template-matching reordering for a GPM partitioning pattern; and generating a bitstream based on the determination.

[0016] In the thirteenth aspect, a method for storing a bitstream of video is proposed. The method includes: generating predictions for video units of the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM); applying overlap block motion compensation (OBMC) to the predictions; generating a bitstream based on the predictions; and storing the bitstream in a non-transitory computer-readable recording medium.

[0017] In the fourteenth aspect, a method for storing video bitstreams is proposed. The method includes: determining whether motion information of a segment has been modified based on whether the segmentation in the geometric segmentation mode (GPM) of the video unit is encoded and decoded using affine motion compensation; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0018] In the fifteenth aspect, a method for storing a bitstream of video is proposed. The method includes: determining a candidate list for application in a geometrical segmentation mode (GPM) of the video units based on conditions relating to encoding / decoding information of the video units; generating a bitstream based on the candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0019] In the sixteenth aspect, a method for storing a bitstream of video is proposed. The method includes: determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to video units of a video, based on whether the GPM is applicable; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0020] In the seventeenth aspect, a method for storing a bitstream of video is proposed. The method includes: determining, based on the encoding and decoding information of video units of the video, whether and / or how to apply template-matching-based reordering for a GPM partitioning pattern; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0021] This summary aims to present, in a simplified form, the concept choices further described below in the detailed embodiments. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. Attached Figure Description

[0022] The above and other objects, features, and advantages of exemplary embodiments of the present disclosure will become more apparent from 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 elements.

[0023] Figure 1 A block diagram illustrating an example video codec system according to some embodiments of the present disclosure is shown; Figure 2 A block diagram illustrating a first example video encoder according to some embodiments of the present disclosure is shown; Figure 3 A block diagram illustrating an example video decoder according to some embodiments of the present disclosure is shown; Figure 4 This shows the locations of spatial and temporal neighbor blocks used in the construction of the AMVP / Merge candidate list; Figure 5 The locations of non-adjacent candidates in the ECM are shown; Figure 6A and Figure 6B An affine motion model based on control points is shown; Figure 7 An example affine MVF for each sub-block is shown; Figure 8 The location of the inherited affine motion prediction value is shown; Figure 9 This demonstrates the inheritance of control point motion vectors; Figure 10The locations of candidate positions for the constructed affine Merge pattern are shown; Figure 11A and Figure 11B The spatial nearest neighbor used to derive the affine Merge candidate is shown; Figure 12 The affine Merge candidates from non-nearest neighbors to the constructed ones are shown; Figure 13 An example of generating HAPC is shown; Figure 14 A diagram illustrating the regression-based affine Merge candidate derivation is shown. Figure 15 This demonstrates template matching execution over the search area surrounding the initial MV; Figure 16 The template and the corresponding reference template are shown; Figure 17 A template and a reference template are shown for a block with sub-block motion that uses motion information of the current block's sub-blocks; Figure 18 The derivation of the sub-CU motion field obtained by applying motion displacement based on neighbor motion information is shown; Figure 19 An example of GPM partitioning grouped at the same angle is shown; Figure 20 The unidirectional prediction MV selection for geometric segmentation mode is shown; Figure 21 An exemplary generation of the hybrid weight w_0 using a geometric segmentation pattern is shown; Figure 22 The ramp function for weighting GPM mixing is shown, based on the displacement (d) from the predicted sample location to the GPM segmentation boundary and the mixing region size (τ). Figures 23A-23C The available IPM candidates are shown respectively; Figure 23D GPM with inter-frame and intra-frame prediction is shown; Figure 24 The edges on the template are shown; Figure 25 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown; Figure 26 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown; Figure 27 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown; Figure 28 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown; Figure 29 A flowchart of a method for video processing according to embodiments of the present disclosure is shown; and Figure 30 A block diagram of a computing device in which various embodiments of the present disclosure may be implemented is shown.

[0024] Throughout all the accompanying figures, the same or similar reference numerals generally refer to the same or similar elements. Detailed Implementation

[0025] The principles of this disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described for illustrative purposes only and to help those skilled in the art understand and implement this disclosure, and do not imply any limitation on the scope of this disclosure. In addition to the methods described below, the disclosure described herein can be implemented in various other ways.

[0026] In the following description and claims, unless otherwise defined, all scientific and technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0027] The terms "an embodiment," "embodiment," "example embodiment," etc., used in this disclosure refer to embodiments that may include specific features, structures, or characteristics, but not every embodiment is required to include that specific feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Moreover, when a specific feature, structure, or characteristic is described in conjunction with an example embodiment, it is claimed that, whether explicitly described or not, such a feature, structure, or characteristic affecting its relation to other embodiments is within the knowledge of those skilled in the art.

[0028] It should be understood that although the terms “first” and “second”, etc., may be used herein to describe various elements, these elements should not be limited to these terms. These terms are used only to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may 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.

[0029] The terminology used herein is for the purpose of describing particular embodiments only and is 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 “comprising,” “including,” “having,” “containing,” and / or “comprising” as used herein indicate the presence of the said features, elements, and / or components, but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof.

[0030] Example Environment Figure 1 This is a block diagram illustrating an example video encoding / decoding system 100 from which the techniques of this disclosure may be utilized. As shown, the video encoding / decoding 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.

[0031] Video source 112 may include sources such as video capture devices. Examples of video capture devices include, but are not limited to, interfaces for receiving video data from video content providers, computer graphics systems for generating video data, and / or combinations thereof.

[0032] Video data may include one or more images. Video encoder 114 encodes the video data from video source 112 to generate a bitstream. The bitstream may include a sequence of bits forming an encoded representation of the video data. The bitstream may include encoded images and associated data. An encoded image is an encoded representation of an image. Associated data may include sequence parameter sets, image parameter sets, and other syntax structures. I / O interface 116 may include a modulator / demodulator and / or a transmitter. Encoded video data can be directly transmitted to destination device 120 via network 130A through I / O interface 116. Encoded video data may also be stored on storage medium / server 130B for access by destination device 120.

[0033] The destination device 120 may include an I / O interface 126, a video decoder 124, and a display device 122. The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may acquire encoded video data from the source device 110 or the storage medium / server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or it may be external to the destination device 120, which is configured to interface with an external display device.

[0034] The video encoder 114 and the video decoder 124 can operate according to video compression standards, such as the High Efficiency Video Codec (HEVC) standard, the Multi-Functional Video Codec (VVC) standard, and other existing and / or future standards.

[0035] Figure 2 This is a block diagram illustrating an example of a video encoder 200 according to some embodiments of the present disclosure. The video encoder 200 may be... Figure 1 An example of a video encoder 114 in system 100 is shown.

[0036] The video encoder 200 can be configured to implement any or all of the technologies disclosed herein. Figure 2 In the example, the video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of the video encoder 200. In some examples, the processor can be configured to perform any or all of the techniques described in this disclosure.

[0037] In some embodiments, the video encoder 200 may include a segmentation unit 201, a prediction unit 202, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy coding unit 214. 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.

[0038] 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 can perform prediction in an IBC mode, in which at least one reference picture is the picture in which the current video block is located.

[0039] Furthermore, although some components (such as motion estimation unit 204 and motion compensation unit 205) can be integrated, for interpretable purposes, these components are... Figure 2 The examples are shown separately.

[0040] The segmentation unit 201 can segment an image into one or more video blocks. The video encoder 200 and the video decoder 300 can support various video block sizes.

[0041] The mode selection unit 203 can, for example, select one of several coding modes (intra-coding or inter-coding) based on the error result, and provide the resulting intra-coded or inter-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 image. In some examples, the mode selection unit 203 can select an intra-inter-prediction joint prediction (CIIP) mode, in which prediction is based on inter-prediction signals and intra-prediction signals. In the case of inter-prediction, the mode selection unit 203 can also select a resolution for the block based on the motion vector (e.g., sub-pixel precision or integer pixel precision).

[0042] To perform inter-frame prediction on the current video block, motion estimation unit 204 can generate motion information for the current video block by comparing one or more reference frames from buffer 213 with the current video block. Motion compensation unit 205 can determine the predicted video block for the current video block based on the motion information and decoded samples of images from buffer 213 other than the image associated with the current video block.

[0043] The motion estimation unit 204 and the motion compensation unit 205 can perform different operations on the current video block, for example, depending on whether the current video block is in an I-strip, P-strip, or B-strip. As used herein, an "I-strip" can refer to a portion of an image composed of macroblocks, all of which are based on macroblocks within the same image. Furthermore, as used herein, in some aspects, "P-strip" and "B-strip" can refer to portions of an image composed of macroblocks independent of macroblocks within the same image.

[0044] In some examples, motion estimation unit 204 can perform unidirectional prediction on the current video block, and can search reference images in list 0 or list 1 to find a reference video block for the current video block. Motion estimation unit 204 can then generate a reference index indicating the reference image containing the reference video block in list 0 or list 1, and a motion vector indicating the spatial displacement between the current video block and the reference video block. Motion estimation unit 204 can output the reference index, prediction direction indicator, and motion vector as motion information for the current video block. Motion compensation unit 205 can 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.

[0045] Alternatively, in other examples, motion estimation unit 204 can perform bidirectional prediction on the current video block. Motion estimation unit 204 can search for reference images in list 0 to find a reference video block for the current video block, and can also search for reference images in list 1 to find another reference video block for the current video block. Motion estimation unit 204 can then generate reference indices indicating multiple reference images containing multiple reference video blocks in lists 0 and 1, and motion vectors indicating multiple spatial displacements between the multiple reference video blocks and the current video block. Motion estimation unit 204 can output the multiple reference indices and multiple motion vectors of the current video block as motion information for the current video block. Motion compensation unit 205 can generate a predicted video block for the current video block based on the multiple reference video blocks indicated by the motion information of the current video block.

[0046] In some examples, the motion estimation unit 204 can output a complete set of motion information for use in the decoder's decoding process. Alternatively, in some embodiments, the motion estimation unit 204 can reference the motion information of another video block to transmit the motion information of the current video block via a signal. For example, the motion estimation unit 204 can determine that the motion information of the current video block is sufficiently similar to the motion information of neighboring video blocks.

[0047] In one example, motion estimation unit 204 may indicate a value to video decoder 300 in the syntax structure associated with the current video block, which indicates that the current video block has the same motion information as another video block.

[0048] In another example, motion estimation unit 204 can identify another video block and motion vector difference (MVD) in the 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. Video decoder 300 can use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0049] As discussed above, the video encoder 200 can transmit motion vectors via signals in a predictive manner. Two examples of predictive signaling techniques that can be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and Merge Pattern Signaling.

[0050] Intra-prediction unit 206 can perform intra-prediction on the current video block. When intra-prediction unit 206 performs intra-prediction on the current video block, it can generate prediction data for the current video block based on decoded samples from other video blocks in the same frame. The prediction data for the current video block can include the predicted video block and various syntax elements.

[0051] The residual generation unit 207 can generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) multiple predicted video blocks from the current video block. The residual data for the current video block may include residual video blocks corresponding to different sample components of the samples in the current video block.

[0052] 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 the subtraction operation.

[0053] The transform processing unit 208 can generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to the residual video blocks associated with the current video block.

[0054] After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 can 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.

[0055] The inverse quantization unit 210 and the inverse transform unit 211 can apply inverse quantization and inverse transform to the transform coefficient video block respectively to reconstruct the residual video block from the transform coefficient video block. The reconstruction unit 212 can add the reconstructed residual video block to the corresponding samples from one or more predicted video blocks generated by the prediction unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.

[0056] After the video block is reconstructed by reconstruction unit 212, a loop filtering operation can be performed to reduce video block artifacts in the video block.

[0057] Entropy encoding unit 214 can receive data from other functional components of video encoder 200. When entropy encoding unit 214 receives data, it can perform one or more entropy encoding operations to generate entropy-encoded data and output a bitstream including the entropy-encoded data.

[0058] Figure 3 This is a block diagram illustrating an example of a video decoder 300 according to some embodiments of the present disclosure. The video decoder 300 may be... Figure 1 An example of video decoder 124 in system 100 is shown.

[0059] The video decoder 300 can be configured to perform any or all of the technologies disclosed herein. Figure 3In the example, the video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared among the various components of the video decoder 300. In some examples, the processor can be configured to perform any or all of the techniques described in this disclosure.

[0060] exist Figure 3 In the example, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra-frame prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306, and a buffer 307. In some examples, the video decoder 300 can perform a decoding process that is generally contrasted with the encoding process described with respect to the video encoder 200.

[0061] Entropy decoding unit 301 can retrieve the encoded bitstream. The encoded bitstream may include entropy-encoded video data (e.g., encoded blocks of video data). Entropy decoding unit 301 can decode the entropy-encoded video data, and motion compensation unit 302 can determine motion information from the entropy-decoded video data, including motion vectors, motion vector precision, reference picture list indices, and other motion information. Motion compensation unit 302 can determine such information, for example, by performing AMVP and Merge pattern. AMVP is used, which involves deriving several most likely candidates based on data from neighboring PBs and reference pictures. Motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of a prediction region in a B-strip, an identifier of which reference picture list is associated with each index. As used herein, in some aspects, "Merge pattern" may refer to deriving motion information from spatially or temporally neighboring blocks.

[0062] The motion compensation unit 302 can generate motion compensation blocks and can perform interpolation based on an interpolation filter. Identifiers for the interpolation filters used at sub-pixel precision can be included in the syntax elements.

[0063] The motion compensation unit 302 can use the interpolation filter used by the video encoder 200 during the encoding of the video block to calculate the interpolated values ​​for sub-integer pixels of the reference block. The motion compensation unit 302 can determine the interpolation filter used by the video encoder 200 based on the received syntax information, and the motion compensation unit 302 can use the interpolation filter to generate the prediction block.

[0064] Motion compensation unit 302 may use at least some of the syntax information to determine the size of the blocks for encoding the encoded video sequence (multiple frames) and / or (multiple stripes), segmentation information describing how each macroblock of the image of the encoded video sequence is segmented, a pattern indicating how each segment is encoded, one or more reference frames (and a list of reference frames) for each inter-frame coded block, and other information for decoding the encoded video sequence. As used herein, in some aspects, a “strip” can refer to a data structure that can be decoded independently of other stripes of the same image in terms of entropy encoding / decoding, signal prediction, and residual signal reconstruction. A strip can be an entire image or a region of an image.

[0065] Intra-prediction unit 303 can use, for example, an intra-prediction mode received in the bitstream to form prediction blocks from spatially adjacent blocks. Dequantization unit 304 dequantizes, i.e., dequantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. Inverse transform unit 305 applies an inverse transform.

[0066] The reconstruction unit 306 can obtain the decoded block, for example, by adding the residual block to the corresponding predicted block generated by the motion compensation unit 302 or the intra-frame prediction unit 303. If necessary, a deblocking filter can also be applied to filter the decoded block to remove block artifacts. The decoded video block is then stored in a buffer 307, which provides a reference block for subsequent motion compensation / intra-frame prediction and also generates decoded video for presentation on a display device.

[0067] Some exemplary embodiments of this disclosure will be described in detail below. It should be understood that section headings are used in this document for ease of understanding and not to limit the embodiments disclosed in a section to that section only. Furthermore, although some embodiments are described with reference to multi-functional video codecs or other specific video codecs, the disclosed techniques are also applicable to other video codec techniques. Furthermore, although some embodiments describe video encoding steps in detail, it should be understood that the corresponding decoding steps corresponding to de-encoding will be implemented by the decoder. Additionally, 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 or at different compression bitrates.

[0068] 1. Brief Overview This disclosure relates to video coding and decoding techniques. Specifically, it relates to affine motion prediction methods in video coding and decoding. These ideas can be applied individually or in various combinations to any standard or non-standard video codec.

[0069] 2. Introduction The exponential growth of multimedia data poses a significant challenge to video encoding and decoding. To meet the ever-increasing demand for more efficient compression technologies, the ITU-T and ISO / IEC have developed a series of video encoding and decoding standards over the past few decades. Specifically, the ITU-T developed the H.261 and H.263 standards, and ISO / IEC developed MPEG-1 and MPEG-4 Vision. These two organizations jointly developed the H.262 / MPEG-2 video standard, the H.264 / MPEG-4 Advanced Video Codec (AVC) standard, the H.265 / HEVC standard, and the latest VVC standard. Since H.262 / MPEG-2, a hybrid video encoding and decoding framework has been adopted, utilizing intra / inter-frame prediction plus transform encoding and decoding. Figure 4 The location of spatial and temporal neighbor blocks used in the construction of the AMVP / Merge candidate list is shown.

[0070] 2.1 MVP in Video Encoding and Decoding Inter-frame prediction aims to eliminate temporal redundancy between adjacent frames and is an indispensable component in hybrid video codec frameworks. Specifically, inter-frame prediction utilizes the content specified by motion vectors (MVs) as the predicted version of the current block to be encoded / decoded, thus transmitting only residual signals and motion information in the bitstream. To reduce the cost of MV signaling, motion vector prediction (MVP) emerged as an efficient mechanism for conveying motion information. Early strategies simply used the MV of a specified neighboring block or the median MV of neighboring blocks as the MVP. H.265 / HEVC involves a contention mechanism where rate-distortion optimization (RDO) selects the best MVP from multiple candidates. Specifically, Advanced MVP (AMVP) mode and Merge mode with different motion information signaling strategies were designed. Using AMVP mode, a reference index, an MVP candidate index referencing the AMVP candidate list, and motion vector difference (MVD) are transmitted via signaling. Regarding Merge mode, only the Merge index referencing the Merge candidate list is transmitted via signaling, and all motion information associated with the Merge candidate is inherited. Both the AMVP and Merge modes require building an MVP candidate list, and the details of the building process for these two modes are described below.

[0071] AMVP mode: AMVP utilizes the spatial-temporal correlation of motion vectors with neighboring blocks for explicit transfer of motion parameters. For each list of reference images, a motion vector candidate list is constructed by first checking the availability of temporally adjacent locations to the left and top, removing redundant candidates, and adding zero vectors to make the candidate list a constant length. For the derivation of spatial motion vector candidates, the final result is based on locations such as... Figure 4The motion vectors of five blocks at different locations are shown to derive two motion vector candidates. The five neighboring blocks located at B0, B1, B2 and A0, A1 are classified into two groups: group A includes the three spatially adjacent blocks above, and group B includes the two spatially adjacent blocks to the left. The two motion vector candidates are derived using the first available candidates from groups A and B in a predefined order, respectively. For temporal motion vector candidate derivation, a motion vector candidate is derived based on two distinct co-locations checked sequentially (lower right (C0) and center (C1)), as shown... Figure 4 As shown. To avoid redundant MV candidates, duplicate motion vector candidates in the list are discarded. If the number of potential candidates is less than 2, additional zero motion vector candidates are added to the list. Figure 5 The positions of non-adjacent candidates in the ECM are shown.

[0072] Merge mode Similar to the AMVP mode, the MVP candidate list for the Merge mode also includes spatial and temporal candidates. For spatial motion vector candidate derivation, after performing availability and redundancy checks, up to four candidates are selected in the order A1, B1, B0, A0, and B2. For temporal Merge candidate (TMVP) derivation, a candidate is selected from at most two temporally neighboring blocks (C0 and C1). When there are not enough Merge candidates using both spatial and temporal candidates, a combined bidirectional prediction Merge candidate and a zero MV candidate are added to the MVP candidate list. The Merge candidate list construction process terminates once the number of available Merge candidates reaches the maximum allowed number for signal transmission.

[0073] In VVC, the construction process for the Merge mode is further improved by introducing a history-based MVP (HMVP), where the HMVP incorporates motion information from previously encoded / decoded blocks that can be far removed from the current block. In VVC, HMVP Merge candidates are appended to the Merge list, following the Spatial MVP and TMVP. In this method, motion information from previously encoded / decoded blocks is stored in a table and used as the MVP for the current CU. The table with multiple HMVP candidates is maintained using a first-in-first-out (FIFO) strategy during the encoding / decoding process. Whenever there is a non-sub-block inter-encoding / decoding CU, the associated motion information is added to the last entry of the table as a new HMVP candidate.

[0074] During the standardization of VVC, a non-adjacent MVP was proposed to facilitate better motion information derivation by utilizing non-adjacent regions. In ECM software, the non-adjacent MVP is inserted between the TMVP and HMVP, where the distance between the non-adjacent spatial candidate and the current codec block is based on the width and height of the current codec block, such as... Figure 5 As shown.

[0075] 2.2 Affine Motion Compensation Prediction In HEVC, only a translational motion model is applied for motion compensation prediction (MCP). In the real world, there are many types 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. Figure 6A and Figure 6B An affine motion model based on control points is shown. For example... Figure 6A and Figure 6B As shown, the affine motion field of a block is described by motion information from two control points (4 parameters) or three control point motion vectors (6 parameters).

[0076] For the 4-parameter affine motion model, the motion vector at the sample point position (x, y) in the block is derived as: (1); For the 6-parameter affine motion model, the motion vector at the sample point position (x, y) in the block is derived as: (2), in( mv0x, mv0y ) is the motion vector of the upper left control point, ( mv1x, mv1y ) is the motion vector of the upper right control point, and ( mv2x, mv2y ) is the motion vector of the lower left control point.

[0077] To simplify motion compensation prediction, a block-based affine transformation prediction is applied. To derive the motion vector for each 4×4 lumen sub-block, the motion vector of the center sample point of each sub-block is calculated according to the above equation (e.g., ...). Figure 7 (as shown), and rounded to 1 / 16 fractional precision. Then, a motion-compensated interpolation filter is applied to generate a prediction for each sub-block with a derived motion vector. The sub-block size for the chroma component is also set to 4×4. The MV of the 4×4 chroma sub-block is calculated as the average of the MV of the upper-left luminance sub-block and the lower-right luminance sub-block in the corresponding 8×8 luminance region.

[0078] Similar to translational motion inter-frame prediction, there are two affine motion inter-frame prediction modes: affine Merge mode and affine AMVP mode.

[0079] 2.2.1 Affine Merge Prediction The Affine Merge pattern can be applied to CUs with a width and height greater than or equal to 8. In this pattern, the CPVM of the current CU is generated based on the motion information of spatially neighboring CUs. There can be up to five CPVM candidates, and the one to be used for the current CU is indicated by a signal transmission index. In VVC, the following three types of CPVM candidates are used to form the Affine Merge candidate list: - Affine Merge candidates inferred from the CPMV of neighboring CUs; - Constructed affine Merge candidate CPMVP using translational MV derivation of neighboring CUs; -Zero MV.

[0080] In VVC, there are at most two inherited affine candidates, which are derived from the affine motion model of neighboring blocks: one from the left neighboring CU and one from the upper neighboring CU. Candidate blocks are as follows: Figure 8 As shown. For the predicted value on the left, the scan order is A0->A1, and for the predicted value above, the scan order is B0->B1->B2. Only the first inherited candidate from each side is selected. No deduplication check is performed between candidates from two inheritances. When a neighboring affine CU is identified, its control point motion vector is used to derive the CPMVP candidate in the affine Merge list of the current CU. Figure 9 As shown, if the adjacent lower-left block A is encoded and decoded in affine mode, the motion vectors of the upper-left, upper-right, and lower-left corners of the CU containing block A are obtained. , and When block A is encoded and decoded using a 4-parameter affine model, the two CPMVs of the current CU are based on... and Calculation. When block A is encoded and decoded using a 6-parameter affine model, the three CPMVs of the current CU are calculated according to... , and calculate.

[0081] Figure 8 The location of the inherited affine motion prediction value is shown. Figure 9 The inheritance of control point motion vectors is shown.

[0082] The constructed affine candidate refers to the candidate built by combining the translational motion information of the neighbors of each control point. The motion information of the control points is derived from... Figure 10The derivation is shown in the specified spatial and temporal nearest neighbors. CPMVk (k=1, 2, 3, 4) represents the k-th control point. For CPMV1, check the B2->B3->A2 block and use the MV of the first available block. For CPMV2, check the B1->B0 block, and for CPMV3, check the A1->A0 block. If the TMVP is available, use it as CPMV4.

[0083] After obtaining the motion signatures (MVs) of the four control points, affine merge candidates are constructed based on this motion information. The following combinations of control point MVs are used for sequential construction: {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}.

[0084] Combining three CPMVs constructs a 6-parameter affine merge candidate, and combining two CPMVs constructs a 4-parameter affine merge candidate. To avoid motion scaling, combinations of control point MVs are discarded if the reference indices of the control points are different. Figure 10 The locations of candidate positions for the constructed affine Merge pattern are shown.

[0085] After the inherited affine Merge candidate and the constructed affine Merge candidate are checked, if the list is still not full, a zero MV is inserted at the end of the list.

[0086] 2.2.2 Affine AMVP Prediction The affine AMVP mode can be applied to CUs with a width and height greater than or equal to 16. An affine flag at the CU level is signaled in the bitstream to indicate whether the affine AMVP mode is used, and another flag is signaled to indicate whether it is a 4-parameter affine or a 6-parameter affine. In this mode, the difference between the current CU's CPVM and its predicted CPMVP is signaled in the bitstream. The affine AMVP candidate list is of size 2 and is generated by sequentially using the following four types of CPVM candidates: Inherited affine AMVP candidates inferred from the CPMV of neighboring CUs; A constructive affine AMVP candidate CPMVP derived using translational MV of neighboring CUs; Translation MV from the neighboring CU; Zero MV.

[0087] The checking order for inherited affine AMVP candidates is the same as that for inherited affine Merge candidates. The only difference is that, for AVMP candidates, only affine CUs with the same reference picture as those in the current block are considered. No deduplication is applied when inserting inherited affine motion predictions into the candidate list.

[0088] The constructed AMVP candidate is from Figure 10 The derivation is based on the specified spatial nearest neighbors. The same checking order as in the affine Merge candidate construction is used. Additionally, the reference picture index of neighboring blocks is checked. The block that is first inter-frame encoded / decoded in the checking order and has the same reference picture as the current CU is used. This applies when the current CU is encoded / decoded in 4-parameter affine mode, and... mv0 and mv1 When all three CPMVs are available, they are added as candidates in the affine AMVP list. If the current CU is encoding / decoding in 6-parameter affine mode and all three CPMVs are available, they are added as candidates in the affine AMVP list. Otherwise, the constructed AMVP candidates are set to unavailable.

[0089] Figure 11A and Figure 11B The spatial nearest neighbors used to derive affine Merge candidates are shown: Figure 11A Used to derive affine Merge candidates for inheritance, and Figure 11B Used to derive the constructed affine Merge candidate.

[0090] If the affine AMVP list still has fewer than 2 candidates after inserting valid inherited affine AMVP candidates and constructed AMVP candidates, then when available, mv0 , mv1 and mv2 The translation MVs will be added sequentially to predict the MVs of all control points in the current CU. Finally, if the affine AMVP list is still not full, zero MVs will be used to fill the affine AMVP list.

[0091] 2.2.3 A Novel Affine Candidate Derivation Method ECM-6.0 integrates three additional affine Merge and AMVP candidate derivation methods: non-adjacent spatial domain candidates, historical parameter-based candidates, and regression-based affine candidates.

[0092] 2.2.3.1 Non-adjacent airspace candidates In ECM-6.0, the study investigated the use of non-adjacent airspace neighbors to provide candidates for both affine Merge and affine AMVP. The pattern for obtaining non-adjacent airspace candidates is... Figure 11A and Figure 11BAs shown in the diagram, similar to non-adjacent regular merge candidates, the distance between non-adjacent spatial candidates and the current codec block is also defined based on the width and height of the current CU.

[0093] Figure 11A and Figure 11B Motion information of non-adjacent spatial neighbors is used to generate additional inheritance and construct affine merge candidates. Specifically, to generate inheritance candidates, non-adjacent spatial neighbors are checked based on their distance from the current block (i.e., from nearest to farthest). At a specific distance, only the first available neighbors encoded in affine mode from each side of the current block (e.g., left and top) are included. Figure 11A As indicated, the checks of the left and top nearest neighbors are performed from bottom to top and from right to left, respectively. For the constructed candidates, such as... Figure 11B As shown, the positions of non-adjacent spatial neighbors on the left and top are first determined independently; then, the positions of the upper left neighbors can be determined accordingly to form a rectangular virtual block together with the non-adjacent neighbors on the left and top. Figure 12 This illustrates the affine Merge candidates constructed from non-nearest neighbors. Figure 12 As shown, motion information from three non-adjacent neighbors is used to form a CPMV at the top left (A), top right (B), and bottom left (C) of the virtual block, which is then projected onto the current CU to generate corresponding candidates for construction.

[0094] 2.2.3.2 Affine Candidates Based on Historical Parameters History-based Affine Model Inheritance (HAMI) allows affine models to inherit from previously affine-encoded blocks that are not adjacent to the current block. A History-based Table (HPT) is established. Each entry in the HPT stores a set of affine parameters: a, b, c, and d, each represented by a 16-bit signed integer. Entry points in the HPT are categorized by reference lists and reference indices. Each reference list in the HPT supports 5 reference indices. The HPT category (denoted as HPTCat) is calculated in a formulaic manner as follows: HPTCat (RefList, RefIdx) = 5×RefList + min (RefIdx, 4) (3) Here, RefList and RefIdx represent the list of reference images (0 or 1) and the reference index, respectively. A maximum of 7 entries can be stored for each category, resulting in a total of 70 entries in the HPT. At the beginning of each CTU row, the number of entries for each category is initialized to zero. After decoding the affine-encoded CU using the reference lists RefListcur and RefIdxcur, the affine parameters are used to update the entries in the category HPTCat(RefListcur, RefIdxcur) in a manner similar to HMVP table updates.

[0095] Candidates based on historical affine parameters (HAPC) are derived from... Figure 10 The MV is derived from a set of affine parameters in the corresponding entries stored in the HPT, represented as the neighboring 4×4 blocks A0, A1, B0, B1, or B2. The MV of the neighboring 4×4 blocks is used as the base MV. The MV of the current block at position (x, y) is calculated in a formulaic manner as follows: (4), Where (mvhbase, mvvbase) represents the MV of the nearest 4×4 block, and (xbase, ybase) represents the center position of the nearest 4×4 block. (x, y) can be the top left, top right, and bottom left corners of the current block to obtain the corner position MV (CPMV) for the current block, or it can be the center of the current block to obtain the regular MV for the current block.

[0096] Figure 13 An example of how to derive an HAPC from block A0 is shown. The affine parameters {a0, b0, c0, d0} are obtained directly from an entry in the category HPTIdx(RefListA0, refIdx0A0) in the HPT. The affine parameters from the HPT (with the center position of A0 as the base position and the MV of block A0 as the base MV) are used together to derive the CPMV for either the affine Merge HAPC or the affine AMVP HAPC. They can also be used to derive the MV located at the center of the current block as a regular Merge candidate. HAPCs can be placed into the sub-block-based Merge candidate list, the affine AMVP candidate list, or the regular Merge candidate list. In response to the introduction of new HAPCs, the size of the sub-block-based Merge candidate list is increased from 5 to 10 and 12 for random access and low-latency B configurations, respectively. Furthermore, for the random access configuration, the size of the regular Merge candidate list is increased from 10 to 11 to accommodate newly added regular Merge candidates.

[0097] 2.2.3.3 Regression-based Affine Candidates In ECM-6.0, regression-based affine merge candidates are derived and added to the affine merge list. The sub-block motion fields from previously encoded and decoded affine CUs and the motion information of neighboring sub-blocks from the current CU are used as inputs to the regression process to derive the proposed affine candidates.

[0098] Previously encoded and decoded affine CUs can be identified by scanning non-adjacent locations and the affine HMVP table. For example... Figure 14 As shown, the neighboring sub-block information of the current CU is obtained from the 4x4 sub-blocks represented by the gray area. For each sub-block, given a reference list, the corresponding motion vector and center coordinates of the sub-block can be used.

[0099] For each affine CU, at most two affine candidates can be derived: one with adjacent subblock information and one without. All candidates generated by linear regression are deduplicated and collected into a candidate subgroup. When ARMC is enabled, an ARMC process based on TM cost is applied. Subsequently, when N affine CUs are found, at most N candidates generated by linear regression are added to the affine merge list. Figure 14 This is a schematic diagram of the affine Merge candidate derivation based on regression.

[0100] 2.3 Template Matching Merge / AMVP Pattern in ECM Template Matching (TM) Merge / AMVP mode 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 image (i.e., the top and / or left neighboring blocks of the current CU) and a block in the reference image (i.e., the block of the same size as the template). Figure 15 As shown, within the search range of [-8, +8] pixels, a better MV is searched around the initial motion of the current CU. Figure 15 This shows the template matching performed on the search area around the initial MV.

[0101] In AMVP mode, an MVP candidate is determined based on the template matching error, selecting the one that minimizes the difference between the current block and the reference block template. Then, the TM process performs MV refinement only on that specific MVP candidate. The TM refines the MVP candidate using an iterative diamond search, starting with full-pixel MVD precision (or 4 pixels for 4-pixel AMVR mode) within a search range of [-8, +8] pixels. The AMVP candidate can be further refined using a cross search with full-pixel MVD precision (or 4 pixels for 4-pixel AMVR mode), followed by half-pixels and quarter-pixels sequentially depending on the AMVR mode. This search process ensures that the MVP candidate maintains the same MV precision as indicated by the Adaptive Motion Vector Resolution (AMVR) mode after the TM process.

[0102] In Merge mode, a similar search method is applied to the Merge candidates indicated by the Merge index. TMMerge can proceed up to 1 / 8 pixel MVD accuracy, or skip those accuracies beyond half-pixel MVD accuracy, depending on whether an alternative interpolation filter is used based on the motion information of the Merge (i.e., used when AMVR is in half-pixel mode). Furthermore, when TM mode is enabled, template matching can operate as a standalone process, or as an additional MV refinement process between a block-based approach and a sub-block-based bilateral matching (BM) approach, depending on whether BM is enabled according to its enable condition check. When both BM and TM are enabled for the CU, the TM search process stops at half-pixel MVD accuracy, and the resulting MV is further refined using the same model-based MVD derivation method as in DMVR.

[0103] 2.4 Adaptive Reordering of Merge Candidates (ARMC) Inspired by the spatial correlation between reconstructed neighboring pixels and the current codec block, we propose Adaptive Reordering of Merge Candidates (ARMC) to refine the order of candidates in a given candidate list. The basic assumption is that candidates with lower template matching costs have a higher probability of being selected through the RDO process and should therefore be placed earlier in the list to reduce signaling costs.

[0104] The reordering method is applied to the regular Merge pattern, the Template Matching (TM) Merge pattern, and the Affine Merge pattern (excluding SbTMVP candidates). For the TM Merge pattern, the Merge candidates are reordered before the refinement process.

[0105] After constructing the Merge candidate list, the Merge candidates are divided into several subgroups. The subgroup size is set to 5. The Merge candidates in each subgroup are reordered in ascending order based on the cost value of template matching. For simplicity, the Merge candidates in the last subgroup (not the first subgroup) are not reordered.

[0106] Template matching cost is measured by the sum of absolute differences (SAD) between the samples of the current block's template and its corresponding reference template. For example... Figure 16 As shown, the template includes a set of reconstructed samples adjacent to the current block, while the reference template is located using the same motion information of the current block. When the merge candidate utilizes bidirectional prediction, the reference samples of the merge candidate's template are also generated through bidirectional prediction.

[0107] For a sub-block-based merge candidate with a sub-block size equal to Wsub * Hsub, the upper template includes several sub-templates of size Wsub × K, and the left template includes several sub-templates of size K × Hsub. For example... Figure 17 As shown, the motion information of the sub-blocks in the first row and first column of the current block is used to derive the reference sample points of each sub-template.

[0108] 2.5 Sub-block-based temporal motion vector prediction (SbTMVP) VVC supports the Sub-Block-Based Temporal Motion Vector Prediction (SbTMVP) method. Similar to TMVP, SbTMVP leverages the motion field in the co-location image to facilitate more accurate MVP derivation. The same co-location image used by TMVP is used for SbTVMP. SbTMVP differs from TMVP primarily in two ways. First, SbTMVP enables motion prediction at the sub-CU level, while TMVP predicts motion at the CU level. Second, compared to TMVP, which obtains the temporal MV from co-location blocks in the co-location image (where the co-location block is the lower right or center block relative to the current CU), SbTMVP applies motion displacement before obtaining temporal motion information from the co-location image. This motion displacement is obtained by reusing the MV of one item from the spatial neighboring block of the current CU. Figure 16 The template and the corresponding reference template are shown.

[0109] Figure 18 The derivation process of the sub-block level motion field for SbTMVP is shown. Specifically, the motion information of the lower left sub-block A1 is first obtained. If any MV in reference list 0 and list 1 points to the same frame, the corresponding MV will be identified as the motion displacement. Otherwise, zero MV will be used as the motion displacement.

[0110] Once the motion displacement is determined, a designated region in the same frame is used to derive the sub-block-level motion field. Assuming... Figure 15 As shown, the motion of A1 is used as the motion displacement. Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid covering the center sample point) in the co-location image is obtained to provide motion information, wherein the MV scaling operation is first performed to align the reference frame of the temporal motion vector with the reference frame of the current CU. Figure 17 Templates and reference templates are shown for blocks with sub-block motion that use motion information of the current block's sub-blocks. Figure 18 The derivation of the sub-CU motion field obtained by applying motion displacement based on neighbor motion information is shown.

[0111] In VVC and ECM, in addition to the CU-level MVP candidate list, a sub-CU-level MVP candidate list is constructed to provide more accurate motion predictions for the current CU. This sub-CU-level MVP candidate list includes the motion field generated by both SbTMVP and affine methods. Specifically, only one SbTMVP candidate is included, and this SbTMVP candidate is always placed as the first entry in the constructed sub-CU-level MVP candidate list. Multiple affine candidates are included in the list after performing template matching-based reordering, with those affine candidates with lower costs placed earlier.

[0112] 2.6 Geometric Partitioning (GPM) In VVC, geometric segmentation modes are supported for inter-frame prediction. Geometric segmentation modes are transmitted via signaling using CU-level flags as a merge mode, where other merge modes include regular merge mode, MMVD mode, CIIP mode, and sub-block merge mode. This applies to each possible CU size. (in (excluding 8x64 and 64x8), the geometric segmentation mode supports a total of 64 segments.

[0113] When this mode is used, the CU is divided into two geometric segments by a geometrically positioned straight line. Figure 19 The position of the segmentation line is mathematically derived from the angle and offset parameters of a specific segment. Each part of the geometric segmentation in the CU is predicted inter-frame using its own motion; only unidirectional prediction is allowed for each segment, meaning each part has one motion vector and one reference index. Unidirectional prediction motion constraints are applied to ensure that, as with regular bidirectional prediction, each CU requires only two motion-compensated predictions.

[0114] If a geometric segmentation pattern is used for the current CU, the geometric segmentation pattern (angle and offset) and two merge indices (one for each segment) are further indicated via signal transmission. The number of maximum GPM candidate sizes is explicitly transmitted in SPS, and syntax binarization is specified for the GPM merge indices. After predicting each part of the geometric segmentation, a blending process with adaptive weights is used to adjust the sample values ​​along the geometric segmentation edges. This is the prediction signal for the entire CU, and the transformation and quantization processes are applied to the entire CU as in other prediction patterns. Finally, the motion field of the CU predicted using the geometric segmentation pattern is stored.

[0115] 2.6.1 Construction of One-Way Prediction Candidate List The unidirectional prediction candidate list is directly derived from the Merge candidate list constructed according to the extended Merge prediction process. Let n denote the index of the unidirectional prediction motion in the geometric unidirectional prediction candidate list. The LX motion vector of the nth extended Merge candidate (where X equals the parity of n) is used as the nth unidirectional prediction motion vector for the geometric segmentation pattern. These motion vectors in... Figure 20 The value is marked with "x". If the corresponding LX motion vector of the nth extended Merge candidate does not exist, the L(1-X) motion vector of the same candidate is used as the unidirectional predicted motion vector for the geometric segmentation pattern.

[0116] 2.6.2 Blending along geometric segmentation edges After predicting each segment of the geometric segment using its own motion, a blend is applied to the two predicted signals to derive samples around the segmentation edges. The blending weights at each location of the CU are derived based on the distance between the individual location and the segmentation edge.

[0117] Location The distance to the segmentation edge is derived as follows: (2-1) (2-2) (2-3) (2-4) in These are indices used for the angles and offsets of the geometric segmentation, which depend on the geometric segmentation index transmitted via signals. and The sign depends on the angle index. .

[0118] The weights of each part of the geometric segmentation are derived as follows: (2-5) (2-6) (2-7) partIdx depends on the angle index Weight An example in Figure 21 As shown in the image, the Figure 21 The mixed weights using geometric segmentation patterns are shown. An example of generation.

[0119] 2.6.3 Geometric Partitioning Pattern (GPM) with Merge Motion Vector Difference (MMVD) GPM in VVC is extended by applying motion vector refinement on top of the existing unidirectional MV of GPM. First, a flag is transmitted to the GPMCU to specify whether to use this mode. If this mode is used, each geometric segment of the GPM CU can further determine whether to transmit MVD via signal transmission. If MVD is transmitted via signal transmission for a geometric segment, the segment's motion is further refined using the transmitted MVD information after selecting a GPM Merge candidate. All other processes are the same as in GPM.

[0120] Similar to MMVD, MVD is transmitted as a pair of distance and direction via signals. In GPM with MMVD (GPM-MMVD), 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) are involved. Additionally, when pic_fpel_mmvd_enabled_flag equals 1, MVD is shifted left by 2, just as in MMVD.

[0121] 2.6.4 Geometric Partitioning Mode with Adaptive Blending (GPM) In VVC, the final predicted samples are generated by weighted averaging of the predictions from the two predicted signals. This is achieved using two integer mixing matrices (…). W 0 and W 1). The weights in the GPM blending matrix are derived from the ramp function based on the displacement from the predicted sample location to the GPM segmentation boundary. The blending region size is fixed at 2 (2 samples on each side of the GPM segmentation boundary).

[0122] The blending process in ECM is improved by adding four additional blending region sizes (one-quarter, half, twice, and four times the existing region size), such as Figure 22 As shown. The CU-level flags are encoded and decoded to accommodate the selected mixing region size via signal transmission. Furthermore, extended weighted precision is utilized, where the maximum value of the weights is changed from 8 (in VVC) to 32 to accommodate the extended mixing region size. Figure 22 The ramp function for GPM mixing is shown, based on the displacement (d) from the predicted sample location to the GPM segmentation boundary and the size of the mixing region (τ).

[0123] 2.6.5 Geometric Segmentation Pattern (GPM) with Template Matching (TM) Template matching is applied to GPM. When GPM mode is enabled for CU, a CU-level flag is transmitted via signaling to indicate whether TM is applied to the two geometric segments. Motion information for each geometric segment is refined using TM. When TM is selected, a template is constructed using left, top, or left and top neighboring samples based on the segmentation angle, as shown in Table 1. Motion is then refined by minimizing the difference between the current template and the template in the reference image using the same search pattern in Merge mode with half-pixel interpolation filters disabled.

[0124] Table 1. Templates for the first and second geometric segments, where A indicates the use of the top sample point, L indicates the use of the left sample point, and L+A indicates the use of both the left and top samples.

[0125]

[0126] The GPM candidate list is constructed as follows: The interleaved list 0 MV candidates and list 1 MV candidates are directly derived from the regular merge candidate list, where list 0 MV candidates have a higher priority than list 1 MV candidates. A deduplication method with an adaptive threshold based on the current CU size is applied to remove redundant MV candidates.

[0127] The interleaved list 1 MV candidates and list 0 MV candidates are further derived directly from the regular merge candidate list, where list 1 MV candidates have a higher priority than list 0 MV candidates. The same deduplication method with an adaptive threshold is also applied to remove redundant MV candidates.

[0128] Zero MV candidates are filled until the GPM candidate list is full.

[0129] GPM-MMVD and GPM-TM are exclusively enabled to a single GPM CU. This is done first by signaling the GPM-MMVD syntax. When both GPM-MMVD control flags are false (i.e., GPM-MMVD is disabled for both GPM segments), the GPM-TM flag is signaled to indicate whether template matching is applied to both GPM segments. Otherwise (if at least one GPM-MMVD flag is true), the value of the GPM-TM flag is presumed to be false.

[0130] 2.6.6 GPM with inter-frame and intra-frame prediction In GPM with inter-frame and intra-frame prediction, the final prediction samples are generated by weighting the inter-frame and intra-frame prediction samples of the regions separated by each GPM. Inter-frame prediction samples are derived from the inter-frame GPM, while intra-frame prediction samples are derived from the intra-frame prediction mode (IPM) candidate list and the index from the encoder transmitted through the signal. The IPM candidate list size is predefined as 3. Available IPM candidates are the parallel angle mode (parallel mode) for GPM block boundaries, the vertical angle mode (vertical mode) for GPM block boundaries, and the planar mode, such as... Figures 23A to 23C As shown. Furthermore, as... Figure 23D The GPM with intra-frame and intra-frame prediction shown is constrained to reduce signaling overhead for IPM and avoid increasing the size of intra-frame prediction circuitry on the hardware decoder. Additionally, direct motion vectors and IPM storage are introduced over the GPM mixing region to further improve encoding / decoding performance.

[0131] In IPM derivation based on DIMD and neighboring modes, parallel modes are registered first. Therefore, if no identical IPM candidates exist in the list, up to two IPM candidates can be registered using the decoder-side intra-frame mode derivation (DIMD) method and / or neighboring block derivation. As for neighboring mode derivation, there are up to five locations for available neighboring blocks, but these are limited by the angles of the GPM block boundaries as shown in Table 2, which have already been used for GPM with template matching (GPM-TM).

[0132] Table 2. Positions of available neighboring blocks for IPM candidate derivation based on the angle of the GPM block boundary. A and L represent the top and left sides of the predicted block.

[0133]

[0134] GPM-intraframe can be combined with GPM with Merge and Motion Vector Difference (GPM-MMVD). TIMD is used as an IPM candidate for GPM-intraframe to further improve encoding and decoding performance. Parallel modes can be registered first, followed by TIMD, DIMD, and IPM candidates for neighboring blocks.

[0135] 2.6.7 Template Matching-Based Reordering for GPM Partitioning Patterns In template-matching-based reordering for GPM partitioning patterns, given the motion information of the current GPM block, the corresponding TM generation value for each GPM partitioning pattern is calculated. Then, all GPM partitioning patterns are reordered in ascending order based on their TM generation values. Instead of sending the GPM partitioning patterns, an index using Golomb-Rice codes is used in signaling to indicate where the exact GPM partitioning pattern is located in the reordering list.

[0136] The GPM partitioning pattern reordering method is a two-step process performed after the corresponding reference templates for the two GPM partitions in the encoding / decoding unit are generated, as follows: The GPM segmentation edge is extended to the reference templates of the two GPM segments, resulting in 64 reference templates, and the corresponding TM cost of each of the 64 reference templates is calculated. The TM generation values ​​based on the GPM partitioning pattern are reordered in ascending order, and the 32 best partitioning patterns are marked as available partitioning patterns.

[0137] like Figure 24 As shown, the edges on the template extend from the edges of the current CU, but the GPM blending process is not applied to the template regions across the edges.

[0138] After ascending reordering using the TM cost, the index is transmitted via signaling.

[0139] 2.6.8 Motion field storage for geometric segmentation patterns Mv1 from the first part of the geometric segmentation, Mv2 from the second part of the geometric segmentation, and the combination Mv of Mv1 and Mv2 are stored in the motion field of the CU encoded and decoded by the geometric segmentation pattern.

[0140] The type of motion vector stored for each individual location in the sports field is determined as follows:

[0141] Where motionIdx equals It is recalculated from equation (2-36). partIdx depends on the angle index. .

[0142] If sType equals 0 or 1, then Mv0 or Mv1 is stored in the corresponding motion field; otherwise, if sType equals 2, the combined Mv from Mv0 and Mv2 is stored. The combined Mv is generated using the following process: 1) If Mv1 and Mv2 come from different lists of reference images (one from L0 and the other from L1), then Mv1 and Mv2 are simply combined to form a bidirectional predicted motion vector.

[0143] 2) Otherwise, if Mv1 and Mv2 come from the same list, only the unidirectional predicted motion Mv2 is stored.

[0144] 2.7 Multiple Hypothesis Prediction (MHP) In the multi-hypothesis inter-frame prediction mode (JVET-M0425), in addition to the regular bidirectional prediction signal, one or more additional motion-compensated prediction signals are transmitted via signal transmission. The resulting overall prediction signal is obtained by sample-by-sample weighted superposition. Utilizing the bidirectional prediction signal... and the first additional inter-frame prediction signal / hypothesis The generated prediction signal The following was obtained:

[0145] According to the following mapping, the weighting factor It is specified by the new syntax element add_hyp_weight_idx.

[0146]

[0147] Similar to the above, more than one additional prediction signal can be used. The resulting overall prediction signal is iteratively accumulated with each additional prediction signal.

[0148]

[0149] The resulting overall prediction signal is obtained as the last one. (i.e., has the largest index) of Within this EE, a maximum of two additional prediction signals can be used (i.e., Limited to 2).

[0150] The motion parameters for each additional prediction hypothesis can be transmitted via signaling by explicitly specifying the reference index, motion vector prediction index, and motion vector difference, or by implicitly specifying the merge index. A separate multi-hypothesis merge flag distinguishes between these two signaling modes.

[0151] For inter-frame AMVP mode, MHP is applied only when unequal weights are selected in BCW in bidirectional prediction mode.

[0152] Combining MHP and BDOF is possible; however, BDOF is only applied to the bidirectional prediction signal portion of the predicted signal (i.e., the ordinary first two assumptions).

[0153] 2.8 Affine Motion Compensation in Geometric Prediction Mode A sub-block-based motion compensation method was proposed that can be used in GPM mode.

[0154] a) In one example, sub-block-based motion compensation can be affine motion compensation.

[0155] b) In one example, sub-block-based motion compensation could be sbTMVP motion compensation.

[0156] c) In one example, the prediction of at least one geometric segmentation can be generated using sub-block-based motion compensation, such as affine motion compensation.

[0157] d) In one example, the final prediction can be generated by a weighted sum of two predictions, where at least one prediction is generated using sub-block-based motion compensation such as affine motion compensation.

[0158] i. In one example, the weighted sum is performed using weights defined by GPM.

[0159] e) In one example, the two predictions used in the GPM pattern can be type A and type B, where type A and type B can be (type A and type B can be the same type): i. Non-affine inter-frame prediction; ii. Affine inter-frame prediction; iii. Intra-frame prediction; iv. Intra-block copy (IBC) prediction; v. sb-TMVP inter-frame prediction; vi. Any combination or generated prediction.

[0160] abbreviation ACT Adaptive Color Transformation ALF Adaptive Loop Filter AMVR Adaptive Motion Vector Resolution APS Adaptive Parameter Set AU Access Unit AUD access unit separator AVC (Advanced Video Coding) (Recommendation ITU-T H.264 | ISO / IEC 14496-10) B Two-way prediction BCW features bidirectional prediction with CU-level weights. BDOF bidirectional optical flow BDPCM is based on block-based incremental pulse coding and decoding modulation. BP caching period CABAC Context-Based Adaptive Binary Arithmetic Encoding and Decoding CB codec block CBR constant bit rate CCALF Cross-Component Adaptive Loop Filter CPB encoded / decoded image cache CRA completely random access CRC Cyclic Redundancy Check CTB codec tree block CTU encoding / decoding tree unit CU encoding / decoding unit CVS encoded video sequence DPB decodes image cache DCI decoding capability information DRAP depends on random access point DU decoding unit DUI Decoding Unit Information EG Index - Golomb EGk k-th exponent - Golomb EOB bitstream ends EOS sequence ends FD Fill Data FIFO (First In First Out) FL fixed length GBR green, blue and red GCI General Constraints Information GDR is being gradually decoded and refreshed. GPM geometric segmentation mode HEVC High-Efficiency Video Codec (Recommendation ITU-T H.265 | ISO / IEC 23008-2) HRD Hypothetical Reference Decoder HSS Hypothesis Flow Scheduler In-frame encoding / decoding IBC Intra-Block Copying IDR instant decoding refresh ILRP Inter-Frame Layer Reference Image IRAP Intra-Frame Random Access Point LFNST low-frequency non-separable transform LIC local lighting compensation LPS's least likely symbol LSB least significant bit LTRP Long-Term Reference Image LMCS with chroma scaling luminance mapping MIP-based intra-frame prediction MPS's most likely symbol MSB most significant bit MTS Multiple Transformation Selection MVP motion vector prediction NAL Network Abstraction Layer OBMC Overlap Block Motion Compensation OLS Output Layer Set OP operation point OPI Operation Point Information P prediction PH image header POC image sequential counting PPS Image Parameter Set PROF refines the prediction using optical flow. PT image timer PU image unit QP quantization parameters RADL random access decodeable front-end (image) RASL random access skipped prerequisites (image) RBSP raw byte sequence payload RGB red, green and blue RPL Reference Image List SAO Sample Adaptive Compensation SAR sample amplitude ratio SEI Supplemental Enhancement Information SH strip head SLI sub-picture level information SODB data bit string SPS sequence parameter set STRP Short-Term Reference Image STSA Stepwise Temporal Sublayer Access TR truncated rice grain VBR Variable Bit Rate VCL video codec layer VPS Video Parameter Set VSEI Multifunctional Supplemental Enhancement Information (Recommendation ITU-T H.274 | ISO / IEC 23002-7) VUI Video Availability Information VVC Multi-Functional Video Codec (Recommendation ITU-T H.266 | ISO / IEC 23090-3) 3. Problems to be solved In existing technologies, affine motion can also be used to generate predictions in GPM. However, it is currently unclear how to coordinate affine motion in GPM with other encoding / decoding tools.

[0161] 4. Detailed Solution In this disclosure, we propose to refine the affine CPMV using template matching. For a given affine candidate in the affine candidate list, the CPMV can be further refined using template matching, and the refined affine candidate is then used to derive sub-block or pixel-level affine motion information for the current block.

[0162] The detailed embodiments described below should be considered as examples for explaining general concepts. These embodiments should not be interpreted in a narrow sense. Furthermore, these embodiments can be combined in any way.

[0163] The terms “video unit” or “code-decoder unit” or “block” can refer to code-decoder tree block (CTB), code-decoder tree unit (CTU), code-decoder block (CB), CU, PU, ​​TU, PB, TB.

[0164] The term "affine block" can refer to a block encoded using affine Merge, affine AMVP, or any other affine variant mode (i.e., affine MMVD, etc.), which can be described by motion information of two control points (4 parameters) or three control point motion vectors (6 parameters). The term "CPMV" can refer to the motion information of an affine block at its top-left, top-right, and / or bottom-left corners.

[0165] The term "template" can refer to a reconstructed region that can be used to refine a CPMV, and it can mean either a "separate template" or a "uniform template." Here, a "separate template" can refer to a reconstructed region that can be used to refine a single CPMV (i.e., one of the top-left, top-right, and / or bottom-left corners), while a "uniform template" can refer to a reconstructed region that can be used to refine all or any (multiple) CPMVs for a block. The term "template matching cost" or "TM cost" can refer to the matching cost of a separate template or the matching cost of a uniform template.

[0166] In this disclosure, with respect to "blocks encoded and decoded in mode N", "mode N" can be a prediction mode (e.g., MODE_INTRA, MODE_INTER, MODE_PLT, MODE_IBC, etc.) or encoding / decoding techniques (e.g., DIMD, TIMD, PDPC, CCLM, CCCM, GLM, intra-frame TMP, AMVP, SMVD, Merge, BDOF, PROF, DMVR, AMVR, TM, affine, CIIP, GPM, spatial GPM, SGPM, GPM inter-frame to inter-frame, GPM intra-frame to intra-frame, GPM inter-frame to intra-frame, MHP, GEO, TPM, MMVD, BCW, HMVP, SbTMVP, LIC, OBMC, ALF, deblocking, SAO, bilateral filter, LMCS and corresponding variants, etc.).

[0167] It should be noted that the terms mentioned below are not limited to the specific terms defined in existing standards. Any changes to encoding / decoding tools also apply.

[0168] 1. It was proposed that OBMC can be used for affine motion compensation in GPM.

[0169] a) In one example, OBMC can be applied to a fusion prediction in GPM, which is generated by fusing (such as weighted averaging) two predictions from two GPM segments.

[0170] i. In one example, OBMC is not applied to the prediction of GPM segmentation prior to fusion.

[0171] ii. In one example, at least one of the two predictions can be generated using affine motion compensation.

[0172] iii. In one example, OBMC can utilize motion information stored in blocks by GPM for fusion prediction.

[0173] iv. In one example, OBMC can be applied to fusion prediction in the first manner for affine prediction.

[0174] v. In one example, OBMC can be applied to fusion prediction in a second way for non-affine prediction.

[0175] vi. In one example, whether OBMC is applied to fusion prediction in the first or second manner can depend on whether the GPM segmentation is affine encoded and / or how the blocks are divided in GPM mode.

[0176] b) In one example, OBMC can be applied to the prediction of GPM segmentation prior to fusion.

[0177] i. In one example, OBMC is not applied to the fusion prediction in GPM.

[0178] ii. In one example, at least one of the two predictions can be generated using affine motion compensation.

[0179] iii. In one example, OBMC can utilize motion information used for GPM segmentation to be applied to GPM segmentation prediction.

[0180] iv. In one example, OBMC can be applied to the prediction prior to fusion in a first manner for affine prediction.

[0181] v. In one example, OBMC can be applied to the prediction prior to fusion in a second way for non-affine predictions.

[0182] vi. In one example, whether OBMC is applied to the prediction in the first or second manner before fusion may depend on whether the GPM segmentation is affine encoded or decoded.

[0183] c) Whether OBMC is applied to GPM blocks before or after the fusion process can depend on the encoding / decoding mode of at least one GPM segment.

[0184] i. In one example, if the GPM segmentation is intra-predictive coding and decoding, then OBMC can be applied to the GPM block before the fusion process.

[0185] ii. In one example, if the GPM segmentation is encoded and decoded using affine prediction, the OBMC can be applied to the GPM block prior to the fusion process.

[0186] iii. In one example, if the GPM segmentation is encoded and decoded in GPM-MMVD mode, the OBMC can be applied to the GPM block prior to the fusion process.

[0187] iv. In one example, if the GPM segmentation is encoded and decoded in GPM-TM mode, the OBMC can be applied to the GPM block prior to the fusion process.

[0188] v. In one example, if the GPM segmentation is unidirectional predictive encoding / decoding, then OBMC can be applied to the GPM block prior to the fusion process.

[0189] vi. In one example, if the GPM segmentation is bidirectional predictive encoding / decoding, the OBMC can be applied to the GPM block prior to the fusion process.

[0190] vii. In one example, if the GPM segmentation is intra-predictive coding and decoding, then OBMC can be applied to the GPM block after the fusion process.

[0191] viii. In one example, if the GPM segmentation is encoded and decoded using affine prediction, then OBMC can be applied to the GPM block after the fusion process.

[0192] ix. In one example, if the GPM segmentation is encoded and decoded in GPM-MMVD mode, the OBMC can be applied to the GPM block after the fusion process.

[0193] x. In one example, if the GPM segmentation is encoded and decoded in GPM-TM mode, the OBMC can be applied to the GPM block after the fusion process.

[0194] xi. In one example, if the GPM segmentation is unidirectional predictive encoding / decoding, then OBMC can be applied to the GPM block after the fusion process.

[0195] xii. In one example, if the GPM segmentation is bidirectional predictive encoding / decoding, the OBMC can be applied to the GPM block after the fusion process.

[0196] d) In one example, whether and how OBMC is applied in GPM can depend on encoding / decoding information such as block width / height, QP, encoding / decoding mode, etc.

[0197] 2. It was proposed that ARMC could be applied to modify the candidate list used in GPM.

[0198] a) In one example, the candidate list used in GPM can be reordered before it is used in GPM.

[0199] i. In one example, after reordering the list, if the cost of the first candidate is less than (or not greater than) the cost of the second candidate, then the first candidate can be placed before the second candidate in the list.

[0200] 1) In one example, the cost of a candidate can be calculated as the distortion (such as SAD) between the template of the current block and the reference template derived from the candidate's motion information and / or intra-prediction mode.

[0201] ii. In one example, the first Merge candidate list can be reordered when it is used in GPM.

[0202] iii. In one example, the second candidate list derived from the first Merge candidate list for GPM can be reordered.

[0203] 1) In one example, the second candidate list may consist of only one-way predicted candidates.

[0204] iv. In one example, when the affine Merge candidate list is used in GPM, the affine Merge candidate list can be reordered.

[0205] 1) In one example, the reference template for the affine Merge candidate can consist of multiple sub-templates that are localized using motion information derived through the affine model.

[0206] a) In one example, the motion vector of a sub-template can be derived using an affine model for a position (such as the center position) within the sub-template.

[0207] b) In one example, the motion vector of a sub-template can be set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0208] 2) In one example, the first affine Merge candidate list, which includes bidirectional predictions, can be reordered when it is used in GPM.

[0209] 3) In one example, the second affine Merge candidate list can be reordered when it is used in GPM and only includes one-way predictions.

[0210] a) The second affine Merge candidate list can be derived from the first affine Merge candidate list.

[0211] v. In one example, when ARMC is applied in GPM, candidates in the list can be divided into multiple groups. Candidates are compared and reordered only within the same group. The order of different groups can be fixed.

[0212] b) In one example, GPM-MMVD candidates can be reordered.

[0213] c) In one example, whether and / or how modifications (such as reordering) are made may depend on codec information such as block width / height, QP, codec mode, etc.

[0214] i. For example, the first category of candidate lists in GPM is reordered, but the second category of candidate lists in GPM is not reordered.

[0215] 1) For example, the first type of candidate list is an affine Merge candidate list, and the second type of candidate list is a non-affine Merge candidate list.

[0216] 3. In one example, whether and how to apply template-matching reordering for the GPM partitioning pattern can depend on encoding / decoding information such as block width / height, QP, encoding / decoding pattern, etc.

[0217] a) In one example, whether and / or how the GPM partitioning pattern is reordered may depend on whether the GPM partitioning is encoded and decoded using affine motion compensation.

[0218] 1) For example, a reference template for reordering GPM partitioning patterns can be generated through affine model derivation. For example, the reference template can consist of multiple sub-templates that are located using motion information derived through affine model derivation.

[0219] a) In one example, the motion vector of a sub-template can be derived using an affine model for a position (such as the center position) within the sub-template.

[0220] b) In one example, the motion vector of a sub-template can be set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0221] b) In one example, whether a reference template for reordering GPM partitioning patterns is generated by affine model derivation may depend on whether the corresponding GPM partitioning is encoded or decoded using affine motion compensation.

[0222] i. For example, if the corresponding GPM segmentation is encoded and decoded using affine motion compensation, then the reference template for reordering the GPM segmentation pattern can be generated by affine model derivation.

[0223] ii. For example, if the corresponding GPM segmentation is not encoded using affine motion compensation, the reference template for reordering the GPM segmentation pattern may not be generated by affine model derivation.

[0224] 4. In one example, whether the motion information of the segment in GPM can be modified may depend on whether the segment is encoded and decoded using affine motion compensation.

[0225] a) In one example, the segmented motion information in GPM can be modified by MMVD.

[0226] b) In one example, the segmented motion information in the GPM can be modified by the TM.

[0227] c) In one example, if the segmentation in the GPM is encoded and decoded using affine motion compensation, then the motion information of the segmentation in the GPM cannot be modified by MMVD.

[0228] i. Alternatively, if the motion information is modified by MMVD, then the segmentation in GPM cannot be encoded or decoded using affine motion compensation.

[0229] d) In one example, if the segmentation in the GPM is encoded and decoded using affine motion compensation, then the motion information of the segmentation in the GPM cannot be modified by the TM.

[0230] i. Alternatively, if the motion information is modified by TM, then the segmentation in GPM cannot be encoded or decoded using affine motion compensation.

[0231] 5. In one example, different candidate lists can be applied in different situations within GPM.

[0232] a) In one example, which candidate list to use for GPM splitting may depend on whether MMVD GPM is applied for GPM splitting.

[0233] i. For example, if MMVD GPM is not applied to GPM segmentation, the first candidate list can be used for GPM segmentation, where the first candidate list can include bidirectional prediction candidates. For example, the first candidate list can be the same as the regular Merge candidate list.

[0234] ii. For example, if MMVD GPM is applied to GPM segmentation, a second candidate list can be used for GPM segmentation, wherein the second candidate list cannot include bidirectional prediction candidates.

[0235] 1) The second candidate list can be derived from the first candidate list.

[0236] a) For example, if candidate K in the first candidate list is a one-way prediction candidate, then candidate K in the second candidate list can be copied from candidate K in the first candidate list.

[0237] b) For example, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list can be set to the motion of reference list 0 that references candidate K in the first candidate list.

[0238] c) For example, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list can be set to the motion of reference list 1 that references candidate K in the first candidate list.

[0239] d) For example, whether a candidate K in the second candidate list is set to reference list 0 or reference list 1 of candidate K in the first candidate list can depend on the parity of K.

[0240] i. For example, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list can be set to the motion of the reference list [K&1] of candidate K in the first candidate list.

[0241] ii. For example, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list can be set to the motion of the reference list [(K+1)&1] of candidate K in the first candidate list.

[0242] iii. In one example, the candidate list can be an affine candidate list or a non-affine candidate list.

[0243] 6. In one example, whether GPM is applicable under certain conditions may depend on whether GPM using affine motion compensation is applicable.

[0244] a) In one example, assuming the width and height of the current block are represented as W and H respectively, the following rules can be applied: i. If GPM using affine motion compensation is not applicable, then GPM is only applicable if TW0 <= W <= TW1 and TH0 <= H <= TH1. For example, TW0 = TH0 = 8 and TW1 = TH1 = 64.

[0245] ii. If GPM using affine motion compensation is applicable, then GPM is applicable only if TW0'<=W<=TW1' and TH0'<=H<=TH1', and 1) TW0' may not be equal to TW0; 2) TW1' may not be equal to TW1; 3) TH0' may not be equal to TH0; 4) TH1' may not be equal to TH1; 5) For example, TW0'=TH0'=16 and TW1'=TH1'=128.

[0246] b) If the GPM is applicable only under certain conditions (e.g., W or H equals 128) when the GPM with affine motion compensation is applicable, it can be implicitly determined that the GPM with affine motion compensation should be performed without signal transmission.

[0247] c) If the GPM is applicable only under certain conditions (e.g., W or H equals 8) when the GPM using affine motion compensation is not applicable, it can be implicitly determined that the GPM without affine motion compensation should be executed without signal transmission.

[0248] General aspects 7. Additional operations can be applied to the proposed method or applied together with the proposed method.

[0249] a) The syntax elements disclosed above can be binarized into flags, fixed-length codes, EG(x) codes, unary codes, rounded unary codes, rounded binary codes, etc. Syntax elements can be signed or unsigned.

[0250] b) If a codec tool or codec method is deemed unsuitable or unusable, it means that the syntax elements of the codec tool or codec method may not be transmitted via signal and may be implicitly determined to be unused.

[0251] c) The syntax elements disclosed above can be encoded or decoded using at least one context model. Alternatively, the syntax elements can be encoded or decoded in a bypass manner.

[0252] d) The above-disclosed grammatical elements can be transmitted conditionally via signals.

[0253] a. SE is transmitted via signal only if the corresponding function is applicable.

[0254] b. SE is transmitted via signal only if the dimensions (width and / or height) of the block meet the conditions.

[0255] e) The syntax elements disclosed above can be transmitted via signaling at the block level / sequence level / picture group level / picture level / strip level / piece group level, such as in the codec structure of CTU / CU / TU / PU / CTB / CB / TB / PB, or in the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / strip header / piece group header.

[0256] f) Whether and / or how the methods disclosed above are applied can be transmitted via signal at the block level / sequence level / picture group level / picture level / strip level / piece group level, such as in the codec structure of CTU / CU / TU / PU / CTB / CB / TB / PB, or in the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / strip header / piece group header.

[0257] g) Whether and how to apply the methods disclosed above may depend on the encoded / decoded information, such as block size, color format, single-tree splitting / double-tree splitting, color components, and stripe / image type.

[0258] h) The methods presented in this document can be used in other codec tools that require chroma blending.

[0259] Figure 25 A flowchart of a method 2500 for video processing according to an embodiment of the present disclosure is shown. Method 2500 is implemented during the conversion between video units of a video and a bitstream of a video.

[0260] At box 2510, the conversion between video units and the video bitstream is performed, and the prediction for the video units is generated by applying affine motion compensation. The video units are encoded and decoded using the Geometric Partitioning Mode (GPM).

[0261] At box 2520, Overlapping Block Motion Compensation (OBMC) is applied to the prediction. At box 2530, a transformation based on the prediction is performed. In some embodiments, the transformation includes encoding video units into a bitstream. In some embodiments, the transformation includes decoding video units from the bitstream. In this way, affine mappings in the GPM are coordinated with OBMC, thereby improving encoding / decoding efficiency and performance.

[0262] In some embodiments, OBMC is applied to the fused prediction in GPM, which is generated by fusing two predictions from two GPM segments. In some embodiments, OBMC is not applied to the predictions from the GPM segments prior to fusion. In some other embodiments, at least one of the two predictions is generated using affine motion compensation. In some further embodiments, OBMC is applied to the fused prediction using motion information stored in blocks by the GPM.

[0263] In some embodiments, OBMC is applied to the fused prediction in a first manner for affine prediction. In some embodiments, OBMC is applied to the fused prediction in a second manner for non-affine prediction. In some embodiments, whether OBMC is applied to the fused prediction in the first or second manner depends on whether the GPM segmentation is affine encoded and / or how the video units in the GPM mode are divided.

[0264] In some embodiments, OBMC is applied to the prediction of the GPM segmentation before fusing the two predictions from the two GPM segments. In some embodiments, OBMC is not applied to the fused prediction in the GPM. In some embodiments, at least one of the two predictions is generated using affine motion compensation. In some other embodiments, OBMC is applied to the prediction of the GPM segmentation using motion information used for GPM segmentation.

[0265] In some embodiments, OBMC is applied to the prediction prior to fusion in a first manner for affine prediction. In some other embodiments, OBMC is applied to the prediction prior to fusion in a second manner for non-affine prediction. In some further embodiments, whether OBMC is applied to the prediction prior to fusion in the first or second manner depends on whether the GPM segmentation is affine encoded or decoded.

[0266] In some embodiments, whether the OBMC is applied to the GPM block before or after the fusion of the two predictions from two GPM segments depends on the encoding / decoding mode of at least one GPM segment. For example, if the GPM segment is encoded using intra-frame prediction, the OBMC is applied to the GPM block before fusion. In some embodiments, if the GPM segment is encoded using affine prediction, the OBMC is applied to the GPM block before fusion. In some other embodiments, if the GPM segment is encoded using a GPM-MMVD mode with Merge Motion Vector Difference, the OBMC is applied to the GPM block before fusion. In some further embodiments, if the GPM segment is encoded using a GPM-Template Matching (TM) mode, the OBMC is applied to the GPM block before fusion. In some embodiments, if the GPM segment is encoded using unidirectional prediction, the OBMC is applied to the GPM block before fusion. In some other embodiments, if the GPM segment is encoded using bidirectional prediction, the OBMC is applied to the GPM block before fusion. In some further embodiments, if GPM segmentation is encoded using intra-frame prediction, then OBMC is applied to the GPM block after fusion. In some embodiments, if GPM segmentation is encoded using affine prediction, then OBMC is applied to the GPM block after fusion. In some other embodiments, if GPM segmentation is encoded using GPM-MMVD mode, then OBMC is applied to the GPM block after fusion. In some further embodiments, if GPM segmentation is encoded using GPM-TM mode, then OBMC is applied to the GPM block after fusion. In some embodiments, if GPM segmentation is encoded using unidirectional prediction, then OBMC is applied to the GPM block after fusion. In some other embodiments, if GPM segmentation is encoded using bidirectional prediction, then OBMC is applied to the GPM block after fusion.

[0267] In some embodiments, whether and / or how OBMC is applied in the GPM depends on the codec information. For example, the codec information includes at least one of the following: block width, block height, quantization parameter (QP), or codec mode.

[0268] In some embodiments, whether or not OBMC is applied to prediction and / or how OBMC is applied to prediction is transmitted via signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level. In some embodiments, whether or not OBMC is applied to prediction and / or how OBMC is applied to prediction is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice group header. In some embodiments, whether or not OBMC is applied to prediction and / or how OBMC is applied to prediction is transmitted via signaling at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample or pixel.

[0269] In some embodiments, method 2500 further includes: determining, based on the encoded and decoded information of the video units, whether and / or how to apply OBMC to prediction. The encoded and decoded information may include at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0270] According to another embodiment of this disclosure, a non-transitory computer-readable recording medium is provided. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: generating predictions for video units of the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM) pattern; applying overlapping block motion compensation (OBMC) to the predictions; and generating a bitstream based on the predictions.

[0271] According to further embodiments of this disclosure, a method for storing a bitstream of video is provided. The method includes: generating predictions for video units of the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM); applying overlapping block motion compensation (OBMC) to the predictions; generating a bitstream based on the predictions; and storing the bitstream in a non-transitory computer-readable recording medium.

[0272] Figure 26 A flowchart of a method 2600 for video processing according to an embodiment of the present disclosure is shown. Method 2600 is implemented during the conversion between video units of a video and a bitstream of a video.

[0273] At box 2610, for the conversion between video units and video bitstreams, it is determined whether the segmentation in the geometric segmentation mode (GPM) of the video unit is encoded and decoded using affine motion compensation, and whether the motion information of the segmentation is modified.

[0274] At box 2620, the conversion is performed based on determination. In some embodiments, the conversion includes encoding video units into a bitstream. In some embodiments, the conversion includes decoding video units from the bitstream. In this way, encoding / decoding efficiency and performance can be improved.

[0275] In some embodiments, the segmented motion information in the GPM is modified by Merge Motion Vector Difference (MMVD). In some other embodiments, the segmented motion information in the GPM is modified by Template Matching (TM).

[0276] In some further embodiments, if the segmentation is encoded and decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by MMVD. Alternatively, if the motion information is modified by MMVD, the segmentation in the GPM is not encoded and decoded using affine motion compensation.

[0277] In some embodiments, if the segmentation is encoded and decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by the TM. Alternatively, if the motion information is modified by the TM, the segmentation in the GPM is not encoded and decoded using affine motion compensation.

[0278] In some embodiments, whether and / or how to determine the segmented motion information in the GPM is determined by signal transmission at one of the following: sequence level, picture group level, picture level, strip level, or slice group level. In some embodiments, whether and / or how to determine the segmented motion information in the GPM is determined by signal transmission at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice group header. In some embodiments, whether and / or how to determine the segmented motion information in the GPM is determined by signal transmission at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample or pixel.

[0279] In some embodiments, method 2600 further includes: determining, based on the encoded and decoded information of the video unit, whether and / or how to determine the segmented motion information in the GPM. The encoded and decoded information may include at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0280] According to another embodiment of this disclosure, a non-transitory computer-readable recording medium is provided. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: determining whether motion information of a segment has been modified based on whether a segmentation in a geometric segmentation pattern (GPM) of video units is encoded and decoded using affine motion compensation; and generating a bitstream based on the determination.

[0281] According to further embodiments of this disclosure, a method for storing a bitstream of video is provided. The method includes: determining whether motion information of a segment has been modified based on whether a segmentation in a geometric segmentation pattern (GPM) of a video unit is encoded and decoded using affine motion compensation; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0282] Figure 27 A flowchart of a method 2700 for video processing according to an embodiment of the present disclosure is shown. Method 2700 is implemented during the conversion between video units of a video and a bitstream of a video.

[0283] At box 2710, for the conversion between video units and video bitstreams, a candidate list for application in the geometric segmentation mode (GPM) of the video unit is determined based on conditions associated with the video unit. In some embodiments, the candidate list is an affine candidate list or a non-affine candidate list.

[0284] At box 2720, the conversion is performed based on a candidate list. In some embodiments, the conversion includes encoding video units into a bitstream. In some embodiments, the conversion includes decoding video units from the bitstream. In this way, encoding / decoding efficiency and performance can be improved.

[0285] In some embodiments, different candidate lists are applied based on different conditions. For example, the selection of a candidate list can be adaptively changed based on conditions.

[0286] In some embodiments, which candidate list is used for GPM segmentation of a video unit depends on whether Merge Motion Vector Difference (MMVD) GPM is applied for GPM segmentation. For example, if MMVD GPM is not applied in GPM segmentation, a first candidate list is used for GPM segmentation. The first candidate list may include bidirectional prediction candidates. In some embodiments, the first candidate list is the same as the regular Merge candidate list.

[0287] In some embodiments, if MMVD GPM is applied in GPM segmentation, a second candidate list is used for GPM segmentation. The second candidate list may not include bidirectional prediction candidates.

[0288] In some embodiments, the second candidate list is derived from the first candidate list. In some embodiments, if candidate K in the first candidate list is a one-way prediction candidate, then candidate K in the second candidate list is copied from candidate K in the first candidate list. Alternatively, if candidate K in the first candidate list is a two-way prediction candidate, then candidate K in the second candidate list is set to move with reference to reference list 0 of candidate K in the first candidate list. In some other embodiments, if candidate K in the first candidate list is a two-way prediction candidate, then candidate K in the second candidate list is set to move with reference to reference list 1 of candidate K in the first candidate list. In some further embodiments, whether candidate K in the second candidate list is set to move with reference to reference list 0 or reference list 1 of candidate K in the first candidate list depends on the parity of K. In these cases, K can be an integer.

[0289] In some embodiments, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move in reference to the reference list [K&1] of candidate K in the first candidate list. In some other embodiments, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move in reference to the reference list [(K+1)&1] of candidate K in the first candidate list.

[0290] In some embodiments, adaptive reordering of Merge candidates (ARMC) is applied to modify the candidate list used in the GPM. For example, the candidate list used in the GPM is reordered before it is used in the GPM.

[0291] In some embodiments, after reordering the candidate list, if the cost of the first candidate is less than or no greater than the cost of the second candidate, the first candidate in the candidate list is placed before the second candidate. In some embodiments, the cost of a candidate is calculated as the distortion between the template of the current block and a reference template derived from the motion information and / or intra-prediction mode of the candidate.

[0292] In some embodiments, if a first Merge candidate is used in the GPM, the first Merge candidate list is reordered. In some other embodiments, a second candidate list derived from the first Merge candidate list for the GPM is reordered. In some embodiments, the second candidate list includes one or more unidirectional prediction candidates.

[0293] In some embodiments, if the affine Merge candidate list is used in GPM, the affine Merge candidate list is reordered. In some embodiments, the reference template for the affine Merge candidate includes multiple sub-templates that are located using motion information derived through an affine model.

[0294] In some embodiments, the motion vector of a sub-template is derived using an affine model for a given position within the sub-template. For example, this position could be the center position. In some other embodiments, the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0295] In some embodiments, if a first affine Merge candidate list including bidirectional predictions is used in the GPM, the first affine Merge candidate list is reordered. In some embodiments, if a second affine Merge candidate list including unidirectional predictions is used in the GPM, the second affine Merge candidate list is reordered. In some embodiments, the second affine Merge candidate list is derived from the first affine Merge candidate list.

[0296] In some embodiments, if ARMC is applied in GPM, the candidates in the list are divided into multiple groups. In some embodiments, candidates within the same group are compared and reordered. In some embodiments, the order of different groups is fixed.

[0297] In some embodiments, GPM-MMVD candidates are reordered. In some other embodiments, whether and / or how modifications are made depends on the codec information. In some embodiments, the codec information includes at least one of the following: block width, block height, quantization parameters (QP), or codec mode. For example, a first-class candidate list in the GPM is reordered, while a second-class candidate list in the GPM is not reordered. In some embodiments, the first-class candidate list is an affine merge candidate list, and the second-class candidate list is a non-affine merge candidate list.

[0298] In some embodiments, whether and / or how the candidate list applied in the GPM is determined to be transmitted via signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level. In some embodiments, whether and / or how the applied candidate list is determined to be transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice group header. In some embodiments, whether and / or how the applied candidate list is determined to be transmitted via signaling at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample or pixel.

[0299] In some embodiments, method 2700 further includes: determining, based on the encoded and decoded information of the video units, whether to determine an application candidate list and / or how to determine the application candidate list. The encoded and decoded information may include at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0300] According to another embodiment of this disclosure, a non-transitory computer-readable recording medium is provided. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by an apparatus for video processing. The method includes: determining a candidate list for application in a geometrical segmentation mode (GPM) of the video units based on conditions relating to encoding / decoding information of the video units; and generating a bitstream based on the candidate list.

[0301] According to further embodiments of this disclosure, a method for storing a bitstream of video is provided. The method includes: determining a candidate list for application in a geometrical segmentation mode (GPM) of video units based on conditions relating to encoding / decoding information of video units of the video; generating a bitstream based on the candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0302] Figure 28 A flowchart of a method 2800 for video processing according to an embodiment of the present disclosure is shown. Method 2800 is implemented during the conversion between video units of a video and a bitstream of a video.

[0303] At box 2810, for the conversion between video units and video bitstreams, whether GPM is applicable to video units is determined based on whether the geometric segmentation mode (GPM) with affine motion compensation is applicable.

[0304] At box 2820, the conversion is performed based on determination. In some embodiments, the conversion includes encoding video units into a bitstream. In some embodiments, the conversion includes decoding video units from the bitstream. In this way, encoding / decoding efficiency and performance can be improved.

[0305] In some embodiments, if GPM with affine motion compensation is not applicable, then GPM is only applicable when TW0 <= W <= TW1 and TH0 <= H <= TH1. In this case, W represents the width of the video unit, H represents the height of the video unit, and TW0, TW1, TH0, and TH1 represent thresholds, respectively. In some embodiments, TW0 = TH0 = 8 and TW1 = TH1 = 64.

[0306] In some embodiments, if GPM with affine motion compensation is applicable, GPM is only applicable when TW0' <= W <= TW1' and TH0' <= H <= TH1'. In this case, W represents the width of the video unit, H represents the height of the video unit, and TW0', TW1', TH0', and TH1' represent thresholds, respectively. In some embodiments, TW0' is not equal to TW0. In some other embodiments, TW1' is not equal to TW1. In some further embodiments, TH0' is not equal to TH0. Or, TH1' is not equal to TH1. In some example embodiments, TW0' = TH0' = 16 and TW1' = TH1' = 128.

[0307] In some embodiments, if a GPM is applicable under certain conditions only if a GPM with affine motion compensation is applicable, it explicitly indicates that a GPM with affine motion compensation needs to be executed. In some other embodiments, if a GPM is applicable under certain conditions only if a GPM with affine motion compensation is not applicable, it explicitly indicates that a GPM without affine motion compensation needs to be executed.

[0308] In some embodiments, whether and / or how to determine whether GPM is applicable is signaled at one of the following: sequence level, picture group level, picture level, strip level, or slice group level. In some other embodiments, whether and / or how to determine whether GPM is applicable is signaled at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice group header. In some further embodiments, whether and / or how to determine whether GPM is applicable is signaled at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample or pixel.

[0309] In some embodiments, method 2800 further includes: determining, based on the encoded and decoded information of the video units, whether and / or how to determine whether GPM is applicable. The encoded and decoded information may include at least one of the following: block size, color format, single and / or dual tree segmentation, color components, stripe type, or picture type.

[0310] According to another embodiment of this disclosure, a non-transitory computer-readable recording medium is provided. This non-transitory computer-readable recording medium stores a bitstream of video generated by a method performed by means of a video processing apparatus. The method includes: determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to video units of the video, based on whether the GPM is applicable; and generating a bitstream based on the determination.

[0311] According to further embodiments of this disclosure, a method for storing a bitstream of video is provided. The method includes: determining whether a geometric segmentation pattern (GPM) with affine motion compensation is applicable to video units of the video, based on whether the GPM is applicable; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0312] Figure 29 A flowchart of a method 2900 for video processing according to an embodiment of the present disclosure is shown. Method 2900 is implemented during the conversion between video units of a video and a bitstream of a video.

[0313] At box 2910, for the conversion between video units and video bitstreams, based on the encoding and decoding information of the video units, whether and / or how to apply template-matching reordering for the GPM partitioning mode is determined. In some embodiments, the encoding and decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding and decoding mode.

[0314] At box 2920, the conversion is performed based on determination. In some embodiments, the conversion includes encoding video units into a bitstream. In some embodiments, the conversion includes decoding video units from the bitstream. This is done to improve encoding / decoding efficiency and performance.

[0315] In some embodiments, whether and / or how the GPM partitioning pattern is reordered depends on whether the GPM segmentation is encoded and decoded using affine motion compensation. In some other embodiments, the reference template used for reordering the GPM partitioning pattern is generated in a manner derived through an affine model. For example, the reference template includes multiple sub-templates, which are located using motion information derived through an affine model.

[0316] In some embodiments, the motion vector of a sub-template is derived using an affine model for its position within the sub-template. In some other embodiments, the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0317] In some embodiments, whether the reference template for reordering GPM partition patterns is generated through affine model derivation depends on whether the corresponding GPM segment is encoded and decoded using affine motion compensation. In some embodiments, if the corresponding GPM segment is encoded and decoded using affine motion compensation, the reference template for reordering GPM partition patterns is generated through affine model derivation. In some other embodiments, if the corresponding GPM segment is not encoded and decoded using affine motion compensation, the reference template for reordering GPM partition patterns is not generated through affine model derivation.

[0318] In some embodiments, whether and / or how to determine the application's template-matching reordering for the GPM partitioning mode based on codec information is transmitted via signaling at one of the following: sequence level, picture group level, picture level, stripe level, or slice group level. In some other embodiments, whether and / or how to determine the application's template-matching reordering for the GPM partitioning mode based on codec information is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), stripe header, or slice group header. In some further embodiments, whether and / or how to determine the template-matching-based reordering of the application for the GPM partitioning mode based on codec information is transmitted via signaling at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0319] In some embodiments, method 2900 further includes: determining, based on the encoded and decoded information of the video units, whether and / or how the template-matching reordering of the application for the GPM partitioning mode is determined based on the encoded and decoded information. The encoded and decoded information may include at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0320] In some embodiments, syntax elements are binarized into one of the following: flags, fixed-length codes, EG(x) codes, unary codes, rounded unary codes, or rounded binary codes. In some embodiments, syntax elements are signed or unsigned.

[0321] In some embodiments, syntax elements are encoded and decoded using at least one context model, or the syntax elements are encoded and decoded in a bypass manner. In some embodiments, syntax elements are conditionally transmitted via signaling. In some embodiments, syntax elements are transmitted via signaling if a corresponding function applies, or if the dimension of the video unit satisfies a condition. In some embodiments, the dimension includes the width and / or height of the video unit. In some embodiments, syntax elements are transmitted via signaling at one of the following levels: sequence level, picture group level, picture level, strip level, or slice group level.

[0322] In some embodiments, syntax elements are signaled at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice group header. In some embodiments, syntax elements are signaled at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU line, strip, slice, subpicture, or region comprising more than one sample or pixel. In some embodiments, video units are encoded and decoded using one or more other codec tools requiring chroma blending.

[0323] According to another embodiment of this disclosure, a non-transitory computer-readable recording medium is provided. This non-transitory computer-readable recording medium stores video data through a method performed by an apparatus for video processing to generate a bitstream. The method includes: determining, based on encoding / decoding information of video units of the video, whether and / or how to apply template-matching reordering for a GPM partitioning pattern; and generating a bitstream based on the determination.

[0324] According to further embodiments of this disclosure, a method for storing a bitstream of video is provided. The method includes: determining, based on encoding / decoding information of video units of the video, whether and / or how to apply template-matching reordering for a GPM partitioning pattern; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0325] The embodiments of this disclosure can be described according to the following entries, and their features can be combined in any reasonable manner.

[0326] Item 1. A video processing method comprising: a conversion between video units of a video and a bitstream of the video; generating a prediction for the video units by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM); applying overlapping block motion compensation (OBMC) to the prediction; and performing the conversion based on the prediction.

[0327] Item 2. The method according to Item 1, wherein the OBMC is applied to the fused prediction in the GPM, the fused prediction being generated by fusing two predictions from two GPM segments.

[0328] Item 3. The method according to Item 2, wherein the OBMC is not applied to the prediction of GPM segmentation prior to the fusion.

[0329] Item 4. The method according to Item 2, wherein at least one of the two predictions is generated using affine motion compensation.

[0330] Item 5. The method according to Item 2, wherein the OBMC utilizes motion information stored in the block by the GPM and is applied to the fused prediction.

[0331] Item 6. The method according to Item 2, wherein the OBMC is applied to the fused prediction in a first manner for affine prediction.

[0332] Item 7. The method according to Item 2, wherein the OBMC is applied to the fused prediction in a second manner for non-affine prediction.

[0333] Item 8. The method according to Item 2, wherein the OBMC is applied to the fused prediction in a first manner or a second manner depends on whether the GPM segmentation is affine encoded and / or how the video units in the GPM mode are divided.

[0334] Item 9. The method according to Item 1, wherein the OBMC is applied to the prediction of the GPM segment before fusing the two predictions of the two GPM segments.

[0335] Item 10. The method according to Item 9, wherein the OBMC is not applied to the fused prediction in the GPM.

[0336] Item 11. The method according to Item 9, wherein at least one of the two predictions is generated using affine motion compensation.

[0337] Item 12. The method according to Item 9, wherein the OBMC utilizes motion information used for GPM segmentation to be applied to the prediction of the GPM segmentation.

[0338] Item 13. The method according to Item 9, wherein the OBMC is applied to the prediction in a first manner for affine prediction prior to fusion.

[0339] Item 14. The method according to Item 9, wherein the OBMC is applied to the prediction in a second manner for non-affine prediction prior to fusion.

[0340] Item 15. The method according to Item 9, wherein whether the OBMC is applied to the prediction prior to fusion in a first manner or a second manner depends on whether the GPM segmentation is affine encoded or decoded.

[0341] Item 16. The method according to Item 1, wherein the OBMC is applied to the GPM block before or after the fusion of the two predictions of the two GPM segments depends on the encoding / decoding mode of at least one GPM segment.

[0342] Item 17. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using intra-frame prediction, the OBMC is applied to the GPM block prior to the fusion.

[0343] Item 18. The method according to Item 16, wherein if the GPM segmentation is encoded or decoded using affine prediction, the OBMC is applied to the GPM block prior to the fusion.

[0344] Item 19. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using a GPM mode with Merge motion vector difference (GPM-MMVD), the OBMC is applied to the GPM block prior to the fusion.

[0345] Item 20. The method according to Item 16, wherein if the GPM segmentation is encoded or decoded using GPM-template matching (TM) mode, the OBMC is applied to the GPM block prior to the fusion.

[0346] Item 21. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using unidirectional prediction, the OBMC is applied to the GPM block prior to the fusion.

[0347] Item 22. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using bidirectional prediction, the OBMC is applied to the GPM block prior to the fusion.

[0348] Item 23. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using intra-frame prediction, the OBMC is applied to the GPM block after the fusion.

[0349] Item 24. The method according to Item 16, wherein if the GPM segmentation is encoded or decoded using affine prediction, the OBMC is applied to the GPM block after the fusion.

[0350] Item 25. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using the GPM-MMVD mode, the OBMC is applied to the GPM block after the fusion.

[0351] Item 26. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using the GPM-TM mode, the OBMC is applied to the GPM block after the fusion.

[0352] Item 27. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using unidirectional prediction, the OBMC is applied to the GPM block after the fusion.

[0353] Item 28. The method according to Item 16, wherein if the GPM segmentation is encoded and decoded using bidirectional prediction, the OBMC is applied to the GPM block after the fusion.

[0354] Item 29. The method according to Item 16, wherein whether and / or how the OBMC is applied in the GPM depends on the encoding / decoding information.

[0355] Item 30. The method according to Item 29, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

[0356] Item 31. The method according to any one of items 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted by signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0357] Item 32. The method according to any one of items 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0358] Item 33. The method according to any one of items 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted via signal transmission at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0359] Item 34. The method according to any one of items 1 to 30 further comprises: determining, based on the encoded and decoded information of the video unit, whether to apply the OBMC to the prediction and / or how to apply the OBMC to the prediction, the encoded and decoded information including at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0360] Item 35. A video processing method comprising: a conversion between video units of a video and a bitstream of the video; determining whether motion information of the segmentation is modified based on whether the segmentation in a geometric segmentation mode (GPM) of the video unit is encoded and decoded using affine motion compensation; and performing the conversion based on the determination.

[0361] Item 36. The method according to Item 35, wherein the motion information of the segment in the GPM is modified by Merge Motion Vector Difference (MMVD).

[0362] Item 37. The method according to Item 35, wherein the motion information of the segment in the GPM is modified by template matching (TM).

[0363] Item 38. The method according to Item 35, wherein if the segmentation is encoded and decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by MMVD.

[0364] Item 39. The method according to Item 35, wherein if the motion information is modified by MMVD, the segmentation in the GPM is not encoded or decoded using affine motion compensation.

[0365] Item 40. The method according to Item 35, wherein if the segmentation is encoded or decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by TM.

[0366] Item 41. The method according to Item 35, wherein if the motion information is modified by TM, the segmentation in the GPM is not encoded or decoded using affine motion compensation.

[0367] Item 42. The method according to any one of items 35 to 41, wherein it is determined whether the motion information of the segment in the GPM is determined and / or how the motion information of the segment in the GPM is determined to be transmitted by signal at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0368] Item 43. The method according to any one of items 35 to 41, wherein it is determined whether the motion information of the segment in the GPM is determined and / or how the motion information of the segment in the GPM is determined to be transmitted via signal at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0369] Item 44. The method according to any one of items 35 to 41, wherein it is determined whether the motion information of the segment in the GPM is transmitted by signal at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0370] Item 45. The method according to any one of items 35 to 41 further comprises: determining, based on the encoded and decoded information of the video unit, whether to determine the motion information of the segment in the GPM and / or how to determine the motion information of the segment in the GPM, the encoded and decoded information including at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0371] Item 46. A video processing method comprising: a conversion between video units of a video and a bitstream of the video; determining a candidate list for application in a geometric segmentation mode (GPM) of the video units based on conditions relating to codec information of the video units; and performing the conversion based on the candidate list.

[0372] Item 47. The method described in Item 46, wherein different candidate lists are applied based on different conditions.

[0373] Item 48. According to the method of Item 46, which candidate list is used for GPM segmentation of the video unit depends on whether Merge Motion Vector Difference (MMVD) GPM is applied for the GPM segmentation.

[0374] Item 49. The method according to Item 46, wherein if MMVD GPM is not applied in the GPM segmentation, a first candidate list is used for the GPM segmentation, wherein the first candidate list includes bidirectional prediction candidates.

[0375] Item 50. The method according to Item 49, wherein the first candidate list is the same as the regular Merge candidate list.

[0376] Item 51. The method according to Item 46 or 49, wherein if MMVD GPM is applied in the GPM segmentation, a second candidate list is used for the GPM segmentation, wherein the second candidate list does not include bidirectional prediction candidates.

[0377] Item 52. The method according to Item 51, wherein the second candidate list is derived from the first candidate list.

[0378] Item 53. The method according to Item 52, wherein if candidate K in the first candidate list is a one-way prediction candidate, then candidate K in the second candidate list is copied from candidate K in the first candidate list; or wherein if candidate K in the first candidate list is a two-way prediction candidate, then candidate K in the second candidate list is set to move with reference to reference list 0 of candidate K in the first candidate list; or wherein if candidate K in the first candidate list is a two-way prediction candidate, then candidate K in the second candidate list is set to move with reference to reference list 1 of candidate K in the first candidate list; or wherein whether candidate K in the second candidate list is set to move with reference to reference list 0 or reference list 1 of candidate K in the first candidate list depends on the parity of K, and wherein K is an integer.

[0379] Item 54. The method according to Item 53, wherein if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move with reference to the reference list [K&1] of candidate K in the first candidate list.

[0380] Item 55. The method according to Item 53, wherein if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move in reference to the reference list [(K+1)&1] of candidate K in the first candidate list.

[0381] Item 56. The method according to Item 46, wherein the candidate list is an affine candidate list or a non-affine candidate list.

[0382] Item 57. The method according to Item 46, wherein adaptive reordering of Merge candidates (ARMC) is applied to modify the candidate list used in GPM.

[0383] Item 58. The method according to Item 57, wherein the candidate list used in the GPM is reordered before the candidate list is used in the GPM.

[0384] Item 59. The method according to Item 58, wherein after reordering the candidate list, if the cost of the first candidate is less than or not greater than the cost of the second candidate, the first candidate is placed before the second candidate in the candidate list.

[0385] Item 60. The method according to Item 59, wherein the cost of the candidate is calculated as the distortion between the template of the current block and a reference template derived from the motion information and / or intra-frame prediction mode of the candidate.

[0386] Item 61. The method according to Item 58, wherein if the first Merge candidate is used in the GPM, the list of the first Merge candidates is reordered.

[0387] Item 62. The method according to Item 58, wherein the second candidate list derived from the first Merge candidate list for GPM is reordered.

[0388] Item 63. The method according to Item 62, wherein the second candidate list includes one or more one-way prediction candidates.

[0389] Item 64. The method according to Item 58, wherein if the affine Merge candidate list is used in GPM, the affine Merge candidate list is reordered.

[0390] Item 65. The method according to Item 64, wherein the reference template of the affine Merge candidate comprises a plurality of sub-templates, the plurality of sub-templates being located using motion information derived through an affine model.

[0391] Item 66. The method according to Item 65, wherein the motion vector of the sub-template is derived using the affine model for position in the sub-template.

[0392] Item 67. The method according to Item 65, wherein the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0393] Item 68. The method according to Item 64, wherein if a first affine Merge candidate list including bidirectional predictions is used in GPM, the first affine Merge candidate list is reordered.

[0394] Item 69. The method according to Item 64, wherein if a second affine Merge candidate list including unidirectional predictions is used in GPM, the second affine Merge candidate list is reordered.

[0395] Item 70. The method according to Item 69, wherein the second affine Merge candidate list is derived from the first affine Merge candidate list.

[0396] Item 71. The method according to Item 58, wherein if ARMC is applied in GPM, the candidates in the list are divided into multiple groups.

[0397] Item 72. The method according to Item 71, wherein candidates in the same group are compared and reordered.

[0398] Item 73. The method described in Item 71, wherein the order of the different groups is fixed.

[0399] Item 74. The method according to Item 57, wherein the GPM-MMVD candidates are reordered.

[0400] Item 75. The method according to Item 57, wherein whether and / or how the modification is made depends on the encoding / decoding information.

[0401] Item 76. The method according to Item 75, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

[0402] Item 77. The method according to Item 75, wherein the first candidate list in the GPM is reordered and the second candidate list in the GPM is not reordered.

[0403] Item 78. The method according to Item 77, wherein the first candidate list is an affine Merge candidate list and the second candidate list is a non-affine Merge candidate list.

[0404] Item 79. The method according to any one of items 46 to 78, wherein whether the candidate list to be applied in the GPM is determined and / or how the candidate list to be applied in the GPM is determined is transmitted by signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0405] Item 80. The method according to any one of items 46 to 78, wherein whether the candidate list of the application is determined and / or how the candidate list of the application is determined is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0406] Item 81. The method according to any one of items 46 to 78, wherein whether the candidate list of the application is determined and / or how the candidate list of the application is determined is transmitted by signaling at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0407] Item 82. The method according to any one of items 46 to 78 further comprises: determining, based on the encoded and decoded information of the video unit, whether to determine the candidate list to be applied and / or how to determine the candidate list to be applied, the encoded and decoded information including at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0408] Item 83. A method for video processing, comprising: a conversion between video units of a video and a bitstream of the video; determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to the video unit, based on whether the GPM is applicable; and performing the conversion based on the determination.

[0409] Item 84. The method according to Item 83, wherein if GPM with affine motion compensation is not applicable, then GPM is applicable only if TW0 <= W <= TW1 and TH0 <= H <= TH1, and wherein W represents the width of the video unit, H represents the height of the video unit, and TW0, TW1, TH0 and TH1 represent thresholds, respectively.

[0410] Item 85. The method according to Item 84, wherein TW0=TH0=8 and TW1=TH1=64.

[0411] Item 86. The method according to Item 83, wherein if GPM with affine motion compensation is applicable, GPM is applicable only if TW0'<=W<=TW1' and TH0'<=H<=TH1', and wherein W represents the width of the video unit, H represents the height of the video unit, and TW0', TW1', TH0' and TH1' represent thresholds, respectively.

[0412] Item 87. The method according to Item 86, wherein TW0' is not equal to TW0, or wherein TW1' is not equal to TW1, or wherein TH0' is not equal to TH0, or wherein TH1' is not equal to TH1, or wherein TW0'=TH0'=16 and TW1'=TH1'=128.

[0413] Item 88. The method according to Item 83, wherein if the GPM is applicable only under certain conditions, it explicitly indicates that the GPM with affine motion compensation needs to be performed.

[0414] Item 89. The method according to Item 83, wherein if the GPM is applicable under certain conditions only if the GPM with affine motion compensation is not applicable, it explicitly indicates that the GPM without affine motion compensation needs to be performed.

[0415] Item 90. The method according to any one of items 83 to 89, wherein whether or how to determine whether GPM is applicable is transmitted by signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0416] Item 91. The method according to any one of Items 83 to 89, wherein whether or how to determine whether GPM is applicable is determined by signal transmission at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0417] Item 92. The method according to any one of items 83 to 89, wherein whether or how to determine whether GPM is applicable is determined by signal transmission at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0418] Item 93. The method according to any one of items 83 to 89 further comprises: determining, based on the encoded and decoded information of the video unit, whether and / or how to determine whether GPM is applicable, said encoded and decoded information including at least one of the following: block size, color format, single-tree segmentation and / or dual-tree segmentation, color components, stripe type, or picture type.

[0419] Item 94. A video processing method comprising: a conversion between video units of a video and a bitstream of the video; determining, based on encoding / decoding information of the video units, whether to apply template-matching reordering for a geometric segmentation pattern (GPM) partitioning mode and / or how to apply template-matching reordering for a GPM partitioning mode; and performing the conversion based on the determination.

[0420] Item 95. The method according to Item 94, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

[0421] Item 96. The method according to Item 94, wherein whether and / or how the GPM partitioning pattern is reordered depends on whether the GPM partitioning is encoded or decoded using affine motion compensation.

[0422] Item 97. The method according to Item 95, wherein the reference template used for reordering the GPM partitioning pattern is generated by affine model derivation.

[0423] Item 98. The method according to Item 97, wherein the reference template comprises a plurality of sub-templates, the plurality of sub-templates being positioned using motion information derived through the affine model.

[0424] Item 99. The method according to Item 97, wherein the motion vector of the sub-template is derived using the affine model for position in the sub-template.

[0425] Item 100. The method according to Item 97, wherein the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

[0426] Item 101. The method according to Item 94, wherein whether the reference template used for reordering the GPM partitioning pattern is generated by affine model derivation depends on whether the corresponding GPM partition is encoded or decoded using affine motion compensation.

[0427] Item 102. The method according to Item 101, wherein if the corresponding GPM segmentation is encoded and decoded using affine motion compensation, the reference template used to reorder the GPM partitioning pattern is generated in a manner derived by the affine model.

[0428] Item 103. The method according to Item 101, wherein if the corresponding GPM segment is not encoded or decoded using affine motion compensation, the reference template used to reorder the GPM segmentation pattern is not generated in a manner derived by the affine model.

[0429] Item 104. The method according to any one of items 94 to 103, wherein whether the template-matching reordering applied to the GPM partitioning mode is determined based on the codec information and / or how the template-matching reordering applied to the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0430] Item 105. The method according to any one of items 94 to 103, wherein whether the template-matching reordering for the GPM partitioning mode is determined based on the codec information and / or how the template-matching reordering for the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0431] Item 106. The method according to any one of items 94 to 103, wherein whether the template-matching-based reordering applied to the GPM partitioning mode is determined based on the codec information and / or how the template-matching-based reordering applied to the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU row, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0432] Item 107. The method according to any one of items 94 to 103, further comprising: determining, based on the encoded and decoded information of the video unit, whether to determine, based on the encoded and decoded information, to apply the template-matching reordering for the GPM partitioning mode and / or how to determine, based on the encoded and decoded information, to apply the template-matching reordering for the GPM partitioning mode, wherein the encoded and decoded information includes at least one of the following: block size, color format, single-tree partitioning and / or dual-tree partitioning, color components, stripe type, or picture type.

[0433] Item 108. The method according to any one of items 1 to 107, wherein the syntax element is binarized into one of the following: a flag, a fixed-length code, an EG(x) code, a unary code, a rounded unary code, or a rounded binary code.

[0434] Item 109. The method according to Item 108, wherein the syntax element is signed or unsigned.

[0435] Item 110. The method according to any one of items 1 to 107, wherein the syntax elements are encoded or decoded using at least one context model, or wherein the syntax elements are encoded or decoded in a bypass manner.

[0436] Item 111. The method according to any one of items 1 to 110, wherein the syntax element is transmitted via signal in a conditional manner.

[0437] Item 112. The method according to Item 111, wherein the syntax element is transmitted via signal if the corresponding function is applicable, or wherein the syntax element is transmitted via signal if the dimension of the video unit satisfies a condition.

[0438] Item 113. The method according to Item 112, wherein the dimension includes the width and / or height of the video unit.

[0439] Item 114. The method according to any one of items 1 to 113, wherein the syntax element is transmitted by signaling at one of the following: sequence level, picture group level, picture level, strip level, or slice group level.

[0440] Item 115. The method according to any one of items 1 to 113, wherein the syntax element is transmitted via signaling at one of the following: sequence header, picture header, sequence parameter set (SPS), video parameter set (VPS), dependency parameter set (DPS), decoding capability information (DCI), picture parameter set (PPS), adaptive parameter set (APS), strip header, or slice header.

[0441] Item 116. The method according to any one of items 1 to 113, wherein the syntax element is transmitted by signal at one of the following: prediction block (PB), transform block (TB), codec block (CB), prediction unit (PU), transform unit (TU), codec unit (CU), codec tree block (CTB), codec tree unit (CTU), CTU line, strip, slice, sub-picture, or region comprising more than one sample point or pixel.

[0442] Item 117. The method according to any one of items 1 to 116, wherein the video unit is encoded or decoded using one or more other encoding / decoding tools that require chroma blending.

[0443] Item 118. The method according to any one of items 1 to 117, wherein the conversion includes encoding the video unit into the bitstream.

[0444] Item 119. The method according to any one of items 1 to 117, wherein the conversion includes decoding the video unit from the bitstream.

[0445] Item 120. 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 a method according to any one of items 1 to 119.

[0446] Item 121. A non-transitory computer-readable storage medium storing instructions that cause a processor to execute the method according to any one of items 1 to 119.

[0447] Item 122. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method comprises: generating predictions for video units of the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM) mode; applying overlapping block motion compensation (OBMC) to the predictions; and generating the bitstream based on the predictions.

[0448] Item 123. A method for storing a bitstream of video, comprising: generating a prediction of video units for the video by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM); applying overlapping block motion compensation (OBMC) to the prediction; generating the bitstream based on the prediction; and storing the bitstream in a non-transitory computer-readable recording medium.

[0449] Item 124. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method comprises: determining whether motion information of the segmentation is modified based on whether the segmentation in a geometric segmentation mode (GPM) of video units of the video is encoded and decoded using affine motion compensation; and generating the bitstream based on the determination.

[0450] Item 125. A method for storing a bitstream of video, comprising: determining whether motion information of the segmentation has been modified based on whether the segmentation in a geometric segmentation mode (GPM) of video units of the video is encoded and decoded using affine motion compensation; generating the bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0451] Item 126. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method comprises: determining a candidate list of applications in a geometric segmentation mode (GPM) of the video units based on conditions relating to encoding / decoding information of video units of the video; and generating the bitstream based on the candidate list.

[0452] Item 127. A method for storing a bitstream of video, comprising: determining a candidate list for application in a geometric segmentation mode (GPM) of the video units based on conditions relating to encoding / decoding information of video units of the video; generating the bitstream based on the candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0453] Item 128. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method comprises: determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to video units of the video, based on whether the GPM is applicable; and generating the bitstream based on the determination.

[0454] Item 129. A method for storing a bitstream of video, comprising: determining whether a geometric segmentation mode (GPM) with affine motion compensation is applicable to video units of the video, based on whether the GPM is applicable; generating the bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0455] Item 130. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: determining, based on encoding and decoding information of video units of the video, whether and / or how to apply template-matching reordering for a geometric segmentation pattern (GPM) partitioning mode; and generating the bitstream based on the determination.

[0456] Item 131. A method for storing a bitstream of video, comprising: determining, based on encoding and decoding information of video units of the video, whether and / or how to apply template-matching reordering for a geometrically segmented pattern (GPM) partitioning mode; generating the bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0457] Example device Figure 30 A block diagram of a computing device 3000 in which various embodiments of the present disclosure may be implemented is shown. The computing device 3000 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).

[0458] It should be understood that, Figure 30 The computing device 3000 shown is for illustrative purposes only and is not intended to imply any limitation on the functionality and scope of the embodiments of this disclosure.

[0459] like Figure 30As shown, the computing device 3000 includes a general-purpose computing device 3000. The computing device 3000 may include at least one or more processors or processing units 3010, memory 3020, storage units 3030, one or more communication units 3040, one or more input devices 3050, and one or more output devices 3060.

[0460] In some embodiments, the computing device 3000 can be implemented as any user terminal or server terminal with computing capabilities. The server terminal can be a server, large computing device, etc., provided by a service provider. The user terminal can be, for example, any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, stations, units, devices, multimedia computers, multimedia tablet computers, internet nodes, communicators, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, and includes accessories and peripherals of these devices, or any combination thereof. It is conceivable that the computing device 3000 can support any type of interface to the user (such as "wearable" circuitry devices, etc.).

[0461] Processing unit 3010 can be a physical processor or a virtual processor, and can perform various processes based on programs stored in memory 3020. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capabilities of computing device 3000. Processing unit 3010 may also be referred to as a central processing unit (CPU), microprocessor, controller, or microcontroller.

[0462] Computing device 3000 typically includes various computer storage media. Such media can be any media accessible by computing device 3000, including but not limited to volatile and non-volatile media, or removable and non-removable media. Memory 3020 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), or flash memory) or any combination thereof. Storage cell 3030 can be any removable or non-removable media and may include machine-readable media, such as memory, flash drives, disks, or other media that can be used to store information and / or data and can be accessed within computing device 3000.

[0463] The computing device 3000 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Although in Figure 30 Not shown, but a disk drive for reading from and / or writing to a removable non-volatile disk, and an optical disc drive for reading from and / or writing to a removable non-volatile optical disc may be provided. In this case, each drive may be connected to a bus (not shown) via one or more data media interfaces.

[0464] The communication unit 3040 communicates with another computing device via a communication medium. Furthermore, the functionality of the components in the computing device 3000 can be implemented by a single computing cluster or by multiple computing machines communicating via communication connections. Therefore, the computing device 3000 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general-purpose network nodes.

[0465] Input device 3050 can be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 3060 can be one or more of various output devices, such as a monitor, speaker, printer, etc. With the aid of communication unit 3040, computing device 3000 can also communicate with one or more external devices (not shown), such as storage devices and display devices. Computing device 3000 can also communicate with one or more devices that enable a user to interact with computing device 3000, or any device that enables computing device 3000 to communicate with one or more other computing devices (e.g., network card, modem, etc.), if needed. Such communication can be performed via input / output (I / O) interface (not shown).

[0466] In some embodiments, some or all components of computing device 3000 may be arranged in a cloud computing architecture, rather than integrated into a single device. In a cloud computing architecture, components may be provided remotely and may work together to achieve the functionality described herein. In some embodiments, cloud computing provides computing, software, data access, and storage services without requiring end users to know the physical location or configuration of the systems or hardware providing these services. In various embodiments, cloud computing is provided via a wide area network (WAN), such as the Internet, using suitable protocols. For example, a cloud computing provider provides applications accessible over a WAN via a web browser or any other computing component. The software or components of the cloud computing architecture, along with the corresponding data, may be stored on servers at remote locations. Computing resources in a cloud computing environment may be consolidated or distributed at locations in remote data centers. Cloud computing infrastructure may provide services through shared data centers, although they may appear as a single access point for users. Therefore, a cloud computing architecture can be used to provide the components and functionality described herein from service providers at remote locations. Alternatively, the components and functionality described herein may be provided from conventional servers or installed directly or otherwise on client devices.

[0467] In embodiments of this disclosure, computing device 3000 may be used to implement video encoding / decoding. Memory 3020 may include one or more video codec modules 3025 having one or more program instructions. These modules are accessible and executable by processing unit 3010 to perform the functions of the various embodiments described herein.

[0468] In an example embodiment of performing video encoding, input device 3050 may receive video data as input 3070 to be encoded. The video data may be processed, for example, by video codec module 3025 to generate an encoded bitstream. The encoded bitstream may be provided as output 3080 via output device 3060.

[0469] In an example embodiment of performing video decoding, input device 3050 may receive an encoded bitstream as input 3070. The encoded bitstream may be processed, for example, by a video codec module 3025 to generate decoded video data. The decoded video data may be provided as output 3080 via output device 3060.

[0470] While this disclosure has been specifically shown and described with reference to preferred embodiments, those skilled in the art will understand that various changes in form and detail may be made without departing from the spirit and scope of this application as defined by the appended claims. These variations are intended to be covered by the scope of this application. Therefore, the foregoing description of embodiments of this application is not intended to be limiting.

Claims

1. A video processing method, comprising: For the conversion between video units and the bitstream of the video, predictions for the video units are generated by applying affine motion compensation, wherein the video units are encoded and decoded using the geometric segmentation mode (GPM). Overlapping block motion compensation (OBMC) is applied to the prediction; as well as The transformation is performed based on the prediction.

2. The method of claim 1, wherein the OBMC is applied to the fused prediction in the GPM, the fused prediction being generated by fusing two predictions from two GPM segments.

3. The method of claim 2, wherein the OBMC is not applied to the prediction of GPM segmentation prior to the fusion.

4. The method of claim 2, wherein at least one of the two predictions is generated using affine motion compensation.

5. The method of claim 2, wherein the OBMC utilizes motion information stored in the block by the GPM and is applied to the fused prediction.

6. The method of claim 2, wherein the OBMC is applied to the fused prediction in a first manner for affine prediction.

7. The method of claim 2, wherein the OBMC is applied to the fused prediction in a second manner for non-affine prediction.

8. The method of claim 2, wherein the OBMC is applied to the fused prediction in a first or second manner depending on whether the GPM segmentation is affine encoded and / or how the video units in the GPM mode are divided.

9. The method of claim 1, wherein the OBMC is applied to the prediction of the GPM segment before fusing the two predictions of the two GPM segments.

10. The method of claim 9, wherein the OBMC is not applied to the fused prediction in the GPM.

11. The method of claim 9, wherein at least one of the two predictions is generated using affine motion compensation.

12. The method of claim 9, wherein the OBMC utilizes motion information used for GPM segmentation to be applied to the prediction of the GPM segmentation.

13. The method of claim 9, wherein the OBMC is applied to the prediction in a first manner for affine prediction prior to fusion.

14. The method of claim 9, wherein the OBMC is applied to the prediction in a second manner for non-affine prediction prior to fusion.

15. The method of claim 9, wherein whether the OBMC is applied to the prediction prior to fusion in a first manner or a second manner depends on whether the GPM segmentation is affine encoded or decoded.

16. The method of claim 1, wherein whether the OBMC is applied to the GPM block before or after the fusion of the two predictions of the two GPM segments depends on the encoding / decoding mode of at least one GPM segment.

17. The method of claim 16, wherein if the GPM segmentation is encoded / decoded using intra-frame prediction, the OBMC is applied to the GPM block prior to the fusion.

18. The method of claim 16, wherein if the GPM segmentation is encoded / decoded using affine prediction, the OBMC is applied to the GPM block prior to the fusion.

19. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using a GPM mode with Merge motion vector difference (GPM-MMVD), the OBMC is applied to the GPM block prior to the fusion.

20. The method of claim 16, wherein if the GPM segmentation is encoded or decoded using GPM-template matching (TM) mode, the OBMC is applied to the GPM block prior to the fusion.

21. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using unidirectional prediction, the OBMC is applied to the GPM block prior to the fusion.

22. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using bidirectional prediction, the OBMC is applied to the GPM block prior to the fusion.

23. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using intra-frame prediction, the OBMC is applied to the GPM block after the fusion.

24. The method of claim 16, wherein if the GPM segmentation is encoded or decoded using affine prediction, the OBMC is applied to the GPM block after the fusion.

25. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using the GPM-MMVD mode, the OBMC is applied to the GPM block after the fusion.

26. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using the GPM-TM mode, the OBMC is applied to the GPM block after the fusion.

27. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using unidirectional prediction, the OBMC is applied to the GPM block after the fusion.

28. The method of claim 16, wherein if the GPM segmentation is encoded and decoded using bidirectional prediction, the OBMC is applied to the GPM block after the fusion.

29. The method of claim 16, wherein whether and / or how the OBMC is applied in the GPM depends on the encoding / decoding information.

30. The method of claim 29, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

31. The method according to any one of claims 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted via signal transmission at one of the following: sequence level, Image group level, Image level, strip level, or Film series level.

32. The method according to any one of claims 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted via signal transmission at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

33. The method according to any one of claims 1 to 30, wherein whether the OBMC is applied to the prediction and / or how the OBMC is applied to the prediction is transmitted via signal transmission at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

34. The method according to any one of claims 1 to 30, further comprising: Based on the encoded and decoded information of the video unit, it is determined whether and / or how the OBMC should be applied to the prediction, wherein the encoded and decoded information includes at least one of the following: Block size, Color format, Single-tree segmentation and / or dual-tree segmentation Color components, Strip type, or Image type.

35. A method for video processing, comprising: For the conversion between video units and the bitstream of the video, the motion information of the segment is determined to be modified based on whether the segmentation in the geometric segmentation mode (GPM) of the video unit is encoded and decoded using affine motion compensation. as well as The conversion is performed based on the determination.

36. The method of claim 35, wherein the segmented motion information in the GPM is modified by Merge Motion Vector Difference (MMVD).

37. The method of claim 35, wherein the motion information segmented in the GPM is modified by template matching (TM).

38. The method of claim 35, wherein if the segmentation is encoded and decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by MMVD.

39. The method of claim 35, wherein if the motion information is modified by MMVD, the segmentation in the GPM is not encoded or decoded using affine motion compensation.

40. The method of claim 35, wherein if the segmentation is encoded or decoded using affine motion compensation, the motion information of the segmentation in the GPM is not modified by the TM.

41. The method of claim 35, wherein if the motion information is modified by TM, the segmentation in the GPM is not encoded or decoded using affine motion compensation.

42. The method according to any one of claims 35 to 41, wherein whether or not the segmented motion information in the GPM is determined and / or how the segmented motion information in the GPM is determined to be transmitted via signal at one of the following: sequence level, Image group level, Image level, strip level, or Film series level.

43. The method according to any one of claims 35 to 41, wherein whether or not the motion information of the segment in the GPM is determined and / or how the motion information of the segment in the GPM is determined to be transmitted via signal at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

44. The method according to any one of claims 35 to 41, wherein whether or not the segmented motion information in the GPM is determined and / or how the segmented motion information in the GPM is determined to be transmitted via signal at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

45. The method according to any one of claims 35 to 41, further comprising: Based on the encoded and decoded information of the video unit, it is determined whether to determine the motion information of the segment in the GPM and / or how to determine the motion information of the segment in the GPM, wherein the encoded and decoded information includes at least one of the following: Block size, Color format, Single-tree segmentation and / or dual-tree segmentation Color components, Strip type, or Image type.

46. ​​A video processing method, comprising: For the conversion between video units and the bitstream of the video, a candidate list for application in the geometric segmentation mode (GPM) of the video unit is determined based on conditions related to the encoding and decoding information of the video unit. as well as The transformation is performed based on the candidate list.

47. The method of claim 46, wherein different candidate lists are applied based on different conditions.

48. The method of claim 46, wherein which candidate list is used for GPM segmentation of the video unit depends on whether Merge Motion Vector Difference (MMVD) GPM is applied for the GPM segmentation.

49. The method of claim 46, wherein if MMVD GPM is not applied in the GPM segmentation, a first candidate list is used for the GPM segmentation, wherein the first candidate list includes bidirectional prediction candidates.

50. The method of claim 49, wherein the first candidate list is the same as the regular Merge candidate list.

51. The method of claim 46 or 49, wherein if MMVD GPM is applied in the GPM segmentation, a second candidate list is used for the GPM segmentation, wherein the second candidate list does not include bidirectional prediction candidates.

52. The method of claim 51, wherein the second candidate list is derived from the first candidate list.

53. The method of claim 52, wherein if candidate K in the first candidate list is a one-way prediction candidate, then candidate K in the second candidate list is copied from candidate K in the first candidate list, or Wherein, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to reference the motion of reference list 0 of candidate K in the first candidate list, or Wherein, if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to reference the motion of reference list 1 of candidate K in the first candidate list, or The motion of a candidate K in the second candidate list, which is set to reference list 0 or reference list 1 of the candidate K in the first candidate list, depends on the parity of K. Where K is an integer.

54. The method of claim 53, wherein if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move in reference to the reference list [K&1] of candidate K in the first candidate list.

55. The method of claim 53, wherein if candidate K in the first candidate list is a bidirectional prediction candidate, then candidate K in the second candidate list is set to move in reference to the reference list [(K+1)&1] of candidate K in the first candidate list.

56. The method of claim 46, wherein the candidate list is an affine candidate list or a non-affine candidate list.

57. The method of claim 46, wherein adaptive reordering of Merge candidates (ARMC) is applied to modify the candidate list used in GPM.

58. The method of claim 57, wherein the candidate list used in the GPM is reordered before the candidate list is used in the GPM.

59. The method of claim 58, wherein after reordering the candidate list, if the cost of the first candidate is less than or not greater than the cost of the second candidate, the first candidate is placed before the second candidate in the candidate list.

60. The method of claim 59, wherein the cost of the candidate is calculated as the distortion between the template of the current block and a reference template derived from the motion information and / or intra-frame prediction mode of the candidate.

61. The method of claim 58, wherein if the first Merge candidate is used in the GPM, the first Merge candidate list is reordered.

62. The method of claim 58, wherein the second candidate list derived from the first Merge candidate list for GPM is reordered.

63. The method of claim 62, wherein the second candidate list comprises one or more one-way prediction candidates.

64. The method of claim 58, wherein if the affine Merge candidate list is used in GPM, the affine Merge candidate list is reordered.

65. The method of claim 64, wherein the reference template of the affine Merge candidate comprises a plurality of sub-templates, the plurality of sub-templates being located using motion information derived through an affine model.

66. The method of claim 65, wherein the motion vector of the sub-template is derived using the affine model for a position in the sub-template.

67. The method of claim 65, wherein the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

68. The method of claim 64, wherein if a first affine Merge candidate list including bidirectional predictions is used in GPM, the first affine Merge candidate list is reordered.

69. The method of claim 64, wherein if a second affine Merge candidate list including unidirectional predictions is used in GPM, the second affine Merge candidate list is reordered.

70. The method of claim 69, wherein the second affine Merge candidate list is derived from the first affine Merge candidate list.

71. The method of claim 58, wherein if ARMC is applied in GPM, the candidates in the list are divided into multiple groups.

72. The method of claim 71, wherein candidates in the same group are compared and reordered.

73. The method of claim 71, wherein the order of the different groups is fixed.

74. The method of claim 57, wherein the GPM-MMVD candidates are reordered.

75. The method of claim 57, wherein whether and / or how the modification is made depends on the encoding / decoding information.

76. The method of claim 75, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

77. The method of claim 75, wherein the first candidate list in the GPM is reordered, and the second candidate list in the GPM is not reordered.

78. The method of claim 77, wherein the first candidate list is an affine merge candidate list and the second candidate list is a non-affine merge candidate list.

79. The method according to any one of claims 46 to 78, wherein whether the candidate list to be applied in the GPM is determined and / or how the candidate list to be applied in the GPM is determined is transmitted via signaling at one of the following: sequence level, Image group level, Image level, strip level, or Film series level.

80. The method according to any one of claims 46 to 78, wherein whether the candidate list for the application is determined and / or how the candidate list for the application is determined is transmitted via signaling at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

81. The method according to any one of claims 46 to 78, wherein whether the candidate list for the application is determined and / or how the candidate list for the application is determined is transmitted via signaling at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

82. The method according to any one of claims 46 to 78, further comprising: Based on the encoded and decoded information of the video unit, it is determined whether to determine the candidate list for the application and / or how to determine the candidate list for the application, wherein the encoded and decoded information includes at least one of the following: Block size, Color format, Single-tree segmentation and / or dual-tree segmentation Color components, Strip type, or Image type.

83. A video processing method, comprising: For the conversion between video units and the bitstream of the video, determine whether GPM is applicable to the video unit, based on whether Geometric Partitioning Mode (GPM) with affine motion compensation is applicable; as well as The conversion is performed based on the determination.

84. The method of claim 83, wherein if GPM with affine motion compensation is not applicable, then GPM is applicable only if TW0 <= W <= TW1 and TH0 <= H <= TH1, and wherein W represents the width of the video unit, H represents the height of the video unit, and TW0, TW1, TH0 and TH1 each represent a threshold.

85. The method of claim 84, wherein TW0=TH0=8 and TW1=TH1=64.

86. The method of claim 83, wherein if GPM with affine motion compensation is applicable, then GPM is applicable only if TW0'<=W<=TW1' and TH0'<=H<=TH1', and wherein W represents the width of the video unit, H represents the height of the video unit, and TW0', TW1', TH0' and TH1' each represent a threshold.

87. The method of claim 86, wherein TW0' is not equal to TW0, or Where TW1' is not equal to TW1, or Where TH0' is not equal to TH0, or Where TH1' is not equal to TH1, or Where TW0'=TH0'=16 and TW1'=TH1'=128.

88. The method of claim 83, wherein if the GPM is applicable only under certain conditions, it explicitly indicates that the GPM with affine motion compensation needs to be performed.

89. The method of claim 83, wherein if the GPM is applicable under certain conditions only when the GPM with affine motion compensation is not applicable, then it explicitly indicates that the GPM without affine motion compensation needs to be performed.

90. The method according to any one of claims 83 to 89, wherein whether or not GPM is applicable and / or how to determine whether GPM is applicable is transmitted via signal transmission at one of the following: sequence level, Image group level, Image level, strip level, or Film series level.

91. The method according to any one of claims 83 to 89, wherein whether or not GPM is applicable and / or how to determine whether GPM is applicable is transmitted via signal transmission at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

92. The method according to any one of claims 83 to 89, wherein whether or not GPM is applicable and / or how to determine whether GPM is applicable is transmitted via signal transmission at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

93. The method according to any one of claims 83 to 89, further comprising: Based on the encoded and decoded information of the video unit, determine whether and / or how to determine whether GPM is applicable, wherein the encoded and decoded information includes at least one of the following: Block size, Color format, Single-tree segmentation and / or dual-tree segmentation Color components, Strip type, or Image type.

94. A video processing method, comprising: For the conversion between video units and the bitstream of the video, based on the encoding and decoding information of the video units, determine whether and / or how to apply template matching-based reordering for the geometric segmentation mode (GPM) partitioning mode. as well as The conversion is performed based on the determination.

95. The method of claim 94, wherein the encoding / decoding information includes at least one of the following: block width, block height, quantization parameter (QP), or encoding / decoding mode.

96. The method of claim 94, wherein whether and / or how the GPM partitioning pattern is reordered depends on whether the GPM segmentation is encoded or decoded using affine motion compensation.

97. The method of claim 95, wherein the reference template used for reordering the GPM partitioning pattern is generated by affine model derivation.

98. The method of claim 97, wherein the reference template comprises a plurality of sub-templates, the plurality of sub-templates being positioned using motion information derived through the affine model.

99. The method of claim 97, wherein the motion vector of the sub-template is derived using the affine model for a position in the sub-template.

100. The method of claim 97, wherein the motion vector of the sub-template is set to be equal to the motion vector of the sub-block of the current block adjacent to the sub-template.

101. The method of claim 94, wherein whether the reference template used for reordering the GPM partitioning pattern is generated by affine model derivation depends on whether the corresponding GPM partition is encoded or decoded using affine motion compensation.

102. The method of claim 101, wherein if the corresponding GPM segmentation is encoded and decoded using affine motion compensation, the reference template used to reorder the GPM segmentation pattern is generated in a manner derived by the affine model.

103. The method of claim 101, wherein if the corresponding GPM segment is not encoded or decoded using affine motion compensation, the reference template used to reorder the GPM segmentation pattern is not generated in a manner derived by the affine model.

104. The method according to any one of claims 94 to 103, wherein whether the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information and / or how the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: sequence level, Image group level, Image level, strip level or Film series level.

105. The method according to any one of claims 94 to 103, wherein whether the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information and / or how the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

106. The method according to any one of claims 94 to 103, wherein whether the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information and / or how the template-matching-based reordering of the application for the GPM partitioning mode is determined based on the codec information is transmitted via signaling at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

107. The method according to any one of claims 94 to 103, further comprising: Based on the encoded and decoded information of the video unit, determine whether to determine the application of the template-matching reordering for the GPM partitioning mode based on the encoded and decoded information and / or how to determine the application of the template-matching reordering for the GPM partitioning mode based on the encoded and decoded information, wherein the encoded and decoded information includes at least one of the following: Block size, Color format, Single-tree segmentation and / or dual-tree segmentation Color components, Strip type, or Image type.

108. The method according to any one of claims 1 to 107, wherein the syntax element is binarized into one of the following: a flag, a fixed-length code, an EG(x) code, a unary code, a rounded unary code, or a rounded binary code.

109. The method of claim 108, wherein the syntax element is signed or unsigned.

110. The method according to any one of claims 1 to 107, wherein the syntax elements are encoded and decoded using at least one context model, or Syntax elements are bypassed for encoding and decoding.

111. The method according to any one of claims 1 to 110, wherein the syntax element is transmitted via signal in a conditional manner.

112. The method of claim 111, wherein if the corresponding function is applicable, the syntax element is transmitted via a signal, or If the dimension of the video unit meets the condition, the syntax element is transmitted via signal.

113. The method of claim 112, wherein the dimension includes the width and / or height of the video unit.

114. The method according to any one of claims 1 to 113, wherein the syntax element is transmitted by signal at one of the following: sequence level, Image group level, Image level, strip level, or Film series level.

115. The method according to any one of claims 1 to 113, wherein the syntax element is transmitted by signal at one of the following: Sequence header, Image header, Sequence Parameter Set (SPS) Video Parameter Set (VPS) Dependency Parameter Set (DPS) Decoding Capability Information (DCI) Image Parameter Set (PPS) Adaptive Parameter Set (APS) strip head, or The beginning of the film.

116. The method according to any one of claims 1 to 113, wherein the syntax element is transmitted by signal at one of the following: Predicted blocks (PB) Transform Block (TB) Code Block (CB) Prediction Unit (PU) Transformer Unit (TU) Codec Unit (CU) Code-decode tree block (CTB) Code-decode tree unit (CTU) CTU line, strips, piece, Sub-images, or This includes regions containing more than one sample point or pixel.

117. The method according to any one of claims 1 to 116, wherein the video unit is encoded or decoded using one or more other encoding / decoding tools that require chroma blending.

118. The method according to any one of claims 1 to 117, wherein the conversion comprises encoding the video unit into the bitstream.

119. The method according to any one of claims 1 to 117, wherein the conversion comprises decoding the video unit from the bitstream.

120. 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 according to any one of claims 1 to 119.

121. A non-transitory computer-readable storage medium storing instructions that cause a processor to execute the method according to any one of claims 1 to 119.

122. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: Predictions for video units of the video are generated by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM). Overlapping block motion compensation (OBMC) is applied to the prediction; as well as The bit stream is generated based on the prediction.

123. A method for storing a bitstream of video, comprising: Predictions for video units of the video are generated by applying affine motion compensation, wherein the video units are encoded and decoded using a geometric segmentation mode (GPM). Overlapping block motion compensation (OBMC) is applied to the prediction; The bitstream is generated based on the prediction; as well as The bitstream is stored in a non-transitory computer-readable recording medium.

124. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: Whether the segmentation in the Geometric Segmentation Mode (GPM) of the video unit is encoded and decoded using affine motion compensation is used to determine whether the motion information of the segmentation has been modified. as well as The bit stream is generated based on the determination.

125. A method for storing a bitstream of video, comprising: Whether the segmentation in the Geometric Segmentation Mode (GPM) of the video unit is encoded and decoded using affine motion compensation is used to determine whether the motion information of the segmentation has been modified. The bit stream is generated based on the determination; as well as The bitstream is stored in a non-transitory computer-readable recording medium.

126. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: Based on conditions related to the encoding and decoding information of the video units of the video, a candidate list for application in the geometric segmentation mode (GPM) of the video units is determined. as well as The bitstream is generated based on the candidate list.

127. A method for storing a bitstream of video, comprising: Based on conditions related to the encoding and decoding information of the video units of the video, a candidate list for application in the geometric segmentation mode (GPM) of the video units is determined. The bitstream is generated based on the candidate list; as well as The bitstream is stored in a non-transitory computer-readable recording medium.

128. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: Determine whether GPM is applicable to video units of the video, based on whether Geometric Segmentation Mode with Affine Motion Compensation (GPM) is applicable; as well as The bit stream is generated based on the determination.

129. A method for storing a bitstream of video, comprising: Determine whether GPM is applicable to video units of the video, based on whether Geometric Segmentation Mode with Affine Motion Compensation (GPM) is applicable; The bit stream is generated based on the determination; as well as The bitstream is stored in a non-transitory computer-readable recording medium.

130. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by means of a video processing apparatus, wherein the method includes: Based on the encoding and decoding information of the video units of the video, determine whether and / or how to apply template matching-based reordering for the geometric segmentation mode (GPM) partitioning mode. as well as The bit stream is generated based on the determination.

131. A method for storing a bitstream of video, comprising: Based on the encoding and decoding information of the video units of the video, determine whether and / or how to apply template matching-based reordering for the geometric segmentation mode (GPM) partitioning mode. The bit stream is generated based on the determination; as well as The bitstream is stored in a non-transitory computer-readable recording medium.