Method and device for video processing and medium

By applying a regression processing method in video encoding and decoding technology, using the motion information and position information of time domain blocks or space domain subblocks to determine the affine candidates of video blocks, the problem of insufficient encoding and decoding efficiency and effectiveness in the prior art is solved, and a more efficient encoding and decoding process is realized.

CN119732047APending Publication Date: 2025-03-28DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380060313.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-18
Filing Date
2023-08-18
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing video codec techniques have challenges in improving codec efficiency and effectiveness, especially when dealing with complex motion patterns.

Method used

By using a regression processing method, affine candidates for video blocks are determined, and the motion information and position information of time domain blocks or airspace subblocks are used for regression processing, thereby improving the encoding and decoding efficiency.

Benefits of technology

This method can improve the encoding and decoding efficiency and effectiveness, especially when dealing with complex motion modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119732047A_ABST
    Figure CN119732047A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scheme for video processing. A method for video processing is proposed. The method comprises the following steps: for conversion between a current video block of a video and a bit stream of the video, determining motion information and position information of at least one sub-block of a time domain block in a co-located frame of the current video block; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one sub-block; and performing the conversion based on the affine candidates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate generally to video processing techniques, and more particularly to regression-based affine candidate determination. Background Art

[0002] Nowadays, digital video capabilities are being applied to all aspects of people's lives. Various types of video compression technologies, 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 Versatile Video Codec (VVC) standard have been proposed for video encoding / decoding. However, it is generally expected to further improve the encoding and decoding efficiency of video encoding and decoding technologies. Summary of the invention

[0003] An embodiment of the present disclosure provides a solution for video processing.

[0004] In a first aspect, a method for video processing is provided. The method comprises: determining motion information and position information of at least one sub-block of a time domain block in a co-located frame of the current video block for conversion between a current video block of the video and a bit stream of the video; determining an affine candidate of the current video block by applying a regression process to the current video block based on the motion information and position information of the at least one sub-block; and performing conversion based on the affine candidate. The method according to the first aspect of the present disclosure determines the affine candidate by applying a regression process based on the sub-blocks of the time domain block, thereby improving the coding efficiency and coding effectiveness.

[0005] In a second aspect, another method for video processing is provided. The method includes: determining motion information and position information of at least one spatial sub-block of the current video block for conversion between a current video block of the video and a bitstream of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one spatial sub-block; and performing conversion based on the affine candidate. The method according to the second aspect of the present disclosure determines the affine candidate by applying a regression process based on the spatial sub-block, thereby improving the coding efficiency and coding effectiveness.

[0006] In a third aspect, a device for video processing is provided. The device includes a processor and a non-volatile memory having instructions thereon. The instructions, when executed by the processor, cause the processor to perform the method according to the first aspect of the present disclosure.

[0007] In a fourth aspect, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions for causing a processor to execute the method according to the first aspect of the present disclosure.

[0008] In a fifth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining motion information and position information of at least one subblock of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one subblock; and generating a bitstream based on the affine candidate.

[0009] In a sixth aspect, a method for storing a bitstream of a video is provided. The method includes: determining motion information and position information of at least one subblock of a temporal block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying a regression process to the current video block based on the motion information and position information of the at least one subblock; generating a bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0010] In a seventh aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining motion information and position information of at least one spatial sub-block of a current video block; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one spatial sub-block; and generating a bitstream based on the affine candidate.

[0011] In an eighth aspect, a method for storing a bitstream of a video is provided. The method includes: determining motion information and position information of at least one spatial subblock of a current video block; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one spatial subblock; generating a bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0012] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings. In the exemplary embodiments of the present disclosure, the same reference numerals generally refer to the same components.

[0014] Figure 1shows a block diagram illustrating an example video encoding and decoding system according to some embodiments of the present disclosure;

[0015] Figure 2 shows a block diagram illustrating a first example video encoder according to some embodiments of the present disclosure;

[0016] Figure 3 shows a block diagram illustrating an example video decoder according to some embodiments of the present disclosure;

[0017] Figure 4A and Figure 4B Affine motion models based on control points are shown respectively;

[0018] Figure 5 The affine MVF of each sub-block is shown;

[0019] Figure 6 The positions of the inherited affine motion predictors are shown;

[0020] Figure 7 Control point motion vector inheritance is shown;

[0021] Figure 8 The positions of candidate positions for the constructed affine merge pattern are shown;

[0022] Fig. 9 A diagram showing the use of motion vectors for the proposed combination method;

[0023] Fig.10 Sub-block MV VSB and pixel Δv(i,j) are shown;

[0024] Fig.11A and Fig. 11B The SbTMVP process in VVC is shown, where Fig.11A shows the spatial neighboring blocks used by ATVMP, and Fig. 11B The derivation of a sub-CU motion field by applying motion shifts from spatial neighbors and scaling motion information from corresponding co-located sub-CUs is shown;

[0025] Fig.12 A first HPT and a second HPT are shown;

[0026] Fig.13 Spatial neighbors used to derive affine merge / AMVP candidates are shown: (a) used to derive inherited candidates (b) used to derive constructed candidates of the first type;

[0027] Fig.14 shows constructed affine merge / AMVP candidates from non-adjacent neighbors to the first type;

[0028] Fig.15 A diagram of neighboring 4x4 sub-blocks used for RMVF parameter derivation is shown. W and H are the width and height of the current CU;

[0029] Fig.16 The planar motion vector prediction process is shown;

[0030] FIG. 17A to FIG. 17D Examples of translational and non-translational motion are shown, respectively, where Fig.17A shows the translational motion that can be represented by BMME, Fig. 17B shows that scaling and rotation can be represented by a four-parameter affine model with two control points, Fig. 17C shows that a regular deformation motion can be represented by a six-parameter affine model with three control points, and Fig.17D shows irregular deformation motion that can be represented by a bilinear interpolation model with four control points;

[0031] Fig.18A and Fig.18B The candidate positions of the motion information of each control point for predicting the block are shown respectively, where: Fig.18A shows the spatial neighbors, and Fig.18B Neighboring points in the time domain are shown;

[0032] Fig.19 A sketch of a bilinear interpolation model for 16x16 blocks is shown;

[0033] Fig. 20 The reference sample used in the planar mode is shown;

[0034] Fig.21 The positions of the spatial merging candidates are shown;

[0035] Fig. 22 shows candidate pairs considered for redundancy check of spatial merging candidates;

[0036] Fig.23 A diagram showing motion vector scaling for temporal merging candidates is shown;

[0037] Fig.24 The temporal merging candidate C is shown 0 and C 1 Candidate location of

[0038] Fig.25 The VVC spatial domain neighboring blocks of the current block are shown;

[0039] Fig.26 shows a diagram of a virtual block in the i-th search round;

[0040] Fig. 27The spatial neighboring blocks used to derive spatial merge candidates are shown;

[0041] Fig.28 Non-adjacent time domain neighboring blocks for deriving non-adjacent time domain merging candidates are shown;

[0042] Fig.29A and Fig.29B The derivation of motion information of neighboring sub-blocks from the corresponding temporal block in the right column, the lower row, and the lower right corner is shown respectively;

[0043] Fig. 30A and Fig. 30B The derivation of motion information of non-adjacent sub-blocks from the corresponding temporal blocks in the lower right column and lower right row are shown respectively;

[0044] Fig.31 shows the derivation of co-located sub-block motion information from corresponding temporal blocks;

[0045] Fig.32 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0046] Fig.33 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0047] Fig.34 A block diagram of a computing device is shown in which various embodiments of the present disclosure may be implemented.

[0048] Throughout the drawings, the same or similar reference numbers generally refer to the same or similar elements. DETAILED DESCRIPTION

[0049] The principle of the present disclosure is now described in conjunction with some embodiments. It should be understood that these embodiments are described only for illustrative purposes to help those skilled in the art understand and implement the present disclosure, and do not constitute any limitation to the scope of the present disclosure. The disclosure described herein can be implemented in various ways except for the way described below.

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

[0051] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, it is considered that structures or features related to other embodiments that affect that feature are within the knowledge of those skilled in the art, whether or not explicitly described.

[0052] 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 by these terms. These terms are only used to distinguish one element from another element. 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.

[0053] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "comprise", "include", "have", "have", "include" and / or "include", when used herein, specify the presence of stated features, elements and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components and / or combinations thereof. Example Environment

[0054] Figure 1 1 is a block diagram illustrating an example video codec system 100 that may utilize the techniques of the present disclosure. As shown, the video codec system 100 may include a source device 110 and a destination device 120. The source device 110 may also be referred to as a video encoding device, and the destination device 120 may also be referred to as a video decoding device. In operation, the source device 110 may be configured to generate encoded video data, and the destination device 120 may be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.

[0055] Video source 112 may include a source such as a video capture device. Examples of a video capture device include, but are not limited to, an interface that receives video data from a video content provider, a computer graphics system for generating video data, and / or combinations thereof.

[0056] The video data may include one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a bit sequence that forms a codec representation of the video data. The bitstream may include a codec picture and associated data. The codec picture is a codec representation of the picture. The associated data may include a sequence parameter set, a picture parameter set, and other grammatical structures. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The encoded video data may be directly transmitted to the destination device 120 via the network 130A via the I / O interface 116. The encoded video data may also be stored on a storage medium / server 130B for access by the destination device 120.

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

[0058] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Codec (HEVC) standard, the Versatile Video Codec (VVC) standard, and other existing and / or future standards.

[0059] Figure 2 is a block diagram showing an example of a video encoder 200 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video encoder 114 in the system 100 is shown.

[0060] Video encoder 200 may be configured to implement any or all of the techniques of this disclosure. Figure 2 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[0061] In some embodiments, the video encoder 200 may include a partitioning unit 201, a prediction unit 202, a residual generation unit 207, a transformation unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transformation unit 211, a reconstruction unit 212, a buffer 213 and an entropy coding unit 214, and the prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.

[0062] In other examples, the video encoder 200 may include more, fewer, or different functional components. In one example, the prediction unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode, where at least one reference picture is a picture in which the current video block is located.

[0063] Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, for purposes of explanation, these components are described in detail in the following sections. Figure 2 are shown separately in the example.

[0064] The partitioning unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[0065] The mode selection unit 203 may select one of a plurality of codec modes (INTRA codec or INTER codec) based on the error result, for example, and provide the resulting intra-coded block 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 picture. In some examples, the mode selection unit 203 may select a combination of intra- and inter-prediction (CIIP) modes, where the prediction is based on an inter-prediction signal and an intra-prediction signal. In the case of inter-prediction, the mode selection unit 203 may also select a resolution for a motion vector (e.g., sub-pixel precision or integer pixel precision) for the block.

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

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

[0068] In some examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference pictures of list 0 or list 1 to find the reference video block for the current video block. The motion estimation unit 204 may then generate a reference index and a motion vector, the reference index indicating the reference picture in list 0 or list 1 containing the reference video block, and the motion vector indicating the spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, the prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information of the current video block.

[0069] Alternatively, in other examples, the motion estimation unit 204 may perform bidirectional prediction on the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block, and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate a plurality of reference indexes and a plurality of motion vectors, the plurality of reference indexes indicating a plurality of reference pictures in list 0 and list 1 containing a plurality of reference video blocks, and the plurality of motion vectors indicating a plurality of spatial displacements between the plurality of reference video blocks and the current video block. The motion estimation unit 204 may output the plurality of reference indexes and the plurality of motion vectors of the current video block as motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the plurality of reference video blocks indicated by the motion information of the current video block.

[0070] In some examples, motion estimation unit 204 may output a complete set of motion information for use in a decoding process by a decoder. Alternatively, in some embodiments, motion estimation unit 204 may signal motion information of a current video block with reference to motion information of another video block. For example, motion estimation unit 204 may determine that motion information of a current video block is sufficiently similar to motion information of an adjacent video block.

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

[0072] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0073] As discussed above, the video encoder 200 may signal motion vectors in a predictive manner.Two examples of prediction signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and merge mode signaling.

[0074] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a prediction video block and various syntax elements.

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

[0076] In other examples, such as in skip mode, there may be no residual data for the current video block, and the residual generation unit 207 may not perform a subtraction operation.

[0077] Transform processing unit 208 may generate one or more transform coefficient video blocks for a current video block by applying one or more transforms to the residual video block associated with the current video block.

[0078] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values ​​associated with the current video block.

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

[0080] After reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[0081] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives the data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy-coded data and output a bitstream including the entropy-coded data.

[0082] Figure 3 is a block diagram showing an example of a video decoder 300 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video decoder 124 in the system 100 is shown.

[0083] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Figure 3 In the example of , video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

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

[0085] The entropy decoding unit 301 can retrieve the encoded bitstream. The encoded bitstream may include entropy-encoded video data (e.g., encoded video data blocks). The entropy decoding unit 301 can decode the entropy-encoded video data, and the motion compensation unit 302 can determine motion information from the entropy-decoded video data, the motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine the information, for example, by performing AMVP and merge mode. AMVP is used, including deriving several most likely candidates based on data and reference pictures of adjacent PBs. The motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indexes, and in the case of prediction areas in B strips, also includes an identification of which reference picture list is associated with each index. As used herein, in some aspects, "merge mode" may refer to deriving motion information from blocks adjacent in the spatial or temporal domain.

[0086] The motion compensation unit 302 may generate a motion compensated block, which may perform interpolation based on interpolation filtering. An identifier for the interpolation filter used with sub-pixel precision may be included in a syntax element.

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

[0088] The motion compensation unit 302 may use at least part of the syntax information to determine the size of blocks used to encode (multiple) frames and / or (multiple) slices of the encoded video sequence, partition information describing how each macroblock of a picture of the encoded video sequence is partitioned, a mode indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-frame coded block, and other information for decoding the encoded video sequence. As used herein, in some aspects, a "slice" may refer to a data structure that can be decoded independently of other slices of the same picture in terms of entropy coding and decoding, signal prediction, and residual signal reconstruction. A slice may be an entire picture, or it may be a region of a picture.

[0089] The intra prediction unit 303 may use, for example, an intra prediction mode received in the bitstream to form a prediction block from spatially neighboring blocks. The inverse quantization unit 303 inversely quantizes (i.e., dequantizes) the quantized video block coefficients provided in the bitstream and decoded by the entropy decoding unit 301. The inverse transform unit 303 applies an inverse transform.

[0090] The reconstruction unit 306 may obtain the decoded block, for example, by adding the residual block to the corresponding prediction block generated by the motion compensation unit 202 or the intra prediction unit 303. If necessary, a deblocking filter may also be applied to filter the decoded block in order to remove blocking artifacts. The decoded video block is then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction, and the buffer 307 also produces the decoded video for presentation on a display device.

[0091] Some exemplary embodiments of the present disclosure will be described in detail below. It should be noted that the section titles used in this document are for ease of understanding, rather than limiting the embodiments disclosed in the section to that section. In addition, although some embodiments are described with reference to general video codecs or other specific video codecs, the disclosed technology is also applicable to other video codec technologies. In addition, although some embodiments describe the video coding and decoding steps in detail, it should be understood that the corresponding decoding steps of the cancellation codec will be implemented by the decoder. In addition, the term video processing includes video coding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at different compression bit rates. 1. Brief Overview The present disclosure relates to image / video coding, and more particularly to regression-based affine motion prediction. It can be applied to existing video coding standards such as HEVC or standard VVC (universal video coding). It can also be applied to future video coding standards or video codecs. 2. Introduction Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Visual, and the two organizations jointly developed H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC) and H.265 / HEVC standards. Since H.262, video codec standards are based on a hybrid video codec structure that utilizes temporal prediction plus transform coding. In order to explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. JVET meetings are held quarterly, and at the JVET meeting in April 2018, the new video codec standard was officially named Versatile Video Codec (VVC), and the first version of the VVC Test Model (VTM) was released at this time. Then after each meeting, the VVC working draft and test model VTM were updated. The VVC project achieved technical completion (FDIS) at the July 2020 meeting. In January 2021, JVET established the Exploration Experiment (EE) with the goal of leveraging novel traditional algorithms to enhance compression efficiency beyond VVC capabilities. Soon after, ECM was built as a common software foundation for long-term exploratory work toward the next generation of video codec standards. In January 2021, JVET established Exploration Experiments (EEs) to target enhanced compression efficiency beyond VVC capabilities using novel conventional algorithms. Soon, ECM was built as a common software foundation for long-term exploratory work toward the next generation of video coding standards. 2.1. Affine Motion Compensated Prediction In HEVC, only the translational motion model is applied to motion compensated prediction (MCP). In the real world, there are various motions, such as zoom-in / out, rotation, perspective motion, and other irregular motions. In VVC, block-based affine transformation motion compensated prediction is applied. Figure 4A and Figure 4B The affine motion models based on control points are shown respectively. Figure 4A A 4-parameter affine model is shown. Figure 4B A 6-parameter affine model is shown. Figure 4A and Figure 4B As shown, the affine motion field of a block is described by the motion information of two control points (4-parameters) or three control point motion vectors (6-parameters). For the 4-parameter affine motion model, the motion vector at a sample position (x, y) in a block is derived as: For the 6-parameter affine motion model, the motion vector at a sample position (x, y) in a block is derived as: Where (mv 0x ,mv 0y ) is the motion vector of the upper left control point, (mv 1x ,mv 1y ) is the motion vector of the upper right control point, and (mv 2x ,mv 2y) is the motion vector of the lower left control point. To simplify motion compensated prediction, block-based affine transform prediction is applied. Figure 5 The affine MVF of each sub-block is shown. To derive the motion vector of each 4x4 luminance sub-block, the motion vector of the center sample of each sub-block is Figure 5 As shown, it is calculated according to the above equation and rounded to 1 / 16 fractional precision. The motion compensated interpolation filter is then applied to generate a prediction for each subblock with a derived motion vector. The subblock size of the chroma component is also set to 4x4. The MV of the 4×4 chroma subblock is calculated as the average of the MVs of the upper left and lower right luminance subblocks in the same 8x8 luminance region. Just like translational motion inter prediction, there are two affine motion inter prediction modes: affine merge mode and affine AMVP mode. 2.1.1. Affine Merge Prediction AF_MERGE mode can be applied to CUs with width and height greater than or equal to 8. In this mode, the CPMV of the current CU is generated based on the motion information of the spatially adjacent CUs. There can be up to five CPMVP candidates, and the index is signaled to indicate the candidate to be used for the current CU. The following three types of CPMV candidates are used to form the affine merge candidate list: – Inherited affine merge candidates inferred from the CPMV of neighboring CUs. – The constructed affine merge candidate CPMVP derived using the translated MV of the neighboring CU. – Zero MV. In VVC, there are maximum two inherited affine candidates derived from the affine motion models of neighboring blocks, one from the left neighboring CU and one from the above neighboring CU. Figure 6 The positions of the inherited affine motion predictors are shown. The candidate blocks are Figure 6 For the left predictor, the scan order is A0->A1, and for the upper predictor, the scan order is B0->B1->B2. Only the first inherited candidate from each side is selected. Pruning check is not performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vectors are used to derive the CPMVP candidate in the affine merge list of the current CU. Figure 7 shows the inheritance of control point motion vectors. Figure 7 As shown, if the neighboring lower left block A is encoded and decoded in affine mode, the motion vectors v of the upper left corner, upper right corner, and lower left corner of the CU containing block A are 2 、v 3 and v 4 When block A is encoded and decoded through the 4-parameter affine model, the two CPMVs of the current CU are obtained according to v2 and v 3 In the case where block A is encoded and decoded through a 6-parameter affine model, the three CPMVs of the current CU are calculated according to v 2 、v 3 and v 4 is calculated. The constructed affine candidates refer to candidates constructed by combining neighboring translation motion information of each control point. Figure 8 The positions of candidate positions for the constructed affine merge pattern are shown in Fig. Figure 8 The CPMV is derived from the specified spatial and temporal neighbors shown in . k (k=1, 2, 3, 4) represents the kth control point. 1 , check B2->B3->A2 blocks and use the MV of the first available block. For CPMV 2 , check the B1->B0 block, and for CPMV 3 , check A1->A0 block. For TMVP, if available, TMVP is used as CPMV 4 . After obtaining the MVs of the four control points, an affine merge candidate is constructed based on the motion information. The following combinations of control point MVs are used for construction in order: {CPMV 1 ,CPMV 2 ,CPMV 3},{CPMV 1 ,CPMV 2 ,CPMV 4},{CPMV 1 ,CPMV 3 ,CPMV 4}, {CPMV 2 ,CPMV 3 ,CPMV 4},{CPMV 1 ,CPMV 2},{CPMV 1 ,CPMV 3} Combinations of 3 CPMVs construct 6-parameter affine merge candidates, and combinations of 2 CPMVs construct 4-parameter affine merge candidates. To avoid the motion scaling process, the relevant combinations of control point MVs are discarded if the reference indices of the control points are different. After the inherited affine merge candidates and the constructed affine merge candidates are checked, if the list is still not full, a zero MV is inserted at the end of the list. 2.1.2. Affine AMVP prediction Affine AMVP mode can be applied to CUs with width and height both greater than or equal to 16. An affine flag in the CU level in the bitstream is signaled to indicate whether the affine AMVP mode is used, and then another flag is signaled to indicate 4-parameter affine or 6-parameter affine. In this mode, the difference between the CPMV of the current CU and its predicted value CPMVP is signaled in the bitstream. The affine AVMP candidate list size is 2, which is generated by using the following four types of CPMV candidates in order: – Inherited affine AMVP candidates inferred from the CPMV of neighboring CUs – Constructed affine AMVP candidate CPMVP derived using the translation MV of the neighboring CU –Translated MV from neighboring CU – Zero MV. The order of checking inherited affine AMVP candidates is the same as that of checking inherited affine merge candidates. The only difference is that for AVMP candidates, only affine CUs with the same reference picture as in the current block are considered. When the inherited affine motion prediction value is inserted into the candidate list, the pruning process is not applied. The constructed AMVP candidates are from Figure 8 The same check order as for affine merge candidate construction is used. In addition, the reference picture index of the neighboring blocks is also checked. The first block in the check order that is inter-coded and has the same reference picture as the current CU is used. Only when the current CU is coded with 4-parameter affine mode and mv 0 and mv 1 If all three CPMVs are available, they are added to the affine AMVP list as a candidate. If the current CU is encoded and decoded through the 6-parameter affine mode and all three CPMVs are available, they are added to the affine AMVP list as a candidate. Otherwise, the constructed AMVP candidate is set to unavailable. If the affine AMVP list of candidates is still less than 2 after the valid inherited affine AMVP candidates and constructed AMVP candidates are inserted, then mv 0 、mv 1 and mv 2 Will be added in order as translation MVs to predict all control point MVs of the current CU when available. Finally, if the affine AMVP list is still not full, the zero MV is used to fill the affine AMVP list. 2.1.3. Affine motion information storage In VVC, the CPMV of an affine CU is stored in a separate buffer. The stored CPMV is only used to generate the inherited CPMVP in affine merge mode and affine AMVP mode for the most recently decoded CU. The sub-block MV derived from the CPMV is used for motion compensation, merging of translation MVs / MV derivation of AMVP lists, and deblocking. To avoid picture row buffering for additional CPMV, affine motion data inherited from the CU of the upper CTU is handled differently from inheritance from normal neighboring CUs. If the candidate CU for affine motion data inheritance is in the upper CTU row, the lower left and lower right sub-block MVs in the row buffer are used for affine MVP derivation instead of the CPMVs. In this way, the CPMVs are only stored in the local buffer. If the candidate CU is 6-parameter affine coded, the affine model is downgraded to a 4-parameter model. Fig. 9 A diagram of the motion vector usage for the proposed combination method is shown. Fig. 9 As shown, along the upper CTU boundary, the lower left and lower right sub-block motion vectors of the CU are used for affine inheritance of the CU in the lower CTU. 2.1.4. Prediction Refinement with Optical Flow for Affine Mode Compared with pixel-based motion compensation, sub-block-based affine motion compensation can save memory access bandwidth and reduce computational complexity at the expense of prediction accuracy loss. In order to achieve finer granularity of motion compensation, prediction refinement with optical flow (PROF) is used to refine sub-block-based affine motion compensated predictions without increasing the memory access bandwidth for motion compensation. In VVC, after sub-block-based affine motion compensation is performed, the luma prediction samples are refined by adding the differences derived from the optical flow equation. PROF is described as the following four steps: Step 1) Sub-block based affine motion compensation is performed to generate a sub-block prediction I(i,j). Step 2) Spatial gradient g of sub-block prediction x (i,j) and g y (i,j) is calculated at each sample position using a 3-tap filter [-1,0,1]. The gradient calculation is exactly the same as in BDOF. g x (i,j)=(I(i+1,j)>>shift1)-(I(i-1,j)>>shift1) (2-3) g y (i,j)=(I(i,j+1)>>shift1)-(I(i,j-1)>>shift1) (2-4) Shift1 is used to control the precision of the gradient. For gradient calculation, the sub-block (i.e., 4x4) prediction is extended by one sample on each side. To avoid additional memory bandwidth and additional interpolation calculations, those extended samples on the extended boundary are copied from the nearest integer pixel position in the reference picture. Step 3) The brightness prediction refinement is calculated by the following optical flow equation. ΔI(i,j)= g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j) (2-5) where Δv(i,j) is the difference between the sample MV calculated for the sample position (i,j) (denoted as v(i,j)) and the sub-block MV of the sub-block to which the sample (i,j) belongs, as Fig.10 as shown in . Fig.10 Sub-block MV VSB and pixel Δv(i,j) are shown. Δv(i,j) is quantized in units of 1 / 32 luma sample precision. Since the affine model parameters and the sample positions relative to the sub-block center do not change from sub-block to sub-block, Δv(i,j) can be calculated for the first sub-block and reused for other sub-blocks in the same CU. Let dx(i,j) and dy(i,j) be the distance from the sample position (i,j) to the center (x SB ,y SB ), Δv(i,j) can be derived by the following equations: To maintain accuracy, the center of the sub-block (x SB ,y SB ) is calculated as ((W SB -1) / 2, (H SB -1) / 2), where W SB and H SB are the sub-block width and height respectively. For the 4-parameter affine model, For the 6-parameter affine model, Among them, (v 0x ,v 0y )、(v 1x ,v 1y )、(v 2x ,v 2y ) are the upper left, upper right and lower left control point motion vectors, w and h are the width and height of the CU. Step 4) Finally, the luma prediction refinement ΔI(i,j) is added to the sub-block prediction I(i,j). The final prediction I' is generated according to the following equation. I′(i,j)=I(i,j)+ΔI(i,j) PROF is not applied to affine-coded CUs in two cases: 1) all control point MVs are the same, indicating that the CU has only translational motion; 2) affine motion parameters are greater than a certain limit, because sub-block based affine MC is downgraded to CU based MC to avoid large memory access bandwidth requirements. A fast codec method is applied to reduce the coding complexity of affine motion estimation with PROF. PROF is not applied in the following two cases during the affine motion estimation stage: a) If the CU is not a root block and its parent block does not select the affine mode as its best mode, PROF is not applied because the possibility of selecting the affine mode as the best mode for the current CU is low; b) If the magnitudes of the four affine parameters (C, D, E, F) are all less than a predetermined threshold and the current picture is not a low-latency picture, PROF is not applied because the improvement introduced by PROF for this case is small. In this way, affine motion estimation with PROF can be accelerated. 2.1.5. Adaptive bypass of affine ME If the VTM encoder parameter AdaptBypassAffineMe is enabled, adaptive bypass of affine ME is used as an encoder-specific operation for accelerated encoding. Before performing affine ME for a CU, the decoding modes of its five spatial neighbors (above, left, top right, bottom left, top left) are checked. If the number of available neighbors is greater than or equal to 4 and none of them are coded as affine or SbTMVP mode, affine ME is bypassed. In addition, the following two conditions are considered. 1) If the CU is not larger than 16x16, the affine ME is not bypassed. 2) If the best mode for the CU is affine merging, and the current picture does not have a symmetric reference pair (SMVD condition) or the absolute temporal distance between the current picture and the SMVD reference is greater than 1, then affine ME is not bypassed. 2.2. Sub-block based temporal motion vector prediction (Sb TMVP) VVC supports a sub-block based temporal motion vector prediction (Sb TMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the co-located picture to improve the motion vector prediction and merge mode for the CU in the current picture. The same co-located pictures used by TMVP are used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects: –TMVP predicts motion at CU level, but SbTMVP predicts motion at sub-CU level; – Given that TMVP is from the same block in the same picture (the same block is the lower right or center block relative to the current CU) Extracting temporal motion vectors, SbTMVP applies motion shifting before extracting temporal motion information from co-located pictures, where the motion shifting is obtained from the motion vector of one of the spatial neighboring blocks of the current CU. The SbTVMP process Fig.11A and Fig. 11B Shown in. Fig.11A The spatial neighboring blocks used by ATVMP are shown. Fig. 11B The sub-CU motion field is derived by applying motion shifts from spatial neighbors and scaling the motion information from the corresponding co-located sub-CU. SbTMVP predicts the motion vector of the sub-CU within the current CU in two steps. In the first step, Fig.11A The spatial neighbor A1 in is checked. If A1 has a motion vector that uses the co-located picture as its reference picture, then this motion vector is selected as the motion shift to be applied. If no such motion is identified, the motion shift is set to (0,0). In the second step, the motion offset identified in step 1 is applied (i.e., added to the coordinates of the current block) to obtain Fig. 11B The co-located picture shown obtains sub-CU level motion information (motion vector and reference index). Fig. 11B The example in assumes that the motion shift is set to the motion of block A1. Then, for each sub-CU, the motion information of its corresponding block (the minimum motion grid covering the center sample) in the co-located picture is used to derive the motion information for the sub-CU. After the motion information of the co-located sub-CU is identified, it is converted into the motion vector and reference index of the current sub-CU in a manner similar to the TMVP process of HEVC, where temporal motion scaling is applied to align the reference picture of the temporal motion vector with the reference picture of the current CU. In VVC, a combined sub-block based merge list containing SbTVMP candidates and affine merge candidates is used for signaling of sub-block based merge mode. SbTVMP mode is enabled / disabled by a sequence parameter set (SPS) flag. If SbTMVP mode is enabled, the SbTMVP prediction value is added as the first entry in the list of sub-block based merge candidates, and then the affine merge candidates. The size of the sub-block based merge list is signaled in the SPS, and the maximum allowed size of the sub-block based merge list in VVC is 5. The sub-CU size used in SbTMVP is fixed to 8x8, and like the affine merge mode, the SbTMVP mode is only applicable to CUs whose width and height are both greater than or equal to 8. The encoding logic of the additional SbTMVP merge candidate is the same as other merge candidates, ie, for each CU in a P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate. 2.3. Affine model inheritance and non-adjacent affine patterns based on history parameters History Parameter-Based Affine Model Inheritance (HAMI) allows affine models to be inherited from previously affine-encoded blocks that may not be adjacent to the current block.Similar to the enhanced regular merge mode, a non-adjacent affine mode (NA-AFF) is introduced. A first history parameter table (HPT) is established. The entries of the first HPT store affine parameter sets: a, b, c, and d, each of which is represented by a 16-bit signed integer. The entries in the HPT are classified by reference list and reference index. Five reference indexes are supported for each reference list in the HPT. In formula, the category of the HPT (denoted as HPTCat) is calculated as HPTCat(Ref List, RefIdx)=5×RefList+min(Ref Idx, 4), Where RefList and RefIdx represent the reference picture list (0 or 1) and the reference index, respectively. For each category, up to seven entries can be stored, making 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. When decoding a video with a reference list RefList curl and RefIdx cur After the affine-encoded CU is decoded, the affine parameters are used to update the category HPTCat (Ref List cur ,RefIdx cur ) in the . Fig.12 The first HPT and the second HPT are shown. The candidate based on the historical affine parameter (HAPC) is obtained from Fig.12 The affine parameter set in the corresponding entry in the first HPT and one of the seven neighboring 4x4 blocks represented as A0, A1, A2, B0, B1, B2 or B3 in the first HPT is derived. The MV of the neighboring 4x4 block is taken as the base MV. In the formula, the MV of the current block at position (x, y) is calculated as: Where (mv h base ,mv vbase ) represents the MV of the adjacent 4X4 block, (x base ,y base ) represents the center position of the neighboring 4X4 blocks. (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 normal MV of the current block. A second history parameter table (HPT) with base MV information is also appended. There are nine entries in the second HPT, where the entry includes the base MV, the reference index for each reference list and four affine parameters and the base position. An additional merged HAPC can be generated from the second HPT, where the base MV information for the corresponding affine model is stored in the entry. The difference between the first HPT and the second HPT is Fig.12 is shown in . Furthermore, the affine merge candidates used in pairs are generated from two affine merge candidates, which are either historically derived or not. The pair of affine merge candidates is generated by averaging the CPMVs of the existing affine merge candidates in the list. In response to the introduction of the new HAPC, the size of the sub-block based merge candidate list is increased from 5 to 15, and are all included in the ARMC process. Fig.13 Figure 1 shows the spatial neighbors used to derive affine merge / AMVP candidates: (a) for deriving inherited candidates (b) for deriving the first type of constructed candidates. In NA-AFF, the pattern of non-adjacent spatial neighbors is obtained in Fig.13 As shown in . Similar to the existing non-adjacent conventional merge candidates, the distance between the non-adjacent spatial neighbors and the current coding block in NA-AFF is defined based on the width and height of the current CU. Fig.13 The motion information of non-adjacent spatial neighbors in is used to generate additional inherited and constructed affine merge / AMVP candidates. Specifically, for the inherited candidates, the same derivation process of the inherited affine merge / AMVP candidates in VVC remains unchanged, except that CPMV is inherited from non-adjacent spatial neighbors. Non-adjacent spatial neighbors are checked based on their distance from the current block (i.e., from near to far). At a certain distance, only the first available neighbor (encoded in affine mode) from each side of the current block (e.g., left and above) is included for the inherited candidate derivation. As Fig.13 As shown by the dotted arrows in (a), the checking order of the neighboring points on the left and above is from bottom to top and from right to left respectively. Fig.14 Shown is the constructed affine merge / AMVP candidate of the first type from non-adjacent neighbors. For the first type of candidates, such as Fig.13 As shown in (b), first, the positions of the left and upper non-adjacent spatial neighboring points are determined independently; then, the position of the upper left neighboring point can be determined accordingly, which can close the rectangular virtual block with the left and upper non-adjacent neighboring points. Then, as Fig.14 As shown, the motion information of three non-adjacent neighbors is used to form CPMVs at the upper left (A), upper right (B), and lower left (C) of the virtual block, which are finally projected to the current CU to generate the corresponding constructed candidates. Insert the NA-AFF candidates into the existing affine merge candidate list and the affine AMVP candidate list according to the following order: Affine merge mode: 1.SbTMVP candidate, if available, 2. Inherit from adjacent nodes, 3. Inherit from non-adjacent neighbors, 4. Build from adjacent points 5. The constructed affine candidates of the first type from non-adjacent neighbors, 6. Zero MV. Affine AMVP mode: 1. Inherit from adjacent neighbors, 2. Build from adjacent points 3. Translation MV from adjacent neighbors, 4. Translation MV from neighboring points in the time domain, 5. Inherit from non-adjacent neighbors, 6. The constructed affine candidates of the first type from non-adjacent neighbors, 7. Zero MV. Due to the inclusion of additional candidates generated by NA-AFF, the size of the affine merge candidate list is increased from 5 to 15. The subgroup size of the ARMC for the affine merge mode is increased from 3 to 15. In NA-AFF: 1. The region from which non-adjacent neighbors come is restricted to within the current CTU (ie, no additional storage requirement for line buffering). 2. The storage granularity for affine motion information including CPMV and reference index is reduced from 8x8 to 16x16 (i.e., only the affine motion from the top left 8x8 block is saved). In addition, the saved CPMV is projected to each 16x16 block before storage, so that position and size information is not required. 3. Only the upper left CPMV and the upper right CPMV are stored (ie, the 4-parameter affine model for NA-AFF is always used). 2.4. Regression-based affine candidate inference During the VVC standardization process, a regression-based motion vector field (RMVF) derivation method was proposed, which provides new and various sub-block-based merging candidates. Fig.15 As shown, the motion vectors and center positions of neighboring sub-blocks from the current CU are used as input to the linear regression process to derive a set of linear model parameters. Fig.15 A diagram of neighboring 4x4 sub-blocks used for RMVF parameter derivation is shown. W and H are the width and height of the current CU. A regression-based affine candidate derivation method is proposed. The sub-block motion field from the previously encoded affine CU and the motion vectors from the neighboring sub-blocks of the current CU are used as input for the regression process. Compared with the regression process, the difference is that the predicted CPMV instead of the sub-block motion field for the current block is derived as output. It was decided to test the proposed method in EE2. This contribution reports the EE test results of the proposed method on ECM-5.0. A total of 3 tests were conducted. In test a, regression-based affine merge candidates are derived and added to the affine merge list. The sub-block motion fields from the previously decoded affine CU and the motion information from the neighboring sub-blocks of the current CU are used as inputs to the regression process to derive the proposed affine candidates. A previously encoded affine CU can be identified by scanning non-adjacent locations and the affine HMVP table. The neighboring sub-block information of the current CU is given by Fig.15 4x4 sub-block extraction represented by the grey area depicted in . For each sub-block, given a reference list, the corresponding motion vector and center coordinates of the sub-block can be used. For each affine CU, at most 2 affine candidates can be derived. One with neighboring sub-block information and one without. All candidates generated by linear regression are pruned and collected into a candidate subgroup, and the TM cost-based ARMC process is applied when ARMC is enabled. Afterwards, when N affine CUs are found, at most N candidates generated by linear regression are added to the affine merge list. In test b, the number of affine candidates for ARMC is increased from 15 to 30, and the output list size is kept at 15. Finally, in test c, the diversity criterion for ARMC ranking tested in EE2-2.5 is applied above test b. 2.5. Planar Motion Vector Prediction In order to generate a smooth fine-grained motion field, Fig.16 A brief description of the planar motion vector prediction process is given. Fig.16 The planar motion vector prediction process is shown. Planar motion vector prediction is achieved by averaging horizontal and vertical linear interpolations on a 4x4 block basis as follows. P(x,y)=(H×P h (x,y)+W×P v (x,y)+H×W) / (2×H×W) W and H represent the width and height of the block. (x,y) are the coordinates of the current subblock relative to the top left subblock. All distances are represented by pixel distances divided by 4. P(x,y) is the motion vector of the current subblock. The horizontal prediction value P for the position (x, y) h (x,y) and vertical prediction value P v (x,y) is calculated as follows: P h (x,y)=(W-1-x)×L(-1,y)+(x+1)×R(W,y) P v (x,y)=(H-1-y)×A(x,-1)+(y+1)×B(x,H) Where L(-1,y) and R(W,y) are the motion vectors from the 4x4 block to the left and right of the current block. A(x,-1) and B(x,H) are the motion vectors from the 4x4 block to the top and bottom of the current block. The reference motion information of the neighboring blocks in the left column and above row is derived from the spatial neighboring blocks of the current block. The reference motion information of the neighboring blocks in the right column and the lower row is derived as follows. 1) Export the motion information of the lower right temporal neighboring 4x4 block. 2) Calculate the motion vector of the right column neighboring 4x4 block using the derived motion information of the lower right neighboring 4x4 block and the motion information of the upper right neighboring 4x4 block, as described in formula (2-10). 3) Calculate the motion vector of the lower row neighboring 4x4 block using the derived motion information of the lower right neighboring 4x4 block and the motion information of the lower left neighboring 4x4 block, as described in formula (2-11). R(W,y)=((Hy-1)×AR+(y+1)×BR) / H (2-10) B(x,H)=((Wx-1)×BL+(x+1)×BR) / W (2-11) Where AR is the motion vector of the upper right spatially adjacent 4x4 block, BR is the motion vector of the lower right spatially adjacent 4x4 block, and BL is the motion vector of the lower left spatially adjacent 4x4 block. The motion information obtained from the neighboring blocks for each list is scaled to the first reference picture for the given list. 2.6. Bilinear interpolation model The core idea of ​​bilinear interpolation is to perform linear interpolation in two directions. Examples of irregular deformation motion that can be represented by the bilinear interpolation model are FIG. 17A to FIG. 17D , where the motion information of each pixel in the block can be calculated from the motion information of its four control points according to the bilinear interpolation model. Fig.17A A translational motion that can be represented by a BMME is shown. Fig. 17B It is shown that scaling and rotation can be represented by a four-parameter affine model with two control points. Fig. 17C A regular deformation motion that can be represented by a six-parameter affine model with three control points is shown. Fig.17D An irregular deformation motion that can be represented by a bilinear interpolation model with four control points is shown. 2.6.1. Export of motion information for control points exist Fig.18A and Fig.18B The candidate positions of motion information for each control point of the prediction block are shown in . Fig.18A and Fig.18B Candidate positions of motion information for each control point of the prediction block are shown respectively. Fig.18A shows the spatial neighbors, and Fig.18B Neighboring points in the time domain are shown. Fig.18A and Fig.18B In, CP k (k=1,2,3,4) represents the kth control point. Used to predict CP k The spatial candidate positions of the motion information of (k=1,2,3) are Fig.18A For predicting CP 4 The temporal candidate positions of the motion information are Fig.18B is shown in . Get the motion information of each control point in the following priority order: For CP 1 , check priority is B 2 ->A 2 ->B 3 , if it is available, use B 2 Otherwise, if A 2 If available, use A 2 If A 2 and B 2 If neither is available, use B 3 If all three candidates are unavailable, CP cannot be obtained. 1 sports information. For CP 2 , check priority is B 0 ->B1 . For CP 3 , the verification priority is A 0 ->A 1 . For CP 4 , use T Rb . The motion information of each sub-block in the current block can be interpolated only when the motion information of all four control points can be derived and they are different in at least one reference list. 2.6.2. Derivation of motion vectors for sub-blocks After deriving the MV of the control point, it is used to interpolate the MV of each sub-block in the current block as follows. represents the MV of the kth control point, Indicates the MV of the current sub-block. Interpolation kernel φ k Depends on CP k The contribution to the current sub-block. The interpolation function is a bilinear interpolation function. Equation (2-12) gives the corresponding Fig.19 The interpolation kernel of . φ 1 =((W+1-x)·(H+1-y)) / ((W+1)·(H+1)) φ 2 =(x·(H+1-y)) / ((W+1)·(H+1)) φ 3 =((W+1-x)·y) / ((W+1)·(H+1)) φ 4 =(x,y) / ((W+1)·(H+1)) (2-12). In equation (2-12) and Fig.19 In , W and H represent the width and height of the block. (x, y) is the coordinate of the current sub-block. All distances are represented by pixel distances divided by 4. 2.6.3. Derivation of reference index for sub-blocks The reference index is used to indicate the reference picture. After determining the motion information of each control point, the reference index for each sub-block is derived as follows. If all four control points have the same reference index, then that reference index is selected as the reference index for each sub-block. Otherwise, the reference index with the highest utilization among the reference indexes of the four control points is selected. Note that there may be more than one reference index with the highest utilization. In this case, the one with the smallest index is selected as the reference index for each sub-block. This is because the reference picture with the smallest reference index has the shortest temporal distance to the current picture. 2.6.4. Scaling the motion vector of a control point Before using the MV of the control point to interpolate the MV of the sub-block, they should be pre-processed. If the MV of the control point points to a different reference picture from the reference picture of the sub-block, the MV is scaled. The scaling process is performed based on the picture order count (POC) distance similar to the derivation process of the temporal merging candidate. 2.7. Plane Horizontal Mode and Plane Vertical Mode In planar mode, Fig. 20 The reconstructed values ​​of the four reference samples shown in are used to obtain the predicted value of the current sample. Fig. 20 The reference samples used in the planar mode are shown. Specifically, linear interpolation is performed in the horizontal direction and the vertical direction respectively, and the two results are averaged to obtain the predicted samples, as shown in the following formula: predV(x,y)=((H-1-y)*rec(x,-1)+(y+1)*rec(-1,H))<<log 2 W predH(x,y)=((W-1-x)*rec(-1,y)+(x+1)*rec(W,-1))<<log 2 H pred(x,y)=(predV(x,y)+predH(x,y)+W*H)>>(log 2 W+log 2 H+1). This contribution proposes two additional planar modes: planar horizontal mode and planar vertical mode. For planar horizontal mode, horizontal linear interpolation is performed based only on the left and top-right reference samples to predict the current sample as: pred(x,y)=((W-1-x)*rec(-1,y)+(x+1)*rec(W,-1)+(W>>1))>>log 2 W. For planar vertical mode, vertical linear interpolation is performed based only on the upper and lower left reference samples to predict the current sample as: pred(x,y)=((H-1-y)*rec(x,-1)+(y+1)*rec(-1,H)+(H>>1))>>log 2 H. The proposed two additional planar modes are only applied to the luma component and are not used for ISP-coded blocks.When the current block enables one of the two proposed planar modes, the propagation mode of the block is set to the original planar mode. For signaling, if the plane flag indicates that the plane mode is used for the current block and the current block is a non-ISP encoded luma block, the syntax element is further signaled by truncating the unary code to indicate which of the original plane mode, the plane horizontal mode, and the plane vertical mode is selected to predict the current block. 2.8. Enhanced temporal motion information derivation In ECM, the temporal MVP for AMVP mode is derived by extracting motion information from the center or bottom right position in the co-located frame. And a similar strategy is also applied to sbTMVP mode, where the motion information from the left neighboring position is used as a motion shift, which is then used to obtain the MVP at the sub-CU level for the CU to be coded. It is said that this design may not ensure the trajectory consistency between the predefined position and the current CU. In this proposal, two aspects are proposed to further improve TMVP in sbTMVP and AMVP modes. First, two co-located frames are used to provide temporal motion information. Second, the motion shift for positioning TMVP is adaptively determined from multiple positions according to the template cost. When constructing the sub-block-based merge candidate list and the AMVP candidate list, two reference frames having the minimum POC distance relative to the frame to be encoded and decoded are determined as co-located frames. For two co-located frames, two motion shift candidate lists are constructed respectively. When constructing the motion shift list Li of the i-th co-located frame Ci, the motion information of the existing candidates in the motion candidate list is checked. If any MV of the motion candidate points to Ci, the corresponding MV is included in Li used as the motion shift candidate. The motion shift with the minimum template matching cost is used to derive the sbTMVP or TMVP candidate. Since one or more sbTMVP candidates are included, the ARMC for the sub-block based merge candidate list is modified accordingly. In the proposed method, the sbTMVP candidate derived from the first co-located frame is placed in the first entry without reordering. At the same time, other sbTMVP candidates are ordered together with the AFFINE candidates. 2.9. Extended Merge Prediction In VVC, the merge candidate list is constructed by including the following five types of candidates in order: (1) Spatial MVP from the spatially adjacent CU (2) Temporal MVP from the co-located CU (3) History-based MVP from FIFO table (4) Paired Average MVP (5) Zero MV. The size of the merge list is signaled in the sequence parameter set header, and the maximum allowed merge list size is 6. For each CU code in merge mode, the index of the best merge candidate is encoded using truncated unary binarization (TU). The first binary bit of the merge index is coded with context, while bypass coding is used for the other binary bits. A derivation process for each category of merge candidates in this session is provided. As done in HEVC, VVC also supports parallel derivation of merge candidate lists for all CUs within a region of a certain size. 2.9.1 Spatial Candidate Export The derivation of spatial merge candidates in VVC is the same as in HEVC, except that the positions of the first two merge candidates are swapped. Fig.21 A maximum of four merge candidates among the candidates in the positions depicted in are selected. Fig.21 The position of the spatial merge candidates is shown. The order of derivation is B 1 , A 1 , B 0 , A 0 and B 2 Only when position B 0 , A 0 , B 1 , A 1 When one or more CUs of are not available (for example, because they belong to another slice or tile) or are intra-coded, position B 2 Considered. In position A 1 After the candidates at are added, the addition of the remaining candidates is subject to a redundancy check, which ensures that candidates with the same motion information are excluded from the list, so that the encoding and decoding efficiency is improved. In order to reduce the computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Fig. 22 shows the candidate pairs that are considered for redundant checking of spatial merging candidates; in contrast, only Fig. 22 The arrows in are linked to pairs, and a candidate is only added to the list if the corresponding candidate for redundancy check does not have the same motion information. 2.9.2 Time Domain Candidate Derivation In this step, only one candidate is added to the list. Specifically, when deriving this time domain merge candidate, the scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. The reference picture list used to derive the co-located CU is explicitly signaled in the slice header. Fig.23 A diagram of motion vector scaling for temporal merge candidates is shown. Fig.23 As shown by the dashed line in , the scaled motion vector for the temporal merge candidate is obtained, which is scaled from the motion vector of the co-located CU using the POC distance, tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero. The position of the time domain candidate is in the candidate C 0 and C 1 is selected between Fig.24 Depicted. Fig.24 The temporal merging candidate C is shown 0 and C 1 Candidate position; if position C 0 The CU at position C is not available, is intra-coded, or is outside the current row of the CTU. 1 is used. Otherwise, position C 0 Used to derive time-domain merging candidates. 2.9.3 History-based Merge Candidate Export After spatial MVP and TMVP, history-based MVP (HMVP) merge candidates are added to the merge list. In this method, the motion information of previously coded blocks is stored in a table and is used as the MVP of the current CU. A table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (cleared) when a new CTU row is encountered. Whenever there is a CU that is non-subblock inter-coded, the associated motion information is added to the last entry of the table as a new HMVP candidate. The HMVP table size S is set to 6, which indicates that up to 6 history-based MVP (HMVP) candidates can be added to the table. When inserting a new motion candidate into the table, a constrained first-in, first-out (FIFO) rule is utilized, where a redundancy check is first applied to find if the same HMVP exists in the table. If found, the same HMVP is removed from the table, and all HMVP candidates are moved forward, and the same HMVP is inserted into the last entry of the table. HMVP candidates can be used in the merge candidate list construction process. The latest HMVP candidates in the table are checked in order and inserted into the candidate list after the TMVP candidate. Redundancy check is applied to the HMVP candidate to merge the candidate in the spatial or temporal domain. In order to reduce the number of redundancy check operations, the following simplifications are introduced: 1. The last two entries in the table are redundancy checked as A 1 and B 1 Airspace candidates. 2. Once the total number of available merge candidates reaches the maximum allowed merge candidate minus 1, the merge candidate list construction process from HMVP is terminated. 2.9.4 Pairwise Average Merging Candidate Derivation Pairwise average candidates are generated by averaging predefined pairs of candidates in the existing merge candidate list, and the predefined pairs are defined as {(0,1),(0,2),(1,2),(0,3),(1,3),(2,3)}, where the number represents the merge index to the merge candidate list. The average motion vector is calculated separately for each reference list. If both motion vectors in a list are available, they are averaged even if they point to different reference pictures; if only one motion vector is available, it is used directly; if no motion vector is available, the list is kept invalid. When the merge list is not full after pairwise average merge candidates are added, zero MVPs are inserted at the end until the maximum merge candidates are reached. 2.10. New Merge Candidates 2.10.1 Non-adjacent merging candidate derivation In VVC, Fig.25 The five spatial neighboring blocks shown and one temporal neighbor are used to derive the merge candidate. Fig.25 The VVC spatial neighboring blocks of the current block are shown. It is proposed to derive additional merge candidates from locations that are not adjacent to the current block using the same pattern as in VVC. To achieve this, for each search round i, a virtual block is generated based on the current block as follows: First, the relative position of the virtual block to the current block is calculated as follows: Offsetx=-i×gridX, Offsetty=-i×gridY Where Offsetx and Offsetty represent the offset of the upper left corner of the virtual block relative to the upper left corner of the current block, and gridX and gridY are the width and height of the search grid. Second, the width and height of the virtual block are calculated by: newWidth=i×2×gridX+currWidth newHeight=i×2×gridY+currHeight. Where currWidth and currHeight are the width and height of the current block. newWidth and newHeight are the width and height of the new virtual block. gridX and gridY are currently set to currWidth and currHeight respectively. Fig.26 A diagram of virtual blocks in the ith search round is shown. Fig.26 The relationship between the virtual block and the current block is shown. After generating the virtual block, block A i , B i , C i , D i and E i can be considered as VVC spatial neighbors of the virtual block and their positions are obtained by the same pattern as in VVC. Obviously, if search round i is 0, the virtual block is the current block. In this case, block A i , B i , C i , D i and E i It is the spatial neighboring block used in VVC merge mode. When building the merge candidate list, pruning is performed to ensure that each element in the merge candidate list is unique. The maximum search loop is set to 1, which means that five non-adjacent spatial neighboring blocks are used. After the temporal merging candidates, the non-adjacent spatial merging candidates are combined with B 1 ->A 1 ->C 1 ->D 1 ->E 1 are inserted into the merge list in the order they were created. 2.10.2 Non-adjacent airspace candidates Non-adjacent spatial merge candidates are inserted after the TMVP in the regular merge candidate list. The mode of spatial merge candidates is Fig. 27 is shown above. Fig. 27 The spatial neighboring blocks used to derive the spatial merge candidates are shown. The distance between non-neighboring spatial candidates and the current codec block is based on the width and height of the current codec block. The line buffer limit is not applied. 2.10.3 Non-adjacent time domain candidates like Fig.28 The non-adjacent time domain positions shown in are introduced, where the non-adjacent time domain MVP positions are located in the same reference frame as the adjacent TMVP. Fig.28 Non-adjacent time domain neighboring blocks used to derive non-adjacent time domain merging candidates are shown. The distance between the non-adjacent time domain candidates and the current codec block is based on the width and height of the current codec block. 3. Question The current design of regression-based affine candidate inference can be further improved. 4. Detailed solution The following detailed embodiments should be considered as examples to explain the general concept. These embodiments should not be interpreted in a narrow manner. In addition, these embodiments can be combined in any way. Affine Motion Prediction Based on Regression 1. The input of the regression process for deriving affine candidates may involve motion information and center positions of neighboring and / or non-neighboring and / or co-located sub-blocks from the corresponding temporal block in the co-located frame for the current block. a. In one example, the corresponding time-domain block for the current block may have the same position and the same size as the current block in the co-located frame. b. In one example, the corresponding time-domain block for the current block may have the same size as the current block, but have a motion shift relative to the current block in the co-located frame. (a) In one example, the motion shift may be derived as follows. 1) In one example, Fig.21 A1 in the spatial domain of the neighboring point can be checked. If A1 has a motion vector that uses the co-located picture as its reference picture, then this motion vector is selected as the motion shift to be applied. If no such motion is identified, the motion shift can be set to a predefined motion vector, such as (0,0). 2) Alternatively, Fig.21 The spatial neighbors A1 and / or B1 and / or B0 and / or A0 and / or B2 may be examined to identify motion shifts. i. In one example, the order of checking can be A1→B1→B0→A0→B2. 3) In one example, the motion shift can be directly set to a predefined motion vector. i. In one example, the predefined motion vector may be (0,0). (b) In one example, if the motion shift is not equal to (0,0), the center positions of the adjacent and / or non-adjacent and / or co-located sub-blocks from the corresponding time domain block in the co-located frame for the current block may need to have the motion shift subtracted. c. In one example, the number of co-located frames may be fixed. (a) In one example, the number of co-located frames may be N (eg, N is a positive integer). 1) In one example, the co-located frame may be the same as the co-located frame for time domain candidate derivation explicitly signaled in the slice header. 2) In one example, the co-located frame can be derived implicitly. i. In one example, the first N smallest The reference frame of the POC distance may be determined as the co-located frame. ii. In one example, the reference frames with the top N smallest QPs may be determined as the co-located frames. iii. In one example, a reference frame having the first N smallest temporal layers may be determined as the co-located frame. (b) Alternatively, the number of co-located frames may be adaptive. d. In one example, motion information of neighboring sub-blocks from the corresponding time-domain block in the co-located frame for the current block may be derived as follows. Fig.29A and Fig.29B The derivation of motion information of neighboring sub-blocks from the corresponding temporal block in the right column, lower row and lower right corner is shown, respectively. (a) In one example, the motion information from the neighboring sub-blocks in the right column, the bottom row, and the bottom right corner can be derived similarly to the temporal candidate derivation in the conventional merge mode, such as Fig.29A as shown in . 1) In one example, the reference picture index for the derived temporal motion information may be predefined, such as zero. 2) In one example, the selected reference picture for which the temporal motion information is derived may be the reference picture whose scaling factor is closest to 1. 3) Alternatively, the motion information from the neighboring sub-blocks in the right column and / or the lower row can be obtained by Fig.29B The linear interpolation shown in is derived. i. In one example, the motion information from the neighboring sub-blocks in the right column can be derived by linear interpolation from the motion information of the upper right corner and the lower right corner in the vertical direction, such as Fig.29B as shown in . ii. In one example, the motion information from the neighboring sub-blocks in the lower row may be derived by linear interpolation of the motion information from the lower left and lower right corners in the horizontal direction, such as Fig.29B as shown in . iii. In one example, the motion information of the upper right corner may be spatial domain or temporal domain motion information. iv. In one example, the motion information of the lower left corner may be spatial or temporal motion information. v. In one example, the motion information of the lower right corner may be time domain motion information. vi. Before performing linear interpolation, the two ends or control points of the linear interpolation are (For example, Fig.29B (B0,C0),(A0,C0)) in the image may need to have the same reference picture. (i) In one example, if two control points have different reference pictures, no linear interpolation may be performed. (ii) In one example, if two control points have different reference pictures, the motion vector of one control point may be scaled to point to the reference picture of the other control point. (b) In one example, the motion information of the neighboring sub-blocks from the corresponding time-domain block in the co-located frame for the current block can be obtained from Fig.24 The adjacent time-domain neighboring blocks shown in the C0 and / or C1 positions are derived. e. In one example, motion information of non-neighboring sub-blocks from corresponding time-domain blocks in a co-located frame for the current block may be derived as follows. Fig. 30A and Fig. 30B The derivation of motion information of non-adjacent sub-blocks from the corresponding temporal blocks in the lower right column and lower right row is shown respectively. (a) In one example, the motion information from the non-neighboring sub-blocks in the bottom right column and / or bottom right row may be derived similarly to the temporal candidate derivation in the conventional merge mode, such as Fig. 30A as shown in . 1) In one example, the reference picture index for the derived temporal motion information may be predefined, such as zero. 2) In one example, the selected reference picture for which the temporal motion information is derived may be the reference picture whose scaling factor is closest to 1. 3) Alternatively, the motion information from the non-adjacent sub-blocks in the bottom right column and / or bottom right row may be obtained by Fig. 30B The linear interpolation shown in is derived. i. In one example, the motion information from the non-adjacent sub-block in the bottom right column can be derived from the motion information of the two control points (e.g., (E0, C0)) in the bottom right column by linear interpolation in the vertical direction, as shown in Fig. 30B as shown in . ii. In one example, the motion information from the non-adjacent sub-block in the lower right row can be derived from the motion information of the two control points (eg, (D0, C0)) in the lower right row by linear interpolation in the horizontal direction, as shown in FIG. Fig. 30B as shown in . iii. Before performing linear interpolation, the two ends or control points of the linear interpolation (For example, Fig. 30B (D0,C0),(E0,C0)) in may need to have the same reference picture. (i) In one example, if two control points have different reference pictures, no linear interpolation may be performed. (ii) In one example, if two control points have different reference pictures, the motion vector of one control point may be scaled to point to the reference picture of the other control point. iv. Before performing linear interpolation, the two ends or control points of the linear interpolation (For example, Fig. 30B (D0, C0), (E0, C0)) in can be derived, similar to the time domain candidate derivation in the regular merge mode. 4) In one example, the length of the bottom right row may depend on the width of the current block. i. In one example, the length of the bottom right row may be a factor (eg, w1) times the width of the current block. (i) In one example, the factor may be 1 / 2. 5) In one example, the length of the bottom right column may depend on the height of the current block. i. In one example, the length of the bottom right column may be a factor (eg, w2) of the height of the current block. (i) In one example, the factor may be 1 / 2. (b) In one example, the motion information of non-neighboring sub-blocks from the corresponding time-domain block in the co-located frame for the current block can be obtained from Fig.28 Those non-adjacent time-domain neighboring blocks in are derived. f. In one example, the motion information of the co-located sub-block from the corresponding temporal block in the co-located frame for the current block may be similar to Fig.31 The temporal candidate derivation in the conventional merge mode shown in is derived. Fig.31 The derivation of co-located sub-block motion information from the corresponding temporal block is shown. (a) In one example, the reference picture index for derived temporal motion information may be predefined, such as zero. (b) In one example, the selected reference picture for which temporal motion information is derived may be the reference picture whose scaling factor is closest to 1. g. In one example, the sub-block size may be predefined, such as 4x4. 2. The input of the regression process for deriving affine candidates may involve motion information of some additional / alternative spatially adjacent and / or non-adjacent sub-blocks from the current block and their center positions. a. In one example, additional / alternative spatially adjacent and / or non-adjacent sub-blocks may be used to derive Fig.21 The spatial neighboring blocks of those spatial merging candidates are the same as / belong to part of the above-mentioned spatial neighboring blocks / include the above-mentioned spatial neighboring blocks. b. In one example, additional / alternative spatially adjacent and / or non-adjacent sub-blocks may be used to derive Fig. 27 The spatial neighboring blocks of those spatial merging candidates are the same as / belong to part of the above-mentioned spatial neighboring blocks / include the above-mentioned spatial neighboring blocks.

[0092] Fig.32 A flow chart of a method 3200 for video processing according to an embodiment of the present disclosure is illustrated. The method 3200 is implemented during conversion between a current video block of a video and a bitstream of the video.

[0093] At block 3210, motion information and position information for at least one sub-block of a time-domain block in a co-located frame of a current video block is determined.

[0094] At block 3220, an affine candidate for the current video block is determined by applying a regression process to the current video block based on the motion information and position information of the at least one sub-block.

[0095] At block 3230, a conversion is performed based on the affine candidate. In some embodiments, the conversion may include encoding the target video block into a bitstream. Alternatively or additionally, the conversion may include decoding the target video block from a bitstream.

[0096] The method 3200 enables determination of affine candidates based on sub-blocks of a time domain block, thereby improving coding efficiency and coding effectiveness.

[0097] In some embodiments, the at least one subblock of the time domain block includes at least one of the following: a subblock adjacent to the time domain block, a subblock not adjacent to the time domain block, or a co-located subblock in the time domain block.

[0098] In some embodiments, the first size of the temporal block is the same as the second size of the current video block.

[0099] In some embodiments, the first position of the temporal block in the co-located frame is the same as the second position of the current video block in the current frame that includes the current video block.

[0100] In some embodiments, the motion shift is between a first position of the temporal block in a co-located frame and a second position of the current video block in a current frame that includes the current video block.

[0101] In some embodiments, method 3200 also includes: determining whether a motion vector associated with at least one spatial neighboring candidate uses a co-located picture of a current video block as a reference picture; if it is determined that the motion vector uses the co-located picture as a reference picture, determining the motion shift as a motion vector; and if it is determined that the motion vector associated with at least one spatial neighboring candidate does not use the co-located picture as a reference picture, determining the motion shift as a predefined vector.

[0102] In some embodiments, at least one spatial neighboring candidate includes at least one of the following: a first spatial neighboring candidate to the left of the current video block, a second spatial neighboring candidate above the current video block, a third spatial neighboring candidate to the right of the second spatial neighboring candidate, a fourth spatial neighboring candidate below the first spatial neighboring candidate, or a fifth spatial neighboring candidate above and to the left of the current video block.

[0103] In some embodiments, a motion vector is determined for at least one spatial neighboring candidate based on an order of the first spatial neighboring candidate, the second spatial neighboring candidate, the third spatial neighboring candidate, the fourth spatial candidate, or the fifth spatial candidate.

[0104] In some embodiments, method 3200 further includes determining the motion shift as a predefined vector.

[0105] In some embodiments, the predefined vector comprises a zero vector.

[0106] In some embodiments, the method 3200 further includes: determining at least one relative position from the at least one sub-block to the current video block; and determining position information of the at least one sub-block by subtracting the motion shift from the relative position.

[0107] In some embodiments, determining the position information of at least one sub-block includes: determining whether the motion shift is a zero vector; if the motion shift is determined to be a zero vector, determining the position information of the at least one sub-block as a relative position; and if the motion shift is determined to be not a zero vector, determining the position information of the at least one sub-block by subtracting the motion shift from the relative position.

[0108] In some embodiments, the current video block includes a set of co-located frames, and the number of co-located frames in the set is fixed or adaptive.

[0109] In some embodiments, the co-located frame set includes candidate co-located frames associated with the time domain candidate determination process, and information of the candidate co-located frames is included in a slice header in the bitstream.

[0110] In some embodiments, method 3200 further includes: selecting a set of co-located frames from a plurality of reference frames based on at least one of: an ordering of picture order count distances of a plurality of reference frames relative to a current frame including a current video block; an ordering of quantization parameters of a plurality of reference frames; or an ordering of temporal layers associated with a plurality of reference frames.

[0111] In some embodiments, the at least one sub-block comprises a neighboring sub-block of the time domain block, and wherein the motion information of the neighboring sub-block is determined according to at least one of: a right column adjacent to the time domain block, a lower row adjacent to the time domain block, or a lower right corner adjacent to the right column and the lower row.

[0112] In some embodiments, the motion information of neighboring sub-blocks is determined by using the temporal candidate determination used in the regular merge mode.

[0113] In some embodiments, the reference picture index associated with the motion information comprises a predefined value. For example, the predefined value may be zero.

[0114] In some embodiments, determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; and determining the motion information based on the reference picture.

[0115] In some embodiments, the difference between the scaling factor of the reference picture and the predefined value is the closest among a plurality of differences between the scaling factors of a plurality of pictures and the predefined value. For example, the predefined value may be 1.

[0116] In some embodiments, method 3200 also includes: determining motion information of an adjacent sub-block by applying linear interpolation to at least one of the following: first motion information of the upper right corner above the right column and second motion information of the lower right corner, or third motion information of the lower left corner and second motion information of the lower right corner on the left side of the lower row.

[0117] In some embodiments, the first motion information of the upper right corner includes at least one of the following: spatial motion information of the upper right corner or temporal motion information of the upper right corner.

[0118] In some embodiments, the third motion information of the lower left corner includes at least one of the following: spatial motion information of the lower left corner or temporal motion information of the lower left corner.

[0119] In some embodiments, the second motion information of the lower right corner includes temporal motion information of the lower right corner.

[0120] In some embodiments, the top right corner, bottom left corner, and bottom right corner are associated with the same reference picture.

[0121] In some embodiments, the method 3200 further includes: if it is determined that the two control points at the upper right corner, the lower left corner, and the lower right corner are associated with different reference pictures, stopping applying the linear interpolation.

[0122] In some embodiments, method 3200 also includes: if it is determined that the two control points at the upper right corner, the lower left corner, and the lower right corner have different reference pictures, scaling the first control point based on the motion vector of the first control point of the two control points to point to the reference picture of the second control point of the two control points.

[0123] In some embodiments, the at least one sub-block comprises a neighboring sub-block of the time domain block, and wherein the motion information of the neighboring sub-block is determined according to at least one of: a first time domain neighboring block at a center position of a co-located block of the current video block, or a second time domain neighboring block at a right and bottom position of the co-located block of the current video block.

[0124] In some embodiments, the at least one subblock comprises a non-adjacent subblock of the time domain block, and wherein the motion information of the non-adjacent subblock is determined according to at least one of: a lower right column below and to the right of the time domain block, or a lower right row below and to the right of the time domain block.

[0125] In some embodiments, the motion information of non-neighboring sub-blocks is determined by using the temporal candidate determination used in the regular merge mode.

[0126] In some embodiments, the reference picture index associated with the motion information comprises a predefined value. For example, the predefined value may be zero.

[0127] In some embodiments, determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; and determining the motion information based on the reference picture.

[0128] In some embodiments, the difference between the scaling factor of the reference picture and the predefined value is the closest among a plurality of differences between the scaling factors of a plurality of pictures and the predefined value. For example, the predefined value may be 1.

[0129] In some embodiments, method 3200 further includes determining motion information of the non-adjacent sub-block by applying linear interpolation to at least one of: fourth motion information and fifth motion information associated with the bottom right column, or sixth motion information and seventh motion information associated with the bottom right row.

[0130] In some embodiments, at least one of the fourth motion information or the fifth motion information or the sixth motion information or the seventh motion information includes temporal motion information.

[0131] In some embodiments, determining the motion information of the non-adjacent sub-block by applying linear interpolation includes: determining a first control point and a second control point in a lower right column; and determining the motion information of the non-adjacent sub-block by applying linear interpolation to fourth motion information and fifth motion information of the first control point and the second control point in a vertical direction.

[0132] In some embodiments, determining the motion information of non-adjacent sub-blocks by applying linear interpolation includes: determining a third control point and a fourth control point in a lower right row; and determining the motion information of the non-adjacent sub-blocks by applying linear interpolation to sixth motion information and seventh motion information of the third control point and the fourth control point in a horizontal direction.

[0133] In some embodiments, the first control point, the second control point, the third control point, and the fourth control point are associated with the same reference picture.

[0134] In some embodiments, the method 3200 further includes: if it is determined that two of the first control point, the second control point, the third control point, and the fourth control point are associated with different reference pictures, stopping applying the linear interpolation.

[0135] In some embodiments, method 3200 also includes: if it is determined that two control points among the first control point, the second control point, the third control point, and the fourth control point are associated with different reference pictures, scaling a given control point based on a motion vector of a given control point among the two control points to point to the reference picture of another control point among the two control points.

[0136] In some embodiments, the first control point, the second control point, the third control point, and the fourth control point are determined by using the temporal candidate determination used in the regular merge mode.

[0137] In some embodiments, the first length of the bottom right row is based on the width of the current video block.

[0138] In some embodiments, the first length is determined based on the width and the first factor.

[0139] In some embodiments, the first factor is 1 / 2.

[0140] In some embodiments, the second length of the lower right column is based on the height of the current video block.

[0141] In some embodiments, the second length is determined based on the height and a second factor.

[0142] In some embodiments, the second factor is 1 / 2.

[0143] In some embodiments, at least one sub-block comprises a non-adjacent sub-block of a time domain block, and wherein the non-adjacent sub-block is determined based on a plurality of non-adjacent time domain neighboring blocks. For example, the plurality of non-adjacent time domain neighboring blocks may be Fig.28 The adjacent blocks shown in .

[0144] In some embodiments, the at least one sub-block comprises a co-located sub-block of the temporal block, and wherein the motion information of the co-located sub-block is determined by using the temporal candidate determination used in the regular merge mode.

[0145] In some embodiments, the reference picture index of the motion information of the co-located sub-block includes a predefined value. For example, the predefined value of the reference picture index may be 0.

[0146] In some embodiments, determining the motion information of the co-located sub-block includes: determining a reference image from a plurality of candidate reference images based on a plurality of scaling factors of the plurality of candidate reference images; and determining the motion information based on the reference image.

[0147] In some embodiments, the difference between the scaling factor of the reference picture and the predefined value is the closest among the multiple differences between the scaling factors of multiple pictures and the predefined value. For example, the predefined value may be 1. The selected reference picture for which the temporal motion information is derived may be the reference picture whose scaling factor is closest to 1.

[0148] In some embodiments, the size of at least one sub-block is predefined, such as 4x4.

[0149] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by a device for video processing. The method includes: determining motion information and position information of at least one sub-block of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one sub-block; and generating a bitstream based on the affine candidate.

[0150] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. The method includes: determining motion information and position information of at least one subblock of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one subblock; generating a bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0151] Fig.33A flow chart of a method 3300 for video processing according to an embodiment of the present disclosure is illustrated. The method 3300 is implemented during conversion between a current video block of a video and a bitstream of the video.

[0152] At block 3310, motion information and position information for at least one spatial sub-block of a current video block is determined.

[0153] At block 3320 , an affine candidate for the current video block is determined by applying a regression process to the current video block based on the motion information and position information of the at least one spatial sub-block.

[0154] At block 3330, a conversion is performed based on the affine candidate. In some embodiments, the conversion may include encoding the target video block into a bitstream. Alternatively or additionally, the conversion may include decoding the target video block from a bitstream.

[0155] The method 3300 enables determination of affine candidates based on spatial sub-blocks, thereby improving coding efficiency and coding effectiveness.

[0156] In some embodiments, the at least one spatial sub-block of the current video block includes at least one of the following: a spatial sub-block adjacent to the current video block, or a spatial sub-block not adjacent to the current video block.

[0157] In some embodiments, the at least one spatial sub-block comprises at least a portion of a set of spatial sub-blocks used to determine at least one spatial merging candidate for the current video block.

[0158] In some embodiments, the at least one spatial merge candidate includes at least one of the following: a first spatial neighbor candidate to the left of the current video block; a second spatial neighbor candidate above the current video block; a third spatial neighbor candidate to the right of the second spatial neighbor candidate, a fourth spatial neighbor candidate below the first spatial neighbor candidate, or a fifth spatial neighbor candidate above and to the left of the current video block. For example, the at least one spatial merge candidate may be Fig.21 Shown in.

[0159] In some embodiments, the set of spatial sub-blocks is predetermined. For example, the set of spatial sub-blocks may be Fig. 27 Shown in.

[0160] According to another embodiment of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by a device for video processing. The method includes: determining motion information and position information of at least one spatial sub-block of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one spatial sub-block; and generating a bitstream based on the affine candidate.

[0161] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. The method includes: determining motion information and position information of at least one spatial subblock of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and position information of the at least one spatial subblock; generating a bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0162] It should be understood that the above method 3200 and / or method 3300 can be used in combination or alone. Any suitable combination of these methods can be applied. The scope of the present disclosure is not limited in this regard.

[0163] By using these methods 3200 and 3300 individually or in combination, the affine candidates can be improved, which can improve the coding efficiency and coding effectiveness.

[0164] Embodiments of the present disclosure may be described according to the following clauses, features of which may be combined in any reasonable way.

[0165] Clause 1. A method for video processing, comprising: determining, for conversion between a current video block of a video and a bitstream of the video, motion information and position information of at least one sub-block of a time domain block in a co-located frame of the current video block; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one sub-block; and performing the conversion based on the affine candidate.

[0166] Clause 2. The method according to clause 1, wherein the at least one subblock of the time domain block comprises at least one of the following: a subblock adjacent to the time domain block, a subblock not adjacent to the time domain block, or a co-located subblock in the time domain block.

[0167] Clause 3. The method of clause 1 or clause 2, wherein the first size of the temporal block is the same as the second size of the current video block.

[0168] Clause 4. The method of any one of clauses 1 to 3, wherein a first position of the temporal block in the co-located frame is the same as a second position of the current video block in a current frame that includes the current video block.

[0169] Clause 5. The method of any one of clauses 1 to 3, wherein a motion shift is between a first position of the temporal block in the co-located frame and a second position of the current video block in a current frame that includes the current video block.

[0170] Clause 6. The method according to Clause 5 further includes: determining whether a motion vector associated with at least one spatial neighboring candidate uses a co-located picture of the current video block as a reference picture; if it is determined that the motion vector uses the co-located picture as the reference picture, determining the motion shift to be the motion vector; and if it is determined that the motion vector associated with the at least one spatial neighboring candidate does not use the co-located picture as the reference picture, determining the motion shift to be a predefined vector.

[0171] Clause 7. A method according to Clause 6, wherein the at least one spatial neighbor candidate includes at least one of the following: a first spatial neighbor candidate to the left of the current video block; a second spatial neighbor candidate above the current video block; a third spatial neighbor candidate to the right of the second spatial neighbor candidate, a fourth spatial neighbor candidate below the first spatial neighbor candidate, or a fifth spatial neighbor candidate above and to the left of the current video block.

[0172] Clause 8. A method according to Clause 7, wherein the motion vector is determined for at least one spatial neighbor candidate based on the order of the first spatial neighbor candidate, the second spatial neighbor candidate, the third spatial neighbor candidate, the fourth spatial candidate or the fifth spatial candidate.

[0173] Clause 9. The method of clause 5, further comprising: determining the motion shift as a predefined vector.

[0174] Clause 10. The method of clause 6 or clause 9, wherein the predefined vector comprises a zero vector.

[0175] Clause 11. The method according to any one of clauses 5 to 10 further comprises: determining at least one relative position from the at least one sub-block to the current video block; and determining the position information of the at least one sub-block by subtracting the motion shift from the relative position.

[0176] Clause 12. A method according to Clause 11, wherein determining the position information of the at least one sub-block comprises: determining whether the motion shift is a zero vector; if the motion shift is determined to be a zero vector, determining the position information of the at least one sub-block as the relative position; and if the motion shift is determined not to be the zero vector, determining the position information of the at least one sub-block by subtracting the motion shift from the relative position.

[0177] Clause 13. The method of any one of clauses 1 to 12, wherein the current video block comprises a set of co-located frames, the number of co-located frames in the set being fixed or adaptive.

[0178] Clause 14. The method of clause 13, wherein the set of co-located frames includes candidate co-located frames associated with a time domain candidate determination process, information of the candidate co-located frames being included in a slice header in the bitstream.

[0179] Clause 15. The method according to Clause 13 further includes: selecting the set of co-located frames from multiple reference frames based on at least one of the following: the ordering of the picture sequence count distances of the multiple reference frames relative to the current frame including the current video block; the ordering of quantization parameters of the multiple reference frames; or, the ordering of time domain layers associated with the multiple reference frames.

[0180] Clause 16. A method according to any one of clauses 1 to 15, wherein the at least one sub-block includes an adjacent sub-block of the time domain block, and wherein the motion information of the adjacent sub-block is determined based on at least one of the following: a right column adjacent to the time domain block, a lower row adjacent to the time domain block, or a lower right corner adjacent to the right column and the lower row.

[0181] Clause 17. The method of clause 16, wherein the motion information of the neighboring sub-blocks is determined by using temporal candidate determination used in a regular merge mode.

[0182] Clause 18. The method of clause 16 or clause 17, wherein the reference picture index associated with the motion information comprises a predefined value.

[0183] Clause 19. A method according to any one of clauses 16 to 18, wherein determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; and determining the motion information based on the reference picture.

[0184] Clause 20. The method of clause 19, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest among a plurality of differences between scaling factors of a plurality of pictures and the predefined value.

[0185] Clause 21. The method of clause 20, wherein the predefined value comprises 1.

[0186] Clause 22. The method according to Clause 16 also includes: determining the motion information of the adjacent sub-block by applying linear interpolation to at least one of the following: the first motion information of the upper right corner above the right column and the second motion information of the lower right corner, or the third motion information of the lower left corner on the left side of the lower row and the second motion information of the lower right corner.

[0187] Clause 23. The method according to Clause 22, wherein the first motion information of the upper right corner comprises at least one of the following: spatial motion information of the upper right corner or temporal motion information of the upper right corner.

[0188] Clause 24. The method according to Clause 22 or Clause 23, wherein the third motion information of the lower left corner comprises at least one of the following: spatial motion information of the lower left corner or temporal motion information of the lower left corner.

[0189] Clause 25. The method of any one of clauses 22 to 24, wherein the second motion information of the bottom right corner comprises temporal motion information of the bottom right corner.

[0190] Clause 26. The method of any one of clauses 22 to 25, wherein the upper right corner, the lower left corner, and the lower right corner are associated with the same reference picture.

[0191] Clause 27. The method according to any one of clauses 22 to 25, further comprising: if it is determined that the two control points of the upper right corner, the lower left corner and the lower right corner are associated with different reference pictures, stopping applying the linear interpolation.

[0192] Clause 28. The method according to any one of Clauses 22 to 25 further includes: if it is determined that the two control points of the upper right corner, the lower left corner and the lower right corner have different reference pictures, scaling the first control point based on the motion vector of the first control point of the two control points to point to the reference picture of the second control point of the two control points.

[0193] Clause 29. A method according to any one of clauses 1 to 15, wherein the at least one sub-block comprises a neighboring sub-block of the time domain block, and wherein the motion information of the neighboring sub-block is determined based on at least one of: a first time domain neighboring block at a center position of a co-located block of the current video block, or a second time domain neighboring block at a right and bottom position of the co-located block of the current video block.

[0194] Clause 30. A method according to any one of clauses 1 to 15, wherein the at least one sub-block comprises a non-adjacent sub-block of the time domain block, and wherein the motion information of the non-adjacent sub-block is determined based on at least one of: a lower right column below and to the right of the time domain block, or a lower right row below and to the right of the time domain block.

[0195] Clause 31. The method of clause 30, wherein the motion information of the non-adjacent sub-blocks is determined by using temporal candidate determination used in a regular merge mode.

[0196] Clause 32. The method of clause 30 or clause 31, wherein the reference picture index associated with the motion information comprises a predefined value.

[0197] Clause 33. A method according to any one of clauses 30 to 32, wherein determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; and determining the motion information based on the reference picture.

[0198] Clause 34. The method of clause 33, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest among a plurality of differences between scaling factors of a plurality of pictures and the predefined value.

[0199] Clause 35. The method of clause 34, wherein the predefined value comprises 1.

[0200] Clause 36. The method according to Clause 30 also includes: determining the motion information of the non-adjacent sub-block by applying linear interpolation to at least one of the following: the fourth motion information and the fifth motion information associated with the lower right column, or the sixth motion information and the seventh motion information associated with the lower right row.

[0201] Clause 37. The method of clause 36, wherein at least one of the fourth motion information or the fifth motion information or the sixth motion information or the seventh motion information comprises temporal motion information.

[0202] Clause 38. A method according to Clause 36, wherein determining the motion information of the non-adjacent sub-block by applying linear interpolation comprises: determining a first control point and a second control point of the lower right column; and determining the motion information of the non-adjacent sub-block by applying the linear interpolation to the fourth motion information and the fifth motion information of the first control point and the second control point in a vertical direction.

[0203] Clause 39. A method according to Clause 38, wherein determining the motion information of the non-adjacent sub-block by applying linear interpolation comprises: determining the third control point and the fourth control point of the lower right row; and determining the motion information of the non-adjacent sub-block by applying the linear interpolation to the sixth motion information and the seventh motion information of the third control point and the fourth control point in the horizontal direction.

[0204] Clause 40. The method of clause 39, wherein the first control point, the second control point, the third control point, and the fourth control point are associated with the same reference picture.

[0205] Clause 41. The method according to Clause 39 or Clause 40 further includes: if it is determined that two of the first control point, the second control point, the third control point and the fourth control point are associated with different reference pictures, stopping applying the linear interpolation.

[0206] Clause 42. The method according to Clause 39 or Clause 40 further includes: if it is determined that two control points among the first control point, the second control point, the third control point and the fourth control point are associated with different reference pictures, scaling the given control point based on the motion vector of a given control point among the two control points to point to the reference picture of another control point among the two control points.

[0207] Clause 43. The method of any of clauses 39 to 42, wherein the first control point, the second control point, the third control point and the fourth control point are determined by using temporal candidate determination used in a regular merge mode.

[0208] Clause 44. The method of any one of clauses 30 to 43, wherein the first length of the bottom right row is based on a width of the current video block.

[0209] Clause 45. The method of clause 44, wherein the first length is determined based on the width and a first factor.

[0210] Clause 46. The method of clause 45, wherein the first factor is 1 / 2.

[0211] Clause 47. The method of any one of clauses 30 to 46, wherein the second length of the bottom right column is based on the height of the current video block.

[0212] Clause 48. The method of clause 47, wherein the second length is determined based on the height and a second factor.

[0213] Clause 49. The method of clause 48, wherein the second factor is 1 / 2.

[0214] Clause 50. The method of any one of clauses 1 to 15, wherein the at least one sub-block comprises a non-adjacent sub-block of the time-domain block, and wherein the non-adjacent sub-block is determined based on a plurality of non-adjacent time-domain neighboring blocks.

[0215] Clause 51. A method according to any one of clauses 1 to 15, wherein the at least one sub-block comprises a co-located sub-block of the temporal block, and wherein the motion information of the co-located sub-block is determined by using temporal candidate determination used in a normal merge mode.

[0216] Clause 52. The method of clause 51, wherein the reference picture index of the motion information of the co-located sub-block comprises a predefined value.

[0217] Clause 53. A method according to clause 51 or clause 52, wherein determining the motion information of the co-located sub-block comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; and determining the motion information based on the reference picture.

[0218] Clause 54. The method of clause 53, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest of a plurality of differences between scaling factors of a plurality of pictures and the predefined value.

[0219] Clause 55. The method of clause 54, wherein the predefined value comprises 1.

[0220] Clause 56. The method of any one of clauses 1 to 55, wherein the size of the at least one sub-block is predefined.

[0221] Clause 57. A method for video processing, comprising: determining motion information and position information of at least one spatial sub-block of a current video block of a video for conversion between the current video block and a bitstream of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one spatial sub-block; and performing the conversion based on the affine candidate.

[0222] Clause 58. The method of clause 57, wherein the at least one spatial sub-block of the current video block comprises at least one of: a spatial sub-block adjacent to the current video block, or a spatial sub-block not adjacent to the current video block.

[0223] Clause 59. The method of clause 57 or clause 58, wherein the at least one spatial sub-block comprises at least a portion of a set of spatial sub-blocks used to determine at least one spatial merging candidate for the current video block.

[0224] Clause 60. The method of clause 59, wherein the at least one spatial sub-block further comprises a spatial sub-block that is not in the set of spatial sub-blocks.

[0225] Clause 61. A method according to Clause 59 or Clause 60, wherein the at least one spatial merge candidate includes at least one of the following: a first spatial neighboring candidate to the left of the current video block; a second spatial neighboring candidate above the current video block; a third spatial neighboring candidate to the right of the second spatial neighboring candidate, a fourth spatial neighboring candidate below the first spatial neighboring candidate, or a fifth spatial neighboring candidate above and to the left of the current video block.

[0226] Clause 62. A method according to any one of clauses 59 to 61, wherein the set of spatial sub-blocks is predetermined.

[0227] Clause 63. The method of any one of clauses 1 to 62, wherein the converting comprises encoding the current video block into the bitstream.

[0228] Clause 64. The method of any one of clauses 1 to 62, wherein the converting comprises decoding the current video block from the bitstream.

[0229] Clause 65. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of clauses 1 to 64.

[0230] Clause 66. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform the method of any one of clauses 1 to 64.

[0231] Clause 67. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a device for video processing, wherein the method comprises: determining motion information and position information of at least one sub-block of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one sub-block; and generating the bitstream based on the affine candidate.

[0232] Clause 68. A method for storing a bitstream of a video, comprising: determining motion information and position information of at least one subblock of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one subblock; generating the bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0233] Item 69. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a device for video processing, wherein the method comprises: determining motion information and position information of at least one spatial sub-block of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one spatial sub-block; and generating the bitstream based on the affine candidate.

[0234] Clause 70. A method for storing a bitstream of a video, comprising: determining motion information and position information of at least one spatial sub-block of a current video block of the video; determining an affine candidate of the current video block by applying regression processing to the current video block based on the motion information and the position information of the at least one spatial sub-block; generating the bitstream based on the affine candidate; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device

[0235] Fig.34 A block diagram of a computing device 3400 in which various embodiments of the present disclosure may be implemented is shown. The computing device 3400 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).

[0236] It should be understood that Fig.34 The computing device 3400 shown in the figure is for illustrative purposes only and is not intended to in any way imply any limitation on the functionality and scope of the embodiments of the present disclosure.

[0237] like Fig.34 As shown, computing device 3400 includes a general computing device 3400. Computing device 3400 may include at least one or more processors or processing units 3410, memory 3420, storage unit 3430, one or more communication units 3440, one or more input devices 3450, and one or more output devices 3460.

[0238] In some embodiments, the computing device 3400 can be implemented as any user terminal or server terminal with computing power. The server terminal can be a server provided by a service provider, a large computing device, etc. The user terminal can be, for example, any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet computer, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, and includes the accessories and peripherals of these devices, or any combination thereof. It is conceivable that the computing device 3400 can support any type of interface to the user (such as a "wearable" circuit device, etc.).

[0239] The processing unit 3410 may be a physical processor or a virtual processor and may implement various processes based on a program stored in the memory 3420. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the computing device 3400. The processing unit 3410 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.

[0240] The computing device 3400 typically includes various computer storage media. Such media can be any media accessible by the computing device 3400, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 3420 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (such as a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory) or any combination thereof. The storage unit 3430 can be any removable or non-removable medium, and can include machine-readable media, such as a memory, a flash drive, a disk, or other media that can be used to store information and / or data and can be accessed in the computing device 3400.

[0241] The computing device 3400 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Fig.34 Although not shown in the figure, a magnetic disk drive for reading from and / or writing to a removable nonvolatile magnetic disk and an optical disk drive for reading from and / or writing to a removable nonvolatile optical disk may be provided. In this case, each drive may be connected to the bus (not shown) via one or more data medium interfaces.

[0242] The communication unit 3440 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 3400 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 3400 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general network nodes.

[0243] Input device 3450 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 3460 may be one or more of various output devices, such as a display, speaker, printer, etc. With the aid of communication unit 3440, computing device 3400 may also communicate with one or more external devices (not shown), such as storage devices and display devices, and computing device 3400 may also communicate with one or more devices that enable a user to interact with computing device 3400, or any device that enables computing device 3400 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), if necessary. Such communication may be performed via an input / output (I / O) interface (not shown).

[0244] In some embodiments, some or all components of the computing device 3400 may also be arranged in a cloud computing architecture rather than being integrated in a single device. In a cloud computing architecture, components may be provided remotely and work together to implement the functions described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage services, which will not require the end user to know the physical location or configuration of the system or hardware that provides these services. In various embodiments, cloud computing provides services via a wide area network (e.g., the Internet) using a suitable protocol. For example, a cloud computing provider provides applications via a wide area network, which can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a remote server. The computing resources in a cloud computing environment may be merged or distributed at the location of a remote data center. Cloud computing infrastructure may provide services through a shared data center, although they appear as a single access point for users. Therefore, the cloud computing architecture may be used to provide the components and functions described herein from a service provider at a remote location. Alternatively, they may be provided by a conventional server, or installed directly or otherwise on a client device.

[0245] In an embodiment of the present disclosure, the computing device 3400 may be used to implement video encoding / decoding. The memory 3420 may include one or more video codec modules 3425 having one or more program instructions. These modules can be accessed and executed by the processing unit 3410 to perform the functions of the various embodiments described herein.

[0246] In an example embodiment performing video encoding, input device 3450 may receive video data as input 3470 to be encoded. The video data may be processed by, for example, video codec module 3425 to generate an encoded bitstream. The encoded bitstream may be provided as output 3480 via output device 3460.

[0247] In an example embodiment performing video decoding, input device 3450 may receive an encoded bitstream as input 3470. The encoded bitstream may be processed by, for example, video codec module 3425 to generate decoded video data. The decoded video data may be provided as output 3480 via output device 3460. Although the present disclosure has been specifically shown and described with reference to the preferred embodiments of the present disclosure, it will be understood by those skilled in the art that various changes can be made in form and detail without departing from the spirit and scope of the present application as defined by the appended claims. These changes are intended to be encompassed by the scope of the present application. Therefore, the foregoing description of the embodiments of the present application is not intended to be limiting.

Claims

1. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining motion information and position information of at least one sub-block of a time domain block in a co-located frame of the current video block; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one sub-block; as well as The transforming is performed based on the affine candidate.

2. The method according to claim 1, wherein the at least one sub-block of the time domain block comprises at least one of the following: A sub-block adjacent to the time domain block, A sub-block that is not adjacent to the time domain block, or The co-located sub-blocks in the time domain block.

3. The method of claim 1 or claim 2, wherein the first size of the time-domain block is the same as the second size of the current video block.

4. The method of any one of claims 1 to 3, wherein a first position of the temporal block in the co-located frame is the same as a second position of the current video block in a current frame including the current video block.

5. The method of any one of claims 1 to 3, wherein a motion shift is between a first position of the temporal block in the co-located frame and a second position of the current video block in a current frame that includes the current video block.

6. The method according to claim 5, further comprising: determining whether a motion vector associated with at least one spatial neighboring candidate uses a co-located picture of the current video block as a reference picture; If it is determined that the motion vector uses the co-located picture as the reference picture, determining the motion shift as the motion vector; as well as If it is determined that the motion vector associated with the at least one spatial neighboring candidate does not use the co-located picture as the reference picture, the motion shift is determined to be a predefined vector.

7. The method according to claim 6, wherein the at least one spatial neighbor candidate comprises at least one of the following: The first spatial neighbor candidate on the left side of the current video block, A second spatial neighboring candidate above the current video block, The third spatial domain neighboring candidate to the right of the second spatial domain neighboring candidate, a fourth spatial domain neighboring candidate below the first spatial domain neighboring candidate, or The fifth spatial neighboring candidate is above and to the left of the current video block.

8. The method of claim 7, wherein the motion vector is determined for at least one spatial neighbor candidate based on the order of the first spatial neighbor candidate, the second spatial neighbor candidate, the third spatial neighbor candidate, the fourth spatial candidate or the fifth spatial candidate.

9. The method according to claim 5, further comprising: The motion shift is determined as a predefined vector.

10. The method of claim 6 or claim 9, wherein the predefined vector comprises a zero vector.

11. The method according to any one of claims 5 to 10, further comprising: determining at least one relative position from the at least one sub-block to the current video block; as well as The position information of the at least one sub-block is determined by subtracting the motion shift from the relative position.

12. The method according to claim 11, wherein determining the position information of the at least one sub-block comprises: determining whether the motion shift is a zero vector; If it is determined that the motion shift is a zero vector, determining the position information of the at least one sub-block as the relative position; as well as If it is determined that the motion shift is not the zero vector, the position information of the at least one sub-block is determined by subtracting the motion shift from the relative position.

13. The method of any one of claims 1 to 12, wherein the current video block comprises a set of co-located frames, the number of co-located frames in the set being fixed or adaptive.

14. The method according to claim 13, wherein the co-located frame set comprises candidate co-located frames associated with a time domain candidate determination process, and information of the candidate co-located frames is included in a slice header in the bitstream.

15. The method according to claim 13, further comprising: The set of co-located frames is selected from a plurality of reference frames based on at least one of the following: an ordering of the plurality of reference frames relative to a picture order count distance of a current frame including the current video block, the ordering of the quantization parameters of the plurality of reference frames, or An ordering of temporal layers associated with the plurality of reference frames.

16. The method according to any one of claims 1 to 15, wherein the at least one sub-block comprises a neighboring sub-block of the time domain block, and wherein the motion information of the neighboring sub-block is determined according to at least one of the following: The right column adjacent to the time domain block, The lower row adjacent to the time domain block, or The lower right corner adjacent to the right column and the lower row. 17 . The method of claim 16 , wherein the motion information of the neighboring subblocks is determined by using temporal candidate determination used in a regular merge mode.

18. The method of claim 16 or claim 17, wherein the reference picture index associated with the motion information comprises a predefined value.

19. The method according to any one of claims 16 to 18, wherein determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; as well as The motion information is determined based on the reference picture.

20. The method of claim 19, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest among a plurality of differences between scaling factors of a plurality of pictures and the predefined value. The method of claim 20 , wherein the predefined value comprises 1.

22. The method of claim 16, further comprising: The motion information of the neighboring sub-blocks is determined by applying linear interpolation to at least one of the following: The first motion information of the upper right corner above the right column and the second motion information of the lower right corner, or The third motion information of the lower left corner on the left side of the lower row and the second motion information of the lower right corner.

23. The method according to claim 22, wherein the first motion information of the upper right corner comprises at least one of the following: spatial motion information of the upper right corner or temporal motion information of the upper right corner.

24. The method according to claim 22 or claim 23, wherein the third motion information of the lower left corner comprises at least one of the following: spatial motion information of the lower left corner or temporal motion information of the lower left corner.

25. The method according to any one of claims 22 to 24, wherein the second motion information of the lower right corner comprises temporal motion information of the lower right corner.

26. The method of any one of claims 22 to 25, wherein the upper right corner, the lower left corner, and the lower right corner are associated with the same reference picture.

27. The method according to any one of claims 22 to 25, further comprising: If it is determined that the two control points of the upper right corner, the lower left corner, and the lower right corner are associated with different reference pictures, the linear interpolation is stopped.

28. The method according to any one of claims 22 to 25, further comprising: If it is determined that the two control points at the upper right corner, the lower left corner and the lower right corner have different reference pictures, the first control point is scaled based on a motion vector of a first control point among the two control points to point to a reference picture of a second control point among the two control points.

29. The method according to any one of claims 1 to 15, wherein the at least one sub-block comprises a neighboring sub-block of the time domain block, and wherein the motion information of the neighboring sub-block is determined according to at least one of the following: a first temporal neighboring block at the center of the co-located block of the current video block, or A second time-domain neighboring block at a right side and below the co-located block of the current video block.

30. The method according to any one of claims 1 to 15, wherein the at least one sub-block comprises a non-adjacent sub-block of the time domain block, and The motion information of the non-adjacent sub-blocks is determined according to at least one of the following: the lower right column below and to the right of the time domain block, or The lower right row below and to the right of the time domain block.

31. The method of claim 30, wherein the motion information of the non-adjacent sub-blocks is determined by using temporal candidate determination used in a regular merge mode.

32. The method of claim 30 or claim 31 , wherein a reference picture index associated with the motion information comprises a predefined value.

33. The method according to any one of claims 30 to 32, wherein determining the motion information comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; as well as The motion information is determined based on the reference picture.

34. The method of claim 33, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest among a plurality of differences between scaling factors of a plurality of pictures and the predefined value.

35. The method of claim 34, wherein the predefined value comprises 1.

36. The method of claim 30, further comprising: The motion information of the non-adjacent sub-blocks is determined by applying linear interpolation to at least one of: the fourth motion information and the fifth motion information associated with the lower right column, or The sixth motion information and the seventh motion information associated with the lower right row. 37 . The method of claim 36 , wherein at least one of the fourth motion information, the fifth motion information, the sixth motion information, or the seventh motion information comprises temporal motion information.

38. The method of claim 36, wherein determining the motion information of the non-adjacent sub-blocks by applying linear interpolation comprises: Determine a first control point and a second control point of the lower right column; as well as The motion information of the non-adjacent sub-blocks is determined by applying the linear interpolation to the fourth motion information and the fifth motion information of the first control point and the second control point in a vertical direction.

39. The method of claim 38, wherein determining the motion information of the non-adjacent sub-blocks by applying linear interpolation comprises: Determine a third control point and a fourth control point of the lower right row; as well as The motion information of the non-adjacent sub-blocks is determined by applying the linear interpolation to the sixth motion information and the seventh motion information of the third control point and the fourth control point in a horizontal direction.

40. The method of claim 39, wherein the first control point, the second control point, the third control point, and the fourth control point are associated with a same reference picture.

41. The method of claim 39 or claim 40, further comprising: If it is determined that two of the first control point, the second control point, the third control point, and the fourth control point are associated with different reference pictures, the application of the linear interpolation is stopped.

42. The method of claim 39 or claim 40, further comprising: If it is determined that two of the first control point, the second control point, the third control point and the fourth control point are associated with different reference pictures, scale the given one of the two control points based on a motion vector of the given one of the two control points to point to the reference picture of the other one of the two control points.

43. The method of any one of claims 39 to 42, wherein the first control point, the second control point, the third control point and the fourth control point are determined by using temporal candidate determination used in a normal merge mode.

44. The method of any one of claims 30 to 43, wherein a first length of the bottom right row is based on a width of the current video block.

45. The method of claim 44, wherein the first length is determined based on the width and a first factor.

46. ​​The method of claim 45, wherein the first factor is 1 / 2.

47. The method of any one of claims 30 to 46, wherein a second length of the bottom right column is based on a height of the current video block.

48. The method of claim 47, wherein the second length is determined based on the height and a second factor.

49. The method of claim 48, wherein the second factor is 1 / 2.

50. The method according to any one of claims 1 to 15, wherein the at least one sub-block comprises a non-adjacent sub-block of the time domain block, and The non-adjacent sub-blocks are determined based on a plurality of non-adjacent time-domain neighboring blocks.

51. The method according to any one of claims 1 to 15, wherein the at least one sub-block comprises a co-located sub-block of the time domain block, and The motion information of the co-located sub-block is determined by using the temporal candidate determination used in the normal merge mode.

52. The method of claim 51, wherein a reference picture index of the motion information of the co-located sub-block comprises a predefined value.

53. The method of claim 51 or claim 52, wherein determining the motion information of the co-located sub-block comprises: determining a reference picture from a plurality of candidate reference pictures based on a plurality of scaling factors of the plurality of candidate reference pictures; as well as The motion information is determined based on the reference picture.

54. The method of claim 53, wherein the difference between the scaling factor of the reference picture and a predefined value is the closest of a plurality of differences between scaling factors of a plurality of pictures and the predefined value.

55. The method of claim 54, wherein the predefined value comprises 1.

56. The method according to any one of claims 1 to 55, wherein the size of the at least one sub-block is predefined.

57. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining motion information and position information of at least one spatial sub-block of the current video block; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one spatial sub-block; as well as The transforming is performed based on the affine candidate.

58. The method of claim 57, wherein the at least one spatial sub-block of the current video block comprises at least one of: A spatial sub-block adjacent to the current video block, or A spatial sub-block that is not adjacent to the current video block.

59. The method of claim 57 or claim 58, wherein the at least one spatial sub-block comprises at least a portion of a set of spatial sub-blocks used to determine at least one spatial merging candidate for the current video block.

60. The method of claim 59, wherein the at least one spatial sub-block further comprises a spatial sub-block that is not in the set of spatial sub-blocks.

61. The method of claim 59 or claim 60, wherein the at least one spatial merging candidate comprises at least one of the following: The first spatial neighbor candidate on the left side of the current video block, A second spatial neighboring candidate above the current video block, The third spatial domain neighboring candidate to the right of the second spatial domain neighboring candidate, a fourth spatial domain neighboring candidate below the first spatial domain neighboring candidate, or The fifth spatial neighboring candidate is above and to the left of the current video block.

62. The method according to any one of claims 59 to 61, wherein the set of spatial sub-blocks is predetermined.

63. The method of any one of claims 1 to 62, wherein the converting comprises encoding the current video block into the bitstream.

64. The method of any one of claims 1 to 62, wherein the converting comprises decoding the current video block from the bitstream.

65. An apparatus for video processing, comprising a processor and a non-volatile memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 64.

66. A non-transitory computer readable storage medium storing instructions that cause a processor to perform the method of any one of claims 1 to 64.

67. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: Determine motion information and position information of at least one sub-block of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one sub-block; as well as The bitstream is generated based on the affine candidate.

68. A method for storing a bitstream of a video, comprising: Determine motion information and position information of at least one sub-block of a time domain block in a co-located frame of a current video block of the video; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one sub-block; generating the bitstream based on the affine candidate; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

69. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: Determining motion information and position information of at least one spatial sub-block of a current video block of the video; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one spatial sub-block; as well as The bitstream is generated based on the affine candidate.

70. A method for storing a bitstream of a video, comprising: Determining motion information and position information of at least one spatial sub-block of a current video block of the video; determining an affine candidate for the current video block by applying a regression process to the current video block based on the motion information and the position information of the at least one spatial sub-block; generating the bitstream based on the affine candidate; as well as The bit stream is stored in a non-transitory computer-readable recording medium.