Traitement en cours

Veuillez attendre...

Paramétrages

Paramétrages

Aller à Demande

1. WO2020192749 - CODAGE ENTROPIQUE POUR MODE AFFINE À RÉSOLUTION DE VECTEUR DE MOUVEMENT ADAPTATIVE

Document

Description

Title of Invention 0001   0002   0003   0004   0005   0006   0007   0008   0009   0010   0011   0012   0013   0014   0015   0016   0017   0018   0019   0020   0021   0022   0023   0024   0025   0026   0027   0028   0029   0030   0031   0032   0033   0034   0035   0036   0037   0038   0039   0040   0041   0042   0043   0044   0045   0046   0047   0048   0049   0050   0051   0052   0053   0054   0055   0056   0057   0058   0059   0060   0061   0062   0063   0064   0065   0066   0067   0068   0069   0070   0071   0072   0073   0074   0075   0076   0077   0078   0079   0080   0081   0082   0083   0084   0085   0086   0087   0088   0089   0090   0091   0092   0093   0094   0095   0096   0097   0098   0099   0100   0101   0102   0103   0104   0105   0106   0107   0108   0109   0110   0111   0112   0113   0114   0115   0116   0117   0118   0119   0120   0121   0122   0123   0124   0125   0126   0127   0128   0129   0130   0131   0132   0133   0134   0135   0136   0137   0138   0139   0140   0141   0142   0143   0144   0145   0146   0147   0148   0149   0150   0151   0152   0153   0154   0155   0156   0157   0158   0159   0160   0161   0162   0163   0164   0165   0166   0167   0168   0169   0170   0171   0172   0173   0174   0175   0176   0177   0178   0179   0180   0181   0182   0183   0184   0185   0186   0187   0188   0189   0190   0191   0192   0193   0194   0195   0196   0197   0198   0199   0200   0201   0202   0203   0204   0205   0206   0207   0208   0209   0210   0211   0212   0213   0214   0215   0216   0217   0218   0219   0220   0221   0222   0223   0224   0225   0226   0227   0228   0229   0230   0231   0232   0233   0234   0235   0236   0237   0238   0239   0240   0241   0242   0243   0244   0245   0246   0247   0248   0249   0250   0251   0252   0253   0254   0255   0256   0257   0258   0259   0260   0261   0262   0263   0264   0265   0266   0267   0268   0269   0270   0271   0272   0273   0274   0275   0276   0277   0278   0279   0280   0281   0282   0283   0284   0285   0286   0287   0288   0289   0290   0291   0292   0293   0294   0295   0296   0297   0298   0299   0300   0301   0302   0303   0304   0305   0306   0307   0308   0309   0310   0311   0312   0313   0314   0315   0316   0317   0318   0319   0320   0321   0322   0323   0324   0325   0326   0327   0328   0329   0330   0331   0332   0333   0334   0335   0336   0337   0338   0339   0340   0341   0342   0343   0344   0345   0346   0347   0348   0349   0350   0351   0352   0353   0354   0355   0356   0357   0358   0359   0360   0361   0362   0363   0364   0365   0366   0367   0368   0369   0370   0371   0372   0373   0374   0375   0376   0377   0378   0379   0380   0381   0382   0383   0384   0385   0386   0387   0388   0389   0390   0391   0392   0393   0394   0395   0396   0397   0398   0399   0400   0401   0402   0403   0404   0405   0406   0407   0408   0409   0410   0411   0412   0413   0414   0415   0416   0417   0418   0419   0420   0421   0422   0423   0424   0425   0426   0427   0428   0429   0430   0431   0432   0433   0434   0435   0436   0437   0438   0439   0440   0441   0442   0443   0444   0445   0446   0447   0448   0449   0450   0451   0452   0453   0454   0455   0456   0457   0458   0459   0460   0461   0462   0463   0464   0465   0466   0467   0468   0469   0470   0471   0472   0473   0474   0475   0476   0477   0478   0479   0480   0481   0482   0483   0484   0485   0486   0487   0488   0489   0490   0491   0492   0493   0494   0495   0496   0497   0498   0499   0500   0501   0502   0503   0504   0505   0506   0507   0508   0509   0510   0511   0512   0513   0514   0515   0516   0517   0518   0519   0520   0521   0522   0523   0524   0525   0526   0527   0528   0529   0530   0531   0532   0533   0534   0535   0536   0537   0538   0539   0540   0541   0542   0543   0544   0545   0546   0547   0548   0549   0550   0551   0552   0553   0554   0555   0556   0557   0558   0559   0560   0561   0562   0563   0564   0565   0566   0567   0568   0569   0570   0571   0572   0573   0574   0575   0576   0577   0578   0579   0580   0581   0582   0583   0584   0585   0586   0587   0588   0589   0590   0591   0592   0593   0594   0595   0596   0597   0598   0599   0600   0601   0602   0603   0604   0605   0606   0607   0608   0609   0610   0611   0612   0613   0614   0615   0616   0617   0618   0619   0620   0621   0622   0623   0624   0625   0626   0627   0628   0629   0630   0631   0632   0633   0634   0635   0636   0637   0638   0639   0640   0641   0642   0643   0644   0645   0646   0647   0648   0649   0650   0651   0652   0653   0654   0655   0656   0657   0658   0659   0660   0661   0662   0663   0664   0665   0666   0667   0668   0669   0670   0671   0672   0673   0674   0675   0676   0677   0678   0679   0680   0681   0682   0683   0684   0685   0686   0687   0688   0689   0690   0691   0692   0693   0694   0695   0696   0697   0698   0699   0700   0701   0702   0703   0704   0705   0706   0707   0708   0709   0710   0711   0712   0713   0714   0715   0716   0717   0718   0719   0720   0721   0722   0723   0724   0725   0726   0727   0728   0729   0730   0731   0732   0733   0734   0735   0736   0737   0738   0739   0740   0741   0742   0743   0744   0745   0746   0747   0748   0749   0750   0751   0752   0753   0754   0755   0756   0757   0758   0759   0760   0761   0762   0763   0764   0765   0766   0767   0768   0769   0770   0771   0772   0773   0774   0775   0776   0777   0778   0779   0780   0781   0782   0783   0784   0785   0786   0787   0788   0789   0790   0791   0792   0793   0794   0795   0796   0797   0798   0799   0800   0801   0802   0803   0804   0805   0806   0807   0808   0809   0810   0811   0812   0813   0814   0815   0816   0817   0818   0819   0820   0821   0822   0823   0824   0825   0826   0827   0828   0829   0830   0831   0832   0833   0834   0835   0836   0837   0838   0839   0840   0841   0842   0843   0844   0845   0846   0847   0848   0849   0850   0851   0852   0853   0854   0855   0856   0857   0858   0859   0860   0861   0862   0863   0864   0865   0866   0867   0868   0869   0870   0871   0872   0873   0874   0875   0876   0877   0878   0879   0880   0881   0882   0883   0884   0885   0886   0887   0888   0889   0890   0891   0892   0893   0894   0895   0896   0897   0898   0899   0900   0901   0902   0903   0904   0905   0906   0907   0908   0909   0910   0911   0912   0913   0914   0915   0916   0917   0918   0919   0920   0921   0922   0923   0924   0925   0926   0927   0928   0929   0930   0931   0932   0933   0934   0935   0936   0937   0938   0939   0940   0941   0942   0943   0944   0945   0946   0947   0948   0949   0950   0951   0952   0953   0954   0955   0956   0957   0958   0959   0960   0961   0962   0963   0964   0965   0966   0967   0968   0969   0970   0971   0972   0973   0974   0975   0976   0977   0978   0979   0980   0981   0982   0983   0984   0985   0986   0987   0988   0989   0990   0991   0992   0993   0994   0995   0996   0997   0998   0999   1000   1001   1002   1003   1004   1005   1006   1007   1008   1009   1010   1011   1012   1013   1014   1015   1016   1017   1018   1019   1020   1021   1022   1023   1024   1025   1026   1027   1028   1029   1030   1031   1032   1033   1034   1035   1036   1037   1038   1039   1040   1041   1042   1043   1044   1045   1046   1047   1048   1049   1050   1051   1052   1053   1054   1055   1056   1057   1058   1059   1060   1061   1062   1063   1064   1065   1066   1067   1068   1069   1070   1071   1072   1073   1074   1075   1076   1077   1078   1079   1080   1081   1082   1083   1084   1085   1086   1087   1088   1089   1090   1091   1092   1093   1094   1095   1096   1097   1098   1099   1100   1101   1102   1103   1104   1105   1106   1107   1108   1109   1110   1111   1112   1113   1114   1115   1116   1117   1118   1119   1120   1121   1122   1123   1124   1125   1126   1127   1128   1129   1130   1131   1132   1133   1134   1135   1136   1137   1138   1139   1140   1141   1142   1143   1144   1145   1146   1147   1148   1149   1150   1151   1152   1153   1154   1155   1156   1157   1158   1159   1160   1161   1162   1163   1164   1165   1166   1167  

Claims

1   2   3   4   5   6   7   8   9   10   11   12   13   14  

Drawings

1   2   3   4A   4B   5   6   7   8   9   10   11   12A   12B   13   14   15   16   17A   17B   18A   18B   19   20   21   22   23A   23B   24   25   26   27   28   29   30   31  

Description

Title of Invention : ENTROPY CODING FOR AFFINE MODE WITH ADAPTIVE MOTION VECTOR RESOLUTION

[0001]
CROSS REFERENCE TO RELATED APPLICATIONS
[0002]
Under the applicable patent law and/or rules pursuant to the Paris Convention, this application is made to timely claim the priority to and benefit of International Patent Application No. PCT/CN2019/079962, filed on March 27, 2019. For all purposes under the law, the entire disclosure of the aforementioned application is incorporated by reference as part of the disclosure of this application.

TECHNICAL FIELD

[0003]
This patent document relates to video coding and decoding techniques, devices and systems.

BACKGROUND

[0004]
In spite of the advances in video compression, digital video still accounts for the largest bandwidth use on the internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, it is expected that the bandwidth demand for digital video usage will continue to grow.
[0005]
SUMMARY
[0006]
Devices, systems and methods related to digital video coding, and specifically, to motion vector predictor derivation and signaling for affine mode with adaptive motion vector resolution (AMVR) are described. The described methods may be applied to both the existing video coding standards (e.g., High Efficiency Video Coding (HEVC) ) and future video coding standards or video codecs.
[0007]
In one representative aspect, the disclosed technology may be used to provide a method for visual media processing. This method includes during a conversion between a current video block and a bitstream representation of the current video block, using syntax elements composed of multiple bins for processing the current video block, wherein the syntax elements are selected according to a context model such that a first context model is applied for selecting a first bin of a first syntax element and a second context model is applied for selecting all bins excluding the first bin of the first syntax element.
[0008]
In another representative aspect, the disclosed technology may be used to provide a method for visual media processing. This method includes making a determination of using a precision from a precision set as a target precision of a motion vector (MVD) that is computed as a difference between a motion vector and a motion vector predictor (MVP) associated with a current video block; in response to detecting that the target precision is different from the precision of the MVP, converting the precision of the MVP to the target precision; and generating a reconstructed motion vector using the MVP with the target precision and the MVD, during a normal inter mode or an affine inter mode coding of the current video block, wherein the reconstructed motion vector is used for processing of subsequent video blocks.
[0009]
In yet another representative aspect, the disclosed technology may be used to provide a method for visual media processing. This method includes during a conversion between a video block and a bitstream representation of the current video block, identifying that a precision of a motion vector predictor (MVP) associated with the current video block is different from a precision of a motion vector difference (MVD) that is computed as a difference between the MVP and a motion vector associated with the current video block; in response to the detecting, converting the precision of the MVD to the precision of the MVP; and reconstructing the motion vector associated with the current video block using the precision of the MVP for processing subsequent video blocks.
[0010]
In another representative aspect, the above-described method is embodied in the form of processor-executable code and stored in a computer-readable program medium.
[0011]
In yet another representative aspect, a device that is configured or operable to perform the above-described method is disclosed. The device may include a processor that is programmed to implement this method.
[0012]
In yet another representative aspect, a video encoder apparatus may implement a method as described herein.
[0013]
In yet another representative aspect, a video decoder apparatus may implement a method as described herein.
[0014]
The above and other aspects and features of the disclosed technology are described in greater detail in the drawings, the description and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015]
FIG. 1 shows an example of constructing a merge candidate list.
[0016]
FIG. 2 shows an example of positions of spatial candidates.
[0017]
FIG. 3 shows an example of candidate pairs subject to a redundancy check of spatial merge candidates.
[0018]
FIGS. 4A and 4B show examples of the position of a second prediction unit (PU) based on the size and shape of the current block.
[0019]
FIG. 5 shows an example of motion vector scaling for temporal merge candidates.
[0020]
FIG. 6 shows an example of candidate positions for temporal merge candidates.
[0021]
FIG. 7 shows an example of generating a combined bi-predictive merge candidate.
[0022]
FIG. 8 shows an example of constructing motion vector prediction candidates.
[0023]
FIG. 9 shows an example of motion vector scaling for spatial motion vector candidates.
[0024]
FIG. 10 shows an example of motion prediction using the alternative temporal motion vector prediction (ATMVP) algorithm for a coding unit (CU) .
[0025]
FIG. 11 shows an example of a coding unit (CU) with sub-blocks and neighboring blocks used by the spatial-temporal motion vector prediction (STMVP) algorithm.
[0026]
FIGS. 12A and 12B show example snapshots of sub-block when using the overlapped block motion compensation (OBMC) algorithm.
[0027]
FIG. 13 shows an example of neighboring samples used to derive parameters for the local illumination compensation (LIC) algorithm.
[0028]
FIG. 14 shows an example of a simplified affine motion model.
[0029]
FIG. 15 shows an example of an affine motion vector field (MVF) per sub-block.
[0030]
FIG. 16 shows an example of motion vector prediction (MVP) for the AF_INTER affine motion mode.
[0031]
FIGS. 17A and 17B show examples of the 4-parameter and 6-parameter affine models, respectively.
[0032]
FIGS. 18A and 18B show example candidates for the AF_MERGE affine motion mode.
[0033]
FIG. 19 shows an example of bilateral matching in pattern matched motion vector derivation (PMMVD) mode, which is a special merge mode based on the frame-rate up conversion (FRUC) algorithm.
[0034]
FIG. 20 shows an example of template matching in the FRUC algorithm.
[0035]
FIG. 21 shows an example of unilateral motion estimation in the FRUC algorithm.
[0036]
FIG. 22 shows an example of an optical flow trajectory used by the bi-directional optical flow (BIO) algorithm.
[0037]
FIGS. 23A and 23B show example snapshots of using of the bi-directional optical flow (BIO) algorithm without block extensions.
[0038]
FIG. 24 shows an example of the decoder-side motion vector refinement (DMVR) algorithm based on bilateral template matching.
[0039]
FIG. 25 shows a flowchart of an example method for video coding.
[0040]
FIG. 26 is a block diagram of an example of a hardware platform for implementing a visual media decoding or a visual media encoding technique described in the present document.
[0041]
FIG. 27 shows an example of symmetrical mode.
[0042]
FIG. 28 is a block diagram of an example video processing system in which disclosed techniques may be implemented.
[0043]
FIG. 29 shows a flowchart of an example method for video processing.
[0044]
FIG. 30 shows a flowchart of an example method for video processing.
[0045]
FIG. 31 shows a flowchart of an example method for video processing.

DETAILED DESCRIPTION

[0046]
Due to the increasing demand of higher resolution video, video coding methods and techniques are ubiquitous in modern technology. Video codecs typically include an electronic circuit or software that compresses or decompresses digital video, and are continually being improved to provide higher coding efficiency. A video codec converts uncompressed video to a compressed format or vice versa. There are complex relationships between the video quality, the amount of data used to represent the video (determined by the bit rate) , the complexity of the encoding and decoding algorithms, sensitivity to data losses and errors, ease of editing, random access, and end-to-end delay (latency) . The compressed format usually conforms to a standard video compression specification, e.g., the High Efficiency Video Coding (HEVC) standard (also known as H. 265 or MPEG-H Part 2) , the Versatile Video Coding standard to be finalized, or other current and/or future video coding standards.
[0047]
Embodiments of the disclosed technology may be applied to existing video coding standards (e.g., HEVC, H. 265) and future standards to improve compression performance. Section headings are used in the present document to improve readability of the description and do not in any way limit the discussion or the embodiments (and/or implementations) to the respective sections only.
[0048]
1. Examples of Inter-Prediction in HEVC/H. 265
[0049]
Video coding standards have significantly improved over the years, and now provide, in part, high coding efficiency and support for higher resolutions. Recent standards such as HEVC and H. 265 are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized.
[0050]
1.1 Examples of Prediction Modes
[0051]
Each inter-predicted PU (prediction unit) has motion parameters for one or two reference picture lists. In some embodiments, motion parameters include a motion vector and a reference picture index. In other embodiments, the usage of one of the two reference picture lists may also be signaled using inter_pred_idc. In yet other embodiments, motion vectors may be explicitly coded as deltas relative to predictors.
[0052]
When a CU is coded with skip mode, one PU is associated with the CU, and there are no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current PU are obtained from neighboring PUs, including spatial and temporal candidates. The merge mode can be applied to any inter-predicted PU, not only for skip mode. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage are signaled explicitly per each PU.
[0053]
When signaling indicates that one of the two reference picture lists is to be used, the PU is produced from one block of samples. This is referred to as 'uni-prediction' . Uni-prediction is available both for P-slices and B-slices.
[0054]
When signaling indicates that both of the reference picture lists are to be used, the PU is produced from two blocks of samples. This is referred to as 'bi-prediction' . Bi-prediction is available for B-slices only.
[0055]
1.1.1 Embodiments of Constructing Candidates for Merge Mode
[0056]
When a PU is predicted using merge mode, an index pointing to an entry in the merge candidates list is parsed from the bitstream and used to retrieve the motion information. The construction of this list can be summarized according to the following sequence of steps:
[0057]
Step 1: Initial candidates derivation
[0058]
Step 1.1: Spatial candidates derivation
[0059]
Step 1.2: Redundancy check for spatial candidates
[0060]
Step 1.3: Temporal candidates derivation
[0061]
Step 2: Additional candidates insertion
[0062]
Step 2.1: Creation of bi-predictive candidates
[0063]
Step 2.2: Insertion of zero motion candidates
[0064]
FIG. 1 shows an example of constructing a merge candidate list based on the sequence of steps summarized above. For spatial merge candidate derivation, a maximum of four merge candidates are selected among candidates that are located in five different positions. For temporal merge candidate derivation, a maximum of one merge candidate is selected among two candidates. Since constant number of candidates for each PU is assumed at decoder, additional candidates are generated when the number of candidates does not reach to maximum number of merge candidate (MaxNumMergeCand) which is signalled in slice header. Since the number of candidates is constant, index of best merge candidate is encoded using truncated unary binarization (TU) . If the size of CU is equal to 8, all the PUs of the current CU share a single merge candidate list, which is identical to the merge candidate list of the 2N×2N prediction unit.
[0065]
1.1.2 Constructing Spatial Merge Candidates
[0066]
In the derivation of spatial merge candidates, a maximum of four merge candidates are selected among candidates located in the positions depicted in FIG. 2. The order of derivation is A 1, B 1, B 0, A 0 and B 2. Position B 2 is considered onlywhen any PU of position A 1, B 1, B 0, A 0 is not available (e.g. because it belongs to another slice or tile) or is intra coded. After candidate at position A 1 is added, the addition of the remaining candidates is subject to a redundancy check which ensures that candidates with same motion information are excluded from the list so that coding efficiency is improved.
[0067]
To reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead only the pairs linked with an arrow in FIG. 3 are considered and a candidate is only added to the list if the corresponding candidate used for redundancy check has not the same motion information. Another source of duplicate motion information is the "second PU" associated with partitions different from 2Nx2N. As an example, FIGS. 4A and 4B depict the second PU for the case of N×2N and 2N×N, respectively. When the current PU is partitioned as N×2N, candidate at position A 1 is not considered for list construction. In some embodiments, adding this candidate may lead to two prediction units having the same motion information, which is redundant to just have one PU in a coding unit. Similarly, position B 1 is not considered when the current PU is partitioned as 2N×N.
[0068]
1.1.3 Constructing Temporal Merge Candidates
[0069]
In this step, only one candidate is added to the list. Particularly, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on co-located PU belonging to the picture which has the smallest POC difference with current picture within the given reference picture list. The reference picture list to be used for derivation of the co-located PU is explicitly signaled in the slice header.
[0070]
FIG. 5 shows an example of the derivation of the scaled motion vector for a temporal merge candidate (as the dotted line) , which is scaled from the motion vector of the co-located PU using the POC distances, tb and td, where tb is defined to be the POC difference between the reference picture of the current picture and the current picture and td is defined to be the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of temporal merge candidate is set equal to zero. For a B-slice, two motion vectors, one is for reference picture list 0 and the other is for reference picture list 1, are obtained and combined to make the bi-predictive merge candidate.
[0071]
In the co-located PU (Y) belonging to the reference frame, the position for the temporal candidate is selected between candidates C 0 and C 1, as depicted in FIG. 6. If PU at position C 0 is not available, is intra coded, or is outside of the current CTU, position C 1 is used. Otherwise, position C 0 is used in the derivation of the temporal merge candidate.
[0072]
1.1.4 Constructing Additional Types of Merge Candidates
[0073]
Besides spatio-temporal merge candidates, there are two additional types of merge candidates: combined bi-predictive merge candidate and zero merge candidate. Combined bi-predictive merge candidates are generated by utilizing spatio-temporal merge candidates. Combined bi-predictive merge candidate is used for B-Slice only. The combined bi-predictive candidates are generated by combining the first reference picture list motion parameters of an initial candidate with the second reference picture list motion parameters of another. If these two tuples provide different motion hypotheses, they will form a new bi-predictive candidate.
[0074]
FIG. 7 shows an example of this process, wherein two candidates in the original list (710, on the left) , which have mvL0 and refIdxL0 or mvL1 and refIdxL1, are used to create a combined bi-predictive merge candidate added to the final list (720, on the right) .
[0075]
Zero motion candidates are inserted to fill the remaining entries in the merge candidates list and therefore hit the MaxNumMergeCand capacity. These candidates have zero spatial displacement and a reference picture index which starts from zero and increases every time a new zero motion candidate is added to the list. The number of reference frames used by these candidates is one and two for uni-and bi-directional prediction, respectively. In some embodiments, no redundancy check is performed on these candidates.
[0076]
1.1.5 Examples of Motion Estimation Regions for Parallel Processing
[0077]
To speed up the encoding process, motion estimation can be performed in parallel whereby the motion vectors for all prediction units inside a given region are derived simultaneously. The derivation of merge candidates from spatial neighborhood may interfere with parallel processing as one prediction unit cannot derive the motion parameters from an adjacent PU until its associated motion estimation is completed. To mitigate the trade-off between coding efficiency and processing latency, a motion estimation region (MER) may be defined. The size of the MER may be signaled in the picture parameter set (PPS) using the "log2_parallel_merge_level_minus2" syntax element. When a MER is defined, merge candidates falling in the same region are marked as unavailable and therefore not considered in the list construction.
[0078]
1.2 Embodiments of Advanced Motion Vector Prediction (AMVP)
[0079]
AMVP exploits spatio-temporal correlation of motion vector with neighboring PUs, which is used for explicit transmission of motion parameters. It constructs a motion vector candidate list by firstly checking availability of left, above temporally neighboring PU positions, removing redundant candidates and adding zero vector to make the candidate list to be constant length. Then, the encoder can select the best predictor from the candidate list and transmit the corresponding index indicating the chosen candidate. Similarly with merge index signaling, the index of the best motion vector candidate is encoded using truncated unary. The maximum value to be encoded in this case is 2 (see FIG. 8) . In the following sections, details about derivation process of motion vector prediction candidate are provided.
[0080]
1.2.1 Examples of Constructing Motion Vector Prediction Candidates
[0081]
FIG. 8 summarizes derivation process for motion vector prediction candidate, and may be implemented for each reference picture list with refidx as an input.
[0082]
In motion vector prediction, two types of motion vector candidates are considered: spatial motion vector candidate and temporal motion vector candidate. For spatial motion vector candidate derivation, two motion vector candidates are eventually derived based on motion vectors of each PU located in five different positions as previously shown in FIG. 2.
[0083]
For temporal motion vector candidate derivation, one motion vector candidate is selected from two candidates, which are derived based on two different co-located positions. After the first list of spatio-temporal candidates is made, duplicated motion vector candidates in the list are removed. If the number of potential candidates is larger than two, motion vector candidates whose reference picture index within the associated reference picture list is larger than 1 are removed from the list. If the number of spatio-temporal motion vector candidates is smaller than two, additional zero motion vector candidates is added to the list.
[0084]
1.2.2 Constructing Spatial Motion Vector Candidates
[0085]
In the derivation of spatial motion vector candidates, a maximum of two candidates are considered among five potential candidates, which are derived from PUs located in positions as previously shown in FIG. 2, those positions being the same as those of motion merge. The order of derivation for the left side of the current PU is defined as A 0, A 1, and scaled A 0, scaled A 1. The order of derivation for the above side of the current PU is defined as B 0, B 1, B 2, scaled B 0, scaled B 1, scaled B 2. For each side there are therefore four cases that can be used as motion vector candidate, with two cases not required to use spatial scaling, and two cases where spatial scaling is used. The four different cases are summarized as follows:
[0086]
-- No spatial scaling
[0087]
(1) Same reference picture list, and same reference picture index (same POC)
[0088]
(2) Different reference picture list, but same reference picture (same POC)
[0089]
-- Spatial scaling
[0090]
(3) Same reference picture list, but different reference picture (different POC)
[0091]
(4) Different reference picture list, and different reference picture (different POC)
[0092]
The no-spatial-scaling cases are checked first followed by the cases that allow spatial scaling. Spatial scaling is considered when the POC is different between the reference picture of the neighbouring PU and that of the current PU regardless of reference picture list. If all PUs of left candidates are not available or are intra coded, scaling for the above motion vector is allowed to help parallel derivation of left and above MV candidates. Otherwise, spatial scaling is not allowed for the above motion vector.
[0093]
As shown in the example in FIG. 9, for the spatial scaling case, the motion vector of the neighbouring PU is scaled in a similar manner as for temporal scaling. One difference is that the reference picture list and index of current PU is given as input; the actual scaling process is the same as that of temporal scaling.
[0094]
1.2.3 Constructing Temporal Motion Vector Candidates
[0095]
Apart from the reference picture index derivation, all processes for the derivation of temporal merge candidates are the same as for the derivation of spatial motion vector candidates (as shown in the example in FIG. 6) . In some embodiments, the reference picture index is signaled to the decoder.
[0096]
2. Example of Inter Prediction Methods in Joint Exploration Model (JEM)
[0097]
In some embodiments, future video coding technologies are explored using a reference software known as the Joint Exploration Model (JEM) . In JEM, sub-block based prediction is adopted in several coding tools, such as affine prediction, alternative temporal motion vector prediction (ATMVP) , spatial-temporal motion vector prediction (STMVP) , bi-directional optical flow (BIO) , Frame-Rate Up Conversion (FRUC) , Locally Adaptive Motion Vector Resolution (LAMVR) , Overlapped Block Motion Compensation (OBMC) , Local Illumination Compensation (LIC) , and Decoder-side Motion Vector Refinement (DMVR) .
[0098]
2.1 Examples of Sub-CU Based Motion Vector Prediction
[0099]
In the JEM with quadtrees plus binary trees (QTBT) , each CU can have at most one set of motion parameters for each prediction direction. In some embodiments, two sub-CU level motion vector prediction methods are considered in the encoder by splitting a large CU into sub-CUs and deriving motion information for all the sub-CUs of the large CU. Alternative temporal motion vector prediction (ATMVP) method allows each CU to fetch multiple sets of motion information from multiple blocks smaller than the current CU in the collocated reference picture. In spatial-temporal motion vector prediction (STMVP) method motion vectors of the sub-CUs are derived recursively by using the temporal motion vector predictor and spatial neighbouring motion vector. In some embodiments, and to preserve more accurate motion field for sub-CU motion prediction, the motion compression for the reference frames may be disabled.
[0100]
2.1.1 Examples of Alternative Temporal Motion Vector Prediction (ATMVP)
[0101]
In the ATMVP method, the temporal motion vector prediction (TMVP) method is modified by fetching multiple sets of motion information (including motion vectors and reference indices) from blocks smaller than the current CU.
[0102]
FIG. 10 shows an example of ATMVP motion prediction process for a CU 1000. The ATMVP method predicts the motion vectors of the sub-CUs 1001 within a CU 1000 in two steps. The first step is to identify the corresponding block 1051 in a reference picture 1050 with a temporal vector. The reference picture 1050 is also referred to as the motion source picture. The second step is to split the current CU 1000 into sub-CUs 1001 and obtain the motion vectors as well as the reference indices of each sub-CU from the block corresponding to each sub-CU.
[0103]
In the first step, a reference picture 1050 and the corresponding block is determined by the motion information of the spatial neighboring blocks of the current CU 1000. To avoid the repetitive scanning process of neighboring blocks, the first merge candidate in the merge candidate list of the current CU 1000 is used. The first available motion vector as well as its associated reference index are set to be the temporal vector and the index to the motion source picture. This way, the corresponding block may be more accurately identified, compared with TMVP, wherein the corresponding block (sometimes called collocated block) is always in a bottom-right or center position relative to the current CU.
[0104]
In the second step, a corresponding block of the sub-CU 1051 is identified by the temporal vector in the motion source picture 1050, by adding to the coordinate of the current CU the temporal vector. For each sub-CU, the motion information of its corresponding block (e.g., the smallest motion grid that covers the center sample) is used to derive the motion information for the sub-CU. After the motion information of a corresponding N×N block is identified, it is converted to the motion vectors and reference indices of the current sub-CU, in the same way as TMVP of HEVC, wherein motion scaling and other procedures apply. For example, the decoder checks whether the low-delay condition (e.g. the POCs of all reference pictures of the current picture are smaller than the POC of the current picture) is fulfilled and possibly uses motion vector MVx (e.g., the motion vector corresponding to reference picture list X) to predict motion vector MVy (e.g., with X being equal to 0 or 1 and Y being equal to 1-X) for each sub-CU.
[0105]
2.1.2 Examples of Spatial-Temporal Motion Vector Prediction (STMVP)
[0106]
In the STMVP method, the motion vectors of the sub-CUs are derived recursively, following raster scan order. FIG. 11 shows an example of one CU with four sub-blocks and neighboring blocks. Consider an 8×8 CU 1100 that includes four 4×4 sub-CUs A (1101) , B (1102) , C (1103) , and D (1104) . The neighboring 4×4 blocks in the current frame are labelled as a (1111) , b (1112) , c (1113) , and d (1114) .
[0107]
The motion derivation for sub-CU A starts by identifying its two spatial neighbors. The first neighbor is the N×N block above sub-CU A 1101 (block c 1113) . If this block c (1113) is not available or is intra coded the other N×N blocks above sub-CU A (1101) are checked (from left to right, starting at block c 1113) . The second neighbor is a block to the left of the sub-CU A 1101 (block b 1112) . If block b (1112) is not available or is intra coded other blocks to the left of sub-CU A 1101 are checked (from top to bottom, staring at block b 1112) . The motion information obtained from the neighboring blocks for each list is scaled to the first reference frame for a given list. Next, temporal motion vector predictor (TMVP) of sub-block A 1101 is derived by following the same procedure of TMVP derivation as specified in HEVC. The motion information of the collocated block at block D 1104 is fetched and scaled accordingly. Finally, after retrieving and scaling the motion information, all available motion vectors are averaged separately for each reference list. The averaged motion vector is assigned as the motion vector of the current sub-CU.
[0108]
2.1.3 Examples of Sub-CU Motion Prediction Mode Signaling
[0109]
In some embodiments, the sub-CU modes are enabled as additional merge candidates and there is no additional syntax element required to signal the modes. Two additional merge candidates are added to merge candidates list of each CU to represent the ATMVP mode and STMVP mode. In other embodiments, up to seven merge candidates may be used, if the sequence parameter set indicates that ATMVP and STMVP are enabled. The encoding logic of the additional merge candidates is the same as for the merge candidates in the HM, which means, for each CU in P or B slice, two more RD checks may be needed for the two additional merge candidates. In some embodiments, e.g., JEM, all bins of the merge index are context coded by CABAC (Context-based Adaptive Binary Arithmetic Coding) . In other embodiments, e.g., HEVC, only the first bin is context coded and the remaining bins are context by-pass coded.
[0110]
2.2 Examples of Adaptive Motion Vector Difference Resolution
[0111]
In some embodiments, motion vector differences (MVDs) (between the motion vector and predicted motion vector of a PU) are signalled in units of quarter luma samples when use_integer_mv_flag is equal to 0 in the slice header. In the JEM, a locally adaptive motion vector resolution (LAMVR) is introduced. In the JEM, MVD can be coded in units of quarter luma samples, integer luma samples or four luma samples. The MVD resolution is controlled at the coding unit (CU) level, and MVD resolution flags are conditionally signalled for each CU that has at least one non-zero MVD components.
[0112]
For a CU that has at least one non-zero MVD components, a first flag is signalled to indicate whether quarter luma sample MV precision is used in the CU. When the first flag (equal to 1) indicates that quarter luma sample MV precision is not used, another flag is signalled to indicate whether integer luma sample MV precision or four luma sample MV precision is used.
[0113]
When the first MVD resolution flag of a CU is zero, or not coded for a CU (meaning all MVDs in the CU are zero) , the quarter luma sample MV resolution is used for the CU. When a CU uses integer-luma sample MV precision or four-luma-sample MV precision, the MVPs in the AMVP candidate list for the CU are rounded to the corresponding precision.
[0114]
In the encoder, CU-level RD checks are used to determine which MVD resolution is to be used for a CU. That is, the CU-level RD check is performed three times for each MVD resolution. To accelerate encoder speed, the following encoding schemes are applied in the JEM:
[0115]
-- During RD check of a CU with normal quarter luma sample MVD resolution, the motion information of the current CU (integer luma sample accuracy) is stored. The stored motion information (after rounding) is used as the starting point for further small range motion vector refinement during the RD check for the same CU with integer luma sample and 4 luma sample MVD resolution so that the time-consuming motion estimation process is not duplicated three times.
[0116]
-- RD check of a CU with 4 luma sample MVD resolution is conditionally invoked. For a CU, when RD cost integer luma sample MVD resolution is much larger than that of quarter luma sample MVD resolution, the RD check of 4 luma sample MVD resolution for the CU is skipped.
[0117]
2.3 Examples of Higher Motion Vector Storage Accuracy
[0118]
In HEVC, motion vector accuracy is one-quarter pel (one-quarter luma sample and one-eighth chroma sample for 4: 2: 0 video) . In the JEM, the accuracy for the internal motion vector storage and the merge candidate increases to 1/16 pel. The higher motion vector accuracy (1/16 pel) is used in motion compensation inter prediction for the CU coded with skip/merge mode. For the CU coded with normal AMVP mode, either the integer-pel or quarter-pel motion is used.
[0119]
SHVC upsampling interpolation filters, which have same filter length and normalization factor as HEVC motion compensation interpolation filters, are used as motion compensation interpolation filters for the additional fractional pel positions. The chroma component motion vector accuracy is 1/32 sample in the JEM, the additional interpolation filters of 1/32 pel fractional positions are derived by using the average of the filters of the two neighbouring 1/16 pel fractional positions.
[0120]
2.4 Examples of Overlapped Block Motion Compensation (OBMC)
[0121]
In the JEM, OBMC can be switched on and off using syntax at the CU level. When OBMC is used in the JEM, the OBMC is performed for all motion compensation (MC) block boundaries except the right and bottom boundaries of a CU. Moreover, it is applied for both the luma and chroma components. In the JEM, an MC block corresponds to a coding block. When a CU is coded with sub-CU mode (includes sub-CU merge, affine and FRUC mode) , each sub-block of the CU is a MC block. To process CU boundaries in a uniform fashion, OBMC is performed at sub-block level for all MC block boundaries, where sub-block size is set equal to 4×4, as shown in FIGS. 12A and 12B.
[0122]
FIG. 12A shows sub-blocks at the CU/PU boundary, and the hatched sub-blocks are where OBMC applies. Similarly, FIG. 12B shows the sub-Pus in ATMVP mode.
[0123]
When OBMC applies to the current sub-block, besides current motion vectors, motion vectors of four connected neighboring sub-blocks, if available and are not identical to the current motion vector, are also used to derive prediction block for the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal of the current sub-block.
[0124]
Prediction block based on motion vectors of a neighboring sub-block is denoted as PN, with N indicating an index for the neighboring above, below, left and right sub-blocks and prediction block based on motion vectors of the current sub-block is denoted as PC. When PN is based on the motion information of a neighboring sub-block that contains the same motion information to the current sub-block, the OBMC is not performed from PN. Otherwise, every sample of PN is added to the same sample in PC, i.e., four rows/columns of PN are added to PC. The weighting factors {1/4, 1/8, 1/16, 1/32} are used for PN and the weighting factors {3/4, 7/8, 15/16, 31/32} are used for PC. The exception are small MC blocks, (i.e., when height or width of the coding block is equal to 4 or a CU is coded with sub-CU mode) , for which only two rows/columns of PN are added to PC. In this case weighting factors {1/4, 1/8} are used for PN and weighting factors {3/4, 7/8} are used for PC. For PN generated based on motion vectors of vertically (horizontally) neighboring sub-block, samples in the same row (column) of PN are added to PC with a same weighting factor.
[0125]
In the JEM, for a CU with size less than or equal to 256 luma samples, a CU level flag is signaled to indicate whether OBMC is applied or not for the current CU. For the CUs with size larger than 256 luma samples or not coded with AMVP mode, OBMC is applied by default. At the encoder, when OBMC is applied for a CU, its impact is taken into account during the motion estimation stage. The prediction signal formed by OBMC using motion information of the top neighboring block and the left neighboring block is used to compensate the top and left boundaries of the original signal of the current CU, and then the normal motion estimation process is applied.
[0126]
2.5 Examples of Local Illumination Compensation (LIC)
[0127]
LIC is based on a linear model for illumination changes, using a scaling factor a and an offset b. And it is enabled or disabled adaptively for each inter-mode coded coding unit (CU) .
[0128]
When LIC applies for a CU, a least square error method is employed to derive the parameters a and b by using the neighboring samples of the current CU and their corresponding reference samples. FIG. 13 shows an example of neighboring samples used to derive parameters of the IC algorithm. Specifically, and as shown in FIG. 13, the subsampled (2: 1 subsampling) neighbouring samples of the CU and the corresponding samples (identified by motion information of the current CU or sub-CU) in the reference picture are used. The IC parameters are derived and applied for each prediction direction separately.
[0129]
When a CU is coded with merge mode, the LIC flag is copied from neighboring blocks, in a way similar to motion information copy in merge mode; otherwise, an LIC flag is signaled for the CU to indicate whether LIC applies or not.
[0130]
When LIC is enabled for a picture, an additional CU level RD check is needed to determine whether LIC is applied or not for a CU. When LIC is enabled for a CU, the mean-removed sum of absolute difference (MR-SAD) and mean-removed sum of absolute Hadamard-transformed difference (MR-SATD) are used, instead of SAD and SATD, for integer pel motion search and fractional pel motion search, respectively.
[0131]
To reduce the encoding complexity, the following encoding scheme is applied in the JEM:
[0132]
-- LIC is disabled for the entire picture when there is no obvious illumination change between a current picture and its reference pictures. To identify this situation, histograms of a current picture and every reference picture of the current picture are calculated at the encoder. If the histogram difference between the current picture and every reference picture of the current picture is smaller than a given threshold, LIC is disabled for the current picture; otherwise, LIC is enabled for the current picture.
[0133]
2.6 Examples of Affine Motion Compensation Prediction
[0134]
In HEVC, only a translation motion model is applied for motion compensation prediction (MCP) . However, the camera and objects may have many kinds of motion, e.g. zoom in/out, rotation, perspective motions, and/or other irregular motions. JEM, on the other hand, applies a simplified affine transform motion compensation prediction. FIG. 14 shows an example of an affine motion field of a block 1400 described by two control point motion vectors V 0 and V 1. The motion vector field (MVF) of the block 1400 can be described by the following equation:
[0135]
[0136]
As shown in FIG. 14, (v 0x, v 0y) is motion vector of the top-left corner control point, and (v 1x, v 1y) is motion vector of the top-right corner control point. To simplify the motion compensation prediction, sub-block based affine transform prediction can be applied. The sub-block size M×N is derived as follows:
[0137]
[0138]
Here, MvPre is the motion vector fraction accuracy (e.g., 1/16 in JEM) . (v 2x, v 2y) is motion vector of the bottom-left control point, calculated according to Equation 1. M and N can be adjusted downward if necessary to make it a divisor of w and h, respectively.
[0139]
FIG. 15 shows an example of affine MVF per sub-block for a block 1500. To derive motion vector of each M×N sub-block, the motion vector of the center sample of each sub-block can be calculated according to Equation 1, and rounded to the motion vector fraction accuracy (e.g., 1/16 in JEM) . Then the motion compensation interpolation filters can be applied to generate the prediction of each sub-block with derived motion vector. After the MCP, the high accuracy motion vector of each sub-block is rounded and saved as the same accuracy as the normal motion vector.
[0140]
2.6.1 Embodiments of the AF_INTER Mode
[0141]
In theJEM, there are two affine motion modes: AF_INTER mode and AF_MERGE mode. For CUs with both width and height larger than 8, AF_INTER mode can be applied. An affine flag in CU level is signaled in the bitstream to indicate whether AF_INTER mode is used. In the AF_INTER mode, a candidate list with motion vector pair { (v 0, v 1) |v 0= {v A, v B, v c} , v 1= {v D, v E} } is constructed using the neighboring blocks.
[0142]
FIG. 16 shows an example of motion vector prediction (MVP) for a block 1600 in the AF_INTER mode. As shown in FIG. 16, v 0 is selected from the motion vectors of the sub-block A, B, or C. The motion vectors from the neighboring blocks can be scaled according to the reference list. The motion vectors can also be scaled according to the relationship among the Picture Order Count (POC) of the reference for the neighboring block, the POC of the reference for the current CU, and the POC of the current CU. The approach to select v 1 from the neighboring sub-block D and E is similar. If the number of candidate list is smaller than 2, the list is padded by the motion vector pair composed by duplicating each of the AMVP candidates. When the candidate list is larger than 2, the candidates can be firstly sorted according to the neighboring motion vectors (e.g., based on the similarity of the two motion vectors in a pair candidate) . In some implementations, the first two candidates are kept. In some embodiments, a Rate Distortion (RD) cost check is used to determine which motion vector pair candidate is selected as the control point motion vector prediction (CPMVP) of the current CU. An index indicating the position of the CPMVP in the candidate list can be signaled in the bitstream. After the CPMVP of the current affine CU is determined, affine motion estimation is applied and the control point motion vector (CPMV) is found. Then the difference of the CPMV and the CPMVP is signaled in the bitstream.
[0143]
In AF_INTER mode, when 4/6 parameter affine mode is used, 2/3 control points are required, and therefore 2/3 MVD needs to be coded for these control points, as shown in FIG. 17. In an existing implementation, the MV may be derived as follows, e.g., it predicts mvd 1 and mvd 2 from mvd 0.
[0144]
[0145]
[0146]
[0147]
Herein, mvd i and mv 1 are the predicted motion vector, motion vector difference and motion vector of the top-left pixel (i = 0) , top-right pixel (i = 1) or left-bottom pixel (i = 2) respectively, as shown in FIG. 18B. In some embodiments, the addition of two motion vectors (e.g., mvA (xA, yA) and mvB (xB, yB) ) is equal to summation of two components separately. For example, newMV = mvA + mvB implies that the two components of newMV are set to (xA + xB) and (yA + yB) , respectively.
[0148]
2.6.2 Examples of Fast Affine ME Algorithms in AF_INTER Mode
[0149]
In some embodiments of the affine mode, MV of 2 or 3 control points needs to be determined jointly. Directly searching the multiple MVs jointly is computationally complex. In an example, a fast affine ME algorithm is adopted into VTM/BMS.
[0150]
For example, the fast affine ME algorithm is described for the 4-parameter affine model, and the idea can be extended to 6-parameter affine model:
[0151]
[0152]
[0153]
Replacing (a-1) with a' enables the motion vectors to be rewritten as:
[0154]
[0155]
If it is assumed that the motion vectors of the two controls points (0, 0) and (0, w) are known, from Equation (5) the affine parameters may be derived as:
[0156]
[0157]
The motion vectors can be rewritten in vector form as:
[0158]
[0159]
Herein, P = (x, y) is the pixel position,
[0160]
[0161]
[0162]
In some embodiments, and at the encoder, the MVD of AF_INTER may be derived iteratively. Denote MV i (P) as the MV derived in the ith iteration for position P and denote dMV C i as the delta updated for MV C in the ith iteration. Then in the (i+1) th iteration,
[0163]
[0164]
[0165]
Denote Pic refas the reference picture and denote Pic cur as the current picture and denote Q=P+MV i (P) . If the MSE is used as the matching criterion, then the function that needs to be minimized may be written as:
[0166]
[0167]
If it is assumed that is small enough, may be rewritten, as an approximation based on a 1-st order Taylor expansion, as:
[0168]
[0169]
Herein, If the notation E i+1 (P) =Pic cur (P) -Pic ref (Q) is adopted, then:
[0170]
[0171]
The term may be derived by setting the derivative of the error function to zero, and then computing delta MV of the control points (0, 0) and (0, w) according to as follows:
[0172]
[0173]
[0174]
[0175]
[0176]
In some embodiments, this MVD derivation process may be iterated n times, and the final MVD may be calculated as follows:
[0177]
[0178]
[0179]
[0180]
[0181]
In the aforementioned implementation, predicting delta MV of control point (0, w) , denoted by mvd 1 from delta MV of control point (0, 0) , denoted by mvd 0, results in only being encoded for mvd 1.
[0182]
2.6.3 Embodiments of the AF_MERGE Mode
[0183]
When a CU is applied in AF_MERGE mode, it gets the first block coded with an affine mode from the valid neighboring reconstructed blocks. FIG. 18A shows an example of the selection order of candidate blocks for a current CU 1800. As shown in FIG. 18A, the selection order can be from left (1801) , above (1802) , above right (1803) , left bottom (1804) to above left (1805) of the current CU 1800. FIG. 18B shows another example of candidate blocks for a current CU 1800 in the AF_MERGE mode. If the neighboring left bottom block 1801 is coded in affine mode, as shown in FIG. 18B, the motion vectors v 2, v 3 and v 4 of the top left corner, above right corner, and left bottom corner of the CU containing the sub-block 1801 are derived. The motion vector v 0 of the top left corner on the current CU 1800 is calculated based on v2, v3 and v4. The motion vector v1 of the above right of the current CU can be calculated accordingly.
[0184]
After the CPMV of the current CU v0 and v1 are computed according to the affine motion model in Equation 1, the MVF of the current CU can be generated. In order to identify whether the current CU is coded with AF_MERGE mode, an affine flag can be signaled in the bitstream when there is at least one neighboring block is coded in affine mode.
[0185]
2.7 Examples of Pattern Matched Motion Vector Derivation (PMMVD)
[0186]
The PMMVD mode is a special merge mode based on the Frame-Rate Up Conversion (FRUC) method. With this mode, motion information of a block is not signaled but derived at decoder side.
[0187]
A FRUC flag can be signaled for a CU when its merge flag is true. When the FRUC flag is false, a merge index can be signaled and the regular merge mode is used. When the FRUC flag is true, an additional FRUC mode flag can be signaled to indicate which method (e.g., bilateral matching or template matching) is to be used to derive motion information for the block.
[0188]
At the encoder side, the decision on whether using FRUC merge mode for a CU is based on RD cost selection as done for normal merge candidate. For example, multiple matching modes (e.g., bilateral matching and template matching) are checked for a CU by using RD cost selection. The one leading to the minimal cost is further compared to other CU modes. If a FRUC matching mode is the most efficient one, FRUC flag is set to true for the CU and the related matching mode is used.
[0189]
Typically, motion derivation process in FRUC merge mode has two steps: a CU-level motion search is first performed, then followed by a Sub-CU level motion refinement. At CU level, an initial motion vector is derived for the whole CU based on bilateral matching or template matching. First, a list of MV candidates is generated and the candidate that leads to the minimum matching cost is selected as the starting point for further CU level refinement. Then a local search based on bilateral matching or template matching around the starting point is performed. The MV results in the minimum matching cost is taken as the MV for the whole CU. Subsequently, the motion information is further refined at sub-CU level with the derived CU motion vectors as the starting points.
[0190]
For example, the following derivation process is performed for a W×H CU motion information derivation. At the first stage, MV for the whole W×H CU is derived. At the second stage, the CU is further split into M×M sub-CUs. The value of M is calculated as in (16) , D is a predefined splitting depth which is set to 3 by default in the JEM. Then the MV for each sub-CU is derived.
[0191]
[0192]
FIG. 19 shows an example of bilateral matching used in the Frame-Rate Up Conversion (FRUC) method. The bilateral matching is used to derive motion information of the current CU by finding the closest match between two blocks along the motion trajectory of the current CU (1900) in two different reference pictures (1910, 1911) . Under the assumption of continuous motion trajectory, the motion vectors MV0 (1901) and MV1 (1902) pointing to the two reference blocks are proportional to the temporal distances, e.g., TD0 (1903) and TD1 (1904) , between the current picture and the two reference pictures. In some embodiments, when the current picture 1900 is temporally between the two reference pictures (1910, 1911) and the temporal distance from the current picture to the two reference pictures is the same, the bilateral matching becomes mirror based bi-directional MV.
[0193]
FIG. 20 shows an example of template matching used in the Frame-Rate Up Conversion (FRUC) method. Template matching can be used to derive motion information of the current CU 2000 by finding the closest match between a template (e.g., top and/or left neighboring blocks of the current CU) in the current picture and a block (e.g., same size to the template) in a reference picture 2010. Except the aforementioned FRUC merge mode, the template matching can also be applied to AMVP mode. In both JEM and HEVC, AMVP has two candidates. With the template matching method, a new candidate can be derived. If the newly derived candidate by template matching is different to the first existing AMVP candidate, it is inserted at the very beginning of the AMVP candidate list and then the list size is set to two (e.g., by removing the second existing AMVP candidate) . When applied to AMVP mode, only CU level search is applied.
[0194]
The MV candidate set at CU level can include the following: (1) original AMVP candidates if the current CU is in AMVP mode, (2) all merge candidates, (3) several MVs in the interpolated MV field (described later) , and top and left neighboring motion vectors.
[0195]
When using bilateral matching, each valid MV of a merge candidate can be used as an input to generate a MV pair with the assumption of bilateral matching. For example, one valid MV of a merge candidate is (MVa, ref a) at reference list A. Then the reference picture ref b of its paired bilateral MV is found in the other reference list B so that ref a and ref b are temporally at different sides of the current picture. If such a ref b is not available in reference list B, ref b is determined as a reference which is different from ref a and its temporal distance to the current picture is the minimal one in list B. After ref b is determined, MVb is derived by scaling MVa based on the temporal distance between the current picture and ref a, ref b.
[0196]
In some implementations, four MVs from the interpolated MV field can also be added to the CU level candidate list. More specifically, the interpolated MVs at the position (0, 0) , (W/2, 0) , (0, H/2) and (W/2, H/2) of the current CU are added. When FRUC is applied in AMVP mode, the original AMVP candidates are also added to CU level MV candidate set. In some implementations, at the CU level, 15 MVs for AMVP CUs and 13 MVs for merge CUs can be added to the candidate list.
[0197]
The MV candidate set at sub-CU level includes an MV determined from a CU-level search, (2) top, left, top-left and top-right neighboring MVs, (3) scaled versions of collocated MVs from reference pictures, (4) one or more ATMVP candidates (e.g., up to four) , and (5) one or more STMVP candidates (e.g., up to four) . The scaled MVs from reference pictures are derived as follows. The reference pictures in both lists are traversed. The MVs at a collocated position of the sub-CU in a reference picture are scaled to the reference of the starting CU-level MV. ATMVP and STMVP candidates can be the four first ones. At the sub-CU level, one or more MVs (e.g., up to 17) are added to the candidate list.
[0198]
Generation of an Interpolated MV Field. Before coding a frame, interpolated motion field is generated for the whole picture based on unilateral ME. Then the motion field may be used later as CU level or sub-CU level MV candidates.
[0199]
In some embodiments, the motion field of each reference pictures in both reference lists is traversed at 4×4 block level. FIG. 21 shows an example of unilateral Motion Estimation (ME) 2100 in the FRUC method. For each 4×4 block, if the motion associated to the block passing through a 4×4 block in the current picture and the block has not been assigned any interpolated motion, the motion of the reference block is scaled to the current picture according to the temporal distance TD0 and TD1 (the same way as that of MV scaling of TMVP in HEVC) and the scaled motion is assigned to the block in the current frame. If no scaled MV is assigned to a 4×4 block, the block's motion is marked as unavailable in the interpolated motion field.
[0200]
Interpolation and Matching Cost. When a motion vector points to a fractional sample position, motion compensated interpolation is needed. To reduce complexity, bi-linear interpolation instead of regular 8-tap HEVC interpolation can be used for both bilateral matching and template matching.
[0201]
The calculation of matching cost is a bit different at different steps. When selecting the candidate from the candidate set at the CU level, the matching cost can be the absolute sum difference (SAD) of bilateral matching or template matching. After the starting MV is determined, the matching cost C of bilateral matching at sub-CU level search is calculated as follows:
[0202]
[0203]
Here, w is a weighting factor. In some embodiments, w can be empirically set to 4. MV and MV s indicate the current MV and the starting MV, respectively. SAD may still be used as the matching cost of template matching at sub-CU level search.
[0204]
In FRUC mode, MV is derived by using luma samples only. The derived motion will be used for both luma and chroma for MC inter prediction. After MV is decided, final MC is performed using 8-taps interpolation filter for luma and 4-taps interpolation filter for chroma.
[0205]
MV refinement is a pattern based MV search with the criterion of bilateral matching cost or template matching cost. In the JEM, two search patterns are supported –an unrestricted center-biased diamond search (UCBDS) and an adaptive cross search for MV refinement at the CU level and sub-CU level, respectively. For both CU and sub-CU level MV refinement, the MV is directly searched at quarter luma sample MV accuracy, and this is followed by one-eighth luma sample MV refinement. The search range of MV refinement for the CU and sub-CU step are set equal to 8 luma samples.
[0206]
In the bilateral matching merge mode, bi-prediction is applied because the motion information of a CU is derived based on the closest match between two blocks along the motion trajectory of the current CU in two different reference pictures. In the template matching merge mode, the encoder can choose among uni-prediction from list0, uni-prediction from list1, or bi-prediction for a CU. The selection ca be based on a template matching cost as follows:
[0207]
If costBi <= factor *min (cost0, cost1)
[0208]
bi-prediction is used;
[0209]
Otherwise, if cost0 <= cost1
[0210]
uni-prediction from list0 is used;
[0211]
Otherwise,
[0212]
uni-prediction from list1 is used;
[0213]
Here, cost0 is the SAD of list0 template matching, cost1 is the SAD of list1 template matching and costBi is the SAD of bi-prediction template matching. For example, when the value of factor is equal to 1.25, it means that the selection process is biased toward bi-prediction. The inter prediction direction selection can be applied to the CU-level template matching process.
[0214]
2.8 Examples of Bi-directional Optical Flow (BIO)
[0215]
The bi-directional optical flow (BIO) method is a sample-wise motion refinement performed on top of block-wise motion compensation for bi-prediction. In some implementations, the sample-level motion refinement does not use signaling.
[0216]
Let I (k) be the luma value from reference k (k=0, 1) after block motion compensation, and denote and as the horizontal and vertical components of the I (k) gradient, respectively. Assuming the optical flow is valid, the motion vector field (v x, v y) is given by:
[0217]
[0218]
Combining this optical flow equation with Hermite interpolation for the motion trajectory of each sample results in a unique third-order polynomial that matches both the function values I (k) and derivatives and at the ends. The value of this polynomial at t=0 is the BIO prediction:
[0219]
[0220]
FIG. 22 shows an example optical flow trajectory in the Bi-directional Optical flow (BIO) method. Here, τ 0and τ 1denote the distances to the reference frames. Distances τ 0and τ 1are calculated based on POC for Ref 0 and Ref 1: τ 0=POC (current) -POC (Ref 0) , τ 1= POC(Ref1) -POC (current) . If both predictions come from the same time direction (either both from the past or both from the future) then the signs are different (e.g., τ 0·τ 1<0) . In this case, BIO is applied if the prediction is not from the same time moment (e.g., τ 0≠τ 1) . Both referenced regions have non-zero motion (e.g., MVx 0, MVy 0, MVx 1, MVy 1≠0) and the block motion vectors are proportional to the time distance (e.g., MVx 0/MVx 1=MVy 0/MVy 1=-τ 01) .
[0221]
The motion vector field (v x, v y) is determined by minimizing the difference Δbetween values in points A and B. FIGS. 9A-9B show an example of intersection of motion trajectory and reference frame planes. Model uses only first linear term of a local Taylor expansion for Δ:
[0222]
[0223]
All values in the above equation depend on the sample location, denoted as (i′, j′) . Assuming the motion is consistent in the local surrounding area, Δ can be minimized inside the (2M+1) × (2M+1) square window Ω centered on the currently predicted point (i, j) , where M is equal to 2:
[0224]
[0225]
For this optimization problem, the JEM uses a simplified approach making first a minimization in the vertical direction and then in the horizontal direction. This results in the following:
[0226]
[0227]
[0228]
where,
[0229]
[0230]
In order to avoid division by zero or a very small value, regularization parameters r and m can be introduced in Equations 28 and 29, where:
[0231]
r=500·4 d-8 (31)
[0232]
m=700·4 d-8 (32)
[0233]
Here, d is bit depth of the video samples.
[0234]
In order to keep the memory access for BIO the same as for regular bi-predictive motion compensation, all prediction and gradients values, I (k) , are calculated for positions inside the current block. FIG. 23A shows an example of access positions outside of a block 2300. As shown in FIG. 23A, in Equation 30, (2M+1) × (2M+1) square window Ω centered in currently predicted point on a boundary of predicted block needs to accesses positions outside of the block. In the JEM, values of I (k) , outside of the block are set to be equal to the nearest available value inside the block. For example, this can be implemented as a padding area 2301, as shown in FIG. 23B.
[0235]
With BIO, it is possible that the motion field can be refined for each sample. To reduce the computational complexity, a block-based design of BIO is used in the JEM. The motion refinement can be calculated based on a 4x4 block. In the block-based BIO, the values of s n in Equation 30 of all samples in a 4x4 block can be aggregated, and then the aggregated values of s n in are used to derived BIO motion vectors offset for the 4×4 block. More specifically, the following formula can used for block-based BIO derivation:
[0236]
[0237]
Here, b k denotes the set of samples belonging to the k-th 4x4 block of the predicted block. s n in Equations 28 and 29 are replaced by ( (s n, bk) >>4) to derive the associated motion vector offsets.
[0238]
In some scenarios, MV regiment of BIO may be unreliable due to noise or irregular motion. Therefore, in BIO, the magnitude of MV regiment is clipped to a threshold value. The threshold value is determined based on whether the reference pictures of the current picture are all from one direction. For example, if all the reference pictures of the current picture are from one direction, the value of the threshold is set to 12×2 14-d; otherwise, it is set to 12×2 13-d.
[0239]
Gradients for BIO can be calculated at the same time with motion compensation interpolation using operations consistent with HEVC motion compensation process (e.g., 2D separable Finite Impulse Response (FIR) ) . In some embodiments, the input for the 2D separable FIR is the same reference frame sample as for motion compensation process and fractional position (fracX, fracY) according to the fractional part of block motion vector. For horizontal gradient asignal is first interpolated vertically using BIOfilterS corresponding to the fractional position fracY with de-scaling shift d-8. Gradient filter BIOfilterG is then applied in horizontal direction corresponding to the fractional position fracX with de-scaling shift by 18-d. For vertical gradient agradient filter is applied vertically using BIOfilterG corresponding to the fractional position fracY with de-scaling shift d-8. The signal displacement is then performed using BIOfilterS in horizontal direction corresponding to the fractional position fracX with de-scaling shift by 18-d. The length of interpolation filter for gradients calculation BIOfilterG and signal displacement BIOfilterF can be shorter (e.g., 6-tap) in order to maintain reasonable complexity. Table 1 shows example filters that can be used for gradients calculation of different fractional positions of block motion vector in BIO. Table 2 shows example interpolation filters that can be used for prediction signal generation in BIO.
[0240]
Table 1: Exemplary filters for gradient calculations in BIO
[0241]
[Table 0001]
Fractional pel position Interpolation filter for gradient (BIOfilterG)
0 {8, -39, -3, 46, -17, 5}
1/16 {8, -32, -13, 50, -18, 5}
1/8 {7, -27, -20, 54, -19, 5}
3/16 {6, -21, -29, 57, -18, 5}
1/4 {4, -17, -36, 60, -15, 4}
5/16 {3, -9, -44, 61, -15, 4}
3/8 {1, -4, -48, 61, -13, 3}
7/16 {0, 1, -54, 60, -9, 2}
1/2 {-1, 4, -57, 57, -4, 1}

[0242]
Table 2: Exemplary interpolation filters for prediction signal generation in BIO
[0243]
[Table 0002]
Fractional pel position Interpolation filter for prediction signal (BIOfilterS)
0 {0, 0, 64, 0, 0, 0}
1/16 {1, -3, 64, 4, -2, 0}
1/8 {1, -6, 62, 9, -3, 1}
3/16 {2, -8, 60, 14, -5, 1}
1/4 {2, -9, 57, 19, -7, 2}
5/16 {3, -10, 53, 24, -8, 2}
3/8 {3, -11, 50, 29, -9, 2}

[0244]
[Table 0003]
7/16 {3, -11, 44, 35, -10, 3}
1/2 {3, -10, 35, 44, -11, 3}

[0245]
In the JEM, BIO can be applied to all bi-predicted blocks when the two predictions are from different reference pictures. When Local Illumination Compensation (LIC) is enabled for a CU, BIO can be disabled.
[0246]
In some embodiments, OBMC is applied for a block after normal MC process. To reduce the computational complexity, BIO may not be applied during the OBMC process. This means that BIO is applied in the MC process for a block when using its own MV and is not applied in the MC process when the MV of a neighboring block is used during the OBMC process.
[0247]
2.9 Examples of Decoder-Side Motion Vector Refinement (DMVR)
[0248]
In a bi-prediction operation, for the prediction of one block region, two prediction blocks, formed using a motion vector (MV) of list0 and a MV of list1, respectively, are combined to form a single prediction signal. In the decoder-side motion vector refinement (DMVR) method, the two motion vectors of the bi-prediction are further refined by a bilateral template matching process. The bilateral template matching applied in the decoder to perform a distortion-based search between a bilateral template and the reconstruction samples in the reference pictures in order to obtain a refined MV without transmission of additional motion information.
[0249]
In DMVR, a bilateral template is generated as the weighted combination (i.e. average) of the two prediction blocks, from the initial MV0 of list0 and MV1 of list1, respectively, as shown in FIG. 24. The template matching operation consists of calculating cost measures between the generated template and the sample region (around the initial prediction block) in the reference picture. For each of the two reference pictures, the MV that yields the minimum template cost is considered as the updated MV of that list to replace the original one. In the JEM, nine MV candidates are searched for each list. The nine MV candidates include the original MV and 8 surrounding MVs with one luma sample offset to the original MV in either the horizontal or vertical direction, or both. Finally, the two new MVs, i.e., MV0′and MV1′as shown in FIG. 24, are used for generating the final bi-prediction results. A sum of absolute differences (SAD) is used as the cost measure.
[0250]
DMVR is applied for the merge mode of bi-prediction with one MV from a reference picture in the past and another from a reference picture in the future, without the transmission of additional syntax elements. In the JEM, when LIC, affine motion, FRUC, or sub-CU merge candidate is enabled for a CU, DMVR is not applied.
[0251]
2.10 Examples of Symmetric Motion Vector Difference
[0252]
Symmetric motion vector difference (SMVD) can be used to encode the MVD more efficiently.
[0253]
Firstly, in slice level, variables BiDirPredFlag, RefIdxSymL0 and RefIdxSymL1 are derived as follows:
[0254]
The forward reference picture in reference picture list 0 which is nearest to the current picture is searched. If found, RefIdxSymL0 is set equal to the reference index of the forward picture.
[0255]
The backward reference picture in reference picture list 1 which is nearest to the current picture is searched. If found, RefIdxSymL1 is set equal to the reference index of the backward picture.
[0256]
If both forward and backward picture are found, BiDirPredFlag is set equal to 1.
[0257]
Otherwise, following applies:
[0258]
The backward reference picture in reference picture list 0 which is nearest to the current one is searched. If found, RefIdxSymL0 is set equal to the reference index of the backward picture.
[0259]
The forward reference picture in reference picture list 1 which is nearest to the current one is searched. If found, RefIdxSymL1 is set equal to the reference index of the forward picture.
[0260]
If both backward and forward picture are found, BiDirPredFlag is set equal to 1. Otherwise, BiDirPredFlag is set equal to 0.
[0261]
Secondly, in CU level, a symmetrical mode flag indicating whether symmetrical mode is used or not is explicitly signaled if the prediction direction for the CU is bi-prediction and BiDirPredFlag is equal to 1.
[0262]
When the flag is true, only mvp_l0_flag, mvp_l1_flag and MVD0 are explicitly signaled. The reference indices are set equal to RefIdxSymL0, RefIdxSymL1 for list 0 and list 1, respectively. MVD1 is just set equal to –MVD0. The final motion vectors are shown in below formula.
[0263]
[0264]
FIG. 27 shows examples of symmetrical mode.
[0265]
The modifications in coding unit syntax to the relevant standards are shown in Table 3, indicated in bolded, italicized, underlined font.
[0266]
Table 3: Modifications in coding unit syntax
[0267]
[0268]
[0269]
2.11 Symmetric MVD for Affine Bi-prediction Coding
[0270]
SMVD for affine mode can be implemented.
[0271]
3. Context-adaptive Binary Arithmetic Coding (CABAC)
[0272]
3.1 CABAC Design in HEVC
[0273]
3.1.1 Context Representation and Initialization Process in HEVC
[0274]
In HEVC, for each context variable, the two variables pStateIdx and valMps are initialized.
[0275]
From the 8 bit table entry initValue, the two 4 bit variables slopeIdx and offsetIdx are derived as follows:
[0276]
slopeIdx = initValue >> 4
[0277]
offsetIdx= initValue &15 (34)
[0278]
The variables m and n, used in the initialization of context variables, are derived from slopeIdx and offsetIdx as follows:
[0279]
m = slopeIdx *5 -45
[0280]
n = (offsetIdx << 3) -16 (35)
[0281]
The two values assigned to pStateIdx and valMps for the initialization are derived from the luma's quantization parameter of slice denoted by SliceQpY. Given the variables m and n, the initialization is specified as follows:
[0282]
preCtxState = Clip3 (1, 126, ( (m *Clip3 (0, 51, SliceQp Y) ) >> 4) + n)
[0283]
valMps = (preCtxState <= 63) ? 0 : 1 (36)
[0284]
pStateIdx = valMps ? (preCtxState-64) : (63 -preCtxState)
[0285]
3.1.2 State Transition Process in HEVC
[0286]
Inputs to this process are the current pStateIdx, the decoded value binVal and valMps values of the context variable associated with ctxTable and ctxIdx.
[0287]
Outputs of this process are the updated pStateIdx and valMps of the context variable associated with ctxIdx.
[0288]
Depending on the decoded value binVal, the update of the two variables pStateIdx and valMps associated with ctxIdx is derived as follows in (37) :
[0289]
[0290]
3.2 CABAC Design in VVC
[0291]
The context-adaptive binary arithmetic coder (BAC) in VVC has been changed in VVC which is different from that in HEVC in terms of both context updating process and arithmetic coder.
[0292]
Here is the summary of recently adopted proposal (JVET-M0473, CE test 5.1.13) .
[0293]
Table 4: Summary of CABAC modifications in VVC
[0294]
[0295]
3.2.1 Context Initialization Process in VVC
[0296]
In VVC, two values assigned to pStateIdx0 and pStateIdx1 for the initialization are derived from SliceQpY. Given the variables m and n, the initialization is specified as follows:
[0297]
preCtxState = Clip3 (0, 127, ( (m *Clip3 (0, 51, SliceQp Y) ) >> 4) + n)
[0298]
pStateIdx0 = initStateIdxToState [preCtxState] >> 4
[0299]
pStateIdx1 = initStateIdxToState [preCtxState] (38)
[0300]
3.2.2 State Transition Process in VVC
[0301]
Inputs to this process are the current pStateIdx0 and pStateIdx1, and the decoded value binVal.
[0302]
Outputs of this process are the updated pStateIdx0 and pStateIdx1 of the context variable associated with ctxIdx.
[0303]
The variables shift0 (corresponding to variable a in Summary of CABAC modifications in VVC Table 4) and shift1 (corresponding to variable b in Summary of CABAC modifications in VVC Table 4e) are derived from the shiftIdx value associated with ctxTable and ctxInc.
[0304]
shift0 = (shiftIdx >> 2) + 2
[0305]
shift1 = (shiftIdx &3) + 3 + shift0 (39)
[0306]
Depending on the decoded value binVal, the update of the two variables pStateIdx0 and pStateIdx1 associated with ctxIdx is derived as follows:
[0307]
pStateIdx0 = pStateIdx0 - (pStateIdx0 >> shift0) + (1023 *binVal >> shift0)
[0308]
pStateIdx1 = pStateIdx1 - (pStateIdx1 >> shift1) + (16383 *binVal >> shift1) (40)
[0309]
4. Drawbacks of Existing Implementations
[0310]
In some existing implementations, when MV/MV difference (MVD) could be selected from a set of multiple MV/MVD precisions for affine coded blocks, it remains uncertain how more accurate motion vectors may be obtained.
[0311]
In other existing implementations, the MV/MVD precision information also plays an important role in determination of the overall coding gain of AMVR applied to affine mode, but achieving this goal remains uncertain.
[0312]
5. Example Methods for MV Predictors for Affine Mode with AMVR
[0313]
Embodiments of the presently disclosed technology overcome the drawbacks of existing implementations, thereby providing video coding with higher coding efficiencies. The derivation and signaling of motion vector predictors for affine mode with adaptive motion vector resolution (AMVR) , based on the disclosed technology, may enhance both existing and future video coding standards, is elucidated in the following examples described for various implementations. The examples of the disclosed technology provided below explain general concepts, and are not meant to be interpreted as limiting. In an example, unless explicitly indicated to the contrary, the various features described in these examples may be combined.
[0314]
In some embodiments, the following examples may be applied to affine mode or normal mode when AMVR is applied. These examples assume that a precision Prec (i.e., MV is with 1 / (2^Prec) precision) is used for encoding MVD in AF_INTER mode or for encoding MVD in normal inter mode. A motion vector predictor (e.g., inherited from a neighboring block MV) and its precision are denoted by MVPred (MVPred X, MVPred Y) and PredPrec, respectively.
[0315]
In the following discussion, SatShift (x, n) is defined as
[0316]
[0317]
Shift (x, n) is defined as Shift (x, n) = (x+ offset0) >>n. In one example, offset0 and/or offset1 are set to (1<<n) >>1 or (1<< (n-1) ) . In another example, offset0 and/or offset1 are set to 0. In another example, offset0=offset1= ( (1<<n) >>1) -1 or ( (1<< (n-1) ) ) -1.
[0318]
In the following discussion, an operation between two motion vectors means the operation will be applied to both the two components of the motion vector. For example, MV3=MV1+MV2 is equivalent to MV3x=MV1x+MV2x and MV3y=MV1y+MV2y. alternatively, the operation may be only applied to the horizontal or vertical component of the two motion vectors.
[0319]
Improvement of Affine Mode with AMVR Supported
[0320]
1. The set of allowed MVD precisions may be different from picture to picture, from slice to slice, or from block to block.
[0321]
a. In one example, the set of allowed MVD precisions may depend on coded information, such as block size, block shape. etc. al.
[0322]
b. A set of allowed MV precisions may be pre-defined, such as {1/16, 1/4, 1} .
[0323]
c. Indications of allowed MV precisions may be signaled in SPS/PPS/VPS/sequence header/picture header/slice header/group of CTUs, etc. al.
[0324]
d. The signaling of selected MV precision from a set of allowed MV precisions further depend on number of allowed MV precisions for a block.
[0325]
2. A syntax element is signaled to the decoder to indicate the used MVD precision in affine inter mode.
[0326]
a. In one example, only one single syntax element is used to indicate the MVD precisions applied to the affine mode and the AMVR mode.
[0327]
i. In one example, same semantics are used, that is, the same value of syntax element is mapped to the same MVD precision for the AMVR and affine mode.
[0328]
ii. Alternatively, the semantics of the single syntax element is different for the AMVR mode and the affine mode. That is, the same value of syntax element could be mapped to different MVD precision for the AMVR and affine mode.
[0329]
b. In one example, when affine mode uses same set of MVD precisions with AMVR (e.g., MVD precision set is {1, 1/4, 4} -pel) , the MVD precision syntax element in AMVR is reused in affine mode, i.e., only one single syntax element is used.
[0330]
i. Alternatively, furthermore, when encoding/decoding this syntax element in CABAC encoder/decoder, same or different context models may be used for AMVR and affine mode.
[0331]
ii. Alternatively, furthermore, this syntax element may have different semantics in AMVR and affine mode. For example, the syntax element equal to 0, 1 and 2 indicates 1/4-pel, 1-pel and 4-pel MV precision respectively in AMVR, while in affine mode, the syntax element equal to 0, 1 and 2 indicates 1/4-pel, 1/16-pel and 1-pel MV precision respectively.
[0332]
c. In one example, when affine mode uses same number of MVD precisions with AMVR but different sets of MVD precisions (e.g., MVD precision set for AMVR is {1, 1/4, 4} -pel while for affine, it is {1/16, 1/4, 1} -pel) , the MVD precision syntax element in AMVR is reused in affine mode, i.e., only one single syntax element is used.
[0333]
i. Alternatively, furthermore, when encoding/decoding this syntax element in CABAC encoder/decoder, same or different context models may be used for AMVR and affine mode.
[0334]
ii. Alternatively, furthermore, this syntax element may have different semantics in AMVR and affine mode.
[0335]
d. In one example, affine mode uses less MVD precisions than AMVR, the MVD precision syntax element in AMVR is reused in affine mode. However, only a subset of the syntax element values is valid for affine mode.
[0336]
i. Alternatively, furthermore, when encoding/decoding this syntax element in CABAC encoder/decoder, same or different context models may be used for AMVR and affine mode.
[0337]
ii. Alternatively, furthermore, this syntax element may have different semantics in AMVR and affine mode.
[0338]
e. In one example, affine mode uses more MVD precisions than AMVR, the MVD precision syntax element in AMVR is reused in affine mode. However, such syntax element is extended to allow more values in affine mode.
[0339]
i. Alternatively, furthermore, when encoding/decoding this syntax element in CABAC encoder/decoder, same or different context models may be used for AMVR and affine mode.
[0340]
ii. Alternatively, furthermore, this syntax element may have different semantics in AMVR and affine mode.
[0341]
f. In one example, anew syntax element is used for coding the MVD precision of affine mode, i.e., two different syntax elements are used for coding the MVD precision of AMVR and affine mode.
[0342]
g. The syntax for indication of MVD precisions for the affine mode may be signaled under one or all of the following conditions are true:
[0343]
i. MVDs for all control points are non-zero.
[0344]
ii. MVDs for at least one control point is non-zero.
[0345]
iii. MVD of one control point (e.g., the first CPMV) are non-zero
[0346]
In this case, when either one of the above conditions or all of them fail, there is no need to signal the MVD precisions.
[0347]
h. The syntax element for indication of MVD precisions for either affine mode or the AMVR mode may be coded with contexts and the contexts are dependent on coded information.
[0348]
i. In one example, when there is only one single syntax element, the contexts may depend on whether current block is coded with affine mode or not.
[0349]
i. In one example, the context may depend on the block size/block shape/MVD precisions of neighboring blocks/temporal layer index/prediction directions, etc. al.
[0350]
j. Whether to enable or disable the usage of multiple MVD precisions for the affine mode may be signaled in SPS/PPS/VPS/sequence header/picture header/slice header/group of CTUs, etc. al.
[0351]
i. In one example, whether to signal the information of enable or disable the usage of multiple MVD precisions for the affine mode may depend on other syntax elements. For example, the information of enable or disable the usage of multiple MV and/or MVP and/or MVD precisions for the affine mode is signaled when affine mode is enabled; and is not signaled and inferred to be 0 when affine mode is disabled.
[0352]
k. Alternatively, multiple syntax elements may be signaled to indicate the used MV and/or MVP and/or MVD precision (in the following discussion, they are all referred to as "MVD precision" ) in affine inter mode.
[0353]
i. In one example, the syntax elements used to indicate the used MVD precision in affine inter mode and normal inter mode may be different.
[0354]
1. The number of syntax elements to indicate the used MVD precision in affine inter mode and normal inter mode may be different.
[0355]
2. The semantics of the syntax elements to indicate the used MVD precision in affine inter mode and normal inter mode may be different.
[0356]
3. The context models in arithmetic coding to code one syntax elements to indicate the used MVD precision in affine inter mode and normal inter mode may be different.
[0357]
4. The methods to derive context models in arithmetic coding to code one syntax element to indicate the used MVD precision in affine inter mode and normal inter mode may be different.
[0358]
ii. In one example, a first syntax element (e.g. amvr_flag) may be signaled to indicate whether to apply AMVR in an affine-coded block.
[0359]
1. The first syntax element is conditionally signaled.
[0360]
a. In one example, signalling of the first syntax element (amvr_flag) is skipped when current block is coded with certain mode (e.g., CPR/IBC mode) .
[0361]
b. In one example, signalling of the first syntax element (amvr_flag) is skipped when all CPMVs' MVDs (including both horizontal and vertical components) are all zero.
[0362]
c. In one example, signalling of the first syntax element (amvr_flag) is skipped when one selected CPMVs' MVDs (including both horizontal and vertical components) are all zero.
[0363]
i. In one example, the selected CPMV's MVD is the first CPMV's MVD to be coded/decoded.
[0364]
d. In one example, signalling of the first syntax element (amvr_flag) is skipped when the usage of enabling multiple MVD precisions for affine-coded block is false.
[0365]
e. In one example, the first syntax element may be signaled under the following conditions:
[0366]
i. Usage of enabling multiple MVD precisions for affine-coded block is true and current block is coded with affine mode;
[0367]
ii. Alternatively, usage of enabling multiple MVD precisions for affine-coded block is true, current block is coded with affine mode, and at least one component of a CPMV's MVD is unequal to 0.
[0368]
iii. Alternatively, usage of enabling multiple MVD precisions for affine-coded block is true, current block is coded with affine mode, and at least one component of a selected CPMV's MVD is unequal to 0.
[0369]
1. In one example, the selected CPMV's MVD is the first CPMV's MVD to be coded/decoded.
[0370]
2. When AMVR is not applied to an affine-coded block or the first syntax element is not present, a default MV and/or MVD precision is utilized.
[0371]
a. In one example, the default precision is 1/4-pel.
[0372]
b. Alternatively, the default precision is set to that used in motion compensation for affine coded blocks.
[0373]
3. For example, the MVD precision of affine mode is 1/4-pel if amvr_flag is equal to 0; otherwise the MVD precision of affine mode may be other values.
[0374]
a. Alternatively, furthermore, the additional MVD precisions may be further signaled via a second syntax element.
[0375]
iii. In one example, a second syntax element (such as amvr_coarse_precision_flag) may be signaled to indicate the MVD precision of affine mode.
[0376]
1. In one example, whether the second syntax element is signaled may depend on the first syntax element. For example, the second syntax element is only signaled when the first syntax element is 1.
[0377]
2. In one example, the MVD precision of affine mode is 1-pel if the second syntax element is 0; otherwise, the MVD precision of affine mode is 1/16-pel.
[0378]
3. In one example, the MVD precision of affine mode is 1/16-pel if the second syntax element is 0; otherwise, the MVD precision of affine mode is full-pixel.
[0379]
iv. In one example, a syntax element used to indicate the used MVD precision in affine inter mode share the same context models as the syntax element with the same name but used to indicate the used MVD precision in normal inter mode.
[0380]
1. Alternatively, a syntax element used to indicate the used MVD precision in affine inter mode use different context models as the syntax element with the same name but used to indicate the used MVD precision in normal inter mode.
[0381]
3. Whether to apply or how to apply AMVR on an affine coded block may depend on the reference picture of the current block.
[0382]
a. In one example, AMVR is not applied if the reference picture is the current picture, i.e., Intra block copying is applied in the current block.
[0383]
Fast Algorithm of AVMR in Affine Mode for Encoder
[0384]
Denote RD cost (real RD cost, or SATD/SSE/SAD cost plus rough bits cost) of affine mode and AMVP mode as affineCosti and amvpCosti for IMV = i, where in i = 0, 1 or 2. Here, IMV = 0 means 1/4 pel MV, and IMV= 1 means integer MV for AMVP mode and 1/16 pel MV for affine mode, and IMV = 2 means 4 pel MV for AMVP mode and integer MV for affine mode. Denote RD cost of merge mode as mergeCost.
[0385]
4. It is proposed that AMVR is disabled for affine mode of current CU if the best mode of its parent CU is not AF_INTER mode or AF_MERGE mode.
[0386]
a. Alternatively, AMVR is disabled for affine mode of current CU if the best mode of its parent CU is not AF_INTER mode
[0387]
5. It is proposed that AMVR is disabled for affine mode if affineCost0>th1*amvpCost0, wherein th1 is a positive threshold.
[0388]
a. Alternatively, in addition, AMVR is disabled for affine mode if min (affineCost0, amvpCost0) > th2*mergeCost, wherein th2 is a positive threshold.
[0389]
b. Alternatively, in addition, integer MV is disabled for affine mode if affineCost0>th3*affineCost1, wherein th3 is a positive threshold.
[0390]
6. It is proposed that AMVR is disabled for AMVP mode if amvpCost0 > th4 *affineCost0, wherein th4 is a positive threshold.
[0391]
a. Alternatively, AMVR is disabled for AMVP mode if min (affineCost0, amvpCost0) > th5*mergeCost, wherein th5 is a positive threshold.
[0392]
7. It is proposed that 4/6 parameter affine models obtained in one MV precision may be used as a candidate start search point for other MV precisions.
[0393]
a. In one example, 4/6 parameter affine models obtained in 1/16 MV may be used as a candidate start search point for other MV precisions.
[0394]
b. In one example, 4/6 parameter affine models obtained in 1/4 MV may be used as a candidate start search point for other MV precisions.
[0395]
8. AMVR for affine mode is not checked at encoder for the current block if its parent block does not choose the affine mode.
[0396]
9. Statistics of usage of different MV precisions for affine-coded blocks in previously coded frames/slices/tiles/CTU rows may be utilized to early terminate the rate-distortion calculations of MV precisions for affine-coded blocks in current slice/tile/CTU row.
[0397]
a. In one example, the percentage of affine-coded blocks with a certain MV precision is recorded. If the percentage is too low, then the checking of the corresponding MV precision is skipped.
[0398]
b. In one example, previously coded frames with the same temporal layer are utilized to decide whether to skip a certain MV precision.
[0399]
Context for Coding Affine AMVR
[0400]
10. For each context that is used for coding the affine AMVR code, it is proposed to set a variable (denoted by shiftIdx) to control two probability updating speed associated with this context.
[0401]
a. In one example, the faster updating speed is defined by (shiftIdx >> 2) + 2.
[0402]
b. In one example, the slower updating speed is defined by (shiftIdx &3) + 3 +shift0
[0403]
c. In one example, the conformance bitstream shall follow the rule that the derived faster updating speed shall be within [2, 5] inclusively.
[0404]
d. In one example, the conformance bitstream shall follow the rule that the derived faster updating speed shall be within [3, 6] inclusively.
[0405]
11. It is proposed that when coding the AMVR mode of one block, the neighboring block's affine AMVR mode information is disallowed for context modeling.
[0406]
a. In one example, the neighboring block's AMVR mode index may be utilized and neighboring block's affine AMVR mode information is excluded. An example is shown in Table 5 (including Table 5-1 and 5-2) , wherein (xNbL, yNbL) and (xNbA, yNbA) denotes the left and above neighboring block. In one example, the context index offset ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx*3.
[0407]
Table 5-1 –Specification of ctxInc using left and above syntax elements
[0408]
[0409]
Table 5-2 –Specification of ctxInc using left and above syntax elements
[0410]
[0411]
b. Alternatively, neighboring block's affine AMVR mode information may be further utilized but with a function instead of being directly used. In one example, the function func as described in Table 6-1 may return true when the amvr_mode [xNbL ] [yNbL ] of an affine-coded neighboring block indicates a certain MV precision (such as the 1/4-pel MV precision) . In one example, the function func as described in Table 6-2 may return true when the amvr_flag [xNbL ] [yNbL ] of an affine-coded neighboring block indicates a certain MV precision (such as the 1/4-pel MV precision) .
[0412]
Table 6-1 –Specification of ctxInc using left and above syntax elements
[0413]
[0414]
Table 6-2 –Specification of ctxInc using left and above syntax elements
[0415]
[0416]
c. Alternatively, neighboring block's affine AMVR mode information may be further utilized for coding the first syntax element (e.g., amvr_flag) of the AMVR mode (which is applied to normal inter mode) . Table 6-3 and 6-4 give some examples.
[0417]
Table 6-3 –Specification of ctxInc using left and above syntax elements
[0418]
[0419]
Table 6-4 –Specification of ctxInc using left and above syntax elements
[0420]
[0421]
d. When the AMVR mode information is represented by multiple syntax elements (e.g., the first and second syntax elements, denoted by amvr_flag, amvr_coarse_precision_flag) , the above syntax amvr_mode may be replaced by any of the multiple syntax elements and above methods may be still applied.
[0422]
12. It is proposed that when coding the Affine AMVR mode, the neighboring block's AMVR mode information may be utilized for context coding.
[0423]
a. In one example, the neighboring block's AMVR mode information is directly used. An example is shown in Table 7. Alternatively, furthermore, the context index offset ctxInc = (condL && availableL) + (condA && availableA) +ctxSetIdx*3.
[0424]
Table 7–Specification of ctxInc using left and above syntax elements
[0425]
[0426]
b. Alternatively, the neighboring block's AMVR mode information is disallowed for context modeling. An example is shown in Table 8.
[0427]
Table 8–Specification of ctxInc using left and above syntax elements
[0428]
[0429]
c. Alternatively, neighboring block's AMVR mode information may be further utilized but with a function instead of being directly used. In one example, the function func as described in Table 9 may return true when the amvr_mode [xNbL ] [yNbL] of an non-affine-coded neighboring block indicates a certain MV precision (such as the 1/4-pel MV precision) .
[0430]
Table 9–Specification of ctxInc using left and above syntax elements
[0431]
[0432]
d. When the affine AMVR mode information is represented by multiple syntax elements (e.g., the first and second syntax elements, denoted by amvr_flag, amvr_coarse_precision_flag) , the above syntax amvr_mode may be replaced by any of the multiple syntax elements and above methods may be still applied.
[0433]
Fast Algorithm of SMVD and Affine SMVD
[0434]
When checking the SMVD mode, suppose the currently selected best mode is CurBestMode, and the AMVR MVD precision in AMVR is MvdPrec or the MVD precision of affine AMVR is MvdPrecAff.
[0435]
13. SMVD mode may be skipped depending on the currently selected best mode (i.e., CurBestMode) , the MVD precision in AMVR.
[0436]
a. In one example, if the CurBestMode is merge mode or/and UMVE mode, SMVD mode may be not checked.
[0437]
b. In one example, if the CurBestMode is not coded with SMVD mode, SMVD mode may be not checked.
[0438]
c. In one example, if the CurBestMode is affine mode, SMVD mode may be not checked.
[0439]
d. In one example, if the CurBestMode is sub-block merge mode, SMVD mode may be not checked.
[0440]
e. In one example, if the CurBestMode is affine SMVD mode, SMVD mode may be not checked.
[0441]
f. In one example, if the CurBestMode is affine merge mode, SMVD mode may be not checked.
[0442]
g. In one example, above fast methods, i.e., bullet 13. a~13. f, may be applied only for some MVD precision.
[0443]
i. In one example, above fast methods may be applied only when MVD precision is greater than or equal to a precision (for example, integer-pel precision) .
[0444]
ii. In one example, above fast methods may be applied only when MVD precision is greater than a precision (for example, integer-pel precision) .
[0445]
iii. In one example, above fast methods may be applied only when MVD precision is smaller than or equal to a precision (for example, integer-pel precision) .
[0446]
iv. In one example, above fast methods may be applied only when MVD precision is smaller than a precision (for example, integer-pel precision) .
[0447]
14. Affine SMVD mode may be skipped depending on the currently selected best mode (i.e., CurBestMode) , the MVD precision in affine AMVR.
[0448]
a. In one example, if the CurBestMode is merge mode or/and UMVE mode, affine SMVD mode may be not checked.
[0449]
b. In one example, if the CurBestMode is not coded with affine SMVD mode, affine SMVD mode may be not checked.
[0450]
c. In one example, if the CurBestMode is sub-block merge mode, affine SMVD mode may be not checked.
[0451]
d. In one example, if the CurBestMode is SMVD mode, affine SMVD mode may be not checked.
[0452]
e. In one example, if the CurBestMode is affine merge mode, affine SMVD mode may be not checked.
[0453]
f. In one example, above fast methods, i.e., bullet 14. a~14. e, may be applied only for some MVD precision.
[0454]
i. In one example, above fast methods may be applied only when affine MVD precision is greater than or equal to a precision (for example, integer-pel precision) .
[0455]
ii. In one example, above fast methods may be applied only when affine MVD precision is greater than a precision (for example, integer-pel precision) .
[0456]
iii. In one example, above fast methods may be applied only when affine MVD precision is smaller than or equal to a precision (for example, integer-pel precision) .
[0457]
iv. In one example, above fast methods may be applied only when affine MVD precision is smaller than a precision (for example, integer-pel precision) .
[0458]
15. The above proposed method may be applied under certain conditions, such as block sizes, slice/picture/tile types, or motion information.
[0459]
a. In one example, when a block size contains smaller than M*H samples, e.g., 16 or 32 or 64 luma samples, proposed method is not allowed.
[0460]
b. Alternatively, when minimum size of a block's width or/and height is smaller than or no larger than X, proposed method is not allowed. In one example, X is set to 8.
[0461]
c. Alternatively, when minimum size of a block's width or/and height is no smaller than X, proposed method is not allowed. In one example, X is set to 8.
[0462]
d. Alternatively, when a block's width > th1 or >=th1 and/or a block's height > th2 or >=th2, proposed method is not allowed. In one example, th1 and/or th2 is set to 8.
[0463]
e. Alternatively, when a block's width < th1 or <=th1 and/or a block's height < th2 or <a=th2, proposed method is not allowed. In one example, th1 and/or th2 is set to 8.
[0464]
f. Alternatively, whether to enable or disable the above methods and/or which method to be applied may be dependent on block dimension, video processing data unit (VPDU) , picture type, low delay check flag, coded information of current block (such as reference pictures, uni or bi-prediction) or previously coded blocks.
[0465]
16. The AMVR methods for affine mode may be performed in different ways when intra block copy (IBC, a. k. a. current picture reference (CPR) ) is applied or not.
[0466]
a. In one example, AMVR for affine mode cannot be used if a block is coded by IBC.
[0467]
b. In one example, AMVR for affine mode may be used if a block is coded by IBC, but the candidate MV/MVD/MVP precisions may be different to those used for non-IBC coded affine-coded block.
[0468]
17. All the term "slice" in the document may be replaced by "tile group" or "tile" .
[0469]
18. In VPS/SPS/PPS/slice header/tile group header, a syntax element (e.g. no_amvr_constraint_flag) equal to 1 specifies that it is a requirement of bitstream conformance that both the syntax element to indicate whether AMVR is enabled (e.g. sps_amvr_enabled_flag) and the syntax element to indicate whether affine AMVR is enabled (e.g. sps_affine_avmr_enabled_flag) shall be equal to 0. The syntax element (e.g. no_amvr_constraint_flag) equal to 0 does not impose a constraint.
[0470]
19. In VPS/SPS/PPS/slice header/tile group header or other video data units, a syntax element (e.g. no_affine_amvr_constraint_flag) may be signalled.
[0471]
a. In one example, no_affine_amvr_constraint_flag equal to 1 specifies that it is a requirement of bitstream conformance that the syntax element to indicate whether affine AMVR is enabled (e.g. sps_affine_avmr_enabled_flag) shall be equal to 0. The syntax element (e.g. no_affine_amvr_constraint_flag) equal to 0 does not impose a constraint
[0472]
20. Multiple contexts may be utilized for coding the second syntax element which indicates the coarse motion precision (such as amvr_coarse_precision_flag) .
[0473]
a. In one example, two contexts may be utilized.
[0474]
b. In one example, selection of contexts may depend on whether the current block is affine coded or not.
[0475]
c. In one example, for the first syntax, it may be coded with only one context and also for the second syntax, it may be coded with only one context.
[0476]
d. In one example, for the first syntax, it may be coded with only one context and also for the second syntax, it may be bypass coded.
[0477]
e. In one example, for the first syntax, it may be bypass coded and also for the second syntax, it may be bypass coded.
[0478]
f. In one example, for all syntax elements related to motion vector precisions, they may be bypass coded.
[0479]
21. For example, only the first bin of the syntax element amvr_mode is coded with arithmetic coding context (s) . All the following bins of amvr_mode are coded as bypass coding.
[0480]
a. The above disclosed method may also be applied to other syntax elements.
[0481]
b. For example, only the first bin of the syntax element SE is coded with arithmetic coding context (s) . All the following bins of SE are coded as bypass coding. SE may be
[0482]
1) alf_ctb_flag
[0483]
2) sao_merge_left_flag
[0484]
3) sao_merge_up_flag
[0485]
4) sao_type_idx_luma
[0486]
5) sao_type_idx_chroma
[0487]
6) split_cu_flag
[0488]
7) split_qt_flag
[0489]
8) mtt_split_cu_vertical_flag
[0490]
9) mtt_split_cu_binary_flag
[0491]
10) cu_skip_flag
[0492]
11) pred_mode_ibc_flag
[0493]
12) pred_mode_flag
[0494]
13) intra_luma_ref_idx
[0495]
14) intra_subpartitions_mode_flag
[0496]
15) intra_subpartition_split_flag
[0497]
16) intra_luma_mpm_flag
[0498]
17) intra_chroma_pred_mode
[0499]
18) merge_flag
[0500]
19) inter_pred_idc
[0501]
20) inter_affine_flag
[0502]
21) cu_affine_type_flag
[0503]
22) ref_idx_l0
[0504]
23) mvp_l0_flag
[0505]
24) ref_idx_l1
[0506]
25) mvp_l1_flag
[0507]
26) avmr_flag
[0508]
27) amvr_precision_flag
[0509]
28) gbi_idx
[0510]
29) cu_cbf
[0511]
30) cu_sbt_flag
[0512]
31) cu_sbt_quad_flag
[0513]
32) cu_sbt_horizontal_flag
[0514]
33) cu_sbt_pos_flag
[0515]
34) mmvd_flag
[0516]
35) mmvd_merge_flag
[0517]
36) mmvd_distance_idx
[0518]
37) ciip_flag
[0519]
38) ciip_luma_mpm_flag
[0520]
39) merge_subblock_flag
[0521]
40) merge_subblock_idx
[0522]
41) merge_triangle_flag
[0523]
42) merge_triangle_idx0
[0524]
43) merge_triangle_idx1
[0525]
44) merge_idx
[0526]
45) abs_mvd_greater0_flag
[0527]
46) abs_mvd_greater1_flag
[0528]
47) tu_cbf_luma
[0529]
48) tu_cbf_cb
[0530]
49) tu_cbf_cr
[0531]
50) cu_qp_delta_abs
[0532]
51) transform_skip_flag
[0533]
52) tu_mts_idx
[0534]
53) last_sig_coeff_x_prefix
[0535]
54) last_sig_coeff_y_prefix
[0536]
55) coded_sub_block_flag
[0537]
56) sig_coeff_flag
[0538]
57) par_level_flag
[0539]
58) abs_level_gt1_flag
[0540]
59) abs_level_gt3_flag
[0541]
c. Alternatively, furthermore, if a syntax element SE is a binary value (i.e., it could be only either equal to 0 or 1) , it may be context coded.
[0542]
i. Alternatively, furthermore, if a syntax element SE is a binary value (i.e., it could be only either equal to 0 or 1) , it may be bypass coded.
[0543]
d. Alternatively, furthermore, only 1 context may be used for coding the first bin.
[0544]
22. The precision of motion vector prediction (MVP) or motion vector difference (MVD) , or the reconstructed motion vector (MV) may be changed depending on the motion precision which may be signaled.
[0545]
a.In one example MVP = MVP<<s if the original prediction of MVP is lower (or not higher) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0546]
i. Alternatively, MVD = MVD<<s if the original precision of MVD is lower (or not higher) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0547]
ii. Alternatively, MV = MV<<s if the original precision of MV is lower (or not higher) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0548]
b. In one example MVP = Shift (MVP, s) if the original prediction of MVP is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0549]
i. Alternatively, MVD = Shift (MVD, s) if the original precision of MVD is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0550]
ii. Alternatively, MV = Shift (MV, s) if the original precision of MV is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0551]
c. In one example MVP = SatShift (MVP, s) if the original prediction of MVP is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0552]
i. Alternatively, MVD = SatShift (MVD, s) if the original precision of MVD is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0553]
ii. Alternatively, MV = SatShift (MV, s) if the original precision of MV is higher (or not lower) than the target precision. s is an integer, which may depend on the difference between the original precision and the target precision.
[0554]
d. The above methods disclosed may be applied when the current block is not coded with affine modes.
[0555]
e. The above methods disclosed may be applied when the current block is coded with affine modes.
[0556]
6. Embodiments
[0557]
Parts indicated in bolded, italicized, underlined font show the modified specification.
[0558]
6.1 Embodiment 1: Indication of usage of affine AMVR mode
[0559]
It may be signaled in SPS/PPS/VPS/APS/sequence header/picture header/tile group header, etc. al. This section presents the signalling in SPS.
[0560]
6.1.1 SPS syntax table
[0561]
[0562]
An alternative SPS syntax table is given as follows:
[0563]
[0564]
[0565]
Semantics:
[0566]
sps_affine_amvr_enabled_flag equal to 1 specifies that adaptive motion vector difference resolution is used in motion vector coding of affine inter mode. amvr_enabled_flag equal to 0 specifies that adaptive motion vector difference resolution is not used in motion vector coding of affine inter mode.
[0567]
6.2 Parsing process of Affine AMVR mode information
[0568]
Syntax of the affine AMVR mode information may reuse that for the AMVR mode information (applied to normal inter mode) . Alternatively, different syntax elements may be utilized.
[0569]
Affine AMVR mode information may be conditionally signaled. Different embodiments below show some examples of the conditions.
[0570]
6.2.1 Embodiment #1: CU syntax table
[0571]
[0572]
[0573]
[0574]
6.2.2 Embodiment 2: An alternative CU syntax table design
[0575]
[0576]
[0577]
[0578]
[0579]
6.2.3 Embodiment 3: A thirdCU syntax table design
[0580]
[0581]
[0582]
[0583]
6.2.4 Embodiment 4: syntax table design with different syntax for AMVR and affine AMVR mode
[0584]
[0585]
[0586]
[0587]
●In one example, conditionsA is defined as follows:
[0588]
(sps_affine_amvr_enabled_flag && inter_affine_flag == 1 &&
[0589]
(MvdCpL0 [x0] [y0] [0] [0] ! = 0 || MvdCpL0 [x0] [y0] [0] [1] ! = 0 ||
[0590]
MvdCpL1 [x0] [y0] [0] [0] ! = 0 || MvdCpL1 [x0] [y0] [0] [1] ! = 0 ||
[0591]
MvdCpL0 [x0] [y0] [1] [0] ! = 0 || MvdCpL0 [x0] [y0] [1] [1] ! = 0 ||
[0592]
MvdCpL1 [x0] [y0] [1] [0] ! = 0 || MvdCpL1 [x0] [y0] [1] [1] ! = 0 ||
[0593]
MvdCpL0 [x0] [y0] [2] [0] ! = 0 || MvdCpL0 [x0] [y0] [2] [1] ! = 0 ||
[0594]
MvdCpL1 [x0] [y0] [2] [0] ! = 0 || MvdCpL1 [x0] [y0] [2] [1] ! = 0) )
[0595]
Alternatively, conditionsA is defined as follows:
[0596]
(sps_affine_amvr_enabled_flag && inter_affine_flag == 1 &&
[0597]
(MvdCpL0 [x0] [y0] [0] [0] ! = 0 || MvdCpL0 [x0] [y0] [0] [1] ! = 0 ||
[0598]
MvdCpL1 [x0] [y0] [0] [0] ! = 0 || MvdCpL1 [x0] [y0] [0] [1] ! = 0 ||)
[0599]
Alternatively, conditionsA is defined as follows:
[0600]
(sps_affine_amvr_enabled_flag && inter_affine_flag == 1 &&
[0601]
(MvdCpLX [x0] [y0] [0] [0] ! = 0 || MvdCpLX [x0] [y0] [0] [1] ! = 0)
[0602]
wherein X is being 0 or 1.
[0603]
Alternatively, conditionsA is defined as follows:
[0604]
(sps_affine_amvr_enabled_flag && inter_affine_flag == 1)
[0605]
● In one example, conditionsB is defined as follows:
[0606]
! sps_cpr_enabled_flag || ! (inter_pred_idc [x0] [y0] == PRED_L0 &&
[0607]
ref_idx_l0 [x0] [y0] == num_ref_idx_l0_active_minus1)
[0608]
Alternatively, conditionsB is defined as follows:
[0609]
! sps_cpr_enabled_flag || ! (pred_mode [x0] [y0] == CPR) .
[0610]
Alternatively, conditionsB is defined as follows:
[0611]
! sps_ibc_enabled_flag || ! (pred_mode [x0] [y0] == IBC) .
[0612]
When different syntax elements are utilized to code AMVR or Affine AMVR, the context modeling and/or contexts used for the embodiments in 6.5 which are applied to Affine AMVR may be applied accordingly.
[0613]
6.2.5 Semantics
[0614]
amvr_flag [x0] [y0] specifies the resolution of motion vector difference. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. amvr_flag [x0] [y0] equal to 0 specifies that the resolution of the motion vector difference is 1/4 of a luma sample. amvr_flag [x0] [y0] equal to 1 specifies that the resolution of the motion vector difference is further specified by amvr_coarse_precisoin_flag [x0] [y0] .
[0615]
When amvr_flag [x0] [y0] is not present, it is inferred as follows:
[0616]
– If sps_cpr_enabled_flag is equal to 1, amvr_flag [x0] [y0] is inferred to be equal to 1.
[0617]
– Otherwise (sps_cpr_enabled_flag is equal to 0) , amvr_flag [x0] [y0] is inferred to be equal to 0.
[0618]
amvr_coarse_precisoin_flag [x0] [y0] equal to 1 specifies that the resolution of the motion vector difference is four luma samples when inter_affine_flag is equal to 0, and 1 luma samples when inter affine flag is equal to 1. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0619]
When amvr_coarse_precisoin_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[0620]
If inter affine flag [x0] [y0] is equal to 0, the variable MvShift is set equal to (amvr_flag [x0] [y0] +amvr_coarse_precisoin_flag [x0] [y0] ) <<1 and the variables MvdL0 [x0] [y0] [0] , MvdL0 [x0] [y0] [1] , MvdL1 [x0] [y0] [0] , MvdL1 [x0] [y0] [1] are modified as follows:
[0621]
MvdL0 [x0] [y0] [0] = MvdL0 [x0] [y0] [0] << (MvShift+2) (7-70)
[0622]
MvdL0 [x0] [y0] [1] = MvdL0 [x0] [y0] [1] << (MvShift+2) (7-71)
[0623]
MvdL1 [x0] [y0] [0] = MvdL1 [x0] [y0] [0] << (MvShift+2) (7-72)
[0624]
MvdL1 [x0] [y0] [1] = MvdL1 [x0] [y0] [1] << (MvShift+2) (7-73)
[0625]
If inter affine flag [x0] [y0] is equal to 1, the variable MvShift is set equal to (amvr coarse precisoin_flag ? (amvr_coarse_precisoin_flag << 1) : (- (amvr_flag << 1) ) ) and the variables MvdCpL0 [x0] [y0] [0] [0] , MvdCpL0 [x0] [y0] [0] [1] , MvdCpL0 [x0] [y0] [1] [0] , MvdCpL0 [x0] [y0] [1] [1] , MvdCpL0 [x0] [y0] [2] [0] , MvdCpL0 [x0] [y0] [2] [1] are modified as follows:
[0626]
MvdCpL0 [x0] [y0] [0] [0] = MvdCpL0 [x0] [y0] [0] [0] << (MvShift + 2) (7-73)
[0627]
MvdCpL1 [x0] [y0] [0] [1] = MvdCpL1 [x0] [y0] [0] [1] << (MvShift + 2) (7-67)
[0628]
MvdCpL0 [x0] [y0] [1] [0] =MvdCpL0 [x0] [y0] [1] [0] << (MvShift + 2) (7-66)
[0629]
MvdCpL1 [x0] [y0] [1] [1] = MvdCpL1 [x0] [y0] [1] [1] << (MvShift+2) (7-67)
[0630]
MvdCpL0 [x0] [y0] [2] [0] = MvdCpL0 [x0] [y0] [2] [0] << (MvShift+2) (7-66)
[0631]
MvdCpL1 [x0] [y0] [2] [1] = MvdCpL1 [x0] [y0] [2] [1] << (MvShift+2) (7-67)
[0632]
Alternativley, if inter_affine_flag [x0] [y0] is equal to 1, the variable MvShift is set equal to (affine_amvr_coarse_precisoin_flag ? (affine_amvr_coarse_precisoin_flag << 1) : (- (affi ne_amvr_flag <<1) ) ) .
[0633]
6.3 Rounding process for motion vectors
[0634]
The rounding process is modified that when the given rightShift value is equal to 0 (which happens for 1/16-pel precision) , the rounding offset is set to 0 instead of (1 << (rightShift-1) ) .
[0635]
For example, the sub-clause of rounding process for MVs is modified as follows:
[0636]
Inputs to this process are:
[0637]
– the motion vector mvX,
[0638]
– the right shift parameter rightShift for rounding,
[0639]
– the left shift parameter leftShift for resolution increase.
[0640]
Output of this process is the rounded motion vector mvX.
[0641]
For the rounding of mvX, the following applies:
[0642]
offset= (rightShift == 0) ? 0 : (1 << (rightShift-1) ) (8-371)
[0643]
mvX [0] = (mvX [0] >= 0? (mvX [0] +offset) >> rightShift:
[0644]
- ( (-mvX [0] +offset) >> rightShift) ) << leftShift (8-372)
[0645]
mvX [1] = (mvX [1] >= 0? (mvX [1] +offset) >> rightShift:
[0646]
- ( (-mvX [1] +offset) >> rightShift) ) << leftShift (8-373)
[0647]
6.4 Decoding process
[0648]
The rounding process invoked in the affine motion vector derivation process are performed with the input of (MvShift + 2) instead of being fixed to be 2.
[0649]
Derivation process for luma affine control point motion vector predictors
[0650]
Inputs to this process are:
[0651]
– a luma location (xCb, yCb) of the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture,
[0652]
– two variables cbWidth and cbHeight specifying the width and the height of the current luma coding block,
[0653]
– the reference index of the current coding unit refIdxLX, with X being 0 or 1,
[0654]
– the number of control point motion vectors numCpMv.
[0655]
Output of this process are the luma affine control point motion vector predictors mvpCpLX [cpIdx] with X being 0 or 1, and cpIdx=0.. numCpMv-1.
[0656]
For the derivation of the control point motion vectors predictor candidate list, cpMvpListLX with X being 0 or 1, the following ordered steps apply:
[0657]
The number of control point motion vector predictor candidates in the list numCpMvpCandLX is set equal to 0.
[0658]
The variables availableFlagA and availableFlagB are both set equal to FALSE.
[0659]
[0660]
The rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvpLX [cpIdx] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift+2) as inputs and the rounded cpMvpLX [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0661]
[0662]
The variable availableFlagA is set equal to TRUE
[0663]
The derivation process for luma affine control point motion vectors from a neighbouring block as specified in clause 8.4.4.5 is invoked with the luma coding block location (xCb, yCb) , the luma coding block width and height (cbWidth, cbHeight) , the neighbouring luma coding block location (xNb, yNb) , the neighbouring luma coding block width and height (nbW, nbH) , and the number of control point motion vectors numCpMv as input, the control point motion vector predictor candidates cpMvpLY [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0664]
The rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvpLY [cpIdx] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvpLY [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0665]
[0666]
The derivation process for luma affine control point motion vectors from a neighbouring block as specified in clause 8.4.4.5 is invoked with the luma coding block location (xCb, yCb) , the luma coding block width and height (cbWidth, cbHeight) , the neighbouring luma coding block location (xNb, yNb) , the neighbouring luma coding block width and height (nbW, nbH) , and the number of control point motion vectors numCpMv as input, the control point motion vector predictor candidates cpMvpLX [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0667]
The rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvpLX [cpIdx] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvpLX [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0668]
The following assignments are made:
[0669]
cpMvpListLX [numCpMvpCandLX] [0] =cpMvpLX [0] (8-618)
[0670]
cpMvpListLX [numCpMvpCandLX] [1] =cpMvpLX [1] (8-619)
[0671]
cpMvpListLX [numCpMvpCandLX] [2] =cpMvpLX [2] (8-620)
[0672]
numCpMvpCandLX=numCpMvpCandLX+1 (8-621)
[0673]
Otherwise if PredFlagLY [xNbBk] [yNbBk] (with Y=! X) is equal to 1 and DiffPicOrderCnt (RefPicListY [RefIdxLY [xNbBk] [yNbBk] ] , RefPicListX [refIdxLX] ) is equal to 0, the following applies:
[0674]
The variable availableFlagB is set equal to TRUE
[0675]
The derivation process for luma affine control point motion vectors from a neighbouring block as specified in clause 8.4.4.5 is invoked with the luma coding block location (xCb, yCb) , the luma coding block width and height (cbWidth, cbHeight) , the neighbouring luma coding block location (xNb, yNb) , the neighbouring luma coding block width and height (nbW, nbH) , and the number of control point motion vectors numCpMv as input, the control point motion vector predictor candidates cpMvpLY [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0676]
The rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvpLY [cpIdx] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvpLY [cpIdx] with cpIdx=0.. numCpMv-1 as output.
[0677]
The following assignments are made:
[0678]
cpMvpListLX [numCpMvpCandLX] [0] =cpMvpLY [0] (8-622)
[0679]
cpMvpListLX [numCpMvpCandLX] [1] =cpMvpLY [1] (8-623)
[0680]
cpMvpListLX [numCpMvpCandLX] [2] =cpMvpLY [2] (8-624)
[0681]
numCpMvpCandLX=numCpMvpCandLX+1 (8-625)
[0682]
When numCpMvpCandLX is less than 2, the following applies
[0683]
The derivation process for constructed affine control point motion vector prediction candidate as specified in clause 8.4.4.8 is invoked with the luma coding block location (xCb, yCb) , the luma coding block width cbWidth, the luma coding block height cbHeight, and the reference index of the current coding unit refIdxLX as inputs, and the availability flag availableConsFlagLX, the availability flags availableFlagLX [cpIdx] and cpMvpLX [cpIdx] with cpIdx=0.. numCpMv-1 as outputs.
[0684]
When availableConsFlagLX is equal to 1, and numCpMvpCandLX is equal to 0, the following assignments are made:
[0685]
cpMvpListLX [numCpMvpCandLX] [0] =cpMvpLX [0] (8-626)
[0686]
cpMvpListLX [numCpMvpCandLX] [1] =cpMvpLX [1] (8-627)
[0687]
cpMvpListLX [numCpMvpCandLX] [2] =cpMvpLX [2] (8-628)
[0688]
numCpMvpCandLX=numCpMvpCandLX+1 (8-629)
[0689]
The following applies for cpIdx=0.. numCpMv-1:
[0690]
When numCpMvpCandLX is less than 2 and availableFlagLX [cpIdx] is equal to 1, the following assignments are made:
[0691]
cpMvpListLX [numCpMvpCandLX] [0] =cpMvpLX [cpIdx] (8-630)
[0692]
cpMvpListLX [numCpMvpCandLX] [1] =cpMvpLX [cpIdx] (8-631)
[0693]
cpMvpListLX [numCpMvpCandLX] [2] =cpMvpLX [cpIdx] (8-632)
[0694]
numCpMvpCandLX=numCpMvpCandLX+1 (8-633)
[0695]
When numCpMvpCandLX is less than 2, the following applies:
[0696]
The derivation process for temporal luma motion vector prediction as specified in clause 8.4.2.11 is with the luma coding block location (xCb, yCb) , the luma coding block width cbWidth, the luma coding block height cbHeight and refIdxLX as inputs, and with the output being the availability flag availableFlagLXCol and the temporal motion vector predictor mvLXCol.
[0697]
When availableFlagLXCol is equal to 1, the following applies:
[0698]
The rounding process for motion vectors as specified in clause 8.4.2.14 is invoked the with mvX set equal to mvLXCol, rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded mvLXCol as output.
[0699]
The following assignments are made:
[0700]
cpMvpListLX [numCpMvpCandLX] [0] =mvLXCol (8-634)
[0701]
cpMvpListLX [numCpMvpCandLX] [1] =mvLXCol (8-635)
[0702]
cpMvpListLX [numCpMvpCandLX] [2] =mvLXCol (8-636)
[0703]
numCpMvpCandLX=numCpMvpCandLX+1 (8-637)
[0704]
When numCpMvpCandLX is less than 2, the following is repeated until numCpMvpCandLX is equal to 2, with mvZero [0] and mvZero [1] both being equal to 0:
[0705]
cpMvpListLX [numCpMvpCandLX] [0] =mvZero (8-638)
[0706]
cpMvpListLX [numCpMvpCandLX] [1] =mvZero (8-639)
[0707]
cpMvpListLX [numCpMvpCandLX] [2] =mvZero (8-640)
[0708]
numCpMvpCandLX=numCpMvpCandLX+1 (8-641)
[0709]
The affine control point motion vector predictor cpMvpLX with X being 0 or 1 is derived as follows:
[0710]
cpMvpLX = cpMvpListLX [mvp_lX_flag [xCb] [yCb] ] (8-642)
[0711]
Derivation process for constructed affine control point motion vector prediction candidates
[0712]
Inputs to this process are:
[0713]
– a luma location (xCb, yCb) specifying the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture,
[0714]
– two variables cbWidth and cbHeight specifying the width and the height of the current luma coding block,
[0715]
– the reference index of the current prediction unit partition refIdxLX, with X being 0 or 1, Output of this process are:
[0716]
– the availability flag of the constructed affine control point motion vector prediction candidiates availableConsFlagLX with X being 0 or 1,
[0717]
– the availability flags availableFlagLX [cpIdx] with cpIdx=0.. 2 and X being 0 or 1,
[0718]
– the constructed affine control point motion vector prediction candidiates cpMvLX [cpIdx] with cpIdx=0.. numCpMv-1 and X being 0 or 1.
[0719]
The first (top-left) control point motion vector cpMvLX [0] and the availability flag availableFlagLX [0] are derived in the following ordered steps:
[0720]
The sample locations (xNbB2, yNbB2) , (xNbB3, yNbB3) and (xNbA2, yNbA2) are set equal to (xCb-1, yCb-1) , (xCb, yCb-1) and (xCb-1, yCb) , respectively.
[0721]
The availability flag availableFlagLX [0] is set equal to 0 and both components of cpMvLX [0] are set equal to 0.
[0722]
The following applies for (xNbTL, yNbTL) withTL being replaced by B2, B3, and A2:
[0723]
The availability derivation process for a coding block as specified in clause is invoked with the luma coding block location (xCb, yCb) , the luma coding block width cbWidth, the luma coding block height cbHeight, the luma location (xNbY, yNbY) set equal to (xNbTL, yNbTL) as inputs, and the output is assigned to the coding block availability flag availableTL.
[0724]
When availableTL is equal to TRUE and availableFlagLX [0] is equal to 0, the following applies:
[0725]
If PredFlagLX [xNbTL] [yNbTL] is equal to 1, and
[0726]
DiffPicOrderCnt (RefPicListX [RefIdxLX [xNbTL] [yNbTL] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLX [xNbTL] [yNbTL] is not the current picture, availableFlagLX [0] is set equal to 1 and the following assignments are made:
[0727]
cpMvLX [0] = MvLX [xNbTL] [yNbTL] (8-643)
[0728]
Otherwise, when PredFlagLY [xNbTL] [yNbTL] (with Y=! X) is equal to 1 and
[0729]
DiffPicOrderCnt (RefPicListY [RefIdxLY [xNbTL] [yNbTL] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLY [xNbTL] [yNbTL] is not the current picture, availableFlagLX [0] is set equal to 1 and the following assignments are made:
[0730]
cpMvLX [0] = MvLY [xNbTL] [yNbTL] (8-644)
[0731]
When availableFlagLX [0] is equal to 1, the rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX [0] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvLX [0] as output.
[0732]
The second (top-right) control point motion vector cpMvLX [1] and the availability flag availableFlagLX [1] are derived in the following ordered steps:
[0733]
The sample locations (xNbB1, yNbB1) and (xNbB0, yNbB0) are set equal to (xCb+cbWidth-1, yCb-1) and (xCb+cbWidth, yCb-1) , respectively.
[0734]
The availability flag availableFlagLX [1] is set equal to 0 and both components of cpMvLX [1] are set equal to 0.
[0735]
The following applies for (xNbTR, yNbTR) withTR being replaced by B1 and B0:
[0736]
The availability derivation process for a coding block as specified in clause 6.4. X is invoked with the luma coding block location (xCb, yCb) , the luma coding block width cbWidth, the luma coding block height cbHeight, the luma location (xNbY, yNbY) set equal to (xNbTR, yNbTR) as inputs, and the output is assigned to the coding block availability flag availableTR.
[0737]
When availableTR is equal to TRUE and availableFlagLX [1] is equal to 0, the following applies:
[0738]
If PredFlagLX [xNbTR] [yNbTR] is equal to 1, and
[0739]
DiffPicOrderCnt (RefPicListX [RefIdxLX [xNbTR] [yNbTR] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLX [xNbTR] [yNbTR] is not the current picture, availableFlagLX [1] is set equal to 1 and the following assignments are made:
[0740]
cpMvLX [1] = MvLX [xNbTR] [yNbTR] (8-645)
[0741]
Otherwise, when PredFlagLY [xNbTR] [yNbTR] (with Y=! X) is equal to 1 and
[0742]
DiffPicOrderCnt (RefPicListY [RefIdxLY [xNbTR] [yNbTR] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLY [xNbTR] [yNbTR] is not the current picture, availableFlagLX [1] is set equal to 1 and the following assignments are made:
[0743]
cpMvLX [1] = MvLY [xNbTR] [yNbTR] (8-646)
[0744]
When availableFlagLX [1] is equal to 1, the rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX [1] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvLX [1] as output.
[0745]
The third (bottom-left) control point motion vector cpMvLX [2] and the availability flag availableFlagLX [2] are derived in the following ordered steps:
[0746]
The sample locations (xNbA1, yNbA1) and (xNbA0, yNbA0) are set equal to (xCb-1, yCb+cbHeight-1) and (xCb-1, yCb+cbHeight) , respectively.
[0747]
The availability flag availableFlagLX [2] is set equal to 0 and both components of cpMvLX [2] are set equal to 0.
[0748]
The following applies for (xNbBL, yNbBL) with BL being replaced by A1 and A0:
[0749]
The availability derivation process for a coding block as specified in clause 6.4. X invoked with the luma coding block location (xCb, yCb) , the luma coding block width cbWidth, the luma coding block height cbHeight, the luma location (xNbY, yNbY) set equal to (xNbBL, yNbBL) as inputs, and the output is assigned to the coding block availability flag availableBL.
[0750]
When availableBL is equal to TRUE and availableFlagLX [2] is equal to 0, the following applies:
[0751]
If PredFlagLX [xNbBL] [yNbBL] is equal to 1, and
[0752]
DiffPicOrderCnt (RefPicListX [RefIdxLX [xNbBL] [yNbBL] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLY [xNbBL] [yNbBL] is not the current picture, availableFlagLX [2] is set equal to 1 and the following assignments are made:
[0753]
cpMvLX [2] = MvLX [xNbBL] [yNbBL] (8-647)
[0754]
Otherwise, when PredFlagLY [xNbBL] [yNbBL] (with Y=! X) is equal to 1 and
[0755]
DiffPicOrderCnt (RefPicListY [RefIdxLY [xNbBL] [yNbBL] ] , RefPicListX [refIdxLX] ) is equal to 0, and the reference picture corresponding to RefIdxLY [xNbBL] [yNbBL] is not the current picture, availableFlagLX [2] is set equal to 1 and the following assignments are made:
[0756]
cpMvLX [2] = MvLY [xNbBL] [yNbBL] (8-648)
[0757]
When availableFlagLX [2] is equal to 1, the rounding process for motion vectors as specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX [2] , rightShift set equal to (MvShift + 2) , and leftShift set equal to (MvShift + 2) as inputs and the rounded cpMvLX [2] as output.
[0758]
6.5 Context modeling
[0759]
Assignment of ctxInc to syntax elements with context coded bins:
[0760]
[0761]
Specification of ctxInc using left and above syntax elements:
[0762]
In one example, context increasement offset ctxInc = (condL && availableL) + (condA && availableA) + ctxSetIdx*3.
[0763]
Alternatively, ctxInc = ( (condL && availableL) || (condA && availableA) ) + ctxSetIdx*3.
[0764]
ctxInc = (condL && availableL) + M* (condA && availableA) + ctxSetIdx*3. (e.g., M=2)
[0765]
ctxInc = M* (condL && availableL) + (condA && availableA) + ctxSetIdx*3. (e.g., M=2)
[0766]
[0767]
Values of initValue for ctxIdx of amvr_flag:
[0768]
Different contexts are used when current block is affine or non-affine.
[0769]
[0770]
Alternatively,
[0771]
[0772]
Alternatively, same contexts may be used when current block is affine or non-affine.
[0773]
[0774]
Alternatively, amvr_flag is bypass coded.
[0775]
Values of initValue for ctxIdx of amvr_coarse_precisoin_flag:
[0776]
Different contexts are used when current block is affine or non-affine.
[0777]
[0778]
Alternatively,
[0779]
[0780]
[0781]
Alternatively, same contexts may be used when current block is affine or non-affine.
[0782]
[0783]
Alternatively, amvr_coarse_precisoin_flag is bypass coded.
[0784]
The examples described above may be incorporated in the context of the method described below, e.g., method 2500, which may be implemented at a video decoder or a video encoder.
[0785]
FIG. 25 shows a flowchart of an exemplary method for video decoding. The method 2500 includes, at step 2510, making a determination of using (a) multiple motion vector difference (MVD) precisions or (b) adaptive motion vector difference resolution (AMVR) for affine coding of a current video block, and, at step 2520, performing, based on the determination, a conversion between the current video block and a bitstream representation of the current video block.
[0786]
The method 2500 includes, at step 2520, performing, based on the final motion vector, a conversion between the bitstream representation and the current block, which is coded using an affine inter mode or a normal inter mode with support for an adaptive motion vector resolution (AMVR) process. In some embodiments, the conversion generates the current block from the bitstream representation (e.g., as might be implemented in a video decoder) . In other embodiments, the conversion generates the bitstream representation from the current block (e.g., as might be implemented in a video encoder) .
[0787]
In some embodiments, and in the context of Example 1, a precision of the final motion vector is identical to a precision of a stored motion vector of the current block. In one example, the precision of the final motion vector is 1/16-pel. In another example, the precision of the final motion vector is 1/8-pel.
[0788]
In some embodiments, and in the context of Example 2, the method 2500 further comprises the step of bypassing a scaling operation for the MVP upon determining that a precision of the MVD is fractional (e.g., a precision greater than 1-pel) . In other embodiments, the method 2500 further comprises the step of scaling the MVP upon determining that a precision of the MVD is less than or equal to 1-pel.
[0789]
In some embodiments, and in the context of Example 5, the current block is coded using the affine inter mode, and a signaled syntax element is indicative of a precision of a motion vector or a precision of a motion vector difference. In one example, a value of 0, 1 or 2 for the signaled syntax element corresponds to the precision of the motion vector being 1/4-pel, 1/16-pel and 1-pel, respectively. In another example, a value of 0, 1 or 2 for the signaled syntax element corresponds to the precision of the motion vector being 1/4-pel, 1-pel and 1/16-pel, respectively. In yet another example, a value of 0, 1 or 2 for the signaled syntax element corresponds to the precision of the motion vector being 1/16-pel, 1/4-pel and 1-pel, respectively.
[0790]
In some embodiments, and in the context of Example 6, the AMVR process is enabled based on signaling in a sequence parameter set (SPS) , a picture parameter set (PPS) , a video parameter set (VPS) , a slice header, a tile header, a group of coding tree units (CTUs) , a coding unit (CU) , a prediction unit (PU) or a transform unit (TU) .
[0791]
In some embodiments, and in the context of Example 7, a set of allowed values for the precision of the motion vector or the precision of the motion vector difference is signaled in a sequence parameter set (SPS) , a picture parameter set (PPS) , a video parameter set (VPS) , a slice header, a tile header, a group of coding tree units (CTUs) , a coding unit (CU) , a prediction unit (PU) or a transform unit (TU) . In one example, the set of allowed values is signaled for each coding tree unit (CTU) of the current block. In another example, the set of allowed values is based on a coded mode or dimensions of the current block. In yet another example, the set of allowed values is based a slice type, a temporal layer index or a low delay check flag. In yet another example, the set of allowed values is based on a precision of a motion vector stored in a decoded picture buffer.
[0792]
In some implementations of the embodiments described above, the MVP may be based on a spatially or temporally neighboring block of the current block. In other implementations of the embodiments described above, the MVP may be a default MVP.
[0793]
7. Example Implementations of the Disclosed Technology
[0794]
FIG. 26 is a block diagram of a video processing apparatus 2600. The apparatus 2600 may be used to implement one or more of the methods described herein. The apparatus 2600 may be embodied in a smartphone, tablet, computer, Internet of Things (IoT) receiver, and so on. The apparatus 2600 may include one or more processors 2602, one or more memories 2604 and video processing hardware 2606. The processor (s) 2602 may be configured to implement one or more methods (including, but not limited to, method 2500) described in the present document. The memory (memories) 2604 may be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware 2606 may be used to implement, in hardware circuitry, some techniques described in the present document.
[0795]
In some embodiments, the video coding methods may be implemented using an apparatus that is implemented on a hardware platform as described with respect to FIG. 26.
[0796]
Various techniques and embodiments may be described using the following clause-based format.
[0797]
1. A method for video coding, comprising:
[0798]
making a determination of using (a) multiple motion vector difference (MVD) precisions or (b) adaptive motion vector difference resolution (AMVR) for affine coding of a current video block, and
[0799]
performing, based on the determination, a conversion between the current video block and a bitstream representation of the current video block.
[0800]
2. The method of clause 1, wherein the determination is made based on one or more syntax elements in the bitstream representation.
[0801]
3. The method of clause 2, wherein the one or more syntax elements are selectively included in the bitstream representation based on enabling the affine coding for the current video block.
[0802]
4. The method of any of clauses 1-3, wherein an MVD precision used for an affine inter mode is different from an MVD precision used for a normal inter mode coding.
[0803]
5. The method of any of clauses 2-4, wherein the one or more syntax elements are coded using context based coding.
[0804]
6. The method of clause 5, wherein different context models are used for affine inter coding and normal inter mode coding of the current video block.
[0805]
7. The method of clause 1, wherein the determination is made based on a first syntax element is included in the bitstream representation to indicate applicability of AMVR to the current video block that is affine coded.
[0806]
8. The method of clause 1, wherein the determination is to disable use of AMVR during the conversion of the current video block or wherein the determination is that a first syntax element is absent from the bitstream representation, and wherein the conversion uses a default motion vector or a default motion vector difference precision.
[0807]
9. The method of clause 8, wherein the default precision is 1/4th pixel.
[0808]
10. The method of clause 7, wherein the determination is made based on a second syntax element indicative of a precision of motion vector differencing.
[0809]
11. The method of clause 7, wherein the first syntax element is excluded from the bitstream representation in case that control point motion vectors of the current video block are zero.
[0810]
12. The method of any of clauses 1 to 11, wherein the AMVR comprises a first AMVR scheme in case that intra block copy is used during the conversion and a second, different, AMVR scheme in case that the intra block copy mode is not used during the conversion.
[0811]
13. The method of any of clauses 2 to 12, wherein the syntax elements are included at a slice level or a picture level, or sequence level.
[0812]
14. The method of any of clauses 1 to 13, wherein the conversion includes generating pixel values of the current video block from the bitstream representation or generating the bitstream representation from the current video block.
[0813]
15. An apparatus in a video system comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to implement the method in any one of clauses 1 to 14.
[0814]
16. A computer program product stored on a non-transitory computer readable media, the computer program product including program code for carrying out the method in any one of clauses 1 to 14.
[0815]
FIG. 27 shows an example of symmetrical mode.
[0816]
FIG. 28 is a block diagram showing an example video processing system 2800 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of the system 2800. The system 2800 may include input 2802 for receiving video content. The video content may be received in a raw or uncompressed format, e.g., 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. The input 2802 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interface include wired interfaces such as Ethernet, passive optical network (PON) , etc. and wireless interfaces such as Wi-Fi or cellular interfaces.
[0817]
The system 2800 may include a coding component 2804 that may implement the various coding or encoding methods described in the present document. The coding component 2804 may reduce the average bitrate of video from the input 2802 to the output of the coding component 2804 to produce a coded representation of the video. The coding techniques are therefore sometimes called video compression or video transcoding techniques. The output of the coding component 2804 may be either stored, or transmitted via a communication connected, as represented by the component 2806. The stored or communicated bitstream (or coded) representation of the video received at the input 2802 may be used by the component 2808 for generating pixel values or displayable video that is sent to a display interface 2810. The process of generating user-viewable video from the bitstream representation is sometimes called video decompression. Furthermore, while certain video processing operations are referred to as "coding" operations or tools, it will be appreciated that the coding tools or operations are used at an encoder and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.
[0818]
Examples of a peripheral bus interface or a display interface may include universal serial bus (USB) or high definition multimedia interface (HDMI) or Displayport, and so on. Examples of storage interfaces include SATA (serial advanced technology attachment) , PCI, IDE interface, and the like. The techniques described in the present document may be embodied in various electronic devices such as mobile phones, laptops, smartphones or other devices that are capable of performing digital data processing and/or video display.
[0819]
FIG. 29 shows a flowchart of an example method for video processing. Steps of this flowchart show an implementation of the embodiments discussed in Example 21 in Section 4 of this document. At step 2910, the process during a conversion between a current video block and a bitstream representation of the current video block, uses syntax elements composed of multiple bins for processing the current video block, wherein the syntax elements are selected according to a context model such that a first context model is applied for selecting a first bin of a first syntax element and a second context model is applied for selecting all bins excluding the first bin of the first syntax element
[0820]
FIG. 30 shows a flowchart of an example method for video processing. Steps of this flowchart show an implementation of the embodiments discussed in Example 22 in Section 4 of this document. At step 3010, the process makes a determination of using a precision from a precision set as a target precision of a motion vector (MVD) that is computed as a difference between a motion vector and a motion vector predictor (MVP) associated with a current video block. At step 3020, the process in response to detecting that the target precision is different from the precision of the MVP, converts the precision of the MVP to the target precision. At step 3030, the process generates a reconstructed motion vector using the MVP with the target precision and the MVD, during a normal inter mode or an affine inter mode coding of the current video block, wherein the reconstructed motion vector is used for processing of subsequent video blocks.
[0821]
FIG. 31 shows a flowchart of an example method for video processing. Steps of this flowchart show an implementation of the embodiments discussed in Example 22 in Section 4 of this document. At step 3110, the process during a conversion between a video block and a bitstream representation of the current video block, identifies that a precision of a motion vector predictor (MVP) associated with the current video block is different from a precision of a motion vector difference (MVD) that is computed as a difference between the MVP and a motion vector associated with the current video block. At step 3120, the process in response to the detecting, converts the precision of the MVD to the precision of the MVP. At step 3130, the process reconstructs the motion vector associated with the current video block using the precision of the MVP for processing subsequent video blocks.
[0822]
Some embodiments are now presented in clause-based format.
[0823]
A1. A method for visual media processing, comprising:
[0824]
during a conversion between a current video block and a bitstream representation of the current video block, using syntax elements composed of multiple bins for processing the current video block, wherein the syntax elements are selected according to a context model such that a first context model is applied for selecting a first bin of a first syntax element and a second context model is applied for selecting all bins excluding the first bin of the first syntax element.
[0825]
A2. The method of clause A1, wherein the first context model is arithmetic coding and the second context model is bypass coding.
[0826]
A3. The method of any one or more of clauses A1-A2, wherein the first syntax element is indicative of an adaptive motion vector difference resolution (AMVR) technique for affine coding of the current video block.
[0827]
A4. The method of any one or more of clauses A1-A2, wherein the multiple bins of the syntax elements are context-coded or bypass-coded.
[0828]
A5. The method of any one or more of clauses A1-A3, wherein, if the first syntax element is Binary-valued, then the first syntax element is context-coded.
[0829]
A6. The method of any one or more of clauses A1-A3, wherein, if the first syntax element is Binary-valued, the first syntax element is bypass-coded.
[0830]
A7. The method of any one or more of clauses A1-A5, wherein only one context model is used for context model based coding of the first bin of the first syntax element.
[0831]
A8. The method of any one or more of clauses A1-A5, wherein more than one context models are used for context model based coding of the first bin of the first syntax element.
[0832]
A9. The method of any one or more of clauses A1-A5, wherein the syntax elements are selectively included in the bitstream representation based on enabling an affine coding mode for the current video block.
[0833]
A10. The method of any one or more of clauses A1-A5, wherein multiple motion vector difference (MVD) precisions are applied on the current video block.
[0834]
A11. The method of clause A10, wherein an adaptive motion vector difference resolution (AMVR) is disabled for use during the conversion of the current video block or wherein the first syntax element is absent from the bitstream representation, and wherein the conversion uses a default motion vector or a default motion vector difference precision.
[0835]
B1. A method for visual media processing, comprising:
[0836]
making a determination of using a precision from a precision set as a target precision of a motion vector (MVD) that is computed as a difference between a motion vector and a motion vector predictor (MVP) associated with a current video block;
[0837]
in response to detecting that the target precision is different from the precision of the MVP, converting the precision of the MVP to the target precision; and
[0838]
generating a reconstructed motion vector using the MVP with the target precision and the MVD, during a normal inter mode or an affine inter mode coding of the current video block, wherein the reconstructed motion vector is used for processing of subsequent video blocks.
[0839]
B2. The method of clause B1, wherein the reconstructed motion vector has a same precision as the MVP with the target precision.
[0840]
B3. The method of clause B2, further comprising:
[0841]
converting a precision of the reconstructed motion vector from the target precision to a precision of 1/N-luma samples, where N is an integer.
[0842]
B4. The method of clause B3, wherein N equals 16.
[0843]
B5. The method of any of clauses B1-B4, wherein an MVD precision set used for the affine inter mode is different from an MVD precision set used for the normal inter mode.
[0844]
B6. The method of clause B1, wherein a default precision of the MVP and/or the MVD and/or the reconstructed motion vector are associated with a reference picture.
[0845]
B7. The method of any one or more of clauses B1-B5, wherein the target precision is indicated in a bitstream representation associated with a conversion between the current video block and visual media data.
[0846]
B8. The method of any one or more of clauses B1-B7, wherein converting the precision of the MVP to the target precision includes a bit-shifting operation by an integer number of bits.
[0847]
B9. The method of clause B8, wherein the integer number of bits corresponds to a difference between the precision of the MVP and the target precision.
[0848]
B10. The method of clause B8, wherein the integer number of bits corresponds to a difference between the precision of 1/N-luma samples and the target precision.
[0849]
B11. The method of any one or more of clauses B1-B7, wherein the target precision of the MVD is less than or equal to a precision of the motion vector.
[0850]
B12. The method of any one or more of clauses B1-B7, wherein converting the precision of the MVP to the target precision includes a bit-shifting operation expressed as SatShift (MVP, s) where SatShift (MVP, s) is defined as
[0851]
[0852]
where s corresponds to a difference between the precision of the MVP and the target precision, offset0 and/or offset1 are set to (1<<n) >>1 and/or (1<< (n-1) ) and/or zero.
[0853]
B13. The method of any one or more of clauses B1-B7, wherein converting the precision of the MVP to the target precision includes a bit-shifting operation expressed as Shift (MVP, s) where Shift (MVP, s) is defined as
[0854]
Shift (x, n) = (x + offset0) >> n
[0855]
where s corresponds to a difference between the precision of the MVP and the target precision, offset0 and/or offset1 are set to (1<<n) >>1 and/or (1<< (n-1) ) and/or zero.
[0856]
B14. The method of clause B3, wherein converting the precision of the reconstructed motion vector from the target precision to the precision of 1/N-luma samples includes a left bit-shifting operation by an integer number of bits.
[0857]
B15. The method of clause B13, wherein the target precision is less than or equal to a precision of 1/N-luma samples.
[0858]
C1. A method for visual media processing, comprising:
[0859]
during a conversion between a video block and a bitstream representation of the current video block, identifying that a precision of a motion vector predictor (MVP) associated with the current video block is different from a precision of a motion vector difference (MVD) that is computed as a difference between the MVP and a motion vector associated with the current video block;
[0860]
in response to the detecting, converting the precision of the MVD to the precision of the MVP; and
[0861]
reconstructing the motion vector associated with the current video block using the precision of the MVP for processing subsequent video blocks.
[0862]
C2. The method of clause C1, wherein reconstructing the motion vector results in a reconstructed motion vector that has a precision of 1/N-luma samples, where N is an integer.
[0863]
C3. The method of clause C2, wherein N equals 16.
[0864]
D1. A video encoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses A1-C3.
[0865]
D2. A video decoder apparatus comprising a processor configured to implement a method recited in any one or more of clauses A1-C3.
[0866]
D3. A computer readable medium having code stored thereon, the code embodying processor-executable instructions for implementing a method recited in any of or more of clauses A1-C3.
[0867]
Descriptions of various syntax elements (also discussed in the VVC standard drafts JVET-M1001-v7 and JVET-Q2001-v1) referred in this document are discussed below.
[0868]
alf_ctb_flag
[0869]
alf_ctb_flag [cIdx] [xCtb>>Log2CtbSize] [yCtb>>Log2CtbSize] equal to 1 specifies that the adaptive loop filter is applied to the coding tree block of the colour component indicated by cIdx of the coding tree unit at luma location (xCtb, yCtb) . alf_ctb_flag [cIdx] [xCtb>>Log2CtbSize] [yCtb>>Log2CtbSize] equal to 0 specifies that the adaptive loop filter is not applied to the coding tree block of the colour component indicated by cIdx of the coding tree unit at luma location (xCtb, yCtb) .
[0870]
When alf_ctb_flag [cIdx] [xCtb>>Log2CtbSize] [yCtb>>Log2CtbSize] is not present, it is inferred to be equal to 0.
[0871]
sao_merge_left_flag
[0872]
sao_merge_left_flag equal to 1 specifies that the syntax elements sao_type_idx_luma, sao_type_idx_chroma, sao_band_position, sao_eo_class_luma, sao_eo_class_chroma, sao_offset_abs and sao_offset_sign are derived from the corresponding syntax elements of the left CTB. sao_merge_left_flag equal to 0 specifies that these syntax elements are not derived from the corresponding syntax elements of the left CTB. When sao_merge_left_flag is not present, it is inferred to be equal to 0.
[0873]
sao_merge_up_flag
[0874]
sao_merge_up_flag equal to 1 specifies that the syntax elements sao_type_idx_luma, sao_type_idx_chroma, sao_band_position, sao_eo_class_luma, sao_eo_class_chroma, sao_offset_abs and sao_offset_sign are derived from the corresponding syntax elements of the above CTB. sao_merge_up_flag equal to 0 specifies that these syntax elements are not derived from the corresponding syntax elements of the above CTB. When sao_merge_up_flag is not present, it is inferred to be equal to 0.
[0875]
sao_type_idx_luma
[0876]
sao_type_idx_luma specifies the offset type for the luma component. The array SaoTypeIdx [cIdx] [rx] [ry] specifies the offset type as specified in SAO offset type table for the CTB at the location (rx, ry) for the colour component cIdx. The value of SaoTypeIdx [0] [rx] [ry] is derived as follows:
[0877]
– If sao_type_idx_luma is present, SaoTypeIdx [0] [rx] [ry] is set equal to sao_type_idx_luma.
[0878]
– Otherwise (sao_type_idx_luma is not present) , SaoTypeIdx [0] [rx] [ry] is derived as follows:
[0879]
– If sao_merge_left_flag is equal to 1, SaoTypeIdx [0] [rx] [ry] is set equal to SaoTypeIdx [0] [rx-1] [ry] .
[0880]
– Otherwise, if sao_merge_up_flag is equal to 1, SaoTypeIdx [0] [rx] [ry] is set equal to SaoTypeIdx [0] [rx] [ry-1] .
[0881]
– Otherwise, SaoTypeIdx [0] [rx] [ry] is set equal to 0.
[0882]
SAO Offset Type Table
[0883]
[0884]
sao_type_idx_chroma
[0885]
sao_type_idx_chroma specifies the offset type for the chroma components. The values of SaoTypeIdx [cIdx] [rx] [ry] are derived as follows for cIdx equal to 1.. 2:
[0886]
– If sao_type_idx_chroma is present, SaoTypeIdx [cIdx] [rx] [ry] is set equal to sao_type_idx_chroma.
[0887]
– Otherwise (sao_type_idx_chroma is not present) , SaoTypeIdx [cIdx] [rx] [ry] is derived as follows:
[0888]
– If sao_merge_left_flag is equal to 1, SaoTypeIdx [cIdx] [rx] [ry] is set equal to SaoTypeIdx [cIdx] [rx-1] [ry] .
[0889]
– Otherwise, if sao_merge_up_flag is equal to 1, SaoTypeIdx [cIdx] [rx] [ry] is set equal to SaoTypeIdx [cIdx] [rx] [ry-1] .
[0890]
– Otherwise, SaoTypeIdx [cIdx] [rx] [ry] is set equal to 0.
[0891]
split_cu_flag
[0892]
split_cu_flag equal to 0 specifies that a coding unit is not split. split_cu_flag equal to 1 specifies that a coding unit is split into four coding units using a quad split as indicated by the syntax element split_qt_flag, or into two coding units using a binary split or into three coding units using a ternary split as indicated by the syntax element mtt_split_cu_binary_flag. The binary or ternary split can be either vertical or horizontal as indicated by the syntax element mtt_split_cu_vertical_flag.
[0893]
When split_cu_flag is not present, the value of split_cu_flag is inferred as follows:
[0894]
– If one or more of the following conditions are true, the value of split_cu_flag is inferred to be equal to 1:
[0895]
– x0 + cbWidth is greater than pic_width_in_luma_samples.
[0896]
– y0 + cbHeight is greater than pic_height_in_luma_samples.
[0897]
– Otherwise, the value of split_cu_flag is inferred to be equal to 0.
[0898]
split_qt_flag
[0899]
split_qt_flag specifies whether a coding unit is split into coding units with half horizontal and vertical size.
[0900]
When split_qt_flag is not present, the following applies:
[0901]
– If allowSplitQt is equal to TRUE, the value of split_qt_flag is inferred to be equal to 1.
[0902]
– Otherwise, the value of split_qt_flag is inferred to be equal to 0.
[0903]
mtt_split_cu_vertical_flag
[0904]
mtt_split_cu_vertical_flag equal to 0 specifies that a coding unit is split horizontally. mtt_split_cu_vertical_flag equal to 1 specifies that a coding unit is split vertically
[0905]
When mtt_split_cu_vertical_flag is not present, it is inferred as follows:
[0906]
– If allowSplitBtHor is equal to TRUE or allowSplitTtHor is equal to TRUE, the value of mtt_split_cu_vertical_flag is inferred to be equal to 0.
[0907]
– Otherwise, the value of mtt_split_cu_vertical_flag is inferred to be equal to 1.
[0908]
mtt_split_cu_binary_flag
[0909]
mtt_split_cu_binary_flag equal to 0 specifies that a coding unit is split into three coding units using a ternary split. mtt_split_cu_binary_flag equal to 1 specifies that a coding unit is split into two coding units using a binary split.
[0910]
When mtt_split_cu_binary_flag is not present, it is inferred as follows:
[0911]
– If allowSplitBtVer is equal to FALSE and allowSplitBtHor is equal to FALSE, the value of mtt_split_cu_binary_flag is inferred to be equal to 0.
[0912]
– Otherwise, if allowSplitTtVer is equal to FALSE and allowSplitTtHor is equal to FALSE, the value of mtt_split_cu_binary_flag is inferred as to be equal to 1.
[0913]
– Otherwise, if allowSplitBtHor is equal to TRUE and allowSplitTtVer is equal to TRUE, the value of mtt_split_cu_binary_flag is inferred to be equal to ! mtt_split_cu_vertical_flag.
[0914]
– Otherwise (allowSplitBtVer is equal to TRUE and allowSplitTtHor is equal to TRUE) , the value of mtt_split_cu_binary_flag is inferred to be equal to mtt_split_cu_vertical_flag.
[0915]
The variable MttSplitMode [x] [y] [mttDepth] is derived from the value of mtt_split_cu_vertical_flag and from the value of mtt_split_cu_binary_flag as defined in MttSplitMode Table for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1.
[0916]
MttSplitMode [x0] [y0] [mttDepth] represents horizontal and vertical binary and ternary splittings of a coding unit within the multi-type tree. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0917]
MttSplitMode Table –Specification of MttSplitMode [x] [y] [mttDepth] for
[0918]
x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1
[0919]
[0920]
When all of the following conditions are true, IsInSmr [x] [y] is set equal to TRUE for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1:
[0921]
– IsInSmr [x0] [y0] is equal to FALSE
[0922]
– One of the following conditions is true:
[0923]
– mtt_split_cu_binary_flag is equal to 1 and cbWidth*cbHeight/2 is less than 32
[0924]
– mtt_split_cu_binary_flag is equal to 0 and cbWidth*cbHeight/4 is less than 32
[0925]
– treeType is not equal to DUAL_TREE_CHROMA
[0926]
When IsInSmr [x0] [y0] is equal to TRUE. the arrays SmrX [x] [y] , SmrY [x] [y] , SmrW [x] [y] and SmrH [x] [y] are derived as follows for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1:
[0927]
SmrX [x] [y] =x0
[0928]
SmrY [x] [y] =y0
[0929]
SmrW [x] [y] =cbWidth
[0930]
SmrH [x] [y] =cbHeight
[0931]
cu_skip_flag
[0932]
cu_skip_flag [x0] [y0] equal to 1 specifies that for the current coding unit, when decoding a P or B tile group, no more syntax elements except one or more of the following are parsed after cu_skip_flag [x0] [y0] : the IBC mode flag pred_mode_ibc_flag [x0] [y0] , the merge plus MVD flag mmvd_flag [x0] [y0] , the merge plus MVD index mmvd_merge_flag [x0] [y0] , the merge plus MVD distance index mmvd distance_idx [x0] [y0] , the merge plus MVD direction index mmvd_direction_idx [x0] [y0] , the merging candidate index merge_idx [x0] [y0] the subblock-based merge flag merge_subblock_flag [x0] [y0] , the subblock-based merging candidate index merge_subblock_idx [x0] [y0] , the merge triangle flag merge_triangle_flag [x0] [y0] , and the merge triangle index merge_triangle_index [x0] [y0] ; when decoding an I tile group, no more syntax elements except merge_idx [x0] [y0] are parsed after cu_skip_flag [x0] [y0] . cu_skip_flag [x0] [y0] equal to 0 specifies that the coding unit is not skipped. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0933]
When cu_skip_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[0934]
pred_mode_ibc_flag
[0935]
pred_mode_ibc_flag equal to 1 specifies that the current coding unit is coded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current coding unit is not coded in IBC prediction mode.
[0936]
When pred_mode_ibc_flag is not present, it is inferred to be equal to the value of sps_ibc_enabled_flag when decoding an I tile group, and 0 when decoding a P or B tile group, respectively.
[0937]
When pred_mode_ibc_flag is equal to 1, the variable CuPredMode [x] [y] is set to be equal to MODE_IBC for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1.
[0938]
pred_mode_flag
[0939]
pred_mode_flag equal to 0 specifies that the current coding unit is coded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current coding unit is coded in intra prediction mode. The variable CuPredMode [x] [y] is derived as follows for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1:
[0940]
– If pred_mode_flag is equal to 0, CuPredMode [x] [y] is set equal to MODE_INTER.
[0941]
– Otherwise (pred_mode_flag is equal to 1) , CuPredMode [x] [y] is set equal to MODE_INTRA.
[0942]
When pred_mode_flag is not present, it is inferred to be equal to 1 when decoding an I tile group, and equal to 0 when decoding a P or B tile group, respectively.
[0943]
intra_luma_ref_idx
[0944]
intra_luma_ref_idx [x0] [y0] specifies the intra prediction reference line index. The variable IntraLumaRefLineIdx [x ] [y ] is set equal to intra_luma_ref_idx [x0 ] [y0 ] for x =x0.. x0 + cbWidth -1 and y = y0.. y0 + cbHeight -1.
[0945]
When intra_luma_ref_idx [x0] [y0] is not present it is inferred to be equal to 0. The variable IntraLumaRefLineIdx [x ] [y ] is set equal to intra_luma_ref_idx [x0 ] [y0 ] for x =x0.. x0 + cbWidth -1 and y = y0.. y0 + cbHeight -1.
[0946]
intra_subpartitions_mode_flag
[0947]
intra_subpartitions_mode_flag [x0] [y0] equal to 1 specifies that the current intra coding unit is partitioned into NumIntraSubPartitions [x0] [y0] rectangular transform block subpartitions. intra_subpartitions_mode_flag [x0] [y0] equal to 0 specifies that the current intra coding unit is not partitioned into rectangular transform block subpartitions.
[0948]
When intra_subpartitions_mode_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[0949]
intra_subpartition_split_flag
[0950]
intra_subpartitions_split_flag [x0] [y0] specifies whether the intra subpartitions split type is horizontal or vertical. When intra_subpartitions_split_flag [x0] [y0] is not present, it is inferred as follows:
[0951]
– If cbHeight is greater than MaxTbSizeY, intra_subpartitions_split_flag [x0] [y0] is inferred to be equal to 0.
[0952]
– Otherwise (cbWidth is greater than MaxTbSizeY) , intra_subpartitions_split_flag [x0] [y0] is inferred to be equal to 1.
[0953]
The variable IntraSubPartitionsSplitType specifies the type of split used for the current luma coding block as illustrated in IntraSubPartitionsSplitType Table. IntraSubPartitionsSplitType is derived as follows:
[0954]
– If intra_subpartitions_mode_flag [x0] [y0] is equal to 0, IntraSubPartitionsSplitType is set equal to 0.
[0955]
– Otherwise, the IntraSubPartitionsSplitType is set equal to 1+intra_subpartitions_split_flag [x0] [y0] .
[0956]
The variable IntraSubPartitionsSplitType specifies the type of split used for the current luma coding block as illustrated in IntraSubPartitionsSplitType Table. IntraSubPartitionsSplitType is derived as follows:
[0957]
– If intra_subpartitions_mode_flag [x0] [y0] is equal to 0, IntraSubPartitionsSplitType is set equal to 0.
[0958]
– Otherwise, the IntraSubPartitionsSplitType is set equal to 1+intra_subpartitions_split_flag [x0] [y0] .
[0959]
IntraSubPartitionsSplitType Table–Name association to
[0960]
IntraSubPartitionsSplitType
[0961]
[Table 0004]
IntraSubPartitionsSplitType Name of IntraSubPartitionsSplitType
0 ISP_NO_SPLIT
1 ISP_HOR_SPLIT
2 ISP_VER_SPLIT

[0962]
The variable NumIntraSubPartitions specifies the number of transform block subpartitions an intra luma coding block is divided into. NumIntraSubPartitions is derived as follows:
[0963]
– If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, NumIntraSubPartitions is set equal to 1.
[0964]
– Otherwise, if one of the following conditions is true, NumIntraSubPartitions is set equal to 2:
[0965]
– cbWidth is equal to 4 and cbHeight is equal to 8,
[0966]
– cbWidth is equal to 8 and cbHeight is equal to 4.
[0967]
– Otherwise, NumIntraSubPartitions is set equal to 4.
[0968]
IntraSubPartitionsSplitType Table–Name association to
[0969]
IntraSubPartitionsSplitType
[0970]
[Table 0005]
IntraSubPartitionsSplitType Name of IntraSubPartitionsSplitType
0 ISP_NO_SPLIT
1 ISP_HOR_SPLIT
2 ISP_VER_SPLIT

[0971]
intra_luma_mpm_flag
[0972]
intra_luma_mpm_flag [x0 ] [y0 ] specifies the intra prediction mode for luma samples. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. When intra_luma_mpm_flag [x0] [y0] is equal to 1, the intra prediction mode is inferred from a neighbouring intra-predicted coding unit.
[0973]
When intra_luma_mpm_flag [x0] [y0] is not present, it is inferred to be equal to 1.
[0974]
When intra_luma_not_planar_flag [x0] [y0] is not present, it is inferred to be equal to 1.
[0975]
intra_chroma_pred_mode
[0976]
intra_chroma_pred_mode [x0] [y0] specifies the intra prediction mode for chroma samples. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0977]
merge_flag
[0978]
merge_flag [x0] [y0] specifies whether the inter prediction parameters for the current coding unit are inferred from a neighbouring inter-predicted partition. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0979]
When merge_flag [x0] [y0] is not present, it is inferred as follows:
[0980]
– If cu_skip_flag [x0] [y0] is equal to 1, merge_flag [x0] [y0] is inferred to be equal to 1.
[0981]
– Otherwise, merge_flag [x0] [y0] is inferred to be equal to 0.
[0982]
inter_pred_idc
[0983]
inter_pred_idc [x0] [y0] specifies whether list0, list1, or bi-prediction is used for the current coding unit according to inter prediction mode table. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0984]
When inter_pred_idc [x0] [y0] is not present, it is inferred to be equal to PRED_L0.
[0985]
Inter Prediction Mode Table –Name association to inter prediction mode
[0986]
[0987]
inter_affine_flag
[0988]
inter_affine_flag [x0] [y0] equal to 1 specifies that for the current coding unit, when decoding a P or B tile group, affine model based motion compensation is used to generate the prediction samples of the current coding unit. inter_affine_flag [x0] [y0] equal to 0 specifies that the coding unit is not predicted by affine model based motion compensation. When inter_affine_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[0989]
cu_affine_type_flag
[0990]
cu_affine_type_flag [x0] [y0] equal to 1 specifies that for the current coding unit, when decoding a P or B tile group, 6-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit. cu_affine_type_flag [x0] [y0] equal to 0 specifies that 4-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit.
[0991]
MotionMode1 Idc [x] [y] represents motion model of a coding unit as illustrated in MotionMode1 Idc Table. The array indices x, y specify the luma sample location (x, y) relative to the top-left luma sample of the picture.
[0992]
The variable MotionModelIdc [x] [y] is derived as follows for x=x0.. x0+cbWidth-1 and y=y0.. y0+cbHeight-1:
[0993]
– If merge_flag [x0] [y0] is equal to 1, the following applies:
[0994]
MotionModelIdc [x] [y] =merge_subblock_flag [x0] [y0]
[0995]
– Otherwise (merge_flag [x0] [y0] is equal to 0) , the following applies:
[0996]
MotionModelIdc [x] [y] =inter_affine_flag [x0] [y0] +cu_affine_type_flag [x0] [y0]
[0997]
MotionModelIdc Table–Interpretation of MotionModelIdc [x0] [y0]
[0998]
[0999]
ref_idx_l0
[1000]
ref_idx_l0 [x0] [y0] specifies the list 0 reference picture index for the current coding unit. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1001]
When ref_idx_l0 [x0] [y0] is not present it is inferred as follows:
[1002]
– If sym_mvd_flag [x0] [y0] is equal to 1, ref_idx_l0 [x0] [y0] is inferred to be equal to RefIdxSymL0.
[1003]
– Otherwise (sym_mvd_flag [x0] [y0] is equal to 0) , ref_idx_l0 [x0] [y0] is inferred to be equal to 0.
[1004]
mvp_l0_flag
[1005]
mvp_l0_flag [x0] [y0] specifies the motion vector predictor index of list 0 where x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1006]
When mvp_l0_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1007]
ref_idx_l1
[1008]
ref_idx_l1 [x0] [y0] has the same semantics as ref_idx_l0, with l0, L0 and list 0 replaced by l1, L1 and list 1, respectively.
[1009]
mvp_l1_flag
[1010]
mvp_l1_flag [x0] [y0] has the same semantics as mvp_l0_flag, with l0 and list 0 replaced by l1 and list 1, respectively.
[1011]
amvr_flag
[1012]
amvr_flag [x0] [y0] specifies the resolution of motion vector difference. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. amvr_flag [x0] [y0] equal to 0 specifies that the resolution of the motion vector difference is 1/4 of a luma sample. amvr_flag [x0] [y0] equal to 1 specifies that the resolution of the motion vector difference is further specified by amvr_precision_flag [x0] [y0] .
[1013]
When amvr_flag [x0] [y0] is not present, it is inferred as follows:
[1014]
– If CuPredMode [x0] [y0] is equal to MODE_IBC, amvr_flag [x0] [y0] is inferred to be equal to 1.
[1015]
– Otherwise (CuPredMode [x0] [y0] is not equal to MODE_IBC) , amvr_flag [x0] [y0] is inferred to be equal to 0.
[1016]
amvr_precision_flag
[1017]
amvr_precision_flag [x0] [y0] equal to 0 specifies that the resolution of the motion vector difference is one integer luma sample if inter_affine_flag [x0] [y0] is equal to 0, and 1/16 of a luma sample otherwise. amvr_precision_flag [x0] [y0] equal to 1 specifies that the resolution of the motion vector difference is four luma samples if inter_affine_flag [x0] [y0] is equal to 0, and one integer luma sample otherwise. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1018]
When amvr_precision_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1019]
The motion vector differences are modified as follows:
[1020]
– If inter_affine_flag [x0] [y0] is equal to 0, the variable MvShift is derived and the variables MvdL0 [x0] [y0] [0] , MvdL0 [x0] [y0] [1] , MvdL1 [x0] [y0] [0] , MvdL1 [x0] [y0] [1] are modified as follows:
[1021]
MvShift = (amvr_flag [x0] [y0] +amvr_precision_flag [x0] [y0] ) <<1
[1022]
MvdL0 [x0] [y0] [0] = MvdL0 [x0] [y0] [0] << (MvShift+2)
[1023]
MvdL0 [x0] [y0] [1] = MvdL0 [x0] [y0] [1] << (MvShift+2)
[1024]
MvdL1 [x0] [y0] [0] = MvdL1 [x0] [y0] [0] << (MvShift+2)
[1025]
MvdL1 [x0] [y0] [1] = MvdL1 [x0] [y0] [1] << (MvShift+2)
[1026]
– Otherwise (inter_affine_flag [x0] [y0] is equal to 1) , the variable MvShift is derived and the variables MvdCpL0 [x0] [y0] [0] [0] , MvdCpL0 [x0] [y0] [0] [1] , MvdCpL0 [x0] [y0] [1] [0] , MvdCpL0 [x0] [y0] [1] [1] , MvdCpL0 [x0] [y0] [2] [0] and MvdCpL0 [x0] [y0] [2] [1] are modified as follows:
[1027]
MvShift = amvr_precision_flag [x0] [y0] ?
[1028]
(amvr_precision_flag [x0] [y0] << 1) : (- (amvr_flag [x0] [y0] << 1) ) )
[1029]
MvdCpL0 [x0] [y0] [0] [0] = MvdCpL0 [x0] [y0] [0] [0] << (MvShift+2)
[1030]
MvdCpL1 [x0] [y0] [0] [1] = MvdCpL1 [x0] [y0] [0] [1] << (MvShift+2)
[1031]
MvdCpL0 [x0] [y0] [1] [0] = MvdCpL0 [x0] [y0] [1] [0] << (MvShift+2)
[1032]
MvdCpL1 [x0] [y0] [1] [1] = MvdCpL1 [x0] [y0] [1] [1] << (MvShift+2)
[1033]
MvdCpL0 [x0] [y0] [2] [0] = MvdCpL0 [x0] [y0] [2] [0] << (MvShift+2)
[1034]
MvdCpL1 [x0] [y0] [2] [1] = MvdCpL1 [x0] [y0] [2] [1] << (MvShift+2)
[1035]
gbi_idx
[1036]
gbi_idx [x0] [y0] specifies the weight index of bi-prediction with CU weights. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1037]
When gbi_idx [x0] [y0] is not present, it is inferred to be equal to 0.
[1038]
cu_cbf
[1039]
cu_cbf equal to 1 specifies that the transform_tree () syntax structure is present for the current coding unit. cu_cbf equal to 0 specifies that the transform_tree () syntax structure is not present for the current coding unit.
[1040]
When cu_cbf is not present, it is inferred as follows:
[1041]
– If cu_skip_flag [x0] [y0] is equal to 1, cu_cbf is inferred to be equal to 0.
[1042]
– Otherwise, cu_cbf is inferred to be equal to 1.
[1043]
cu_sbt_flag
[1044]
cu_sbt_flag equal to 1 specifies that for the current coding unit, subblock transform is used. cu_sbt_flag equal to 0 specifies that for the current coding unit, subblock transform is not used.
[1045]
When cu_sbt_flag is not present, its value is inferred to be equal to 0. NOTE–: When subblock transform is used, a coding unit is split into two transform units; one transform unit has residual data, the other does not have residual data.
[1046]
cu_sbt_quad_flag
[1047]
cu_sbt_quad_flag equal to 1 specifies that for the current coding unit, the subblock transform includes a transform unit of 1/4 size of the current coding unit. cu_sbt_quad_flag equal to 0 specifies that for the current coding unit the subblock transform includes a transform unit of 1/2 size of the current coding unit.
[1048]
When cu_sbt_quad_flag is not present, its value is inferred to be equal to 0.
[1049]
cu_sbt_horizontal_flag
[1050]
cu_sbt_horizontal_flag equal to 1 specifies that the current coding unit is split horizontally into 2 transform units. cu_sbt_horizontal_flag [x0] [y0] equal to 0 specifies that the current coding unit is split vertically into 2 transform units.
[1051]
When cu_sbt_horizontal_flag is not present, its value is derived as follows:
[1052]
– If cu_sbt_quad_flag is equal to 1, cu_sbt_horizontal_flag is set to be equal to allowSbtHorQ.
[1053]
– Otherwise (cu_sbt_quad_flag is equal to 0) , cu_sbt_horizontal_flag is set to be equal to allowSbtHorH.
[1054]
cu_sbt_pos_flag
[1055]
cu_sbt_pos_flag equal to 1 specifies that the tu_cbf_luma, tu_cbf_cb and tu_cbf_cr of the first transform unit in the current coding unit are not present in the bitstream. cu_sbt_pos_flag equal to 0 specifies that the tu_cbf_luma, tu_cbf_cb and tu_cbf_cr of the second transform unit in the current coding unit are not present in the bitstream.
[1056]
The variable SbtNumFourthsTb0 is derived as follows:
[1057]
sbtMinNumFourths = cu_sbt_quad_flag ? 1 : 2
[1058]
SbtNumFourthsTb0 =
[1059]
cu_sbt_pos_flag ? (4-sbtMinNumFourths) : sbtMinNumFourths
[1060]
mmvd_flag
[1061]
mmvd_flag [x0] [y0] equal to 1 specifies that merge mode with motion vector difference is used to generate the inter prediction parameters of the current coding unit. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1062]
When mmvd_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1063]
mmvd_merge_flag
[1064]
mmvd_merge_flag [x0] [y0] specifies whether the first (0) or the second (1) candidate in the merging candidate list is used with the motion vector difference derived from mmvd_distance_idx [x0] [y0] and mmvd_direction_idx [x0] [y0] . The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1065]
mmvd_distance_idx
[1066]
mmvd_distance_idx [x0] [y0] specifies the index used to derive MmvdDistance [x0] [y0] as specified in MmvdDistance Table. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1067]
Both components of of the merge plus MVD offset MmvdOffset [x0] [y0] are derived as follows:
[1068]
MmvdOffset [x0] [y0] [0] = (MmvdDistance [x0] [y0] <<2) *MmvdSign [x0] [y0] [0]
[1069]
MmvdOffset [x0] [y0] [1] = (MmvdDistance [x0] [y0] <<2) *MmvdSign [x0] [y0] [1]
[1070]
MmvdDistance Table–Specification of MmvdDistance [x0] [y0] based on mmvd_distance_idx [x0] [y0]
[1071]
[1072]
ciip_flag
[1073]
ciip_flag [x0] [y0] specifies whether the combined inter-picture merge and intra-picture prediction is applied for the current coding unit. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1074]
When ciip_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1075]
The syntax elements ciip_luma_mpm_flag [x0] [y0] , and ciip_luma_mpm_idx [x0] [y0] specify the intra prediction mode for luma samples used in combined inter-picture merge and intra-picture prediction. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1076]
When ciip_luma_mpm_flag [x0] [y0] is not present, it is inferred as follows:
[1077]
– If cbWidth is greater than 2*cbHeight or cbHeight is greater than 2*cbWidth, ciip_luma_mpm_flag [x0] [y0] is inferred to be equal to 1.
[1078]
– Otherwise, ciip_luma_mpm_flag [x0] [y0] is inferred to be equal to 0.
[1079]
ciip_luma_mpm_flag
[1080]
The syntax elements ciip_luma_mpm_flag [x0] [y0] , and ciip_luma_mpm_idx [x0] [y0] specify the intra prediction mode for luma samples used in combined inter-picture merge and intra-picture prediction. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1081]
When ciip_luma_mpm_flag [x0] [y0] is not present, it is inferred as follows:
[1082]
– If cbWidth is greater than 2*cbHeight or cbHeight is greater than 2*cbWidth, ciip_luma_mpm_flag [x0] [y0] is inferred to be equal to 1.
[1083]
– Otherwise, ciip_luma_mpm_flag [x0] [y0] is inferred to be equal to 0.
[1084]
merge_subblock_flag
[1085]
merge_subblock_flag [x0] [y0] specifies whether the subblock-based inter prediction parameters for the current coding unit are inferred from neighbouring blocks. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. When merge_subblock_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1086]
merge_subblock_idx
[1087]
merge_subblock_idx [x0] [y0] specifies the merging candidate index of the subblock-based merging candidate list where x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1088]
When merge_subblock_idx [x0] [y0] is not present, it is inferred to be equal to 0.
[1089]
merge_triangle_flag
[1090]
merge_triangle_flag [x0] [y0] equal to 1 specifies that for the current coding unit, when decoding a B tile group, triangular shape based motion compensation is used to generate the prediction samples of the current coding unit. merge_triangle_flag [x0] [y0] equal to 0 specifies that the coding unit is not predicted by triangular shape based motion compensation. When merge_triangle_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1091]
merge_triangle_idx0
[1092]
merge_triangle_idx0 [x0] [y0] specifies the first merging candidate index of the triangular shape based motion compensation candidate list where x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1093]
When merge_triangle_idx0 [x0] [y0] is not present, it is inferred to be equal to 0.
[1094]
merge_triangle_idx1
[1095]
merge_triangle_idx1 [x0] [y0] specifies the second merging candidate index of the triangular shape based motion compensation candidate listwhere x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1096]
When merge_triangle_idx1 [x0] [y0] is not present, it is inferred to be equal to 0.
[1097]
merge_idx
[1098]
merge_idx [x0] [y0] specifies the merging candidate index of the merging candidate list where x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[1099]
When merge_idx [x0] [y0] is not present, it is inferred as follows:
[1100]
– If mmvd_flag [x0] [y0] is equal to 1, merge_idx [x0] [y0] is inferred to be equal to mmvd_merge_flag [x0] [y0] .
[1101]
– Otherwise (mmvd_flag [x0] [y0] is equal to 0) , merge_idx [x0] [y0] is inferred to be equal to 0.
[1102]
abs_mvd_greater0_flag
[1103]
abs_mvd_greater0_flag [compIdx] specifies whether the absolute value of a motion vector component difference is greater than 0.
[1104]
abs_mvd_greater1_flag
[1105]
abs_mvd_greater1_flag [compIdx] specifies whether the absolute value of a motion vector component difference is greater than 1.
[1106]
When abs_mvd_greater1_flag [compIdx] is not present, it is inferred to be equal to 0.
[1107]
tu_cbf_luma
[1108]
tu_cbf_luma [x0] [y0] equal to 1 specifies that the luma transform block contains one or more transform coefficient levels not equal to 0. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the picture.
[1109]
When tu_cbf_luma [x0] [y0] is not present in the current CU, its value is inferred as follows:
[1110]
– If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, tu_cbf_luma [x0] [y0] is inferred to be equal to 0.
[1111]
– Otherwise, tu_cbf_luma [x0] [y0] is inferred to be equal to 1.
[1112]
tu_cbf_cb
[1113]
tu_cbf_cb [x0] [y0] equal to 1 specifies that the Cb transform block contains one or more transform coefficient levels not equal to 0. The array indices x0, y0 specify the top-left location (x0, y0) of the considered transform block.
[1114]
When tu_cbf_cb [x0] [y0] is not present in the current CU, its value is inferred to be equal to 0.
[1115]
tu_cbf_cr
[1116]
tu_cbf_cr [x0] [y0] equal to 1 specifies that the Cr transform block contains one or more transform coefficient levels not equal to 0. The array indices x0, y0 specify the top-left location (x0, y0) of the considered transform block.
[1117]
When tu_cbf_cr [x0] [y0] is not present in the current CU, its value is inferred to be equal to 0.
[1118]
cu_qp_delta_abs
[1119]
cu_qp_delta_abs specifies the absolute value of the difference CuQpDeltaVal between the quantization parameter of the current coding unit and its prediction.
[1120]
transform_skip_flag
[1121]
transform_skip_flag [x0] [y0] specifies whether a transform is applied to the luma transform block or not. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the picture. transform_skip_flag [x0] [y0] equal to 1 specifies that no transform is applied to the luma transform block. transform_skip_flag [x0] [y0] equal to 0 specifies that the decision whether transform is applied to the luma transform block or not depends on other syntax elements. When transform_skip_flag [x0] [y0] is not present, it is inferred to be equal to 0.
[1122]
tu_mts_idx
[1123]
tu_mts_idx [x0] [y0] specifies which transform kernels are applied to the residual samples along the horizontal and vertical direction of the associated luma transform block. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the picture.
[1124]
When tu_mts_idx [x0] [y0] is not present, it is inferred to be equal to 0.
[1125]
last_sig_coeff_x_prefix
[1126]
last_sig_coeff_x_prefix specifies the prefix of the column position of the last significant coefficient in scanning order within a transform block. The values of last_sig_coeff_x_prefix shall be in the range of 0 to (log2TbWidth << 1) -1, inclusive.
[1127]
When last_sig_coeff_x_prefix is not present, it is inferred to be 0.
[1128]
last_sig_coeff_y_prefix
[1129]
last_sig_coeff_y_prefix specifies the prefix of the row position of the last significant coefficient in scanning order within a transform block. The values of last_sig_coeff_y_prefix shall be in the range of 0 to (log2TbHeight << 1) -1, inclusive.
[1130]
When last_sig_coeff_y_prefix is not present, it is inferred to be 0.
[1131]
coded_sub_block_flag
[1132]
coded_sub_block_flag [xS] [yS] specifies the following for the subblock at location (xS, yS) within the current transform block, where a subblock is a (4x4) array of 16 transform coefficient levels:
[1133]
– If coded_sub_block_flag [xS] [yS] is equal to 0, the 16 transform coefficient levels of the subblock at location (xS, yS) are inferred to be equal to 0.
[1134]
– Otherwise (coded_sub_block_flag [xS] [yS] is equal to 1) , the following applies:
[1135]
– If (xS, yS) is equal to (0, 0) and (LastSignificantCoeffX, LastSignificantCoeffY) is not equal to (0, 0) , at least one of the 16 sig_coeff_flag syntax elements is present for the subblock at location (xS, yS) .
[1136]
– Otherwise, at least one of the 16 transform coefficient levels of the subblock at location (xS, yS) has a non-zero value.
[1137]
When coded_sub_block_flag [xS] [yS] is not present, it is inferred as follows:
[1138]
– If one or more of the following conditions are true, coded_sub_block_flag [xS] [yS] is inferred to be equal to 1:
[1139]
– (xS, yS) is equal to (0, 0) .
[1140]
– (xS, yS) is equal to (LastSignificantCoeffX >> 2, LastSignificantCoeffY >> 2) .
[1141]
– Otherwise, coded_sub_block_flag [xS] [yS] is inferred to be equal to 0.
[1142]
sig_coeff_flag
[1143]
sig_coeff_flag [xC] [yC] specifies for the transform coefficient location (xC, yC) within the current transform block whether the corresponding transform coefficient level at the location (xC, yC) is non-zero as follows:
[1144]
– If sig_coeff_flag [xC] [yC] is equal to 0, the transform coefficient level at the location (xC, yC) is set equal to 0.
[1145]
– Otherwise (sig_coeff_flag [xC] [yC] is equal to 1) , the transform coefficient level at the location (xC, yC) has a non-zero value.
[1146]
When sig_coeff_flag [xC] [yC] is not present, it is inferred as follows:
[1147]
– If (xC, yC) is the last significant location (LastSignificantCoeffX, LastSignificantCoeffY) in scan order or all of the following conditions are true, sig_coeff_flag [xC] [yC] is inferred to be equal to 1:
[1148]
– (xC&3, yC&3) is equal to (0, 0) .
[1149]
– inferSbDcSigCoeffFlag is equal to 1.
[1150]
– coded_sub_block_flag [xS] [yS] is equal to 1.
[1151]
– Otherwise, sig_coeff_flag [xC] [yC] is inferred to be equal to 0.
[1152]
par_level_flag
[1153]
par_level_flag [n] specifies the parity of the transform coefficient level at scanning position n. When par_level_flag [n] is not present, it is inferred to be equal to 0.
[1154]
abs_level_gt1_flag
[1155]
abs_level_gt1_flag [n] specifies whether the absolute value of the transform coefficient level (at scanning position n) is greater than 1. When abs_level_gt1_flag [n] is not present, it is inferred to be equal to 0.
[1156]
abs_level_gt3_flag
[1157]
abs_level_gt3_flag [n] specifies whether the absolute value of the transform coefficient level (at scanning position n) is greater than 3. When abs_level_gt3_flag [n] is not present, it is inferred to be equal to 0.
[1158]
In the present document, the term “video processing” or “visual media processing” or “processing of visual media” may refer to video encoding, video decoding, video compression or video decompression. For example, video compression algorithms may be applied during conversion from pixel representation of a video to a corresponding bitstream representation or vice versa. The bitstream representation of a current video block may, for example, correspond to bits that are either co-located or spread in different places within the bitstream, as is defined by the syntax. For example, a macroblock may be encoded in terms of transformed and coded error residual values and also using bits in headers and other fields in the bitstream. Furthermore, during conversion, a decoder may parse a bitstream with the knowledge that some fields may be present, or absent, based on the determination, as is described in the above solutions. Similarly, an encoder may determine that certain syntax fields are or are not to be included and generate the coded representation accordingly by including or excluding the syntax fields from the coded representation.
[1159]
From the foregoing, it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the invention. Accordingly, the presently disclosed technology is not limited except as by the appended claims.
[1160]
Implementations of the subject matter and the functional operations described in this patent document can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Implementations of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-transitory computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter effecting a machine-readable propagated signal, or a combination of one or more of them. The term "data processing unit" or "data processing apparatus" encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[1161]
A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document) , in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code) . A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
[1162]
The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit) .
[1163]
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of nonvolatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[1164]
It is intended that the specification, together with the drawings, be considered exemplary only, where exemplary means an example. As used herein, the use of "or" is intended to include "and/or" , unless the context clearly indicates otherwise.
[1165]
While this patent document contains many specifics, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
[1166]
Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[1167]
Only a few implementations and examples are described and other implementations, enhancements and variations can be made based on what is described and illustrated in this patent document.

Claims

[Claim 1]
A method for visual media processing, comprising: during a conversion between acurrent video block and a bitstream representation of the current video block, usingsyntax elements composed of multiple bins for processing the current video block, wherein the syntax elements are selected according to acontext model such that a first context model is applied for selectinga first bin of a first syntax element and a second context model is applied for selectingall bins excluding the firstbin of the firstsyntax element.
[Claim 2]
The method of claim 1, wherein the first context model is arithmetic coding and the second context model is bypass coding.
[Claim 3]
The method of any one or more of claims 1-2, wherein the first syntax element is indicative of anadaptive motion vector difference resolution (AMVR) technique for affine coding of thecurrent video block.
[Claim 4]
The method of any one or more of claims 1-2, wherein the multiple bins of the syntax elements are context-coded or bypass-coded.
[Claim 5]
The method of any one or more of claims 1-3, wherein, if the first syntax element is Binary-valued, then the first syntax element is context-coded.
[Claim 6]
The method of any one or more of claims 1-3, wherein, if the first syntax element is Binary-valued, the first syntax element is bypass-coded.
[Claim 7]
The method of any one or more of claims 1-5, wherein only one context model is used for context model based codingofthe firstbin of the firstsyntax element.
[Claim 8]
The method of any one or more of claims 1-5, wherein more than one context models are used for context model based coding of the first bin of the first syntax element.
[Claim 9]
The method of any one or more of claims 1-5, wherein the syntax elements are selectively included in the bitstream representation based on enabling anaffine coding mode for the current video block.
[Claim 10]
The method of any one or more of claims 1-5, wherein multiple motion vector difference (MVD) precisions are applied on the current video block.
[Claim 11]
The method of claim 10, wherein an adaptive motion vector difference resolution (AMVR) is disabled for use during the conversion of the current video block or wherein the first syntax element is absent from the bitstream representation, and wherein the conversion uses a default motion vector or a default motion vector difference precision.
[Claim 12]
A video encoder apparatus comprising a processor configured to implement a method recited in any one or more of claims 1-11.
[Claim 13]
A video decoder apparatus comprising a processor configured to implement a method recited in any one or more of claims 1-11.
[Claim 14]
A computer readable medium having code stored thereon, the code embodying processor-executable instructions for implementing a method recited in any of or more of claims 1-11.

Drawings

[ Fig. 1]  
[ Fig. 2]  
[ Fig. 3]  
[ Fig. 4A]  
[ Fig. 4B]  
[ Fig. 5]  
[ Fig. 6]  
[ Fig. 7]  
[ Fig. 8]  
[ Fig. 9]  
[ Fig. 10]  
[ Fig. 11]  
[ Fig. 12A]  
[ Fig. 12B]  
[ Fig. 13]  
[ Fig. 14]  
[ Fig. 15]  
[ Fig. 16]  
[ Fig. 17A]  
[ Fig. 17B]  
[ Fig. 18A]  
[ Fig. 18B]  
[ Fig. 19]  
[ Fig. 20]  
[ Fig. 21]  
[ Fig. 22]  
[ Fig. 23A]  
[ Fig. 23B]  
[ Fig. 24]  
[ Fig. 25]  
[ Fig. 26]  
[ Fig. 27]  
[ Fig. 28]  
[ Fig. 29]  
[ Fig. 30]  
[ Fig. 31]