Patent Description:
Video coding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each picture having a spatial dimension of, for example, <NUM> x <NUM> luminance samples and associated chrominance samples. The series of pictures can have a fixed or variable picture rate (informally also known as frame rate), of, for example <NUM> pictures per second or <NUM>. Uncompressed video has significant bitrate requirements. For example, 1080p60 <NUM>:<NUM>:<NUM> video at <NUM> bit per sample (1920x1080 luminance sample resolution at <NUM> frame rate) requires close to <NUM> Gbit/s bandwidth. An hour of such video requires more than <NUM> GBytes of storage space.

In some video compression techniques, an MV applicable to a certain area of sample data can be predicted from other MVs, for example from those related to another area of sample data spatially adjacent to the area under reconstruction, and preceding that MV in decoding order. Doing so can substantially reduce the amount of data required for coding the MV, thereby removing redundancy and increasing compression. MV prediction can work effectively, for example, because when coding an input video signal derived from a camera (known as natural video) there is a statistical likelihood that areas larger than the area to which a single MV is applicable move in a similar direction and, therefore, can in some cases be predicted using a similar motion vector derived from MVs of neighboring area. That results in the MV found for a given area to be similar or the same as the MV predicted from the surrounding MVs, and that in turn can be represented, after entropy coding, in a smaller number of bits than what would be used if coding the MV directly. In some cases, MV prediction can be an example of lossless compression of a signal (namely: the MVs) derived from the original signal (namely: the sample stream). In other cases, MV prediction itself can be lossy, for example because of rounding errors when calculating a predictor from several surrounding MVs.

Various MV prediction mechanisms are described in H. <NUM>/HEVC (ITU-T Rec. <NUM>, "High Efficiency Video Coding", December <NUM>). Out of the many MV prediction mechanisms that H. <NUM> offers, described here is a technique henceforth referred to as "spatial merge". An affine merge mode with prediction offsets applied to the motion vectors of the control points is disclosed by <NPL>.

Referring to <FIG>, a current block (<NUM>) comprises samples that have been found by the encoder during the motion search process to be predictable from a previous block of the same size that has been spatially shifted. Instead of coding that MV directly, the MV can be derived from metadata associated with one or more reference pictures, for example from the most recent (in decoding order) reference picture, using the MV associated with either one of five surrounding samples, denoted A0, A1, and B0, B1, B2 (<NUM> through <NUM>, respectively). <NUM>, the MV prediction can use predictors from the same reference picture that the neighboring block is using.

Aspects of the disclosure provide methods and apparatuses, as defined in the appended claims, for video encoding/decoding. In some examples, an apparatus for video decoding includes receiving circuitry and processing circuitry. For example, the processing circuitry decodes prediction information of a current block in a current picture from a coded video bitstream. The prediction information is indicative of an affine merge mode with offset. Then, the processing circuitry decodes, from the coded video bitstream, a set of offset parameters that is used to determine a motion vector difference, and applies the motion vector difference to first motion vectors of multiple control points of a base predictor of the current block to determine second motion vectors at corresponding multiple control points of the current block. Further, the processing circuitry determines parameters of an affine model based on the second motion vectors at the corresponding multiple control points of the current block, and reconstructs at least a sample of the current block according to the affine model.

In some examples, the processing circuitry decodes, from the coded video bitstream, an offset distance index and an offset direction index that are used to determine the motion vector difference, and determine an offset distance according to the offset distance index and a pre-defined mapping of offset distance indices and offset distances. Then, the processing circuitry determines an offset direction according to the offset direction index and a pre-defined mapping of offset direction indices and offset directions.

In an example, the processing circuitry applies the motion vector difference to two control points of the base predictor when a four-parameter affine model is used. In another example, the processing circuitry applies the motion vector difference to three control points of the base predictor when a six-parameter affine model is used.

In an example, the processing circuitry applies the motion vector difference to the first motion vectors that refer to a first reference picture to determine the second motion vectors for the first reference picture, and applies a mirror of the motion vector difference to third motion vectors of the control points of the base predictor that refer to a second reference picture to determine fourth motion vectors at the corresponding multiple control points of the current block that refer to the second reference picture.

In another example, the processing circuitry applies the motion vector difference to the first motion vectors that refer to a first reference picture to determine the second motion vectors that refer to the first reference picture, and applies a mirror of the motion vector difference to third motion vectors of the control points of the base predictor that refer to a second reference picture to determine fourth motion vectors at the corresponding multiple control points of the current block that refer to the second reference picture when the second reference picture is on an opposite side of the current picture from the first reference picture.

In the claimed embodiment, the processing circuitry applies the motion vector difference to the first motion vectors that refer to a first reference picture to determine the second motion vectors that refer to the first reference picture, and calculates a scaling factor based on a first picture number difference of the first reference picture and the current picture and a second picture number difference of a second reference picture and the current picture. Further, the processing circuitry applies the motion vector difference that is scaled according to the scaling factor to third motion vectors of the control points of the base predictor that refer to the second reference picture to determine fourth motion vectors at the corresponding multiple control points of the current block that refer to the second reference picture.

Aspects of the disclosure also provide a non-transitory computer-readable medium storing instructions which when executed by a computer for video decoding cause the computer to perform the method for video decoding.

A streaming system may include a capture subsystem (<NUM>), that can include a video source (<NUM>), for example a digital camera, creating for example a stream of video pictures (<NUM>) that are uncompressed. In an example, the stream of video pictures (<NUM>) includes samples that are taken by the digital camera. The stream of video pictures (<NUM>), depicted as a bold line to emphasize a high data volume when compared to encoded video data (<NUM>) (or coded video bitstreams), can be processed by an electronic device (<NUM>) that includes a video encoder (<NUM>) coupled to the video source (<NUM>). The video encoder (<NUM>) can include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter as described in more detail below. The encoded video data (<NUM>) (or encoded video bitstream (<NUM>)), depicted as a thin line to emphasize the lower data volume when compared to the stream of video pictures (<NUM>), can be stored on a streaming server (<NUM>) for future use. One or more streaming client subsystems, such as client subsystems (<NUM>) and (<NUM>) in <FIG> can access the streaming server (<NUM>) to retrieve copies (<NUM>) and (<NUM>) of the encoded video data (<NUM>). A client subsystem (<NUM>) can include a video decoder (<NUM>), for example, in an electronic device (<NUM>). The video decoder (<NUM>) decodes the incoming copy (<NUM>) of the encoded video data and creates an outgoing stream of video pictures (<NUM>) that can be rendered on a display (<NUM>) (e.g., display screen) or other rendering device (not depicted). In some streaming systems, the encoded video data (<NUM>), (<NUM>), and (<NUM>) (e.g., video bitstreams) can be encoded according to certain video coding/compression standards. Examples of those standards include ITU-T Recommendation H. In an example, a video coding standard under development is informally known as Versatile Video Coding (VVC). The disclosed subject matter may be used in the context of VVC.

Aspects of the disclosure provide techniques to simplify affine motion compensation with prediction offsets.

Generally, a motion vector for a block can be coded either in an explicit way, to signal the difference to a motion vector predictor (e.g., advanced motion vector prediction or AMVP mode); or in an implicit way, to be indicated completely from one previously coded or generated motion vector. The later one is referred to as merge mode, meaning the current block is merged into a previously coded block by using its motion information.

Both merge mode and the AMVP mode construct candidate list during decoding.

<FIG> shows an example of spatial and temporal candidates in some examples.

For the merge mode in the inter prediction, merge candidates in a candidate list are primarily formed by checking motion information from either spatial or temporal neighboring blocks of the current block. In the <FIG> example, candidate blocks A1, B1, B0, A0 and B2 are sequentially checked. When any of the candidate blocks are valid candidates, for example, are coded with motion vectors, then, the motion information of the valid candidate blocks can be added into the merge candidate list. Some pruning operation is performed to make sure duplicated candidates will not be put into the list again. The candidate blocks A1, B1, B0, A0 and B2 are adjacent to corners of the current block, and are referred to as corner candidates.

After spatial candidates, temporal candidates are also checked into the merge candidate list. In some examples, the current block's co-located block in a specified reference picture is found. The motion information at C0 position (bottom right corner of the current block) of the co-located block will be used as temporal merge candidate. If the block at this position is not coded in inter mode or not available, C1 position (at the outer bottom right corner of the center of the co-located block) will be used instead. The present disclosure provides techniques to further improve merge mode.

The advanced motion vector prediction (AMVP) mode in HEVC refers to using spatial and temporal neighboring blocks' motion information to predict the motion information of the current block, while the prediction residue is further coded. Examples of spatial and temporal neighboring candidates are shown in <FIG> as well.

In some embodiments, in AMVP mode, a two-candidate motion vector predictor list is formed. For example, the list includes a first candidate predictor and a second candidate predictor. The first candidate predictor is from the first available motion vector from the left edge, in the order of spatial A0, A1 positions. The second candidate predictor is from the first available motion vector from the top edge, in the order of spatial B0, B1 and B2 positions. If no valid motion vector can be found from the checked locations for either the left edge or the top edge, no candidate will be filled in the list. If the two available candidates are the same, only one will be kept in the list. If the list is not full (with two different candidates), the temporal co-located motion vector (after scaling) from C0 location will be used as another candidate. If motion information at C0 location is not available, location C1 will be used instead.

In some examples, if there are still no enough motion vector predictor candidates, zero motion vector will be used to fill up the list.

In some embodiments, prediction offsets can be signaled on top of existing merge candidates. For example, a technique that is referred to as ultimate motion vector expression (UMVE) uses a special merge mode in which an offset (both magnitude and direction) on top of the existing merge candidates is signaled. In this technique, a few syntax elements, such as a prediction direction IDX, a base candidate IDX, a distance IDX, a search direction IDX, and the like, are signaled to describe such an offset. For example, the prediction direction IDX is used to indicate which of the prediction directions (temporal prediction direction, e.g., L0 reference direction, L1 reference direction or L0 and L1 reference directions) is used for UMVE mode. The base candidate IDX is used to indicate which of the existing merge candidates is used as the start point (base candidate) to apply the offset. The distance IDX is used to indicate how large the offset is from the starting point (along x or y direction, but not both). The offset magnitude is chosen from a fix number of selections. The search direction IDX is used to indicate the direction (x or y, + or - direction) to apply the offset.

In an example, assuming the starting point MV is MV_S, the offset is MV_offset. Then the final MV predictor will be MV_final = MV_S + MV_offset.

<FIG> shows examples for UMVE according to an embodiment of the disclosure. In an example, the starting point MV is shown by (<NUM>) (for example according to the prediction direction IDX and base candidate IDX), the offset is shown by (<NUM>) (for example according to the distance IDX and the search direction IDX), and the final MV predictor is shown by (<NUM>) in <FIG>. In another example, the starting point MV is shown by (<NUM>) (for example according to the prediction direction IDX and base candidate IDX), the offset is shown by (<NUM>) (for example according to the distance IDX and the search direction IDX), and the final MV predictor is shown by <NUM> in <FIG>.

<FIG> shows examples for UMVE according to an embodiment of the disclosure. For example, the starting point MV is shown by (<NUM>) (for example according to the prediction direction IDX and base candidate IDX). In the <FIG> example, <NUM> search directions, such as +Y, -Y, +X and -X, are used, and the four search directions can be indexed by <NUM>, <NUM>, <NUM>, <NUM>. The distance can be indexed by <NUM> (<NUM> distance to the starting point MV), <NUM> (<NUM> to the starting point MV), <NUM> (<NUM> to the starting point MV), <NUM> (<NUM> to the starting point), and the like. Thus, when the search direction IDX is <NUM>, and the distance IDX is <NUM>, the final MV predictor is shown as <NUM>.

In another example, the search direction and the distance can be combined for indexing. For example, the starting point MV is shown by (<NUM>) (for example according to the prediction direction IDX and base candidate IDX). The search direction and the distance are combined to be indexed by <NUM>-<NUM> as shown in <FIG>.

According to an aspect of the disclosure, affine motion compensation, by describing a <NUM>-parameter (or a simplified <NUM>-parameter) affine model for a coding block, can efficiently predict the motion information for samples within the current block. More specifically, in an affine coded or described coding block, different part of the samples can have different motion vectors. The basic unit to have a motion vector in an affine coded or described block is referred to as a sub-block. The size of a sub-block can be as small as <NUM> sample only; and can be as large as the size of current block.

When an affine mode is determined, for each sample in the current block, its motion vector (relative to the targeted reference picture) can be derived using such a model (e.g., <NUM> parameter affine motion model or <NUM> parameter affine motion model). In order to reduce implementation complexity, affine motion compensation is performed on a sub-block basis, instead of on a sample basis. That means, each sub-block will derive its motion vector and for samples in each sub-block, the motion vector is the same. A specific location of each sub-block is assumed, such as the top-left or the center point of the sub-block, to be the representative location. In one example, such a sub-block size contains 4x4 samples.

In general, an affine motion model has <NUM> parameters to describe the motion information of a block. After the affine transformation, a rectangular block will become a parallelogram. In an example, the <NUM> parameters of an affine coded block can be represented by <NUM> motion vectors at three different locations of the block.

<FIG> shows an example of a block (<NUM>) with an affine motion model. The block (<NUM>) uses motion vectors v<NUM>, v<NUM>, and v<NUM> at three corner locations A, B and C to describe the motion information of the affine motion model used for the block (<NUM>). These locations A, B and C are referred to as control points.

In a simplified example, an affine motion model uses <NUM> parameters to describe the motion information of a block based on an assumption that after the affine transformation, the shape of the block does not change. Therefore, a rectangular block will remain a rectangular and same aspect ratio (e.g., height/width) after the transformation. The affine motion model of such a block can be represented by two motion vectors at two different locations, such as at corner locations A and B.

<FIG> shows examples of affine transformation for a <NUM>-parameter affine mode ( using <NUM>-parameter affine model) and a <NUM>-parameter affine mode (using <NUM>-parameter affine model).

In an example, when assumptions are made such that the object only has zooming and translational motions, or the object only has rotation and translation models, then the affine motion model can be further simplified to a <NUM>-parameter affine motion model with <NUM> parameters to indicate the translational part and <NUM> parameter to indicate either a scaling factor for zooming or an angular factor for rotation.

According to an aspect of the disclosure, when affine motion compensation is used, two signaling techniques can be used. The two signaling techniques are referred to as a merge mode based signaling technique and a residue (AMVP) mode based signaling technique.

For the merge mode based signaling technique, the affine information of the current block is predicted from previously affine coded blocks. In one method, the current block is assumed to be in the same affine object as the reference block, so that the MVs at the control points of the current block can be derived from the reference block's model. The MVs at the current block' other locations are just linearly modified in the same way as from one control point to another in the reference block. This method is referred to as model based affine prediction. In another method, neighboring blocks' motion vectors are used directly as the motion vectors at current block's control points. Then motion vectors at the rest of the block are generated using the information from the control points. This method is referred as control point based affine prediction. In either method, no residue components of the MVs at current block are to be signaled. In other words, the residue components of the MVs are assumed to be zero.

For the residue (AMVP) mode based signaling technique, affine parameters, or the MVs at the control points of the current block, are to be predicted. Because there are more than one motion vectors to be predicted, the candidate list for motion vectors at all control points is organized in grouped way such that each candidate in the list includes a set of motion vector predictors for all control points. For example, candidate <NUM>={predictor for control point A, predictor for control point B, predictor for control point C }; candidate <NUM>={ predictor for control point A, predictor for control point B, predictor for control point C }, etc. The predictor for the same control point in different candidates can be the same or different. The motion vector predictor flag (mvp_10_flag for List <NUM> or mvp_l1_flag for List <NUM>) will be used to indicate which candidate from the list is chosen. After prediction, the residue part of the parameter, or the differences of the actual MVs to the MV predictors at the control points, are to be signaled. The MV predictor at each control point can also come from model based affine prediction from one of its neighbors, and the method described from the above description for affine merge mode can be used.

In some related methods, affine parameters for a block can be either purely derived from neighboring block's affine model or control points' MV predictor, or from explicitly signal the MV differences at the control points. However, in many cases the non-translational part of the affine parameters is very close to zero. Using unrestricted MV difference coding to signal the affine parameters has redundancy.

Aspects of the disclosure provide new techniques to better represent the affine motion parameters therefore improve coding efficiency of affine motion compensation. More specifically, to predict affine model parameters in a more efficient way, the translational parameters of a block are represented using a motion vector prediction, in the same way or similar way as that is for a regular inter prediction coded block. For example, the translational parameters can be indicated from a merge candidate. For the non-translational part, a few typically used parameters such as rotation parameter and zooming parameter are pre-determined with a set of fixed offset values. These values are considered as some refinements or offset around the default value. The encoder can evaluate the best option from these values and signal the index of the choice to the decoder. The decoder then restores the affine model parameters using <NUM>) the decoded translational motion vector and <NUM>) the index of the chosen non-translational parameters.

In the following description, <NUM>-parameter affine model is used as an example, the methods described in the following description can be extended to other motion models, or affine models with different numbers of parameters as well, such as <NUM>-parameter affine model, and the like. In some of the following description, the model used may not be always affine model, but possibly other types of motion model.

In an example, a <NUM>-parameter affine model is described, such as shown by Eq. <NUM> <MAT> where ρ is the scaling factor for zooming, θ is the angular factor for rotation, and (c, f) is the motion vector to describe the translational motion. (x, y) is a pixel location in the current picture, (x', y') is a corresponding pixel location in the reference picture.

Let a = ρcos θ, and b = ρsin θ, Eq. <NUM> may become the following form as in Eq. <NUM> <MAT> Thus, a <NUM>-parameter affine model can be represented by a set of model-based parameters {ρ, θ, c, f}, or {a, b, c, f}.

From Eq. <NUM>, the motion vector (MVx, MVy) at pixel position (x, y) may be described as in Eq. <NUM>, <MAT> Where a' is equal to (a-<NUM>), MVx is the horizontal motion vector value, and MVy is the vertical motion vector value.

In some examples, the <NUM>-parameter affine model can also be represented by the motion vectors of two control points, CP0 and CP1, of the block. Similarly, three control points may be required to represent a <NUM>-parameter affine model.

<FIG> shows a plot that illustrates control points CP0 and CP1 for a current block.

Using two control points CP0 and CP1, the motion vector at position (x, y) in the current block can be derived using Eq. <NUM>: <MAT> where (v0x, v0y) is motion vector of the top-left corner control point CP0 as depicted in <FIG>, and (v1x, v1y) is motion vector of the top-right corner control point CP1 as depicted in <FIG>. In the example of control-point based model, the affine model of the block may be represented by {v<NUM>x, v<NUM>y, v<NUM>x, v<NUM>y, }.

In some related examples, affine parameters for a block can be either purely derived from neighboring block's affine model or control points' MV predictor, or from explicitly signaling of the MV differences at the control points. However, in many cases the non-translational part of the affine parameters is very close to zero. Using unrestricted MV difference coding to signal the affine parameters has redundancy. New techniques to better represent the affine motion parameters are developed to improve coding efficiency.

Aspects of the disclosure provide techniques for improving coding efficiency of affine merge and affine motion vector coding. The techniques may be used in advanced video codec to improve the coding performance of affine inter prediction. The motion vector here may refer to block mode (conventional motion vector where one whole block uses a set of motion information), such as the merge candidates in HEVC standard. The motion vector here may also refer to sub-block mode (for different parts of the block, different sets of motion information may apply), such as affine mode and advanced temporal MV prediction (ATMVP) in WC.

It is noted that the proposed methods may be used separately or combined in any order. In the following description, the term block may be interpreted as a prediction block, a coding block, or a coding unit, i.e. CU. It is proposed to predict current block's affine model based on control point motion vectors (CPMVs) at <NUM> or <NUM> corners. After the CPMVs are predicted using model-based affine merge prediction or constructed control-point based affine merge prediction, an available affine merge candidate may be selected as the base predictor.

In some embodiments, a flag, such as an affine_merge_with_offset usage flag, is signaled to indicate whether the proposed method is used. When the affine_merge_with_offset usage flag is indicative of using the proposed method, the number of base predictor candidates (e.g., the number of affine merge candidates) to be selected from may be determined based on a pre-defined value or a signaled value. In an example, the number of base predictor candidates is a predefined default value that is known and then used by both encoder and decoder. In another example, the encoder side determines the number of base predictor candidates and signals the number of base predictor candidates in the coded video bitstream, such as, but not limited to, in sequence parameter set (SPS), picture parameter set (PPS), or slice header.

In an example, when the number of base predictor candidate is <NUM>, the base predictor index is not signaled in the coded video bitstream, and the first available affine merge candidate is used as the base predictor. When the number of base predictor candidates is greater than <NUM>, the base predictor index is signaled in the coded video bitstream to indicate which affine merge candidate to be used as the base predictor.

After the base predictor is determined, CPMV values of the base predictor may be used as starting point, and distance offset values may be added on top of CPMV values to generate current block's CPMV values.

The offset values may be determined by the offset parameters. In some examples, an offset parameter is provided in a form of offset direction index and offset distance index. For example, the offset direction index is signaled to indicate on which component(s) the offset may be applied to a CPMV. It may be on CPMV's horizontal and/or vertical direction. In an embodiment, there may be <NUM> offset directions for each control point as shown below in Table <NUM>, where only x or y direction has MV difference, but not on both directions:.

In another embodiment, there's no limitation of only x or y has MV difference, then the table for offset direction IDX may become as shown in Table <NUM>, one of the eight offset directions may be used:.

The offset distance index is signaled to indicate the magnitude of offset distance to be applied on the CPMV. In an example, the offset distance index is signaled in the form of pixel distance. In some embodiments, an offset distance table is used, and each offset distance index is mapped to offset distance in number of pixels according to the offset distance table. The offset distance value may be integer or fractional values. The offset distance value indicates that the offset to be applied to the base predictor's motion vector value.

In one example, a offset distance table with size of <NUM> is as shown in Table <NUM>. The offset distance values in the table are {<NUM>/<NUM>, <NUM>, <NUM>, <NUM>}, in terms of pixels.

In another example, an offset distance table with size of <NUM> is as shown in the Table <NUM>. The offset distance values in the table are {<NUM>/<NUM>, <NUM>, <NUM>, <NUM>, <NUM>}, in terms of pixels.

In another example, the mapping of offset distance values with <NUM> indices is shown in Table <NUM>. The offset distance values are in range of ¼ pixels to <NUM> pixels.

The number of distance indices and/or the value of pixel distance corresponding to each distance index may have different values in different ranges, they are not limited by the aforementioned examples.

In an embodiment, the offset direction index and the offset distance index may be signaled only once for all control points, and the same offset distance may be applied to all CPMVs on the same offset direction.

In another embodiment, the offset direction index and the offset distance index parameters may be signaled for each control point separately. Each CPMV has a corresponding offset magnitude applied on a corresponding offset direction.

In some embodiments, when offset parameters are signaled for each control point, a zero_MVD flag may be signaled before offset parameters to indicate whether the motion vector difference is zero for the corresponding CPMV. When the zero_MVD flag is true, in an example, offset parameters are not signaled for the corresponding CPMV. In an embodiment, when N control points are available (N is a positive integer), and the first N-<NUM> control points have zero_MVD flags that are true, the last control point's zero_MVD may be inferred to be false, so that its zero_MVD flag for the last control point is not signaled.

In another embodiment, when one set of offset parameters is signaled for all control points, zero_MVD flag may not be signaled.

Aspects of the disclosure provide techniques to signal offset parameters.

In an embodiment, each control point has its offset parameters signaled separately. In an example, the current block's merge flag and affine_merge_with_offset usage flag are both true. When more than one predictor candidates are existed to be potentially used for base predictor, base predictor index is signaled from the encoder side to the decoder side in an example. In another example, no base predictor index is signaled, and predefined base predictor index can be used on the encoder side and the decoder side.

Further, for each control point (CP) of current block, Zero_MVD flag is signaled for the CP. When the CP is the last CP of the block, and all other CPs have Zero_MVD equal to <NUM> (true), Zero_MVD flag for the last CP is inferred to <NUM> (false) without signaling.

For each CP, when the Zero_MVD flag is true, CPMV is set to be the same as base predictor's corresponding CPMV value. However, when the Zero_MVD flag is false, offset distance index and offset direction index for the CP are signaled in an example. Based on the offset distance index and offset direction index, the offset distance and the offset direction can be determined for example based on Tables <NUM>-<NUM>. Then, CPMV value is generated from the base predictor's corresponding CPMV predictor value with the offset distance applied on the offset direction.

In some examples, the number of control points for the current block is determined by the affine model type of the base predictor. When the base predictor uses <NUM>-parameter affine model, the current block uses <NUM> control points. When the base predictor uses <NUM>-parameter affine model, the current block uses <NUM> control points.

In an example, the base predictor uses four-parameter affine model, and the parameters that are signaled include a usage flag (e.g., affine_merge_with_offset usage flag is equal to true), the base predictor index, zero_MVD flag (false) for a first CP (also referred to as CP0), offset distance index for the first CP, offset direction index for the first CP, zero_MVD flag (false) for a second CP (also referred to as CP1), offset distance index for the second CP, and offset direction index for the second CP.

In another example, the base predictor uses six-parameter affine model, and the parameters that are signaled include a usage flag (e.g., affine_merge_with_offset usage flag is equal to true), the base predictor index, zero_MVD flag (false) for a first CP (also referred to as CP0), offset distance index for the first CP, offset direction index for the first CP, zero_MVD flag (false) for a second CP (also referred to as CP1), offset distance index for the second CP, offset direction index for the second CP, zero_MVD flag (false) for a third CP (also referred to as CP2), offset distance index for the third CP, offset direction index for the third CP.

In other embodiment, one set of offset parameters is signaled for all control points. In some examples, the current block's merge flag and affine_merge_with_offset usage flag are both true. When more than one predictor candidates are existed to be potentially used for base predictor, base predictor index is signaled from the encoder side to the decoder side in an example. In another example, no base predictor index is signaled, and predefined base predictor index can be used on the encoder side and the decoder side. For the current block, one set of offset distance index and offset direction index is signaled. Based on the offset distance index and the offset direction index, the offset distance and the offset direction are determined. Then, the current block's CPMV values are generated from the base predictor's corresponding CPMV predictor values with the offset distance applied on the offset direction.

In an example, the parameters that are signaled include a usage flag (e.g., affine_merge_with_offset usage flag is equal to true), the base predictor index, offset distance index for the current block, and offset direction index for the current block.

Aspects of the disclosure provide techniques for calculate CPMV values.

In some embodiments, when the inter prediction is uni-prediction, the motion vector difference in the form of applying the offset distance (determined based on the offset distance index decoded from the coded video bitstream) on the offset direction (determined based on the offset direction index decoded from the coded video bistream) is used for each control point predictor. The motion vector difference is then used to determine the MV value of each control point.

For example, when base predictor is uni-prediction, and the motion vector values of a control point of the base predictor is denoted as MVP (vpx, vpy). When offset distance index and offset direction index are signaled, the motion vectors of current block's corresponding control points will be calculated using Eq. <NUM>. The distance_offset denotes to the offset distance value that is determined based on the offset distance index. The x_dir_factor and y_dir_factor denotes the offset direction factor (e. g, <NUM> or -<NUM>) on x-axis and y-axis respectively, which are determined based on the offset direction index.

In an example, offset mirroring is used for bi-prediction CPMVs. The motion vector difference (in the form of offset distance and offset direction) can be applied, in opposite directions, to motion vectors of the control points that refer to a reference picture from the L0 list and to motion vectors of the control points that refer to a reference picture from the L1 list. When the inter prediction is bi-prediction, the motion vector difference (in the form offset distance and offset direction) is applied to the L0 motion vectors (motion vectors that refer to a reference picture from the L0 list) of the control point predictor to calculate the L0 motion vectors (motion vectors that refer to a reference picture from the L0 list) of the control points for the current block; and the motion vector difference is also applied to the L1 motion vectors (motion vectors that refer to a reference picture from the L1 list) of the control point predictor but in an opposite direction to calculate the L1 motion vectors (motion vectors that refer to a reference picture from the L1 list) of the control points for the current block. The calculation results will be the MV values of each control point, on each inter prediction direction.

For example, when base predictor is bi- prediction, and the motion vector values of a control point on L0 (motion vectors that refer to a reference picture from the L0 list) is denoted as MVPL0 (v0px, v0py), and the motion vector values of that control point on L1 (motion vectors that refer to a reference picture from the L1 list) is denoted as MVPL1 (v1px, v1py). When offset distance index and offset direction index are signaled, the motion vectors of current block's corresponding control points can be calculated using Eq. <NUM> and Eq. <NUM>: <MAT> <MAT>.

According to another aspect of the disclosure, the CPMV calculation using offset mirroring is conditionally performed for bi-prediction CPMV calculation, for example based on the reference picture's location with regard to the current picture.

In an example, when the inter prediction is bi- prediction, the motion vector values of the control points from the L0 list (motion vectors that refer to a reference picture from the L0 list) is calculated in the same way as above, the signaled offset distance is applied on the signaled offset direction for control point predictor's L0 motion vector (motion vectors that refer to a reference picture from the L0 list).

When the reference pictures from L0 and L1 are on the opposite sides of the current picture, to calculate the motion vectors for the control points from L1 list (motion vectors that refer to a reference picture from the L1 list), the same offset distance with opposite offset direction (from the signaled offset direction) is applied for control point predictor's L1 motion vector (motion vectors that refer to a reference picture from the L1 list).

When the reference pictures from L0 and L1 are on the same side of the current picture, to calculate the motion vectors for the control points from L1 list, the same offset distance with same offset direction (as the signaled offset direction) is applied for control point predictor's L1 motion vector (motion vectors that refer to a reference picture from the L1 list).

It is noted that in some embodiments, the offset distance applied on the reference picture from L1 list is the same as the offset distance applied on the reference picture from L0 list; and in some other embodiments, the offset distance applied on the reference picture from L1 list is scaled according to the ratio of distance of reference picture from L0 list to the current picture and distance of reference picture from L1 list to the current picture.

In an embodiment, the distance offset applied on the reference picture from the L1 list is the same as the distance offset applied on the reference picture from the L0 list.

In an example, when base predictor is bi- prediction, and the motion vector values of a control point (of the base predictor) on a reference picture from the L0 list is denoted as MVPLO (v0px, v0py), and the motion vector values of that control point (of the base predictor) on a reference picture from the L1 list is denoted as MVPL1 (v1px, v1py). The reference pictures from the L0 list and the L1 list are on the opposite side of the current picture. When offset distance index and offset direction index are signaled, the motion vectors of current block's corresponding control points can be calculated using Eq. <NUM> and Eq. <NUM> shown above.

In the claimed embodiment, the offset distance applied on the reference picture from L1 list is scaled according to the ratio of distance of reference picture from L0 list to the current picture and distance of reference picture from L1 list to the current picture.

In an example, when the base predictor is bi- prediction, and the motion vector values of a control point (of the base predictor) on the reference picture from the L0 list is denoted as MVPL0 (v0px, v0py), and the motion vector values of that control point (of the base predictor) on the reference picture from the L1 list is denoted as MVPL1 (v1px, v1py). When offset distance index and offset direction index are signaled, the motion vectors of current block's corresponding control points can be calculated using Eq. <NUM> and Eq. <NUM>. <MAT> <MAT>.

The scaling_factor is calculated based on the POC number of current picture (denoted as current_POC), the POC number of the reference picture on the L0 list (denoted as POC_L0), and the POC number of the reference picture on the L1 list (denoted as POC_L1) according to (Eq. <NUM>): <MAT>.

<FIG> shows a flow chart outlining a process (<NUM>) according to an embodiment of the disclosure. The process (<NUM>) can be used in the reconstruction of a block coded in intra mode, so to generate a prediction block for the block under reconstruction. In various embodiments, the process (<NUM>) are executed by processing circuitry, such as the processing circuitry in the terminal devices (<NUM>), (<NUM>), (<NUM>) and (<NUM>), the processing circuitry that performs functions of the video encoder (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), the processing circuitry that performs functions of the video encoder (<NUM>), and the like. In some embodiments, the process (<NUM>) is implemented in software instructions, thus when the processing circuitry executes the software instructions, the processing circuitry performs the process (<NUM>). The process starts at (S1401) and proceeds to (S1410).

At (S1410), prediction information of a current block in a current picture is decoded from a coded video bitstream. The prediction information is indicative of an affine merge mode with offset.

At (S1420), in response to the affine merge mode with offsest, a set of offset parameters is decoded from the coded video bitstream. Based on the set of offset parameters, a motion vector difference is determined. In some examples, the motion vector different is used in the form of applying an offset distance to an offset direction.

At (S1430), the motion vector difference is applied to first motion vectors of multiple control points from a base predictor of the current block to calculate second motion vectors at corresponding multiple control points of the current block.

At (S1440), parameters of an affine model are determined based on the second motion vectors at the corresponding multiple control points of the current block.

At (S1450), samples of the current block are reconstructed based on the affine model. For example, for a sample of the current block, a motion vector at the sample is calculated according to the affine model. Thus, in an example, the sample is constructed based on a reference sample in a reference picture that is pointed by the motion vector. Then, the process proceeds to (S1499) and terminates.

Computer system (<NUM>) can also include an interface to one or more communication networks. Networks can for example be wireless, wireline, optical. Networks can further be local, wide-area, metropolitan, vehicular and industrial, real-time, delay-tolerant, and so on. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks to include GSM, <NUM>, <NUM>, <NUM>, LTE and the like, TV wireline or wireless wide area digital networks to include cable TV, satellite TV, and terrestrial broadcast TV, vehicular and industrial to include CANBus, and so forth. Certain networks commonly require external network interface adapters that attached to certain general purpose data ports or peripheral buses (<NUM>) (such as, for example USB ports of the computer system (<NUM>)); others are commonly integrated into the core of the computer system (<NUM>) by attachment to a system bus as described below (for example Ethernet interface into a PC computer system or cellular network interface into a smartphone computer system). Using any of these networks, computer system (<NUM>) can communicate with other entities. Such communication can be uni-directional, receive only (for example, broadcast TV), uni-directional send-only (for example CANbus to certain CANbus devices), or bi-directional, for example to other computer systems using local or wide area digital networks. Certain protocols and protocol stacks can be used on each of those networks and network interfaces as described above.

Claim 1:
A method for video decoding by a decoder, characterized by comprising:
decoding (S1410) prediction information of a current block in a current picture from a coded video bitstream, the prediction information being indicative of an affine merge mode with offset;
decoding (S1420), from the coded video bitstream, a set of parameters that is used to determine a motion vector difference;
applying (S1430) the motion vector difference to first motion vectors of multiple control points of a base predictor of the current block to determine second motion vectors at corresponding multiple control points of the current block;
wherein the first motion vectors refer to a first reference picture and the second motion vectors refer to the first reference picture;
calculating a scaling factor based on a first picture number difference of the first reference picture and the current picture and a second picture number difference of a second reference picture and the current picture;
applying the motion vector difference that is scaled according to the scaling factor to third motion vectors of the control points of the base predictor that refer to the second reference picture to determine fourth motion vectors at the corresponding multiple control points of the current block that refer to the second reference picture;
determining (S1440) parameters of an affine model referring to the first reference picture based on the second motion vectors at the corresponding multiple control points of the current block;
determining parameters of an affine model referring to the second reference picture based on the fourth motion vectors at the corresponding multiple control points of the current block; and
reconstructing (S1450) at least a sample of the current block according to the affine models.