Traitement en cours

Veuillez attendre...

Paramétrages

Paramétrages

Aller à Demande

1. WO2020156576 - HMVP MULTIPLE POUR AFFINE

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   1168   1169   1170   1171   1172   1173   1174   1175   1176   1177   1178   1179   1180   1181   1182   1183   1184   1185   1186   1187   1188   1189   1190   1191   1192   1193   1194   1195   1196   1197   1198   1199   1200   1201   1202   1203   1204   1205   1206   1207   1208   1209   1210   1211   1212   1213   1214   1215   1216   1217   1218   1219   1220   1221   1222   1223   1224   1225   1226   1227   1228   1229   1230   1231   1232   1233   1234   1235   1236   1237   1238   1239   1240   1241   1242   1243   1244   1245   1246   1247  

Claims

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

Drawings

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37  

Description

Title of Invention : MULTI-HMVP FOR AFFINE

[0001]
Under the applicable patent law and/or rules pursuant to the Paris Convention, this application is made to timely claim the priority to and benefits of International Patent Application No. PCT/CN2019/074600, filed on February 2, 2019, and No. PCT/CN2019/075867, filed on February 22, 2019. The entire disclosures of International Patent Application No. PCT/CN2019/074600 and PCT/CN2019/075867 are incorporated by reference as part of the disclosure of this application.

TECHNICAL FIELD

[0002]
This document is related to video and image coding technologies.

BACKGROUND

[0003]
Digital video 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.
[0004]
SUMMARY
[0005]
The disclosed techniques may be used by video or image decoder or encoder embodiments for in which geometry partitions with history based motion vector prediction (HMVP) is used.
[0006]
In one example aspect, a method of processing video is disclosed. The method includes storing, by a processor, parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; and performing further processing of the first video block using the parameters.
[0007]
In another example aspect, a method of processing video includes storing, by a processor, in memory, control point motion vectors (CPMVs) representing coordinates of representative points relative to a top-left sample of the first video block; and performing further processing of the first video block using the CPMVs.
[0008]
In another example aspect, a method of processing video includes performing a determination, by a processor, of parameters associated with motion vectors for a first video block, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; determining that a buffer for storing the parameters is full; modifying the buffer such that the buffer is not full; storing the parameters in the buffer that is not full; and performing further processing of the first video block using the parameters stored in the buffer.
[0009]
In another example aspect, a method of processing video includes refreshing, by a processor, a buffer for storing parameters associated with motion vectors for a first video block, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; and performing further processing of the first video block using the parameters stored in the buffer.
[0010]
In another example aspect, a method of processing video includes identifying, by a processor, parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; and performing processing of a second video block using the parameters associated with the first video block.
[0011]
In another example aspect, a method of processing video includes identifying, by a processor, parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; determining, by the processor, that a second video block uses one of the 4-parameter affine model or the 6-parameter affine model based on the parameters; generating an affine merge candidate list for the second video block based on the 4-parameter affine model or the 6-parameter affine model used by the second video block; and performing further processing of the second video block using the affine merge candidate list.
[0012]
In another example aspect, a method of processing video includes identifying, by a processor, parameters associated with motion vectors (MVs) for a first video block; deriving, by the processor, an affine model based on the parameters for the first video block, the affine model being one or both of a 4-parameter affine model or a 6-parameter affine model; and performing further processing of the first video block using the affine model.
[0013]
In another example aspect, a method of processing video includes deriving an affine merge candidate from an affine history based motion vector prediction (HMVP) buffer; and modifying a list that is an affine merge list or a sub-block merge list by inserting the affine merge candidate into the list and by removing an inherited affine merge candidate from the list.
[0014]
In another example aspect, a method of processing video includes deriving an affine merge advanced motion vector prediction (AMVP) candidate from an affine history based motion vector prediction (HMVP) buffer; and modifying an affine AMVP list by inserting the affine AMVP candidate into the list and by removing an inherited affine AMVP candidate from the list.
[0015]
In one example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, affine related information associated with an affine model to be used by the current block based on affine related information associated with an affine model used by a first block stored in a buffer, wherein the first block is affine coded prior to the current block; and performing the conversion by using the derived affine related information.
[0016]
In another example aspect, a method of processing video includes calculating a first set of affine parameters associated with the affine model for a first block which is affine-coded based on motion vectors (MV) associated with the affine model for the first block, a width of the first block and a height of the first block, and clipping the calculated first set of affine parameters.
[0017]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, a virtual affine model for the current block from multiple affine models stored in a buffer for storing affine models; and performing the conversion by using the virtual affine model.
[0018]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, a first set of affine parameters associated with affine model for the current block; comparing the first set of affine parameters to one or more of sets of affine parameters stored in a buffer for storing affine parameters so as to determine whether the first set of affine parameters is same or similar to at least one set of affine parameters; and deciding whether or how to update the buffer for storing affine parameters based on the determination.
[0019]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, affine related information associated with affine model for the current block based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; and performing the conversion by using the derived affine related information.
[0020]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, affine model for the current block based on a set of affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; generating an affine merge candidate list , wherein the affine merge candidate list comprises an affine merge candidate for the current block based on the derived affine model for the current block; and performing the conversion based on the affine merge candidate list.
[0021]
In another example aspect, a method of processing video includes generating, for a conversion between a current block of video and a bitstream representation of the current block, an affine advanced motion vector prediction (AMVP) candidate list for the current block which is affine AMVP coded block, wherein the candidate list includes at least one AMVP candidate based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; and performing the conversion based on the affine AMVP candidate list.
[0022]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, affine candidates for the current block based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block and one or multiple unit blocks; inserting the derived affine candidates into affine candidates list; and performing the conversion by using the affine candidates list.
[0023]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, affine candidates for the current block based on affine parameters stored in an affine history- based motion vector prediction (HMVP) buffer; inserting the derived affine candidates into affine candidates list; and performing the conversion by using the affine candidates list.
[0024]
In another example aspect, a method of processing video includes deriving, for a conversion between a current block of video and a bitstream representation of the current block, an affine model for the current block based on affine related information stored in at least one history motion vector prediction (HMVP) buffer of multiple HMVP buffers, the multiple HMVP buffers being used to store affine related information of blocks coded prior the current block in different categories; and performing the conversion by using the derived affine model.
[0025]
In another example aspect, the above-described method may be implemented by a video encoder apparatus that comprises a processor.
[0026]
In yet another example aspect, these methods may be embodied in the form of processor-executable instructions and stored on a computer-readable program medium.
[0027]
These, and other, aspects are further described in the present document.

BRIEF DESCRIPTION OF THE DRAWINGS

[0028]
FIG. 1 shows an example of sub-block based prediction.
[0029]
FIG. 2 shows an example of a 4-parameter affine model and a 6-parameter affine model.
[0030]
FIG. 3 shows an example of affine motion vector field (MVF) per sub-block.
[0031]
FIG. 4 shows an example of candidates for AF_MERGE.
[0032]
FIG. 5 shows an example of candidate positions for affine merge mode.
[0033]
FIG. 6 shows an example of 135 degree partitioning and 45 degree splitting.
[0034]
FIG. 7 shows a position of neighboring blocks.
[0035]
FIG. 8 shows an example of a coding unit (CU) applying a 1st weighting factor group.
[0036]
FIG. 9 shows an example of motion vector storage.
[0037]
FIG. 10 shows an example of a decoding flow chart with a proposed history-based motion vector prediction (HMVP) method.
[0038]
FIG. 11 shows an example of updating a table in a HMVP method.
[0039]
FIG. 12 shows an example of an ultimate motion vector expression (UMVE) search process.
[0040]
FIG. 13 shows an example of a UMVE search point.
[0041]
FIG. 14 shows an example of a distance index and distance offset mapping.
[0042]
FIG. 15 shows an example of deriving CPMVs from a motion vector (MV) of a neighboring block and a set of parameters stored in a buffer.
[0043]
FIG. 16 is a block diagram of an example of a video processing apparatus.
[0044]
FIG. 17 shows a block diagram of an example implementation of a video encoder.
[0045]
FIG. 18 is a flowchart for an example of a video processing method.
[0046]
FIG. 19 is a flowchart for an example of a video processing method.
[0047]
FIG. 20 is a flowchart for an example of a video processing method.
[0048]
FIG. 21 is a flowchart for an example of a video processing method.
[0049]
FIG. 22 is a flowchart for an example of a video processing method.
[0050]
FIG. 23 is a flowchart for an example of a video processing method.
[0051]
FIG. 24 is a flowchart for an example of a video processing method.
[0052]
FIG. 25 shows examples of possible positions of a collocated unit block.
[0053]
FIG. 26 is a flowchart for an example of a video processing method.
[0054]
FIG. 27 shows example positions in a 4x4 basic block.
[0055]
FIG. 28 is a flowchart for an example of a video processing method.
[0056]
FIG. 29 is a flowchart for an example of a video processing method.
[0057]
FIG. 30 is a flowchart for an example of a video processing method.
[0058]
FIG. 31 is a flowchart for an example of a video processing method.
[0059]
FIG. 32 is a flowchart for an example of a video processing method.
[0060]
FIG. 33 is a flowchart for an example of a video processing method.
[0061]
FIG. 34 is a flowchart for an example of a video processing method.
[0062]
FIG. 35 is a flowchart for an example of a video processing method.
[0063]
FIG. 36 is a flowchart for an example of a video processing method.
[0064]
FIG. 37 is a flowchart for an example of a video processing method.

DETAILED DESCRIPTION

[0065]
The present document provides various techniques that can be used by a decoder of image or video bitstreams to improve the quality of decompressed or decoded digital video or images. For brevity, the term “video” is used herein to include both a sequence of pictures (traditionally called video) and individual images. Furthermore, a video encoder may also implement these techniques during the process of encoding in order to reconstruct decoded frames used for further encoding.
[0066]
Section headings are used in the present document for ease of understanding and do not limit the embodiments and techniques to the corresponding sections. As such, embodiments from one section can be combined with embodiments from other sections.
[0067]
1. Summary
[0068]
This patent document is related to video/image coding technologies. Specifically, it is related to affine prediction in video/image coding. It may be applied to the existing video coding standards like HEVC, or the standard (Versatile Video Coding) to be finalized. It may be also applicable to future video/image coding standards or video/image codec.
[0069]
2. Background
[0070]
Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. The ITU-T produced H. 261 and H. 263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H. 262/MPEG-2 Video and H. 264/MPEG-4 Advanced Video Coding (AVC) and H. 265/HEVC standards. Since H. 262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM) . In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at 50%bitrate reduction compared to HEVC.
[0071]
Sub-block based prediction is first introduced into the video coding standard by HEVC Annex I (3D-HEVC) . With sub-block based prediction, a block, such as a Coding Unit (CU) or a Prediction Unit (PU) , is divided into several non-overlapped sub-blocks. Different sub-block may be assigned different motion information, such as reference index or Motion Vector (MV) , and Motion Compensation (MC) is performed individually for each sub-block. Fig. 1 demonstrates the concept of sub-block based prediction.
[0072]
To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM) .
[0073]
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) and Frame-Rate Up Conversion (FRUC) . Affine prediction has also been adopted into VVC.
[0074]
Fig. 17 is a block diagram of an example implementation of a video encoder. Fig 17 shows that the encoder implementation has a feedback path built in in which the video encoder also performs video decoding functionality (reconstructing compressed representation of video data for use in encoding of next video data) .
[0075]
2.1 Affine Prediction
[0076]
In HEVC, only translation motion model is applied for motion compensation prediction (MCP) . While in the real world, there are many kinds of motion, e.g. zoom in/out, rotation, perspective motions and the other irregular motions. In the VVC, a simplified affine transform motion compensation prediction is applied. As shown Fig. 2, the affine motion field of the block is described by two (in the 4-parameter affine model on the left side of Fig. 2) or three (in the 6-parameter affine model on the right side of Fig. 2) control point motion vectors.
[0077]
Fig. 3 shows an example of MVs in sub-blocks of an affine-coded block.
[0078]
The motion vector field (MVF) of a block is described by the following equations with the 4-parameter affine model (wherein the 4-parameter are defined as the variables a, b, e and f) in equation (1) and 6-parameter affine model (wherein the 4-parameter are defined as the variables a, b, c, d, e and f) in equation (2) respectively:
[0079]
[0080]
[0081]
where (mvh0, mvh0) is motion vector of the top-left corner control point, and (mvh1, mvh1) is motion vector of the top-right corner control point and (mvh2, mvh2) is motion vector of the bottom-left corner control point, all of the three motion vectors are called control point motion vectors (CPMV) , (x, y) represents the coordinate of a representative point relative to the top-left sample within current block. The CP motion vectors may be signaled (like in the affine AMVP mode) or derived on-the-fly (like in the affine merge mode) . w and h are the width and height of the current block. In practice, the division is implemented by right-shift with a rounding operation. In VTM, the representative point is defined to be the center position of a sub-block, e.g., when the coordinate of the left-top corner of a sub-block relative to the top-left sample within current block is (xs, ys) , the coordinate of the representative point is defined to be (xs+2, ys+2) .
[0082]
In a division-free design, (1) and (2) are implemented as
[0083]
[0084]
For the 4-parameter affine model shown in (1) :
[0085]
[0086]
For the 6-parameter affine model shown in (2) :
[0087]
[0088]
Finally,
[0089]
[0090]
[0091]
Off=1<< (S-1) (7)
[0092]
where S represents the calculation precision. e.g. in VVC, S=7. In VVC, the MV used in MC for a sub-block with the top-left sample at (xs, ys) is calculated by (6) with x=xs+2 and y=ys+2.
[0093]
To derive motion vector of each 4×4 sub-block, the motion vector of the center sample of each sub-block, as shown in Fig. 3, is calculated according to Eq. (1) or (2) , and rounded to 1/16 fraction accuracy. Then the motion compensation interpolation filters are applied to generate the prediction of each sub-block with derived motion vector.
[0094]
Affine model can be inherited from spatial neighbouring affine-coded block such as left, above, above right, left bottom and above left neighbouring block as shown in Fig. 4 (a) . For example, if the neighbour left bottom block A in Fig. 4 (a) is coded in affine mode as denoted by A0 in Fig. 4 (b) ., the Control Point (CP) motion vectors mv0N, mv1N and mv2N of the top left corner, above right corner and left bottom corner of the neighbouring CU/PU which contains the block A are fetched. And the motion vector mv0C, mv1C and mv2C (which is only used for the 6-parameter affine model) of the top left corner/top right/bottom left on the current CU/PU is calculated based on mv0N, mv1N and mv2N. It should be noted that in VTM-2.0, sub-block (e.g. 4×4 block in VTM) LT stores mv0, RT stores mv1 if the current block is affine coded. If the current block is coded with the 6-parameter affine model, LB stores mv2; otherwise (with the 4-parameter affine model) , LB stores mv2’. Other sub-blocks stores the MVs used for MC.
[0095]
It should be noted that when a CU is coded with affine merge mode, i.e., in AF_MERGE mode, it gets the first block coded with affine mode from the valid neighbour reconstructed blocks. And the selection order for the candidate block is from left, above, above right, left bottom to above left as shown Fig. 4 (a) .
[0096]
The derived CP MVs mv0C, mv1C and mv2C of current block can be used as CP MVs in the affine merge mode. Or they can be used as MVP for affine inter mode in VVC. It should be noted that for the merge mode, if the current block is coded with affine mode, after deriving CP MVs of current block, the current block may be further split into multiple sub-blocks and each block will derive its motion information based on the derived CP MVs of current block.
[0097]
2.2 Affine merge candidate list
[0098]
Different from VTM wherein only one affine spatial neighboring block may be used to derive affine motion for a block, it proposes to construct a separate list of affine candidates for the AF_MERGE mode.
[0099]
Insert inherited affine candidates into candidate list
[0100]
Inherited affine candidate means that the candidate is derived from the valid neighbor reconstructed block coded with affine mode.
[0101]
As shown in Fig. 5, the scan order for the candidate block is A1, B1, B0, A0 and B2. When a block is selected (e.g., A1) , the two-step procedure is applied:
[0102]
Firstly, use the three corner motion vectors of the CU covering the block to derive two/three control points of current block
[0103]
Based on the control points of current block to derive sub-block motion for each sub-block within current block
[0104]
Insert constructed affine candidates
[0105]
If the number of candidates in affine merge candidate list is less than MaxNumAffineCand, constructed affine candidates are insert into the candidate list.
[0106]
Constructed affine candidate means the candidate is constructed by combining the neighbor motion information of each control point.
[0107]
The motion information for the control points is derived firstly from the specified spatial neighbors and temporal neighbor shown in Fig. 5. CPk (k=1, 2, 3, 4) represents the k-th control point. A0, A1, A2, B0, B1, B2 and B3 are spatial positions for predicting CPk (k=1, 2, 3) ; T is temporal position for predicting CP4.
[0108]
The coordinates of CP1, CP2, CP3 and CP4 is (0, 0) , (W, 0) , (H, 0) and (W, H) , respectively, where W and H are the width and height of current block.
[0109]
The motion information of each control point is obtained according to the following priority order:
[0110]
For CP1, the checking priority is B2->B3->A2. B2 is used if it is available. Otherwise, if B2 is available, B3 is used. If both B2 and B3 are unavailable, A2 is used. If all the three candidates are unavailable, the motion information of CP1 cannot be obtained.
[0111]
For CP2, the checking priority is B1->B0;
[0112]
For CP3, the checking priority is A1->A0;
[0113]
For CP4, T is used.
[0114]
Secondly, the combinations of controls points are used to construct the motion model.
[0115]
Motion vectors of three control points are needed to compute the transform parameters in 6-parameter affine model. The three control points can be selected from one of the following four combinations ( {CP1, CP2, CP4} , {CP1, CP2, CP3} , {CP2, CP3, CP4} , {CP1, CP3, CP4} ) . For example, use CP1, CP2 and CP3 control points to construct 6-parameter affine motion model, denoted as Affine (CP1, CP2, CP3) .
[0116]
Motion vectors of two control points are needed to compute the transform parameters in 4-parameter affine model. The two control points can be selected from one of the following six combinations ( {CP1, CP4} , {CP2, CP3} , {CP1, CP2} , {CP2, CP4} , {CP1, CP3} , {CP3, CP4} ) . For example, use the CP1 and CP2 control points to construct 4-parameter affine motion model, denoted as Affine (CP1, CP2) .
[0117]
The combinations of constructed affine candidates are inserted into to candidate list as following order:
[0118]
{CP1, CP2, CP3} , {CP1, CP2, CP4} , {CP1, CP3, CP4} , {CP2, CP3, CP4} , {CP1, CP2} , {CP1, CP3} , {CP2, CP3} , {CP1, CP4} , {CP2, CP4} , {CP3, CP4}
[0119]
Insert zero motion vectors
[0120]
If the number of candidates in affine merge candidate list is less than MaxNumAffineCand, zero motion vectors are insert into the candidate list, until the list is full.
[0121]
2.3 Affine merge candidate list
[0122]
2.5.1 Affine merge mode
[0123]
In the affine merge mode, only the first available affine neighbour can be used to derive motion information of affine merge mode. A candidate list for affine merge mode is constructed by searching valid affine neighbours and combining the neighbor motion information of each control point.
[0124]
The affine merge candidate list is constructed as following steps:
[0125]
Insert inherited affine candidates
[0126]
Inherited affine candidate means that the candidate is derived from the affine motion model of its valid neighbor affine coded block. In the common base, as shown Fig. 5, the scan order for the candidate positions is: A1, B1, B0, A0 and B2.
[0127]
After a candidate is derived, full pruning process is performed to check whether same candidate has been inserted into the list. If a same candidate exists, the derived candidate is discarded.
[0128]
Insert constructed affine candidates
[0129]
If the number of candidates in affine merge candidate list is less than MaxNumAffineCand (set to 5 in this contribution) , constructed affine candidates are inserted into the candidate list. Constructed affine candidate means the candidate is constructed by combining the neighbor motion information of each control point.
[0130]
The motion information for the control points is derived firstly from the specified spatial neighbors and temporal neighbor shown in Fig. 5. CPk (k=1, 2, 3, 4) represents the k-th control point. A0, A1, A2, B0, B1, B2 and B3 are spatial positions for predicting CPk (k=1, 2, 3) ; T is temporal position for predicting CP4.
[0131]
The coordinates of CP1, CP2, CP3 and CP4 is (0, 0) , (W, 0) , (H, 0) and (W, H) , respectively, where W and H are the width and height of current block.
[0132]
The motion information of each control point is obtained according to the following priority order:
[0133]
For CP1, the checking priority is B2->B3->A2. B2 is used if it is available. Otherwise, if B2 is available, B3 is used. If both B2 and B3 are unavailable, A2 is used. If all the three candidates are unavailable, the motion information of CP1 cannot be obtained.
[0134]
For CP2, the checking priority is B1->B0.
[0135]
For CP3, the checking priority is A1->A0.
[0136]
For CP4, T is used.
[0137]
Secondly, the combinations of controls points are used to construct an affine merge candidate.
[0138]
Motion information of three control points are needed to construct a 6-parameter affine candidate. The three control points can be selected from one of the following four combinations ( {CP1, CP2, CP4} , {CP1, CP2, CP3} , {CP2, CP3, CP4} , {CP1, CP3, CP4} ) . Combinations {CP1, CP2, CP3} , {CP2, CP3, CP4} , {CP1, CP3, CP4} will be converted to a 6-parameter motion model represented by top-left, top-right and bottom-left control points.
[0139]
Motion information of two control points are needed to construct a 4-parameter affine candidate. The two control points can be selected from one of the following six combinations ( {CP1, CP4} , {CP2, CP3} , {CP1, CP2} , {CP2, CP4} , {CP1, CP3} , {CP3, CP4} ) . Combinations {CP1, CP4} , {CP2, CP3} , {CP2, CP4} , {CP1, CP3} , {CP3, CP4} will be converted to a 4-parameter motion model represented by top-left and top-right control points.
[0140]
The combinations of constructed affine candidates are inserted into to candidate list as following order:
[0141]
{CP1, CP2, CP3} , {CP1, CP2, CP4} , {CP1, CP3, CP4} , {CP2, CP3, CP4} , {CP1, CP2} , {CP1, CP3} , {CP2, CP3} , {CP1, CP4} , {CP2, CP4} , {CP3, CP4}
[0142]
For reference list X (X being 0 or 1) of a combination, the reference index with highest usage ratio in the control points is selected as the reference index of list X, and motion vectors point to difference reference picture will be scaled.
[0143]
After a candidate is derived, full pruning process is performed to check whether same candidate has been inserted into the list. If a same candidate exists, the derived candidate is discarded.
[0144]
Padding with zero motion vectors
[0145]
If the number of candidates in affine merge candidate list is less than 5, zero motion vectors with zero reference indices are insert into the candidate list, until the list is full.
[0146]
2.5.2 Affine merge mode
[0147]
The following simplifications for the affine merge mode are proposed.
[0148]
The pruning process for inherited affine candidates is simplified by comparing the coding units covering the neighboring positions, instead of comparing the derived affine candidates. Up to 2 inherited affine candidates are inserted into affine merge list. The pruning process for constructed affine candidates is totally removed.
[0149]
The MV scaling operation in constructed affine candidate is removed. If the reference indices of control points are different, the constructed motion model is discarded.
[0150]
The number of constructed affine candidates is reduced from 10 to 6.
[0151]
It is also proposed that other merge candidates with sub-block prediction such as ATMVP is also put into the affine merge candidate list. In that case, the affine merge candidate list may be renamed with some other names such as sub-block merge candidate list.
[0152]
2.4 Control point MV offset for Affine merge mode
[0153]
New Affine merge candidates are generated based on the CPMVs offsets of the first Affine merge candidate. If the first Affine merge candidate enables 4-parameter Affine model, then 2 CPMVs for each new Affine merge candidate are derived by offsetting 2 CPMVs of the first Affine merge candidate; Otherwise (6-parameter Affine model enabled) , then 3 CPMVs for each new Affine merge candidate are derived by offsetting 3 CPMVs of the first Affine merge candidate. In Uni-prediction, the CPMV offsets are applied to the CPMVs of the first candidate. In Bi-prediction with List 0 and List 1 on the same direction, the CPMV offsets are applied to the first candidate as follows:
[0154]
MVnew (L0) , i = MVold (L0) + MVoffset (i)
[0155]
MVnew (L1) , i = MVold (L1) + MVoffset (i)
[0156]
In Bi-prediction with List 0 and List 1 on the opposite direction, the CPMV offsets are applied to the first candidate as follows:
[0157]
MVnew (L0) , i = MVold (L0) + MVoffset (i)
[0158]
MVnew (L1) , i = MVold (L1) -MVoffset (i)
[0159]
In this contribution, various offset directions with various offset magnitudes are used to generate new Affine merge candidates. Two implementations were tested:
[0160]
16 new Affine merge candidates with 8 different offset directions with 2 different offset magnitudes are generated as shown in the following offsets set:
[0161]
Offset set = { (4, 0) , (0, 4) , (-4, 0) , (0, -4) , (-4, -4) , (4, -4) , (4, 4) , (-4, 4) , (8, 0) , (0, 8) , (-8, 0) , (0, -8) , (-8, -8) , (8, -8) , (8, 8) , (-8, 8) } .
[0162]
The Affine merge list is increased to 20 for this design. The number of potential Affine merge candidates is 31 in total.
[0163]
4 new Affine merge candidates with 4 different offset directions with 1 offset magnitude are generated as shown in the following offsets set:
[0164]
Offset set = { (4, 0) , (0, 4) , (-4, 0) , (0, -4) } .
[0165]
The Affine merge list is kept to 5. Four temporal constructed Affine merge candidates are removed to keep the number of potential Affine merge candidates unchanged, i.e., 15 in total. Suppose the coordinates of CPMV1, CPMV2, CPMV3 and CPMV4 are (0, 0) , (W, 0) , (H, 0) and (W, H) . Note that CPMV4 is derived from the temporal MV as shown in Fig. 6. The removed candidates are the following four temporal-related constructed Affine merge candidates: {CP2, CP3, CP4} , {CP1, CP4} , {CP2, CP4} , {CP3, CP4} .
[0166]
2.5 Generalized Bi-prediction Improvement
[0167]
Generalized Bi-prediction improvement (GBi) proposed is adopted.
[0168]
In an example, GBi is proposed. The gain-complexity trade-off for GBi is improved. GBi applies unequal weights to predictors from L0 and L1 in bi-prediction mode. In inter prediction mode, multiple weight pairs including the equal weight pair (1/2, 1/2) are evaluated based on rate-distortion optimization (RDO) , and the GBi index of the selected weight pair is signaled to the decoder. In merge mode, the GBi index is inherited from a neighboring CU. In BMS2.1 GBi, the predictor generation in bi-prediction mode is shown in Equation (1) .
[0169]
PGBi = (w0 *PL0 + w1 *PL1 + RoundingOffsetGBi) >> shiftNumGBi,
[0170]
where PGBi is the final predictor of GBi. w0 and w1 are the selected GBi weight pair and applied to the predictors of list 0 (L0) and list 1 (L1) , respectively. RoundingOffsetGBi and shiftNumGBi are used to normalize the final predictor in GBi. The supported w1 weight set is {- 1/4, 3/8, 1/2, 5/8, 5/4} , in which the five weights correspond to one equal weight pair and four unequal weight pairs. The blending gain, i.e., sum of w1 and w0, is fixed to 1.0. Therefore, the corresponding w0 weight set is {5/4, 5/8, 1/2, 3/8, -1/4} . The weight pair selection is at CU-level.
[0171]
For non-low delay pictures, the weight set size is reduced from five to three, where the w1 weight set is {3/8, 1/2, 5/8} and the w0 weight set is {5/8, 1/2, 3/8} . The weight set size reduction for non-low delay pictures is applied to the BMS2.1 GBi and all the GBi tests in this contribution.
[0172]
In an example, one solution is proposed to further improve the GBi performance. Specifically, the following modifications are applied on top of the existing GBi design.
[0173]
2.5.1 GBi encoder bug fix
[0174]
To reduce the GBi encoding time, in current encoder design, the encoder will store uni-prediction motion vectors estimated from GBi weight equal to 4/8, and reuse them for uni-prediction search of other GBi weights. This fast encoding method is applied to both translation motion model and affine motion model. 6-parameter affine model was adopted together with 4-parameter affine model. The BMS2.1 encoder does not differentiate 4-parameter affine model and 6-parameter affine model when it stores the uni-prediction affine MVs when GBi weight is equal to 4/8. Consequently, 4-parameter affine MVs may be overwritten by 6-parameter affine MVs after the encoding with GBi weight 4/8. The stored 6-parmater affine MVs may be used for 4-parameter affine ME for other GBi weights, or the stored 4-parameter affine MVs may be used for 6-parameter affine ME. The proposed GBi encoder bug fix is to separate the 4-paramerter and 6-parameter affine MVs storage. The encoder stores those affine MVs based on affine model type when GBi weight is equal to 4/8, and reuse the corresponding affine MVs based on the affine model type for other GBi weights.
[0175]
2.5.2 CU size constraint for GBi
[0176]
In this method, GBi is disabled for small CUs. In inter prediction mode, if bi-prediction is used and the CU area is smaller than 128 luma samples, GBi is disabled without any signaling.
[0177]
2.5.3 Merge mode with GBi
[0178]
With Merge mode, GBi index is not signaled. Instead it is inherited from the neighbouring block it is merged to. When TMVP candidate is selected, GBi is turned off in this block.
[0179]
2.5.4 Affine prediction with GBi
[0180]
When the current block is coded with affine prediction, GBi can be used. For affine inter mode, GBi index is signaled. For Affine merge mode, GBi index is inherited from the neighbouring block it is merged to. If a constructed affine model is selected, GBi is turned off in this block.
[0181]
2.6 Triangular prediction mode
[0182]
The concept of the triangular prediction mode (TPM) is to introduce a new triangular partition for motion compensated prediction. As shown in Fig. 6, it splits a CU into two triangular prediction units, in either diagonal or inverse diagonal direction. Each triangular prediction unit in the CU is inter-predicted using its own uni-prediction motion vector and reference frame index which are derived from a uni-prediction candidate list. An adaptive weighting process is performed to the diagonal edge after predicting the triangular prediction units. Then, the transform and quantization process are applied to the whole CU. It is noted that this mode is only applied to skip and merge modes.
[0183]
2.6.1 Uni-prediction candidate list for TPM
[0184]
The uni-prediction candidate list consists of five uni-prediction motion vector candidates. It is derived from seven neighboring blocks including five spatial neighboring blocks (1 to 5) and two temporal co-located blocks (6 to 7) , as shown in Fig. 7. The motion vectors of the seven neighboring blocks are collected and put into the uni-prediction candidate list according in the order of uni-prediction motion vectors, L0 motion vector of bi-prediction motion vectors, L1 motion vector of bi-prediction motion vectors, and averaged motion vector of the L0 and L1 motion vectors of bi-prediction motion vectors. If the number of candidates is less than five, zero motion vector is added to the list. Motion candidates added in this list are called TPM motion candidates.
[0185]
More specifically, the following steps are involved:
[0186]
Obtain motion candidates from A 1, B 1, B 0, A 0, B 2, Col and Col2 (corresponding to block 1-7 in Fig. 8) without any pruning operations.
[0187]
Set variable numCurrMergeCand = 0
[0188]
For each motion candidates derived from A 1, B 1, B 0, A 0, B 2, Col and Col2 and numCurrMergeCand is less than 5, if the motion candidate is uni-prediction (either from List 0 or List 1) , it is added to the merge list with numCurrMergeCand increased by 1. Such added motion candidates is named ‘originally uni-predicted candidate’ .
[0189]
Full pruning is applied.
[0190]
For each motion candidates derived from A 1, B 1, B 0, A 0, B 2, Col and Col2 and numCurrMergeCand is less than 5, if the motion candidate is bi-prediction, the motion information from List 0 is added to the merge list (that is, modified to be uni-prediction from List 0) and numCurrMergeCand increased by 1. Such added motion candidates are named ‘Truncated List0-predicted candidate’ .
[0191]
Full pruning is applied.
[0192]
For each motion candidates derived from A 1, B 1, B 0, A 0, B 2, Col and Col2 and numCurrMergeCand is less than 5, if the motion candidate is bi-prediction, the motion information from List 1 is added to the merge list (that is, modified to be uni-prediction from List 1) and numCurrMergeCand increased by 1. Such added motion candidates are named ‘Truncated List1-predicted candidate’ .
[0193]
Full pruning is applied.
[0194]
For each motion candidates derived from A 1, B 1, B 0, A 0, B 2, Col and Col2 and numCurrMergeCand is less than 5, if the motion candidate is bi-prediction,
[0195]
If List 0 reference picture’s slice QP is smaller than List 1 reference picture’s slice QP, the motion information of List 1 is firstly scaled to List 0 reference picture, and the average of the two MVs (one is from original List 0, and the other is the scaled MV from List 1) is added to the merge list, that is averaged uni-prediction from List 0 motion candidate and numCurrMergeCand increased by 1.
[0196]
Otherwise, the motion information of List 0 is firstly scaled to List 1 reference picture, and the average of the two MVs (one is from original List 1, and the other is the scaled MV from List 0) is added to the merge list, that is averaged uni-prediction from List 1 motion candidate and numCurrMergeCand increased by 1.
[0197]
Full pruning is applied.
[0198]
If numCurrMergeCand is less than 5, zero motion vector candidates are added.
[0199]
2.6.1.1 Adaptive weighting process
[0200]
After predicting each triangular prediction unit, an adaptive weighting process is applied to the diagonal edge between the two triangular prediction units to derive the final prediction for the whole CU. Two weighting factor groups are defined as follows:
[0201]
1st weighting factor group: {7/8, 6/8, 4/8, 2/8, 1/8} and {7/8, 4/8, 1/8} are used for the luminance and the chrominance samples, respectively;
[0202]
2nd weighting factor group: {7/8, 6/8, 5/8, 4/8, 3/8, 2/8, 1/8} and {6/8, 4/8, 2/8} are used for the luminance and the chrominance samples, respectively.
[0203]
Weighting factor group is selected based on the comparison of the motion vectors of two triangular prediction units. The 2nd weighting factor group is used when the reference pictures of the two triangular prediction units are different from each other or their motion vector difference is larger than 16 pixels. Otherwise, the 1st weighting factor group is used. An example is shown in Fig. 8.
[0204]
2.6.1.2 Motion vector storage
[0205]
The motion vectors (Mv1 and Mv2 in Fig. 9) of the triangular prediction units are stored in 4×4 grids. For each 4×4 grid, either uni-prediction or bi-prediction motion vector is stored depending on the position of the 4×4 grid in the CU. As shown in Fig. 9, uni-prediction motion vector, either Mv1 or Mv2, is stored for the 4×4 grid located in the non-weighted area (that is, not located at the diagonal edge) . On the other hand, a bi-prediction motion vector is stored for the 4×4 grid located in the weighted area. The bi-prediction motion vector is derived from Mv1 and Mv2 according to the following rules:
[0206]
In the case that Mv1 and Mv2 have motion vector from different directions (L0 or L1) , Mv1 and Mv2 are simply combined to form the bi-prediction motion vector.
[0207]
In the case that both Mv1 and Mv2 are from the same L0 (or L1) direction,
[0208]
If the reference picture of Mv2 is the same as a picture in the L1 (or L0) reference picture list, Mv2 is scaled to the picture. Mv1 and the scaled Mv2 are combined to form the bi-prediction motion vector.
[0209]
If the reference picture of Mv1 is the same as a picture in the L1 (or L0) reference picture list, Mv1 is scaled to the picture. The scaled Mv1 and Mv2 are combined to form the bi-prediction motion vector.
[0210]
Otherwise, only Mv1 is stored for the weighted area.
[0211]
2.7 History-based Motion Vector Prediction
[0212]
A history-based MVP (HMVP) method is proposed wherein a HMVP candidate is defined as the motion information of a previously coded block. A table with multiple HMVP candidates is maintained during the encoding/decoding process. The table is emptied when a new slice is encountered. Whenever there is an inter-coded non-affine block, the associated motion information is added to the last entry of the table as a new HMVP candidate. The overall coding flow is depicted in Fig. 10 and Fig. 11.
[0213]
In this contribution, the table size S is set to be 6, which indicates up to 6 HMVP candidates may be added to the table. When inserting a new motion candidate to the table, a constrained FIFO rule is utilized wherein redundancy check is firstly applied to find whether there is an identical HMVP in the table. If found, the identical HMVP is removed from the table and all the HMVP candidates afterwards are moved forward, i.e., with indices reduced by 1.
[0214]
HMVP candidates could be used in the merge candidate list construction process. The latest several HMVP candidates in the table are checked in order and inserted to the candidate list after the TMVP candidate. Pruning is applied on the HMVP candidates to the spatial or temporal merge candidate excluding sub-block motion candidate (i.e., ATMVP) .
[0215]
To reduce the number of pruning operations, three simplifications are introduced:
[0216]
Number of HMPV candidates to be check denoted by L is set as follows:
[0217]
L = (N <=4 ) ? M: (8 -N) (1)
[0218]
wherein N indicates number of available non-sub block merge candidate and M indicates number of available HMVP candidates in the table.
[0219]
In addition, once the total number of available merge candidates reaches the signaled maximally allowed merge candidates minus 1, the merge candidate list construction process from HMVP list is terminated.
[0220]
Moreover, the number of pairs for combined bi-predictive merge candidate derivation is reduced from 12 to 6.
[0221]
Similarly, HMVP candidates could also be used in the AMVP candidate list construction process. The motion vectors of the last K HMVP candidates in the table are inserted after the TMVP candidate. Only HMVP candidates with the same reference picture as the AMVP target reference picture are used to construct the AMVP candidate list. Pruning is applied on the HMVP candidates. In this contribution, K is set to 4 while the AMVP list size is kept unchanged, i.e., equal to 2.
[0222]
2.8 Ultimate motion vector expression (UMVE)
[0223]
In this contribution, ultimate motion vector expression (UMVE) is presented. UMVE is also known as Merge with MVD (MMVD) in VVC. UMVE is used for either skip or merge modes with a proposed motion vector expression method.
[0224]
UMVE re-uses merge candidate as same as using in VVC. Among the merge candidates, a candidate can be selected, and is further expanded by the proposed motion vector expression method.
[0225]
UMVE provides a new motion vector expression with simplified signaling. The expression method includes starting point, motion magnitude, and motion direction.
[0226]
Fig. 12 shows an example of a UMVE search process. Fig. 13 shows an example of a UMVE search point.
[0227]
This proposed technique uses a merge candidate list as it is. But only candidates which are default merge type (MRG_TYPE_DEFAULT_N) are considered for UMVE’s expansion.
[0228]
Base candidate index defines the starting point. Base candidate index indicates the best candidate among candidates in the list as follows.
[0229]
Table 1. Base candidate IDX
[0230]
[Table 0001]
Base candidate IDX 0 1 2 3
N th MVP 1 st MVP 2 nd MVP 3 rd MVP 4 th MVP

[0231]
If the number of base candidate is equal to 1, Base candidate IDX is not signaled.
[0232]
Distance index is motion magnitude information. Distance index indicates the pre-defined distance from the starting point information. Pre-defined distance is as follows:
[0233]
Table 2. Distance IDX
[0234]
[Table 0002]
Distance IDX 0 1 2 3 4 5 6 7
Pixel distance 1/4-pel 1/2-pel 1-pel 2-pel 4-pel 8-pel 16-pel 32-pel

[0235]
Direction index represents the direction of the MVD relative to the starting point. The direction index can represent of the four directions as shown below.
[0236]
Table 3. Direction IDX
[0237]
[Table 0003]
Direction IDX 00 01 10 11
x-axis + N/A N/A
y-axis N/A N/A +

[0238]
UMVE flag is singnaled right after sending a skip flag and merge flag. If skip and merge flag is true, UMVE flag is parsed. If UMVE flage is equal to 1, UMVE syntaxes are parsed. But, if not 1, AFFINE flag is parsed. If AFFINE flag is equal to 1, that is AFFINE mode, But, if not 1, skip/merge index is parsed for VTM’s skip/merge mode.
[0239]
Additional line buffer due to UMVE candidates is not needed. Because a skip/merge candidate of software is directly used as a base candidate. Using input UMVE index, the supplement of MV is decided right before motion compensation. There is no need to hold long line buffer for this.
[0240]
2.9 Inter-intra mode
[0241]
With inter-intra mode, multi-hypothesis prediction combines one intra prediction and one merge indexed prediction. In a merge CU, one flag is signaled for merge mode to select an intra mode from an intra candidate list when the flag is true. For luma component, the intra candidate list is derived from 4 intra prediction modes including DC, planar, horizontal, and vertical modes, and the size of the intra candidate list can be 3 or 4 depending on the block shape. When the CU width is larger than the double of CU height, horizontal mode is exclusive of the intra mode list and when the CU height is larger than the double of CU width, vertical mode is removed from the intra mode list. One intra prediction mode selected by the intra mode index and one merge indexed prediction selected by the merge index are combined using weighted average. For chroma component, DM is always applied without extra signaling. The weights for combining predictions are described as follow. When DC or planar mode is selected or the CB width or height is smaller than 4, equal weights are applied. For those CBs with CB width and height larger than or equal to 4, when horizontal/vertical mode is selected, one CB is first vertically/horizontally split into four equal-area regions. Each weight set, denoted as (w_intrai, w_interi) , where i is from 1 to 4 and (w_intra1, w_inter1) = (6, 2) , (w_intra2, w_inter2) = (5, 3) , (w_intra3, w_inter3) = (3, 5) , and (w_intra4, w_inter4) = (2, 6) , will be applied to a corresponding region. (w_intra1, w_inter1) is for the region closest to the reference samples and (w_intra4, w_inter4) is for the region farthest away from the reference samples. Then, the combined prediction can be calculated by summing up the two weighted predictions and right-shifting 3 bits. Moreover, the intra prediction mode for the intra hypothesis of predictors can be saved for reference of the following neighboring CUs.
[0242]
2.10 Affine merge mode with prediction offsets
[0243]
The proposed method selects the first available affine merge candidate as a base predictor. Then it applies a motion vector offset to each control point’s motion vector value from the base predictor. If there’s no affine merge candidate available, this proposed method will not be used.
[0244]
The selected base predictor’s inter prediction direction, and the reference index of each direction is used without change.
[0245]
In the current implementation, the current block’s affine model is assumed to be a 4-parameter model, only 2 control points need to be derived. Thus, only the first 2 control points of the base predictor will be used as control point predictors.
[0246]
For each control point, a zero_MVD flag is used to indicate whether the control point of current block has the same MV value as the corresponding control point predictor. If zero_MVD flag is true, there’s no other signaling needed for the control point. Otherwise, a distance index and an offset direction index is signaled for the control point.
[0247]
A distance offset table with size of 5 is used as shown in the table below. Distance index is signaled to indicate which distance offset to use. The mapping of distance index and distance offset values is shown in Fig. 14.
[0248]
Table 1 -Distance offset table
[0249]
[Table 0004]
Distance IDX 0 1 2 3 4
Distance-offset 1/2-pel 1-pel 2-pel 4-pel 8-pel

[0250]
The direction index can represent four directions as shown below, where only x or y direction may have an MV difference, but not in both directions.
[0251]
[Table 0005]
Offset Direction IDX 00 01 10 11
x-dir-factor +1 –1 0 0
y-dir-factor 0 0 +1 –1

[0252]
If the inter prediction is uni-prediction, the signaled distance offset is applied on the offset direction for each control point predictor. Results will be the MV value of each control point.
[0253]
For example, when base predictor is uni-prediction, and the motion vector values of a control point is MVP (vpx, vpy) . When distance offset and direction index are signaled, the motion vectors of current block’s corresponding control points will be calculated as below.
[0254]
MV (vx, vy) = MVP (vpx, vpy) + MV (x-dir-factor *distance-offset, y-dir-factor *distance-offset) ;
[0255]
[0256]
If the inter prediction is bi-prediction, the signaled distance offset is applied on the signaled offset direction for control point predictor’s L0 motion vector; and the same distance offset with opposite direction is applied for control point predictor’s L1 motion vector. Results will be the MV values of each control point, on each inter prediction direction.
[0257]
For example, when base predictor is bi-prediction, and the motion vector values of a control point on L0 is MVPL0 (v0px, v0py) , and the motion vector of that control point on L1 is MVPL1 (v1px, v1py) . When distance offset and direction index are signaled, the motion vectors of current block’s corresponding control points will be calculated as below.
[0258]
MVL0 (v0x, v0y) = MVPL0 (v0px, v0py) + MV (x-dir-factor *distance-offset, y-dir-factor *distance-offset ) ;
[0259]
MVL1 (v0x, v0y) = MVPL1 (v0px, v0py) + MV (-x-dir-factor *distance-offset, -y-dir-factor *distance-offset ) ;
[0260]
A simplified method is proposed to reduce the signaling overhead by signaling the distance offset index and the offset direction index per block. The same offset will be applied to all available control points in the same way. In this method, the number of control points is determined by the base predictor’s affine type, 3 control points for 6-parameter type, and 2 control points for 4-parameter type. The distance offset table and the offset direction tables are the same as in 2.1.
[0261]
Since the signaling is done for all the control points of the block at once, the zero_MVD flag is not used in this method.
[0262]
2.11 Representation of Affine Motion Data in P1809115501
[0263]
In P1809115501, it is proposed that the affine parameters instead of CPMVs are stored to predict the affine model of following coded blocks.
[0264]
2.12 Merge list design
[0265]
There are three different merge list construction processes supported in VVC:
[0266]
Sub-block merge candidate list: it includes ATMVP and affine merge candidates. One merge list construction process is shared for both affine modes and ATMVP mode. Here, the ATMVP and affine merge candidates may be added in order. Sub-block merge list size is signaled in slice header, and maximum value is 5.
[0267]
Uni-Prediction TPM merge list: For triangular prediction mode, one merge list construction process for the two partitions is shared even two partitions could select their own merge candidate index. When constructing this merge list, the spatial neighbouring blocks and two temporal blocks of the block are checked. The motion information derived from spatial neighbours and temporal blocks are called regular motion candidates in our IDF. These regular motion candidates are further utilized to derive multiple TPM candidates. Please note the transform is performed in the whole block level, even two partitions may use different motion vectors for generating their own prediction blocks.
[0268]
Uni-Prediction TPM merge list size is fixed to be 5.
[0269]
Regular merge list: For remaining coding blocks, one merge list construction process is shared. Here, the spatial/temporal/HMVP, pairwise combined bi-prediction merge candidates and zero motion candidates may be inserted in order. Regular merge list size is signaled in slice header, and maximum value is 6.
[0270]
2.12.1 Sub-block merge candidate list
[0271]
It is suggested that all the sub-block related motion candidates are put in a separate merge list in addition to the regular merge list for non-sub block merge candidates.
[0272]
The sub-block related motion candidates are put in a separate merge list is named as ‘sub-block merge candidate list’ .
[0273]
In one example, the sub-block merge candidate list includes affine merge candidates, and ATMVP candidate, and/or sub-block based STMVP candidate.
[0274]
2.12.2 Affine merge candidate list
[0275]
In this contribution, the ATMVP merge candidate in the normal merge list is moved to the first position of the affine merge list. Such that all the merge candidates in the new list (i.e., sub-block based merge candidate list) are based on sub-block coding tools.
[0276]
An affine merge candidate list is constructed with following steps:
[0277]
Insert inherited affine candidates
[0278]
Inherited affine candidate means that the candidate is derived from the affine motion model of its valid neighbor affine coded block. The maximum two inherited affine candidates are derived from affine motion model of the neighboring blocks and inserted into the candidate list. For the left predictor, the scan order is {A0, A1} ; for the above predictor, the scan order is {B0, B1, B2} .
[0279]
Insert constructed affine candidates
[0280]
If the number of candidates in affine merge candidate list is less than MaxNumAffineCand (set to 5) , constructed affine candidates are inserted into the candidate list. Constructed affine candidate means the candidate is constructed by combining the neighbor motion information of each control point.
[0281]
The motion information for the control points is derived firstly from the specified spatial neighbors and temporal neighbor shown in Fig. 5. CPk (k=1, 2, 3, 4) represents the k-th control point. A0, A1, A2, B0, B1, B2 and B3 are spatial positions for predicting CPk (k=1, 2, 3) ; T is temporal position for predicting CP4.
[0282]
The coordinates of CP1, CP2, CP3 and CP4 is (0, 0) , (W, 0) , (H, 0) and (W, H) , respectively, where W and H are the width and height of current block.
[0283]
[0284]
The motion information of each control point is obtained according to the following priority order:
[0285]
For CP1, the checking priority is B2->B3->A2. B2 is used if it is available. Otherwise, if B2 is available, B3 is used. If both B2 and B3 are unavailable, A2 is used. If all the three candidates are unavailable, the motion information of CP1 cannot be obtained.
[0286]
For CP2, the checking priority is B1->B0.
[0287]
For CP3, the checking priority is A1->A0.
[0288]
For CP4, T is used.
[0289]
Secondly, the combinations of controls points are used to construct an affine merge candidate.
[0290]
Motion information of three control points are needed to construct a 6-parameter affine candidate. The three control points can be selected from one of the following four combinations ( {CP1, CP2, CP4} , {CP1, CP2, CP3} , {CP2, CP3, CP4} , {CP1, CP3, CP4} ) . Combinations {CP1, CP2, CP3} , {CP2, CP3, CP4} , {CP1, CP3, CP4} will be converted to a 6-parameter motion model represented by top-left, top-right and bottom-left control points.
[0291]
Motion information of two control points are needed to construct a 4-parameter affine candidate. The two control points can be selected from one of the two combinations ( {CP1, CP2} , {CP1, CP3} ) . The two combinations will be converted to a 4-parameter motion model represented by top-left and top-right control points.
[0292]
The combinations of constructed affine candidates are inserted into to candidate list as following order:
[0293]
{CP1, CP2, CP3} , {CP1, CP2, CP4} , {CP1, CP3, CP4} , {CP2, CP3, CP4} , {CP1, CP2} , {CP1, CP3}
[0294]
The available combination of motion information of CPs is only added to the affine merge list when the CPs have the same reference index.
[0295]
Padding with zero motion vectors
[0296]
If the number of candidates in affine merge candidate list is less than 5, zero motion vectors with zero reference indices are insert into the candidate list, until the list is full.
[0297]
Shared merge list
[0298]
It is proposed that it is proposed to share the same merging candidate list for all leaf CUs of one ancestor node in the CU split tree for enabling parallel processing of small skip/merge-coded CUs. The ancestor node is named merge sharing node. The shared merging candidate list is generated at the merge sharing node pretending the merge sharing node is a leaf CU.
[0299]
3. Examples of Problems Solved by Embodiments
[0300]
How to harmonize the affine prediction with other new coding tools such as HMVP is still unclear.
[0301]
4. Examples of embodiments
[0302]
In this document, we propose to methods to control the bandwidth required by affine prediction in a more flexible way. We also propose to harmonize affine prediction with other coding tools.
[0303]
The detailed techniques below should be considered as examples to explain general concepts. These techniques should not be interpreted in a narrow way. Furthermore, these techniques can be combined in any manner. Combination between these techniques and other techniques is also applicable.
[0304]
In the discussions below, suppose the coordinate of the top-left corner/top-right corner/bottom-left corner/bottom-right corner of a neighboring block (e.g., above or left neighbouring CU) of current block are (LTNx, LTNy) / (RTNx, RTNy) / (LBNx, LBNy) / (RBNx, RBNy) , respectively; the coordinate of the top-left corner/top-right corner/bottom-left corner/bottom-right corner of the currernt CU are (LTCx, LTCy) / (RTCx, RTCy) / (LBCx, LBCy) / (RBCx, RBCy) , respectively; the width and height of the affine coded above or left neighbouring CU are w’ and h’, respectively; the width and height of the affine coded current CU are w and h, respectively.
[0305]
The CPMVs of the top-left corner, the top-right corner and the bottom-left corner are denoted as MV0= (MV0x, MV0y) , MV1= (MV1x, MV1y) and MV2= (MV2x, MV2y) , respectively.
[0306]
In the following discussion, SignShift (x, n) is defined as
[0307]
[0308]
In one example, offset0 and offset1 are set to be (1<< (n-1) ) . In another example, they are set to be 0.
[0309]
Shift is defined as
[0310]
Shift (x, n) = (x+offsset) >>n,
[0311]
In one example, offset is set to be (1<< (n-1) ) . In another example, it is set to be 0.
[0312]
Clip3 (min, max, x) is defined as
[0313]
[0314]
It also should be noted that, the term “affine merge candidate list” may be renamed (e.g. “sub-block merge candidate list” ) when other kinds of sub-block merge candidate such as ATMVP candidate is also put into the list or other kinds of merge list which may include at least one affine merge candidate.
[0315]
The proposed techniques may be also applicable to other kinds of motion candidate list, such as affine AMVP candidate list.
[0316]
History-based affine parameters inheritance
[0317]
1. The parameters a, b, c, d, e and f defined in Eq (2) for an affine-coded block may be stored in a buffer (the buffer may be a table, or lookup table, or a First-In-First-Out (FIFO) table, or a stack, or a queue, or a list, or a link, or an array, or any other storage with any data structure) or constrained FIFO table wherein each affine model is unique. In the following discussion, one entry in the buffer is denoted as H [i] , where i is the index referring to the entry.
[0318]
a. Alternatively, a, b, c and d defined in Eq (2) may be stored in the buffer; In this case, e and f are not stored any more.
[0319]
b. Alternatively, a and b defined in Eq (1) may be stored in the buffer if it is coded with the 4-parameter affine mode.;
[0320]
c. Alternatively, a, b, e and f defined in Eq (1) may be stored in the buffer if it is coded with the 4-parameter affine mode;
[0321]
d. The parameters a, b, c, d, e and f defined in Eq (2) are always stored in the buffer, but it is restricted that c=-b, d= a, if it is coded with 4-parameter affine mode.
[0322]
e. The parameters a, b, c and d defined in Eq (2) are always stored in the buffer, but it is restricted that c=-b, d=a, if it is coded with 4-parameter affine mode.
[0323]
f. Same number of parameters may be stored for 4-parameter and 6-parameter affine models, for example, a, b, c, d, e and f are stored. In another example, a, b, c and d are stored.
[0324]
g. Alternatively, different number of parameters may be store for 4-parameter and 6-parameter affine models, and affine model type (i.e., 4-parameter or 6-parameter) may be store as well.
[0325]
h. Which parameters to be stored in the buffer may depend on the affine modes, inter or merge mode, block size, picture type, etc. al.
[0326]
i. Side information associated with the affine parameters may also be stored in the buffer together with the affine parameters, such as inter prediction direction (list 0 or list 1, or Bi) , and reference index for list 0 and/or list 1. In this disclosure, the associated side information may also be included when we talk about a set of affine parameters stored in the buffer.
[0327]
i. If the affined-coded block is bi-predicted, then the set of affine parameters to be stored include the parameters used for list 0 as well as the parameters used for list 1.
[0328]
(a) The parameters for the two reference lists (List0 and List1) are both stored.
[0329]
(b) In one example, the parameters for the two reference lists are stored independently (in two different buffers) ;
[0330]
(c) Alternatively, the parameters for the two reference lists can be stored with prediction from one to the other.
[0331]
j. As an alternative storing method, CPMVs {MV 0, MV 1} or {MV 0, MV 1, MV 2} of an affine-coded block are stored in the buffer instead of the parameters. The parameters for coding a new block can be calculated from {MV 0, MV 1} or {MV 0, MV 1, MV 2} when needed.
[0332]
i. The width of the affine coded block may be stored in the buffer with the CPMVs.
[0333]
ii. The height of the affine coded block may be stored in the buffer with the CPMVs.
[0334]
iii. The top-left coordinate of the affine coded block may be stored in the buffer with the CPMVs.
[0335]
k. In one example, the base MV in Eq (1) is stored with parameters a and b.
[0336]
i. In one example, the coordinate of the position where the base MV locates at is also stored with the parameters a and b.
[0337]
l. In one example, the base MV in Eq (2) is stored with parameters a, b, c and d.
[0338]
i. In one example, the coordinate of the position where the base MV locates at is also stored with the parameters a, b c and d.
[0339]
m. In one example, a set of stored parameters and their base MV should refer to the same reference picture if they refer to the same reference picture list.
[0340]
n. The buffer used to store the coded/decoded affine related information, such as CPMVs, affine parameters, base point position coordinates, block width and height, is also called “affine HMVP buffer” in this document.
[0341]
2. In one example, the parameters to be stored in the buffer can be calculated as below
[0342]
a.
[0343]
b.
[0344]
c.
[0345]
d.
[0346]
e. c=-b for 4-parameter affine prediction.
[0347]
f. d=a for 4-parameter affine prediction.
[0348]
g.
[0349]
h.
[0350]
i. (e, f) = (mvx, mvy) , where (mvx, mvy) can be any MV used for coding one block.
[0351]
3. It is proposed to calculate affine model parameters without division operations. Suppose the width and height of the current block noted as w and h are equal to 2 WB and 2 HB. P is an integer number defining the calculation precision, e.g., P is set to 7.
[0352]
a.
[0353]
b.
[0354]
c.
[0355]
d.
[0356]
4. The affine model parameters may be further clipped before being stored in the buffer.
[0357]
a. In one example, suppose a parameter x (e.g. x= a or b or c or d) is stored with K bits, then x = Clip3 (-2 K-1, 2 K-1-1, x) .
[0358]
b. For example, a=Clip (-128, 127, a) , then a is stored as a 8 bit signed integer.
[0359]
5. The affine model parameters may be clipped before being used for coding/decoding affine-coded blocks (such as, to derive MVs for sub-blocks) .
[0360]
a. In one example, a=Clip3 (Min_a, Max_a, a) , b=Clip3 (Min_b, Max_b, b) , c=Clip3 (Min_c, Max_c, c) , d=Clip3 (Min_d, Max_d, d) wherein Min_a/b/c/d and Max_a/b/c/d are called clipping boundaries.
[0361]
b. In one example, the clipping boundaries may depend on the precision (e.g., bit-depth) of affine parameters.
[0362]
c. In one example, the clipping boundaries may depend on width and height of the block.
[0363]
d. In one example, the clipping boundaries may be signaled such as in VPS/SPS/PPS/picture header/slice header/tile group header.
[0364]
e. In one example, the clipping boundaries may depend on the profile or/and level of a standard.
[0365]
6. The affine model parameters of each affine-coded block may be stored in the buffer after decoding or encoding that block.
[0366]
a. Whether to store the affine model parameters of an affine-coded block may depend on the coded affine mode (e.g., affine AMVP, or affine merge) , number of affine-coded blocks, positions of the affine-coded block, block dimension etc. al.
[0367]
b. In one example, the affine model parameters of the every Kth affine-coded block are stored in the buffer after decoding or encoding every K affine-coded blocks. That is, the affine model parameters of every first, second, …. (K-1) th affine-coded blocks are not stored in the buffer.
[0368]
i. K is a number such as 2 or 4.
[0369]
ii. K may be signaled from the encoder to the decoder in VPS/SPS/PPS/Slice header/tile group head/tile.
[0370]
7. The buffer for storing the affine parameters may have a maximum capacity.
[0371]
a. The buffer may at most store M sets of affine parameters, i.e., for H [i] , i>=0 and i <M.
[0372]
i. M is an integer such as 8 or 16.
[0373]
ii. M may be signaled from the encoder to the decoder in VPS/SPS/PPS/Slice header/tile group head/tile/CTU line/CTU.
[0374]
iii. M may be different for different standard profiles/levels/tiers.
[0375]
8. When the buffer for affine parameter storage is not full, (i.e., the number of stored sets of affine parameters S is smaller than the maximum capacity M) , and a new set of affine parameters need to be stored into the buffer, H [S-1] is used to store the new parameters and then S=S+1.
[0376]
9. When the buffer is full (i.e., the number of stored sets of affine parameters S is equal to the maximum capacity M) , and a new set of affine parameters needs to be stored into the buffer, one or some strategies as below can be done:
[0377]
a. The new set of affine parameters cannot be stored into the buffer;
[0378]
b. One entry already in the buffer is removed and the new set of affine parameters is stored into the buffer.
[0379]
i. In one example, the earliest entry stored in the buffer, e.g. H [0] is removed from the buffer.
[0380]
ii. In one example, the last entry stored in the buffer, e.g. H [M-1] is removed from the buffer.
[0381]
iii. In one example, any entry stored in the buffer, e.g. H [T] is removed from the buffer, T>=0 and T < M.
[0382]
iv. If H [T] is removed, the new set of affine parameters is stored as H [T] .
[0383]
v. If H [T] is removed, all entries after H [T] are moving forward. For example, H [X] =H [X+1] for X from T to M-1 in an ascending order. Then the new set of affine parameters is put to the last entry in the buffer, e.g. H [M-1] ;
[0384]
vi. If H [T] is removed, all entries before H [T] are moving backward. For example, H [X] =H [X-1] for X from T to 1 in a descending order. Then the new set of affine parameters is put to the first entry in the buffer, e.g. H [0] ;
[0385]
10. When a new set of affine parameters needs to be stored into the buffer, it may be compared to all or some sets of affine parameters already in the buffer. If it is judged to be same or similar to at least one set of affine parameters already in the buffer, it should not be stored into the buffer. This procedure is known as “pruning” .
[0386]
a. For one reference picture list (one prediction direction) , the affine parameters {a, b, c, d} or {a, b, c, d, e, f} and affine parameters {a’, b’, c’, d’} or {a’, b’, c’, d’, e’, f’} are considered to be same or similar if
[0387]
i. a==a’ in one example.
[0388]
ii. b==b’ in one example.
[0389]
iii. c==c’ in one example.
[0390]
iv. d==d’ in one example.
[0391]
v. a==a’ and b==b’ in one example.
[0392]
vi. c==c’ and d==d’ in one example.
[0393]
vii. a==a’ and b==b’ and c==c’ in one example.
[0394]
viii. a==a’ and b==b’ and c==c’ and d=d’ in one example.
[0395]
ix. |a-a’| < delta0 in one example.
[0396]
x. |b-b’| < delta0 in one example.
[0397]
xi. |c-c’| < delta0 in one example.
[0398]
xii. |d-d’| < delta0 in one example.
[0399]
xiii. |a-a’| < delta0 and |b-b’| < delta1 in one example.
[0400]
xiv. |c-c’| < delta0 and |d-d’| < delta1 in one example.
[0401]
xv. |a-a’| < delta0 and |b-b’| < delta1 and |c-c’| < delta2 in one example.
[0402]
xvi. |a-a’| < delta0 and |b-b’| < delta1 and |c-c’| < delta2 and |d-d’| < delta3 in one example.
[0403]
xvii. Variables (e.g., delta0, delta1, delta2, delta3) may be a predefined number, or it may depend on coding information such as block width/height. It may be different for different standard profiles/levels/tiers. It may be signaled from the encoder to the decoder in VPS/SPS/PPS/Slice header/tile group head/tile/CTU line/CTU.
[0404]
b. Two sets of affine parameters are considered not to be the same or similar if
[0405]
i. They are associated with different inter prediction direction (list 0 or list 1, or Bi) ,
[0406]
ii. They are associated with different reference indices for list 0 when list 0 is one prediction direction in use.
[0407]
iii. They are associated with different reference indices for list 1 when list 1 is one prediction direction in use.
[0408]
iv. They have different number of affine parameters or they use different affine models.
[0409]
c. If two sets of affine parameters are both associated from bi-prediction, they are judged to be identical (or similar) if parameters for list 0 are judged to be identical (or similar) and parameters for list 1 are also judged to be identical (or similar) .
[0410]
d. A new set of affine parameters may be compared to each set of affine parameters already in the buffer.
[0411]
i. Alternatively, the new set of affine parameters is only compared to some sets of affine parameters already in the buffer. For example, it is compared to the first W entries, e.g. H [0] …H [W-1] . In another example, it is compared to the last W entries, e.g. H [M-W] , H [M-1] . In another example, it is compared to one entry in each W entries, e.g. H [0] , H [W] , H [2*W] ….
[0412]
e. If one entry in the buffer, denoted as H [T] is found identical or similar to the new set of affine parameters needs to be stored into the buffer, then
[0413]
i. H [T] is removed, then the new set of affine parameters is stored as H [T] .
[0414]
ii. H [T] is removed, then all entries after H [T] are moving forward. For example, H [X] =H [X+1] for X from T to M-1 in an ascending order. Then the new set of affine parameters is put to the last entry in the buffer, e.g. H [M-1] .
[0415]
iii. H [T] is removed then all entries before H [T] are moving backward. For example, H [X] =H [X-1] for X from T to 1 in a descending order. Then the new set of affine parameters is put to the first entry in the buffer, e.g. H [0] .
[0416]
11. The buffer storing the affine parameters may be refreshed.
[0417]
a. The buffer is emptied when being refreshed.
[0418]
b. The buffer is emptied when being refreshed, then one or more default affine parameters are put into the buffer when being refreshed.
[0419]
i. The default affine parameters can be different for different sequences;
[0420]
ii. The default affine parameters can be different for different pictures;
[0421]
iii. The default affine parameters can be different for different slices;
[0422]
iv. The default affine parameters can be different for different tiles;
[0423]
v. The default affine parameters can be different for different CTU (a.k.a LCU) lines;
[0424]
vi. The default affine parameters can be different for different CTUs;
[0425]
vii. The default affine parameters can be signaled from the encoder to the decoder in VPS/SPS/PPS/Slice header/tile group head/tile/CTU line/CTU.
[0426]
c. The buffer is refreshed when
[0427]
i. starting coding/decoding the first block of a picture;
[0428]
ii. starting coding/decoding the first block of a slice;
[0429]
iii. starting coding/decoding the first block of a tile;
[0430]
iv. starting coding/decoding the first block of a CTU (a.k.a LCU) line;
[0431]
v. starting coding/decoding the first block of a CTU;
[0432]
12. The affine model parameters stored in the buffer may be used to derive the affine prediction of a current block.
[0433]
a. In one example, the parameters stored in the buffer may be utilized for motion vector prediction or motion vector coding of current block.
[0434]
b. In one example, the parameters stored in the buffer may be used to derive the control point MVs (CPMVs) of the current affine-coded block.
[0435]
c. In one example, the parameters stored in the buffer may be used to derive the MVs used in motion compensation for sub-blocks of the current affine-coded block.
[0436]
d. In one example, the parameters stored in the buffer may be used to derive the prediction for CPMVs of the current affine-coded block. This prediction for CPMVs can be used to predict the CPMVs of the current block when CPMVs need to be coded.
[0437]
i. In one example, if current block is coded with 4-parameter affine model, then, higher priority is assigned to 4-parameter affine model and lower priority is assigned to 6-parameter affine model.
[0438]
ii. In one example, if current block is coded with 6-parameter affine model, then, higher priority is assigned to 6-parameter affine model and lower priority is assigned to 4-parameter affine model.
[0439]
13. The motion information of a neighbouring M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer may be used together to derive the affine model of the current block. For example, they can be used to derive the CPMVs or the MVs of sub-blocks used in motion compensation as shown in Fig. 15
[0440]
a. Suppose the MV stored in the unit block is (mv h 0, mv v 0) and the coordinate of the position for which the MV (mv h (x, y) , mv v (x, y) ) is derived is denoted as (x, y) . Suppose the coordinate of the top-left corner of the current block is (x0’, y0’) , the width and height of the current block is w and h, then
[0441]
i. To derive a CPMV, (x, y) can be (x0’, y0’) , or (x0’+w, y0’) , or (x0’, y0’+h) , or (x0’+w, y0’+h) .
[0442]
ii. To derive a MV for a sub-block of the current block, (x, y) can be the center of the sub-block. Suppose (x00, y00) is the top-left position of a sub-block, the sub-block size is M×N, then
[0443]
(a) xm=x00+M/2, ym=y00+N/2;
[0444]
(b) xm=x00+M/2-1, ym=y00+N/2-1;
[0445]
(c) xm=x00+M/2-1, ym=y00+N/2;
[0446]
(d) xm=x00+M/2, ym=y00+N/2-1;
[0447]
iii. In one example,
[0448]
[0449]
if the parameters in the buffer come from a block coded with the 4-parameter affine mode.
[0450]
iv. In one example,
[0451]
[0452]
if the parameters in the buffer come from a block coded with the 6-parameter affine mode.
[0453]
v. In one example,
[0454]
[0455]
no matter the parameters in the buffer come from a block coded with the 4-parameter affine mode or the 6-parameter affine mode.
[0456]
b. In one example, CPMVs of the current block are derived from the motion vector and parameters stored in the buffer, and these CPMVs serves as MVPs for the signaled CPMVs of the current block.
[0457]
c. In one example, CPMVs of the current block are derived from the motion vector and parameters stored in the buffer, and these CPMVs are used to derive the MVs of each sub-block used for motion compensation.
[0458]
d. In one example, the MVs of each sub-block used for motion compensation are derived from the motion vector and parameters stored in a neighbouring block, if the current block is affine merge coded.
[0459]
e. In one example, the motion vector of a neighbouring unit block and the set of parameters used to derive the CPMVs or the MVs of sub-blocks used in motion compensation for the current block should follow some or all constrains as below:
[0460]
i. They are associated with the same inter prediction direction (list 0 or list 1, or Bi) ,
[0461]
ii. They are associated with the same reference indices for list 0 when list 0 is one prediction direction in use.
[0462]
iii. They are associated with the same reference indices for list 1 when list 1 is one prediction direction in use.
[0463]
Figure 15 is an example of deriving CPMVs from the MV of a neighboring block and a set of parameters stored in the buffer.
[0464]
14. The affine model of the current block derived from a set of affine parameters stored in the buffer may be used to generate an affine merge candidate.
[0465]
a. In one example, the side information such as inter-prediction direction and reference indices for list 0/list 1 associated with the stored parameters is inherited by the generated affine merge candidate.
[0466]
b. The affine merge candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine merge candidate list after the affine merge candidates inherited from neighbouring blocks, before the constructed affine merge candidates;
[0467]
c. The affine merge candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine merge candidate list after the constructed affine merge candidates, before the padding candidates.
[0468]
d. The affine merge candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine merge list after the constructed affine merge candidates not using temporal motion prediction (block T in Fig. 5) , before the constructed affine merge candidates using temporal motion prediction (block T in Fig. 5) ;
[0469]
e. The affine merge candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine merge candidate list, and they can be interleaved with the constructed affine merge candidates, or/and padding candidates.
[0470]
15. The affine parameters stored in the buffer can be used to generate affine AMVP candidates.
[0471]
a. In one example, the stored parameters used to generate affine AMVP candidates should refer to the same reference picture as the target reference picture of an affine AMVP coded block.
[0472]
i. In one example, the reference picture list associated with the stored parameters should be the same as the target reference picture list.
[0473]
ii. In one example, the reference index associated with the stored parameters should be the same as the target reference index.
[0474]
b. The affine AMVP candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine AMVP candidate list after the affine AMVP candidates inherited from neighbouring blocks, before the constructed affine AMVP candidates;
[0475]
c. The affine AMVP candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine AMVP candidate list after the constructed affine AMVP candidates, before the HEVC based affine AMVP candidates.
[0476]
d. The affine AMVP candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine AMVP candidate list after the HEVC based affine AMVP candidates, before the padding affine AMVP candidates.
[0477]
e. The affine AMVP candidate derived from a set of affine parameters stored in the buffer can be inserted into the affine AMVP list after the constructed affine AMVP candidates not using temporal motion prediction (block T in Fig. 5) , before the constructed affine AMVP candidates using temporal motion prediction (block T in Fig. 5) ;
[0478]
f. In one example, if current block is coded with 4-parameter affine model, then, higher priority is assigned to 4-parameter affine model and lower priority is assigned to 6-parameter affine model.
[0479]
g. In one example, if current block is coded with 6-parameter affine model, then, higher priority is assigned to 6-parameter affine model and lower priority is assigned to 4-parameter affine model.
[0480]
16. How many sets of affine model parameters in the buffer to be added to the candidate list (denoted by N) may be pre-defined.
[0481]
a. N may be signaled in from the encoder to the decoder in VPS/SPS/PPS/Slice header/tile group head/tile.
[0482]
b. N may be dependent on block dimension, coded mode information (e.g. AMVP/Merge) , etc. al.
[0483]
c. N may be dependent on the standard profiles/levels/tiers.
[0484]
d. N may depend on the available candidates in the list.
[0485]
i. N may depend on the available candidates of a certain type (e.g., inherited affine motion candidates)
[0486]
17. How to select partial of all sets of affine model parameters (e.g., N as in bullet 15) in the buffer to be inserted into the candidate list may be pre-defined.
[0487]
a. In one example, the latest several sets (e.g., the last N entries) in the buffer.
[0488]
b. It may be dependent on the index of sets of affine model parameters in the buffer.
[0489]
18. When multiple sets of affine model parameters need to be inserted to the candidate list, they may be added in the ascending order of indices.
[0490]
a. Alternatively, they may be added in the descending order of indices.
[0491]
b. Alternatively, the rule to decide the inserting order is depend on the number of available candidates in the candidate list before adding those from the buffer.
[0492]
19. A set of affine parameters stored in the buffer, and their associated base MVs and the position where the base MV locates at, may be used together to derive the affine model of the current block. For example, they can be used to derive the CPMVs or the MVs of sub-blocks used in motion compensation.
[0493]
a. Suppose the associated base MV is (mv h 0, mv v 0) and the coordinate of the position for which the MV (mv h (x, y) , mv v (x, y) ) is derived is denoted as (x, y) . Suppose the coordinate of the top-left corner of the current block is (x0’, y0’) , the width and height of the current block is w and h, then
[0494]
i. To derive a CPMV, (x, y) can be (x0’, y0’) , or (x0’+w, y0’) , or (x0’, y0’+h) , or (x0’+w, y0’+h) .
[0495]
ii. To derive a MV for a sub-block of the current block, (x, y) can be the center of the sub-block.
[0496]
iii. Suppose (xm, ym) is the stored coordinate of the position (base position) where the base MV locates at.
[0497]
iv. In one example,
[0498]
[0499]
if the parameters in the buffer come from a block coded with the 4-parameter affine mode.
[0500]
v. In one example,
[0501]
[0502]
if the parameters in the buffer come from a block coded with the 6-parameter affine mode.
[0503]
vi. In one example,
[0504]
[0505]
no matter the parameters in the buffer come from a block coded with the 4-parameter affine mode or the 6-parameter affine mode.
[0506]
b. In one example, CPMVs of the current block are derived from the motion vector and parameters stored in the buffer, and these CPMVs serves as MVPs for the signaled CPMVs of the current block.
[0507]
c. In one example, CPMVs of the current block are derived from the associated base MV and parameters stored in the buffer, and these CPMVs are used to derive the MVs of each sub-block used for motion compensation.
[0508]
d. In one example, the MVs of each sub-block used for motion compensation are derived from the associated base MV and parameters stored in a neighbouring block, if the current block is affine merge coded.
[0509]
20. The motion information of a spatial neighbouring/non-adjacent M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer may be used together to derive the affine model of the current block. For example, they can be used to derive the CPMVs or the MVs of sub-blocks used in motion compensation.
[0510]
a. Suppose the MV stored in the unit block is (mv h 0, mv v 0) and the coordinate of the position for which the MV (mv h (x, y) , mv v (x, y) ) is derived is denoted as (x, y) . Suppose the coordinate of the top-left corner of the current block is (x0’, y0’) , the width and height of the current block is w and h, then
[0511]
i. To derive a CPMV, (x, y) can be (x0’, y0’) , or (x0’+w, y0’) , or (x0’, y0’+h) , or (x0’+w, y0’+h) .
[0512]
ii. To derive a MV for a sub-block of the current block, (x, y) can be the center of the sub-block.
[0513]
iii. Suppose (x00, y00) is the top-left position of the spatial neighbouring M×N unit block, then the base position (xm, ym) can be derived as:
[0514]
(a) xm=x00+M/2, ym=y00+N/2;
[0515]
(b) xm=x00+M/2-1, ym=y00+N/2-1;
[0516]
(c) xm=x00+M/2-1, ym=y00+N/2;
[0517]
(d) xm=x00+M/2, ym=y00+N/2-1;
[0518]
iv. In one example,
[0519]
[0520]
if the parameters in the buffer come from a block coded with the 4-parameter affine mode.
[0521]
v. In one example,
[0522]
[0523]
if the parameters in the buffer come from a block coded with the 6-parameter affine mode.
[0524]
vi. In one example,
[0525]
[0526]
no matter the parameters in the buffer come from a block coded with the 4-parameter affine mode or the 6-parameter affine mode.
[0527]
b. In one example, CPMVs of the current block are derived from the motion vector of a spatial neighbouring unit block and parameters stored in the buffer, and these CPMVs serves as MVPs for the signaled CPMVs of the current block.
[0528]
c. In one example, CPMVs of the current block are derived from the motion vector of a spatial neighbouring unit block and parameters stored in the buffer, and these CPMVs are used to derive the MVs of each sub-block used for motion compensation.
[0529]
d. In one example, the MVs of each sub-block used for motion compensation are derived from the motion vector of a spatial neighbouring unit block and parameters stored in a neighbouring block, if the current block is affine merge coded.
[0530]
e. In one example, the motion vector of a spatial neighbouring unit block and the set of parameters used to derive the CPMVs or the MVs of sub-blocks used in motion compensation for the current block should follow some or all constrains as below:
[0531]
i. They are associated with the same inter prediction direction (list 0 or list 1, or Bi) ,
[0532]
ii. They are associated with the same reference indices for list 0 when list 0 is one prediction direction in use.
[0533]
iii. They are associated with the same reference indices for list 1 when list 1 is one prediction direction in use.
[0534]
f. In one example, if the MV of the spatial neighbouring M×N unit block and the stored affine parameters referring to different reference pictures, the MV of the spatial neighbouring M×N unit block is scaled to refer to the same reference picture as the stored affine parameters to derive the affine model of the current block.
[0535]
21. It is proposed that temporal motion vector prediction (TMVP) can be used together with the affine parameters stored in the buffer. For example, they can be used to derive the CPMVs or the MVs of sub-blocks used in motion compensation.
[0536]
a. The motion information of a collocated M×N unit block (e.g. 4×4 block in VTM) in the collocated picture and a set of affine parameters stored in the buffer may be used together to derive the affine model of the current block. For example, they can be used to derive the CPMVs or the MVs of sub-blocks used in motion compensation.
[0537]
i. Figure 25 shows examples of possible positions of the collocated unit block. (A1~A4, B1~B4, …F1~F4, J1~J4, K1~K4, and L1~L4.
[0538]
b. Suppose the MV stored in the collocated unit block is (mv h 0, mv v 0) and the coordinate of the position for which the MV (mv h (x, y) , mv v (x, y) ) is derived is denoted as (x, y) . Suppose the coordinate of the top-left corner of the current block is (x0’, y0’) , the width and height of the current block is w and h, then
[0539]
i. To derive a CPMV, (x, y) can be (x0’, y0’) , or (x0’+w, y0’) , or (x0’, y0’+h) , or (x0’+w, y0’+h) .
[0540]
ii. To derive a MV for a sub-block of the current block, (x, y) can be the center of the sub-block.
[0541]
iii. Suppose (x00, y00) is the top-left position of the collocated M×N unit block, then the base position (xm, ym) can be derived as:
[0542]
(a) xm=x00+M/2, ym=y00+N/2;
[0543]
(b) xm=x00+M/2-1, ym=y00+N/2-1;
[0544]
(c) xm=x00+M/2-1, ym=y00+N/2;
[0545]
(d) xm=x00+M/2, ym=y00+N/2-1;
[0546]
iv. In one example,
[0547]
[0548]
if the parameters in the buffer come from a block coded with the 4-parameter affine mode.
[0549]
v. In one example,
[0550]
[0551]
if the parameters in the buffer come from a block coded with the 6-parameter affine mode.
[0552]
vi. In one example,
[0553]
[0554]
no matter the parameters in the buffer come from a block coded with the 4-parameter affine mode or the 6-parameter affine mode.
[0555]
c. In one example, CPMVs of the current block are derived from the motion vector of a temporal neighbouring block and parameters stored in the buffer, and these CPMVs serves as MVPs for the signaled CPMVs of the current block.
[0556]
d. In one example, CPMVs of the current block are derived from the motion vector of a temporal neighbouring block and parameters stored in the buffer, and these CPMVs are used to derive the MVs of each sub-block used for motion compensation.
[0557]
e. In one example, the MVs of each sub-block used for motion compensation are derived from the motion vector of a temporal neighbouring block and parameters stored in a neighbouring block, if the current block is affine merge coded.
[0558]
f. In one example, the motion vector of a temporal neighbouring unit block and the set of parameters used to derive the CPMVs or the MVs of sub-blocks used in motion compensation for the current block should follow some or all constrains as below:
[0559]
i. They are associated with the same inter prediction direction (list 0 or list 1, or Bi) ,
[0560]
ii. They are associated with the same reference indices for list 0 when list 0 is one prediction direction in use.
[0561]
iii. They are associated with the same reference indices for list 1 when list 1 is one prediction direction in use.
[0562]
g. In one example, if the MV of the temporal neighbouring M×N unit block and the stored affine parameters referring to different reference pictures, the MV of the spatial temporal M×N unit block is scaled to refer to the same reference picture as the stored affine parameters to derive the affine model of the current block.
[0563]
i. For example, if the POC of the collocated picture is POCx; the POC of the reference picture the MV of the temporal neighbouring M×N unit block refers to is POCy; the POC of the current picture is POCz; the POC of the reference picture the stored affine parameters refer to is POCw, then (mv h 0, mv v 0) is scaled as
[0564]
mv h 0= mv h 0× (POCw-POCz) / (POCy-POCx) and
[0565]
mv v 0= mv v 0× (POCw-POCz) / (POCy-POCx) .
[0566]
22. The affine merge candidates derived from parameters stored in the buffer and one or multiple spatial neighbouring/non-adjacent unit blocks can be put into the affine merge candidate list.
[0567]
a. In one example, these candidates are put right after the inherited affine merge candidates.
[0568]
b. In one example, these candidates are put right after the first constructed affine merge candidate.
[0569]
c. In one example, these candidates are put right after the first affine merge candidate constructed from spatial neighbouring blocks.
[0570]
d. In one example, these candidates are put right after all the constructed affine merge candidates.
[0571]
e. In one example, these candidates are put right before all the zero affine merge candidates.
[0572]
f. In one example, a spatial neighbouring unit block is not used to derive an affine merge candidate with the parameters stored in the buffer, if another affine merge candidate is inherited from the spatial neighbouring unit block.
[0573]
g. In one example, a spatial neighbouring unit block can be used to derive an affine merge candidate with only one set of the parameters stored in the buffer. In other words, if a spatial neighbouring unit block and set of the parameters stored in the buffer has derive an affine merge candidate, it cannot be used to derive another affine merge candidate with another set of parameters stored in the buffer.
[0574]
h. In one example, at most N affine merge candidates derived from parameters stored in the buffer and a spatial neighbouring unit block can be put into the affine merge candidate list. N is an integer such as 3.
[0575]
i. In one example, the GBI index of the current block is inherited from the GBI index of the spatial neighbouring block if it chooses the affine merge candidates derived from parameters stored in the buffer and a spatial neighbouring unit block.
[0576]
j. In one example, affine merge candidates derived from parameters stored in the buffer and spatial neighbouring blocks are put into the affine merge candidate list in order.
[0577]
i. For example, a two-level nested looping method are used to search available affine merge candidates derived from parameters stored in the buffer and spatial neighbouring blocks and put them into the affine merge candidate list.
[0578]
(a) In the first level loop, each set of parameters stored in the buffer are visited in order. They can be visited from the beginning of the table to the end, or from the end of the table to the beginning, or in any other predefined or adaptive order.
[0579]
a. In an example, some sets of parameters stored in the buffer are skipped in the first loop. For example, the first N or the last N sets in the table are skipped. Alternatively, H [k] s are skipped if k %S == 0. Alternatively, H [k] s are skipped if k %S ! = 0
[0580]
(b) For each set of parameters stored in the buffer, a second level loop is applied. In the second level loop, each spatial neighboring block is visited in order. For example, blocks A1, B1, B0, A0, and B2 as shown in Fig. 5 are visited in order. In a pseudo code implementation, the nested loops can be described as:
[0581]
[0582]
a. In one example, there may be only one spatial neighbouring block included in the second loop. For example, only A1 is included.
[0583]
b. With a set of parameters given in the first level loop and a spatial neighbouring block given in the second level loop, an affine merge candidate generated and put into the affine merge candidate list if all or some of the following conditions are satisfied.
[0584]
i. The spatial neighbouring block is available;
[0585]
ii. The spatial neighbouring block is inter-coded;
[0586]
iii. The spatial neighbouring block is not out of the current CTU-row.
[0587]
iv. Inter-prediction (list 0, list1, or bi) of the set of parameters and that of the spatial neighbouring block are the same;
[0588]
v. Reference Index for list 0 of the set of parameters and that of the spatial neighbouring block are the same;
[0589]
vi. Reference Index for list 1 of the set of parameters and that of the spatial neighbouring block are the same;
[0590]
vii. The POC of the reference picture for list 0 of the set of parameters is the same to the POC of one of the reference pictures of the spatial neighbouring block.
[0591]
viii. The POC of the reference picture for list 1 of the set of parameters is the same to the POC of one of the reference pictures of the spatial neighbouring block.
[0592]
c. In one example, if a neighbouring block has been used to derive an inherited affine merge candidate, then it is skipped in the second loop, not to be used to derive an affine merge candidate with stored affine parameters.
[0593]
d. In one example, if a neighbouring block has been used to derive an affine merge candidate with a set of stored affine parameters, then it is skipped in the second loop, not to be used to derive an affine merge candidate with another set of stored affine parameters.
[0594]
e. In one example, if a neighbouring block is used to derive an affine merge candidate, then all other neighbouring blocks after that neighbouring block are skipped and the second loop is broken and go back to the first loop. The next set of parameters is visited in the first loop.
[0595]
23. The affine merge candidates derived from parameters stored in the buffer and one or multiple temporal unit block can be put into the affine merge candidate list.
[0596]
a. In one example, these candidates are put right after the inherited affine merge candidates.
[0597]
b. In one example, these candidates are put right after the first constructed affine merge candidate.
[0598]
c. In one example, these candidates are put right after the first affine merge candidate constructed from spatial neighbouring blocks.
[0599]
d. In one example, these candidates are put right after all the constructed affine merge candidates.
[0600]
e. In one example, these candidates are put right after all affine merge candidates derived from parameters stored in the buffer and a spatial neighbouring unit block.
[0601]
f. In one example, these candidates are put right before all the zero affine merge candidates.
[0602]
g. In one example, at most N affine merge candidates derived from parameters stored in the buffer and a temporal neighbouring unit block can be put into the affine merge candidate list. N is an integer such as 3.
[0603]
h. In one example, the GBI index of the current block is inherited from the GBI index of the temporal neighbouring block if it chooses the affine merge candidates derived from parameters stored in the buffer and a temporal neighbouring unit block.
[0604]
i. In one example, affine merge candidates derived from parameters stored in the buffer and temporal neighbouring blocks are put into the affine merge candidate list in order.
[0605]
i. For example, a two-level nested looping method are used to search available affine merge candidates derived from parameters stored in the buffer and temporal neighbouring blocks and put them into the affine merge candidate list.
[0606]
(a) In the first level loop, each set of parameters stored in the buffer are visited in order. They can be visited from the beginning of the table to the end, or from the end of the table to the beginning, or in any other predefined or adaptive order.
[0607]
a. In an example, some sets of parameters stored in the buffer are skipped in the first loop. For example, the first N or the last N sets in the table are skipped. Alternatively, H [k] s are skipped if k %S == 0. Alternatively, H [k] s are skipped if k %S ! = 0
[0608]
(b) For each set of parameters stored in the buffer, a second level loop is applied. In the second level loop, each temporal neighboring block is visited in order. For example, blocks L4 and E4 as shown in Fig. 25 are visited in order. In a pseudo code implementation, the nested loops can be described as:
[0609]
[0610]
a. In one example, there may be only one temporal neighbouring block included in the second loop. For example, only L4 is included.
[0611]
b. With a set of parameters given in the first level loop and a neighbouring block given in the second level loop, an affine merge candidate generated and put into the affine merge candidate list if all or some of the following conditions are satisfied.
[0612]
i. The neighbouring block is available;
[0613]
ii. The neighbouring block is inter-coded;
[0614]
iii. The neighbouring block is not out of the current CTU-row.
[0615]
iv. Inter-prediction (list 0, list1, or bi) of the set of parameters and that of the neighbouring block are the same;
[0616]
v. Reference Index for list 0 of the set of parameters and that of the neighbouring block are the same;
[0617]
vi. Reference Index for list 1 of the set of parameters and that of the neighbouring block are the same;
[0618]
vii. The POC of the reference picture for list 0 of the set of parameters is the same to the POC of one of the reference pictures of the neighbouring block.
[0619]
viii. The POC of the reference picture for list 1 of the set of parameters is the same to the POC of one of the reference pictures of the neighbouring block.
[0620]
c. In one example, if a neighbouring block has been used to derive an inherited affine merge candidate, then it is skipped in the second loop, not to be used to derive an affine merge candidate with stored affine parameters.
[0621]
d. In one example, if a neighbouring block has been used to derive an affine merge candidate with a set of stored affine parameters, then it is skipped in the second loop, not to be used to derive an affine merge candidate with another set of stored affine parameters.
[0622]
e. In one example, if a neighbouring block is used to derive an affine merge candidate, then all other neighbouring blocks after that neighbouring block are skipped and the second loop is broken and go back to the first loop. The next set of parameters is visited in the first loop.
[0623]
24. The affine AMVP candidates derived from parameters stored in the buffer and one or multiple spatial neighbouring/non-adjacent unit block can be put into the affine AMVP candidate list.
[0624]
a. In one example, these candidates are put right after the inherited affine AMVP candidates.
[0625]
b. In one example, these candidates are put right after the first constructed AMVP merge candidate.
[0626]
c. In one example, these candidates are put right after the first affine AMVP candidate constructed from spatial neighbouring blocks.
[0627]
d. In one example, these candidates are put right after all the constructed affine AMVP candidates.
[0628]
e. In one example, these candidates are put right after the first translational affine AMVP candidate.
[0629]
f. In one example, these candidates are put right after all translational affine AMVP candidates.
[0630]
g. In one example, these candidates are put right before all the zero affine AMVP candidates.
[0631]
h. In one example, a spatial neighbouring unit block is not used to derive an affine AMVP candidate with the parameters stored in the buffer, if another affine AMVP candidate is inherited from the spatial neighbouring unit block.
[0632]
i. In one example, a spatial neighbouring unit block can be used to derive an affine AMVP candidate with only one set of the parameters stored in the buffer. In other words, if a spatial neighbouring unit block and set of the parameters stored in the buffer has derive an affine AMVP candidate, it cannot be used to derive another affine AMVP candidate with another set of parameters stored in the buffer.
[0633]
j. In one example, at most N affine AMVP candidates derived from parameters stored in the buffer and a spatial neighbouring unit block can be put into the affine AMVP candidate list. N is an integer such as 1.
[0634]
k. In one example, affine AMVP candidates derived from parameters stored in the buffer and spatial neighbouring blocks are put into the affine AMVP candidate list in order.
[0635]
i. For example, a two-level nested looping method are used to search available affine AMVP candidates derived from parameters stored in the buffer and spatial neighbouring blocks and put them into the affine AMVP candidate list.
[0636]
(a) In the first level loop, each set of parameters stored in the buffer are visited in order. They can be visited from the beginning of the table to the end, or from the end of the table to the beginning, or in any other predefined or adaptive order.
[0637]
a. In an example, some sets of parameters stored in the buffer are skipped in the first loop. For example, the first N or the last N sets in the table are skipped. Alternatively, H [k] s are skipped if k %S == 0. Alternatively, H [k] s are skipped if k %S ! = 0
[0638]
(b) For each set of parameters stored in the buffer, a second level loop is applied. In the second level loop, each spatial neighboring block is visited in order. For example, blocks A1, B1, B0, A0, and B2 as shown in Fig. 5 are visited in order. In a pseudo code implementation, the nested loops can be described as:
[0639]
[0640]
a. In one example, there may be only one spatial neighbouring block included in the second loop. For example, only A1 is included.
[0641]
b. With a set of parameters given in the first level loop and a spatial neighbouring block given in the second level loop, an affine AMVP candidate generated and put into the affine AMVP candidate list if all or some of the following conditions are satisfied.
[0642]
i. The spatial neighbouring block is available;
[0643]
ii. The spatial neighbouring block is inter-coded;
[0644]
iii. The spatial neighbouring block is not out of the current CTU-row.
[0645]
iv. Reference Index for list 0 of the set of parameters and that of the spatial neighbouring block are the same;
[0646]
v. Reference Index for list 1 of the set of parameters and that of the spatial neighbouring block are the same;
[0647]
vi. Reference Index for list 0 of the set of parameters is equal to the AMVP signaled reference index for list 0.
[0648]
vii. Reference Index for list 1 of the set of parameters is equal to the AMVP signaled reference index for list 1.
[0649]
viii. Reference Index for list 0 of the spatial neighbouring block is equal to the AMVP signaled reference index for list 0.
[0650]
ix. Reference Index for list 1 of the spatial neighbouring block is equal to the AMVP signaled reference index for list 1.
[0651]
x. The POC of the reference picture for list 0 of the set of parameters is the same to the POC of one of the reference pictures of the spatial neighbouring block.
[0652]
xi. The POC of the reference picture for list 1 of the set of parameters is the same to the POC of one of the reference pictures of the spatial neighbouring block.
[0653]
xii. The POC of the AMVP signaled reference picture for list 0 is the same to the POC of one of the reference pictures of the spatial neighbouring block.
[0654]
xiii. The POC of the AMVP signaled reference picture for list 0 is the same to the POC of one of the reference pictures of the set of parameters.
[0655]
c. In one example, if a neighbouring block has been used to derive an inherited affine AMVP candidate, then it is skipped in the second loop, not to be used to derive an affine AMVP candidate with stored affine parameters.
[0656]
d. In one example, if a neighbouring block has been used to derive an affine AMVP candidate with a set of stored affine parameters, then it is skipped in the second loop, not to be used to derive an affine AMVP candidate with another set of stored affine parameters.
[0657]
e. In one example, if a neighbouring block is used to derive an affine AMVP candidate, then all other neighbouring blocks after that neighbouring block are skipped and the second loop is broken and go back to the first loop. The next set of parameters is visited in the first loop.
[0658]
25. The affine AMVP candidates derived from parameters stored in the buffer and one or multiple temporal unit block can be put into the affine AMVP candidate list.
[0659]
a. In one example, these candidates are put right after the inherited affine AMVP candidates.
[0660]
b. In one example, these candidates are put right after the first constructed AMVP merge candidate.
[0661]
c. In one example, these candidates are put right after the first affine AMVP candidate constructed from spatial neighbouring blocks.
[0662]
d. In one example, these candidates are put right after all the constructed affine AMVP candidates.
[0663]
e. In one example, these candidates are put right after the first translational affine AMVP candidate.
[0664]
f. In one example, these candidates are put right after all translational affine AMVP candidates.
[0665]
g. In one example, these candidates are put right before all the zero affine AMVP candidates.
[0666]
h. In one example, these candidates are put right after all affine AMVP candidates derived from parameters stored in the buffer and a spatial neighbouring unit block.
[0667]
i. In one example, at most N affine AMVP candidates derived from parameters stored in the buffer and a temporal neighbouring unit block can be put into the affine merge candidate list. N is an integer such as 1.
[0668]
j. In one example, affine AMVP candidates derived from parameters stored in the buffer and temporal neighbouring blocks are put into the affine AMVP candidate list in order.
[0669]
i. For example, a two-level nested looping method are used to search available affine AMVP candidates derived from parameters stored in the buffer and temporal neighbouring blocks and put them into the affine AMVP candidate list.
[0670]
(a) In the first level loop, each set of parameters stored in the buffer are visited in order. They can be visited from the beginning of the table to the end, or from the end of the table to the beginning, or in any other predefined or adaptive order.
[0671]
a. In an example, some sets of parameters stored in the buffer are skipped in the first loop. For example, the first N or the last N sets in the table are skipped. Alternatively, H [k] s are skipped if k %S == 0. Alternatively, H [k] s are skipped if k %S ! = 0
[0672]
(b) For each set of parameters stored in the buffer, a second level loop is applied. In the second level loop, each temporal neighboring block is visited in order. For example, blocks A1, B1, B0, A0, and B2 as shown in Fig. 5 are visited in order. In a pseudo code implementation, the nested loops can be described as:
[0673]
[0674]
a. In one example, there may be only one temporal neighbouring block included in the second loop. For example, only A1 is included.
[0675]
b. With a set of parameters given in the first level loop and a temporal neighbouring block given in the second level loop, an affine AMVP candidate generated and put into the affine AMVP candidate list if all or some of the following conditions are satisfied.
[0676]
i. The temporal neighbouring block is available;
[0677]
ii. The temporal neighbouring block is inter-coded;
[0678]
iii. The temporal neighbouring block is not out of the current CTU-row.
[0679]
iv. Reference Index for list 0 of the set of parameters and that of the temporal neighbouring block are the same;
[0680]
v. Reference Index for list 1 of the set of parameters and that of the temporal neighbouring block are the same;
[0681]
vi. Reference Index for list 0 of the set of parameters is equal to the AMVP signaled reference index for list 0.
[0682]
vii. Reference Index for list 1 of the set of parameters is equal to the AMVP signaled reference index for list 1.
[0683]
viii. Reference Index for list 0 of the temporal neighbouring block is equal to the AMVP signaled reference index for list 0.
[0684]
ix. Reference Index for list 1 of the temporal neighbouring block is equal to the AMVP signaled reference index for list 1.
[0685]
x. The POC of the reference picture for list 0 of the set of parameters is the same to the POC of one of the reference pictures of the temporal neighbouring block.
[0686]
xi. The POC of the reference picture for list 1 of the set of parameters is the same to the POC of one of the reference pictures of the temporal neighbouring block.
[0687]
xii. The POC of the AMVP signaled reference picture for list 0 is the same to the POC of one of the reference pictures of the temporal neighbouring block.
[0688]
xiii. The POC of the AMVP signaled reference picture for list 0 is the same to the POC of one of the reference pictures of the set of parameters.
[0689]
c. In one example, if a neighbouring block has been used to derive an inherited affine AMVP candidate, then it is skipped in the second loop, not to be used to derive an affine AMVP candidate with stored affine parameters.
[0690]
d. In one example, if a neighbouring block has been used to derive an affine AMVP candidate with a set of stored affine parameters, then it is skipped in the second loop, not to be used to derive an affine AMVP candidate with another set of stored affine parameters.
[0691]
e. In one example, if a neighbouring block is used to derive an affine AMVP candidate, then all other neighbouring blocks after that neighbouring block are skipped and the second loop is broken and go back to the first loop. The next set of parameters is visited in the first loop.
[0692]
26. It is proposed to use affine merge candidates derived from the affine HMVP buffer are put into the affine merge list/sub-block merge list and inherited affine merge candidates may be removed from the list.
[0693]
a. In one example, the affine merge candidates derived from the affine HMVP buffer are put into the affine merge list/sub-block merge list and inherited affine merge candidates are excluded from the list.
[0694]
b. In an alternative example, affine merge candidates derived from the affine HMVP buffer are put into the affine merge list/sub-block merge list and affine merge candidates inherited from a block in the current CTU row are removed from the list.
[0695]
i. For example, affine merge candidates derived from the affine HMVP buffer are put into the affine merge list/sub-block merge list after affine merge candidates which are inherited from a block in a CTU row different to the current CTU row.
[0696]
c. Alternatively, whether to add inherited affine merge candidates may depend on the affine HMVP buffer.
[0697]
i. In one example, affine merge candidates derived from the affine HMVP buffer may be inserted to the candidate list before inherited affine merge candidates.
[0698]
ii. In one example, when the affine HMVP buffer is empty, inherited affine merge candidates may be added; otherwise (if the affine HMVP buffer is not empty) , inherited affine merge candidates may be excluded.
[0699]
d. Alternatively, whether to apply proposed methods may depend on the block dimensions.
[0700]
27. It is proposed to use affine AMVP candidates derived from the affine HMVP buffer are put into the affine AMVP list and inherited affine AMVP candidates may be removed from the list.
[0701]
a. In one example, the affine AMVP candidates derived from the affine HMVP buffer are put into the affine AMVP list and inherited affine AMVP candidates are excluded from the list.
[0702]
b. In an alternative example, affine AMVP candidates derived from stored in the affine HMVP buffer are put into the affine AMVP list and affine AMVP candidates inherited from a block in the current CTU row are removed from the list.
[0703]
i. For example, affine AMVP candidates derived from the affine HMVP buffer are put into the affine AMVP list after affine AMVP candidates which are inherited from a block in a CTU row different to the current CTU row.
[0704]
c. Alternatively, whether to add inherited affine AMVP candidates may depend on the affine HMVP buffer.
[0705]
d. Alternatively, whether to apply proposed methods may depend on the block dimensions.
[0706]
28. In one example, the size of affine merge candidate list is increased by N (e.g. N=1) if affine merge candidates derived from parameters stored in the buffer can be put into the list.
[0707]
29. In one example, the size of affine AMVP candidate list is increased by N (e.g. N=1) if affine AMVP candidates derived from parameters stored in the buffer can be put into the list.
[0708]
30. Virtual affine models may be derived from multiple existing affine models stored in the buffer. Suppose the buffer has included several affine models, the i-th candidate is denoted by Candi with parameters as (ai, bi, ci, di, ei, fi) .
[0709]
a. In one example, parameters of Candi and Candj may be combined to form a virtual affine model by taking some parameters from Candi and remaining parameters from Candj. One example of the virtual affine model is (ai, bi, cj, dj, ei, fi) .
[0710]
b. In one example, parameters of Candi and Candj may be jointly used to generate a virtual affine model with a function, such as averaging. One example of the virtual affine model is ( (ai+aj) /2, (bi+bj) /2, (ci+cj) /2, (di+dj) /2, (ei+ej) /2, (fi+fj) /2) .
[0711]
c. Virtual affine models may be used in a similar way as the stored affine model, such as with bullets mentioned above.
[0712]
31. It is proposed that the affine merge candidates inherited from spatial neighbouring blocks are not put into the sub-block based merge candidate list and the disclosed history-based affine merge candidates are put into the sub-block based merge candidate list.
[0713]
a. In one example, the disclosed history-based affine merge candidates are put into the sub-block based merge candidate list just after the ATMVP candidate.
[0714]
b. In one example, the disclosed history-based affine merge candidates are put into the sub-block based merge candidate list before the constructed affine merge candidates.
[0715]
c. It is proposed that whether the affine merge candidates inherited from a spatial neighbouring block is put into the sub-block based merge candidate list or not, may depend on the position of the spatial neighbouring block.
[0716]
i. In one example, the affine merge candidate inherited from a spatial neighbouring block is put into the sub-block based merge candidate list if the spatial neighbouring block is in the same CTU or CTU row as the current block; Otherwise, it is not put into.
[0717]
ii. Alternatively, the affine merge candidate inherited from a spatial neighbouring blocks is put into the sub-block based merge candidate list if the spatial neighbouring block is not in the same CTU or CTU row as the current block; Otherwise, it is not put into.
[0718]
32. It is proposed that the affine AMVP candidates inherited from spatial neighbouring blocks are not put into the affine MVP candidate list and the disclosed history-based affine MVP candidates are put into affine MVP candidate list.
[0719]
a. In one example, the disclosed history-based affine MVP candidates are put first into the affine MVP candidate list.
[0720]
b. It is proposed that whether the affine AMVP candidate inherited from a spatial neighbouring block is put into the affine MVP candidate list or not, may depend on the position of the spatial neighbouring block.
[0721]
i. In one example, the affine AMVP candidate inherited from a spatial neighbouring block is put into the affine MVP candidate list if the spatial neighbouring block is in the same CTU or CTU row as the current block; Otherwise, it is not put into.
[0722]
ii. Alternatively, the affine AMVP candidate inherited from a spatial neighbouring block is put into the affine MVP candidate list if the spatial neighbouring block is not in the same CTU or CTU row as the current block; Otherwise, it is not put into.
[0723]
33. More than one affine HMVP buffers are used to store affine parameters or CPMVs in different categories.
[0724]
a. For example, two buffers are used to store affine parameters in reference list 0 and reference list 1, respectively.
[0725]
i. In one example, after decoding an affine coded CU, the CPMVs or parameters for reference list 0 are used to update the HMVP buffer for reference list 0.
[0726]
ii. In one example, after decoding an affine coded CU, the CPMVs or parameters for reference list 1 are used to update the HMVP buffer for reference list 1.
[0727]
iii. In one example, if the motion information of a spatial neighbouring/non-adjacent M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the spatial neighbouring/non-adjacent unit block referring to reference list X is combined with the affine parameters stored in the buffer referring to reference list X. X = 0 or 1.
[0728]
iv. In one example, if the motion information of a temporal neighbouring M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the temporal neighbouring unit block referring to reference list X is combined with the affine parameters stored in the buffer referring to reference list X. X = 0 or 1.
[0729]
b. For example, N (e.g. N = 6) buffers are used to store affine parameters referring to different reference indices in different reference lists. In the following discussion, “reference K” means the reference index of the reference picture is K.
[0730]
i. In one example, after decoding an affine coded CU, the CPMVs or parameters referring to reference K in list X are used to update the HMVP buffer for reference K in list X. X = 0 or 1. K may be 0, 1, 2, etc.
[0731]
ii. In one example, after decoding an affine coded CU, the CPMVs or parameters referring to reference K, where K >= L, in list X are used to update the HMVP buffer for reference L in list X. X = 0 or 1. M may be 1, 2, 3, etc.
[0732]
iii. In one example, if the motion information of a spatial neighbouring/non-adjacent M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the spatial neighbouring/non-adjacent unit block referring to reference K in list X is combined with the affine parameters stored in the buffer referring to reference K in list X. X = 0 or 1. K may be 0, 1, 2, etc.
[0733]
iv. In one example, if the motion information of a temporal neighbouring M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the temporal neighbouring unit block referring to reference K in list X is combined with the affine parameters stored in the buffer referring to reference K in list X. X = 0 or 1. K may be 0, 1, 2, etc.
[0734]
v. In one example, if the motion information of a spatial neighbouring/non-adjacent M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the spatial neighbouring/non-adjacent unit block referring to reference K, where K >=L, in list X is combined with the affine parameters stored in the buffer referring to reference L in list X. X = 0 or 1. L may be 1, 2, 3, etc.
[0735]
vi. In one example, if the motion information of a temporal neighbouring M×N unit block (e.g. 4×4 block in VTM) and a set of affine parameters stored in the buffer are used together to derive the affine model of the current block, the MV of the temporal neighbouring unit block referring to reference K, where K >=L, in list X is combined with the affine parameters stored in the buffer referring to reference L in list X. X = 0 or 1. L may be 1, 2, 3etc.
[0736]
c. The size of each affine HMVP buffer for a category may be different.
[0737]
i. In one example, the size may depend on the reference picture index.
[0738]
ii. For example, the size of the affine HMVP buffer for reference 0 is 3, the size of the affine HMVP buffer for reference 1 is 2, and the size of the affine HMVP buffer for reference 2 is 1.
[0739]
34. Whether to and/or how to update the affine HMVP buffers may depend on the coding mode and/or other coding information of the current CU.
[0740]
a. For example, if a CU is coded with affine merge mode and the merge candidate is derived from the affine HMVP buffer, then the HMVP buffer is not updated after decoding this CU.
[0741]
i. Alternatively, the affine HMVP buffer is updated by removing the associated affine parameters to the last entry of the affine HMVP buffer.
[0742]
b. In one example, whenever one block is coded with affine mode, the affine HMVP buffer may be updated.
[0743]
c. In one example, when one block is coded with affine merge mode and the block uses the shared merge list, updating of the affine HMVP buffer is skipped.
[0744]
35. In one example, an affine HMVP buffer may be divided into M (M>1) sub-buffers: HB 0, HB 1, …HB M-1.
[0745]
a. Alternatively, multiple affine HMVP buffers (i.e., multiple affine HMVP tables) may be allocated, each of them may correspond to one sub-buffer HB i mentioned above.
[0746]
b. In one example, operations on one sub-buffer (e.g., the sub-buffer updating process, usage of the sub-buffer) may not affect the other sub-buffers.
[0747]
c. In one example, M is pre-defined, such as 10.
[0748]
d. In one example, the first M0 buffers are related to the storage of affine parameters for reference picture list X and the remaining (M-M0) buffers are related to the storage of affine parameters for reference picture list Y wherein Y = 1 –X and X being 0 or 1.
[0749]
i. Alternatively, affine parameters for reference picture list X may be stored in interleaved way with those affine parameters for reference picture list Y.
[0750]
ii. In one example, affine parameters for reference picture list X may be stored in HB i with i being an odd value and affine parameters for reference picture list X may be stored in HB j with j being an even value.
[0751]
e. In one example, M may be signaled from the encoder to the decoder, such as at video level (e.g. VPS) , sequence level (e.g. SPS) , picture level (e.g. PPS or picture header) , slice level (e.g. slice header) , tile group level (e.g. tile group header) .
[0752]
f. In one example, M may depend on the number of reference pictures.
[0753]
i. For example, M may depend on the number of reference pictures in reference list 0;
[0754]
ii. For example, M may depend on the number of reference pictures in reference list 1;
[0755]
g. In one example, each sub-buffer may have the same number of maximum allowed number of entries, denoted as N. For example, N=1 or N= 2;
[0756]
h. In one example, each sub-buffer may have a different number of maximum allowed number of entries. For example, sub-buffer HB K may have N K allowed number of entries at most. For different K, N K may be different.
[0757]
i. When a set of affine parameters is used to update the HMVP buffer, one sub-buffer with a sub-buffer index SI may be selected, and then the set of affine parameters may be used to update the corresponding sub-buffer HB SI.
[0758]
i. In one example, the selection of sub-buffer may be based on the coded information of the block on which the set of affine parameters is applied.
[0759]
(a) In one example, the coded information may include the reference list index (or prediction direction) and/or the reference index associated with the set of affine parameters.
[0760]
(b) For example, suppose the reference list index and reference index of the set of affine parameters are denoted as X (e.g., X being 0 or 1) and RIDX, then the selected sub-buffer index SI may be calculated as SI = f (X, RIDX) , where f is a function.
[0761]
a. In one example, SI = X *MaxR0 + min (RIDX, MaxRX-1) , where MaxR0 and MaxR1 are integers, e.g. MaxR0=MaxR1=5.
[0762]
b. Alternatively, SI = 2*min (RIDX, MaxRX-1) + X.
[0763]
c. In one example, X can only be 0 or 1 and RIDX must be greater than or equal to 0.
[0764]
d. In one example, MaxR0 and MaxR1 may be different.
[0765]
e. In one example, MaxR0/MaxR1 may depend on the temporal layer index, slice/tile group/picture type, low delay check flag, etc. al.
[0766]
f. In one example, MaxR0 may depend on the total number of reference pictures in reference list 0.
[0767]
g. In one example, MaxR1 may depend on the total number of reference pictures in reference list 1.
[0768]
h. In one example, MaxR0 and/or MaxR1 may be signaled from the encoder to the decoder, such as at video level (e.g. VPS) , sequence level (e.g. SPS) , picture level (e.g. PPS or picture header) , slice level (e.g. slice header) , tile group level (e.g. tile group header) .
[0769]
j. When a set of affine parameters is used to update a sub-buffer HB SI, it may be regarded as updating a regular affine HMVP buffer, and the methods to update affine HMVP buffers disclosed in this document may be applied to update a sub-buffer.
[0770]
k. A spatial or temporal adjacent or non-adjacent neighbouring block (it may also be referred as “a neighbouring block” for simplification) may be used combining with one or multiple sets of affine parameters stored in one or multiple HMVP affine sub-buffers.
[0771]
36. In one example, the maximum allowed size for an affine HMVP buffer and/or an affine HMVP sub-buffer may be equal to 1.
[0772]
a. In one example, there is no need to recorder a counter to record the number of sets of affine parameters stored in the affine HMVP buffer or the affine HMVP sub-buffer.
[0773]
37. Whether to and/or how to conduct operations on the affine HMVP buffer or the affine HMVP sub-buffer may depend on whether all the affine parameters of a set are zero.
[0774]
a. In one example, when the affine HMVP buffer or the affine HMVP sub-buffer is refreshed, all affine parameters stored in the buffer or sub-buffer are set to be zero.
[0775]
i. The affine HMVP buffer or the affine HMVP sub-buffer may be refreshed before coding/decoding each picture and/or slice and/or tile group and/or CTU row and/or CTU and/or CU.
[0776]
b. In one example, when a set of affine parameters is used to update the affine HMVP buffer or the affine HMVP sub-buffer, the buffer or sub-buffer is not updated if all the affine parameters in the set are equal to zero.
[0777]
c. In one example, when parameters of a set of affine parameters stored in the affine HMVP buffer or the affine HMVP sub-buffer are all zero, the set of affine parameters cannot be used to generate an affine merge candidate or affine AMVP candidate.
[0778]
i. For example, the set of affine parameters cannot be used to generate an affine merge candidate or affine AMVP candidate, combining with a neighbouring block.
[0779]
ii. For example, when parameters of a set of affine parameters stored in an entry of an affine HMVP buffer or an affine HMVP sub-buffer are all zero, the entry is marked as “invalid” or “unavailable” .
[0780]
iii. For example, when parameters of sets of affine parameters stored in all entries of an affine HMVP buffer or an affine HMVP sub-buffer are all zero, the affine HMVP buffer or the affine HMVP sub-buffer is marked as “invalid” or “unavailable” , and/or the counter of the buffer or sub-buffer is set to be zero.
[0781]
38. When a spatial or temporal adjacent or non-adjacent neighbouring block (it may also be referred as “a neighbouring block” for simplification) is used to generate an affine merge candidate by combining affine parameters stored in the affine HMVP buffer, only affine parameters stored in one or several related sub-buffers may be accessed.
[0782]
a. For example, the related sub-buffers can be determined by the coding information of the neighbouring block. For example, the coding information may include the reference lists and/or the reference indices of the neighbouring block.
[0783]
b. For example, one or multiple sets of affine parameters stored in the related sub-buffers can be used to generate the affine merge candidate combining with a neighbouring block.
[0784]
i. For example, the set of affine parameters stored as the first entry in a related sub-buffer can be used.
[0785]
ii. For example, the set of affine parameters stored as the last entry in a related sub-buffer can be used.
[0786]
c. For example, one related sub-buffer HB S0 is determined for the MV of the neighbouring block referring to reference list 0.
[0787]
d. For example, one related sub-buffer HB S1 is determined for the MV of the neighbouring block referring to reference list 1.
[0788]
i. HB S0 and HB S1 may be different.
[0789]
e. For a MV of the neighbouring block referring to a reference picture with the reference index RIDX in reference list LX, the related sub-buffer index SI is calculated as SI=g (LX, RIDX) , where g is a function.
[0790]
i. For example, function g is the same as function f in bullet 35. d.
[0791]
ii. In one example, SI=LX *MaxR0 + min (RIDX, MaxRX-1) , where MaxR0 and MaxR1 are integers, e.g. MaxR0=MaxR1=5.
[0792]
(a) In one example, LX can only be 0 or 1 and RIDX must be greater than or equal to 0.
[0793]
(b) MaxR0 and MaxR1 may be different.
[0794]
(c) MaxR0 may depend on the total number of reference pictures in reference list 0.
[0795]
(d) MaxR1 may depend on the total number of reference pictures in reference list 1.
[0796]
(e) MaxR0 and/or MaxR1 may be signaled from the encoder to the decoder, such as at video level (e.g. VPS) , sequence level (e.g. SPS) , picture level (e.g. PPS or picture header) , slice level (e.g. slice header) , tile group level (e.g. tile group header) .
[0797]
f. In one example, when the neighbouring block is inter-coded with uni-prediction referring to a reference picture with the reference index RIDX in reference list LX, then an affine merge candidate can be generated from this neighbouring block combining with a set of affine parameters stored in the related affine HMVP sub-buffer, if there is at least one entry available in the sub-buffer, and/or the counter of the sub-buffer is not equal to 0.
[0798]
i. The generated affine merge candidate should also be uni-predicted, referring to a reference picture with the reference index RIDX in reference list LX.
[0799]
g. In one example, when the neighbouring block is inter-coded with bi-prediction referring to a reference picture with the reference index RIDX0 in reference list 0 and reference index RIDX1 in reference list 1, then an affine merge candidate can be generated from this neighbouring block combining with one or multiple sets of affine parameters stored in the one or multiple related affine HMVP sub-buffers.
[0800]
i. In one example, the generated affine merge candidate should also be bi-predicted, referring to a reference picture with the reference index RID0 in reference list 0 and reference index RID1 in reference list 1.
[0801]
(a) The bi-predicted affine merge candidate can only be generated when there is at least one entry available in the sub-buffer related to reference index RID0 in reference list 0 (and/or the counter of the sub-buffer is not equal to 0) , and there is at least one entry available in the sub-buffer related to reference index RID1 in reference list 1 (and/or the counter of the sub-buffer is not equal to 0) .
[0802]
(b) In one example, no affine merge candidate can be generated from neighbouring block combining with affine parameters stored in affine HMVP buffers and/or sub-buffers, if the condition below cannot be satisfied.
[0803]
a. There is at least one entry available in the sub-buffer related to reference index RID0 in reference list 0 (and/or the counter of the sub-buffer is not equal to 0) , and there is at least one entry available in the sub-buffer related to reference index RID1 in reference list 1 (and/or the counter of the sub-buffer is not equal to 0) .
[0804]
ii. In an alternative example, the generated affine merge candidate can also be uni-predicted, referring to a reference picture with the reference index RID0 in reference list 0, or reference index RID1 in reference list 1.
[0805]
(a) The generated affine merge candidate is uni-predicted referring to a reference picture with the reference index RID0 in reference list 0, if there is at least one entry available in the sub-buffer related to reference index RID0 in reference list 0 (and/or the counter of the sub-buffer is not equal to 0) , and there is no entry available in the sub-buffer related to reference index RID1 in reference list 1 (and/or the counter of the sub-buffer is equal to 0) .
[0806]
(b) The generated affine merge candidate is uni-predicted referring to a reference picture with the reference index RID1 in reference list 1, if there is at least one entry available in the sub-buffer related to reference index RID1 in reference list 1 (and/or the counter of the sub-buffer is not equal to 0) , and there is no entry available in the sub-buffer related to reference index RID0 in reference list 0 (and/or the counter of the sub-buffer is equal to 0) .
[0807]
h. In one example, all methods disclosed in this document can be used to generate an affine merge candidate by combining affine parameters stored in one or several related sub-buffers.
[0808]
39. When a spatial or temporal adjacent or non-adjacent neighbouring block (it may also be referred as “a neighbouring block” for simplification) is used to generate an affine AMVP candidate by combining affine parameters stored in the affine HMVP buffer, only affine parameters stored in one or several related sub-buffers may be accessed.
[0809]
a. For example, the related sub-buffers can be determined by the coding information of the neighbouring block. For example, the coding information may include the reference lists and/or the reference indices of the neighbouring block.
[0810]
b. For example, one or multiple sets of affine parameters stored in the related sub-buffers can be used to generate the affine AMVP candidate combining with a neighbouring block.
[0811]
i. For example, the set of affine parameters stored as the first entry in a related sub-buffer can be used.
[0812]
ii. For example, the set of affine parameters stored as the last entry in a related sub-buffer can be used.
[0813]
c. For a target reference picture with the target reference index RIDX in target reference list LX, the related sub-buffer index SI is calculated as SI=h (LX, RIDX) , where g is a function.
[0814]
i. For example, function g is the same as function f in bullet 35. d.
[0815]
ii. For example, function g is the same as function g in bullet 38.
[0816]
iii. In one example, SI=LX *MaxR0 + min (RIDX, MaxRX-1) , where MaxR0 and MaxR1 are integers, e.g. MaxR0=MaxR1=5.
[0817]
(a) In one example, LX can only be 0 or 1 and RIDX must be greater than or equal to 0.
[0818]
(b) MaxR0 and MaxR1 may be different.
[0819]
(c) MaxR0 may depend on the total number of reference pictures in reference list 0.
[0820]
(d) MaxR1 may depend on the total number of reference pictures in reference list 1.
[0821]
(e) MaxR0 and/or MaxR1 may be signaled from the encoder to the decoder, such as at video level (e.g. VPS) , sequence level (e.g. SPS) , picture level (e.g. PPS or picture header) , slice level (e.g. slice header) , tile group level (e.g. tile group header) .
[0822]
d. In one example, no affine AMVP candidate can be generated from affine parameters stored in affine HMVP buffer/sub-buffers if if there is no entry available in the sub-buffer related to target reference index RIDX in the target reference list LX (and/or the counter of the sub-buffer is equal to 0) .
[0823]
e. In one example, when the neighbouring block is inter-coded and have a MV referring to the target reference index RIDX in target reference list LX, then the MV is used to generate the affine AMVP candidate combining with the affine parameters stored in the related sub-buffer.
[0824]
f. In one example, when the neighbouring block is inter-coded and does not have a MV referring to the target reference index RIDX in target reference list LX, then no affine AMVP candidate can be generated from the neighbouring block.
[0825]
i. Alternatively, when the neighbouring block is inter-coded and does not have a MV referring to the target reference index RIDX in target reference list LX, the neighbouring block will be checked to determine whether it has a second MV referring to a second reference picture in reference list 1-LX, and the second reference has the same POC as the target reference picture.
[0826]
(a) If it has a second MV referring to a second reference picture in reference list 1-LX, and the second reference has the same POC as the target reference picture, the second MV is used to generate the affine AMVP candidate combining with the affine parameters stored in the related sub-buffer. Otherwise, no affine AMVP candidate can be generated from the neighbouring block.
[0827]
g. In one example, all methods disclosed in this document can be applied to generate an affine merge/AMVP candidate by combining affine parameters stored in one or several related sub-buffers.
[0828]
40. A neighbouring block cannot be used combining with affine parameters stored in affine HMVP buffers or affine HMVP sub-buffers to generate an affine merge/AMVP candidate, if it is coded with the Intra Block Copy (IBC) mode.
[0829]
41. A spatial neighbouring block cannot be used combining with affine parameters stored in affine HMVP buffer/sub-buffer to generate affine merge/AMVP candidate, if it is used to generate an inheritance merge/AMVP candidate.
[0830]
42. The spatial and/or temporal neighbouring/non-adjacent blocks may be divided into K groups (e.g., K = 2) and how to combine parameters in affine HMVP buffer/sub-buffer with the motion information of spatial and/or temporal neighbouring/non-adjacent blocks for coding the current block may be based on the group.
[0831]
a. The affine merge candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in different groups may be put at different positions into the affine merge candidate list;
[0832]
b. The affine AMVP candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in different groups may be put at different positions into the affine AMVP candidate list;
[0833]
c. In one example, spatial neighbouring blocks may be divided into groups based on their coded information.
[0834]
i. For example, a neighbouring block may be put into a certain group based on whether it is affine-coded.
[0835]
ii. For example, a neighbouring block may be put into a certain group based on whether it is affine-coded and with AMVP mode.
[0836]
iii. For example, a neighbouring block may be put into a certain group based on whether it is affine-coded and with merge mode.
[0837]
d. In one example, spatial neighbouring blocks may be divided into groups based on their positions.
[0838]
e. In one example, not all the neighbouring blocks are put into the K groups.
[0839]
f. In one example, the spatial neighbouring blocks are divided into two groups as below:
[0840]
i. The first encountered affine-coded left neighbouring block may be put into group X.
[0841]
(a) Left neighbouring blocks are checked in order, e.g. block A0, block A1 as shown in Fig. 5.
[0842]
(b) In one example, the first encountered affine-coded left neighbouring block is not put into group X if it is used to generate an inheritance merge/AMVP candidate.
[0843]
ii. The first encountered affine-coded above neighbouring block is put into group X.
[0844]
(a) Above neighbouring blocks are checked in order. E. g. block B0, block B1, and block B2 as shown in Fig. 5.
[0845]
(b) In one example, the first encountered inter-coded and affine-coded above neighbouring block is not put into group X if it is used to generate an inheritance merge/AMVP candidate.
[0846]
iii. Other inter-coded neighbouring blocks may be put into group Y wherein Y is unequal to X.
[0847]
g. In one example, the affine merge candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in group X may be put into the affine merge candidate list before the K-th constructed affine merge candidate. E. g. K may be 1 or 2.
[0848]
h. In one example, the affine merge candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in group Y may be put into the affine merge candidate list after the K-th constructed affine merge candidate. E. g. K may be 1 or 2.
[0849]
i. In one example, the affine AMVP candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in group X may be put into the affine AMVP candidate list before the K-th constructed affine merge candidate. E. g. K may be 1 or 2.
[0850]
j. In one example, the affine AMVP candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in group Y may be put into the affine AMVP candidate list after the K-th constructed affine merge candidate. E. g. K may be 1 or 2.
[0851]
k. In one example, the affine AMVP candidates generated from affine parameters stored in the affine HMVP buffer/sub-buffer combining with spatial neighbouring blocks in group X may be put into the affine AMVP candidate list before the zero candidates.
[0852]
43. The base position (xm, ym) in bullet 20 may be any position inside the basic neighbouring block (e.g. 4×4 basic block) as shown in FIG. 27.
[0853]
a. For example, (xm, ym) may be P22 in FIG. 27.
[0854]
b. Suppose the coordinate of top-left sample of the current block is (xPos00, yPos00) , the coordinate of top-right sample of the current block is (xPos10, yPos00) , the coordinate of top-right sample of the current block is (xPos00, yPos01) , then in Fig. 5:
[0855]
i. (xm, ym) for adjacent neighbouring basic block A1 is (xPos00-2, yPos01-1) ;
[0856]
ii. (xm, ym) for adjacent neighbouring basic block A0 is (xPos00-2, yPos01+3) ;
[0857]
iii. (xm, ym) for adjacent neighbouring basic block B1 is (xPos10-1, yPos00-2) ;
[0858]
iv. (xm, ym) for adjacent neighbouring basic block B0 is (xPos10+3, yPos00-2) ;
[0859]
v. (xm, ym) for adjacent neighbouring basic block B2 is (xPos00-2, yPos00-2) ;
[0860]
FIG. 16 is a block diagram of a video processing apparatus 1700. The apparatus 1700 may be used to implement one or more of the methods described herein. The apparatus 1700 may be embodied in a smartphone, tablet, computer, Internet of Things (IoT) receiver, and so on. The apparatus 1700 may include one or more processors 1702, one or more memories 1704 and video processing hardware 1706. The processor (s) 1702 may be configured to implement one or more methods described in the present document. The memory (memories) 1704 may be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware 1706 may be used to implement, in hardware circuitry, some techniques described in the present document.
[0861]
FIG. 18 is a flowchart for a method 1900 of processing a video. The method 1900 includes storing (1905) parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, and performing (1910) further processing of the first video block using the parameters.
[0862]
FIG. 19 is a flowchart for a method 2000 of processing a video. The method 2000 includes storing (2005) control point motion vectors (CPMVs) representing coordinates of representative points relative to a top-left sample of the first video block, and performing (2010) further processing of the first video block using the CPMVs.
[0863]
FIG. 20 is a flowchart for a method 2100 of processing a video. The method 2100 includes performing a determination (2105) of parameters associated with motion vectors for a first video block, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, determining (2110) that a buffer for storing the parameters is full, modifying (2115) the buffer such that the buffer is not full, storing (2120) the parameters in the buffer that is not full, and performing (2125) further processing of the first video block using the parameters stored in the buffer.
[0864]
FIG. 21 is a flowchart for a method 2200 of processing video. The method 2200 includes performing a determination (2205) of first parameters associated with motion vectors for a first video block, the first parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, determining (2210) that a buffer includes second parameters similar to the first parameters, and performing (2215) further processing of the first video block using the second parameters rather than the first parameters.
[0865]
FIG. 22 is a flowchart for a method 2300 of processing video. The method 2300 includes refreshing (2305) a buffer for storing parameters associated with motion vectors for a first video block, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, performing (2310) further processing of the first video block using the parameters stored in the buffer.
[0866]
FIG. 23 is a flowchart for a method 2400 of processing video. The method 2400 includes identifying (2405) parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, and performing (2410) further processing of a second video block using the parameters associated with the first video block.
[0867]
FIG. 24 is a flowchart for a method 2500 of processing video. The method 2500 includes identifying (2505) parameters associated with motion vectors for a first video block in memory, the parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block, determining (2510) that a second video block uses one of the 4-parameter affine model or the 6-parameter affine model based on the parameters, generating (2515) an affine merge candidate list for the second video block based on the 4-parameter affine model or the 6-parameter affine model used by the second video block, and performing (2520) further processing of the second video block using the affine merge candidate list.
[0868]
FIG. 26 is a flowchart for a method 2600 of processing video. The method 2600 includes identifying (2605) parameters associated with motion vectors (MVs) for a first video block, deriving (2610) an affine model based on the parameters for the first video block, the affine model being one or both of a 4-parameter affine model or a 6-parameter affine model, and performing (2615) further processing of the first video block using the affine model.
[0869]
With reference to methods 1900, 2000, 2100, 2200, 2300, 2400, 2500, and 2600, some examples of determining a candidate for encoding and their use are described in Section 4 of the present document. For example, as described in Section 4, video blocks can be processed using in accordance with parameters associated with a 4-parameter affine model or a 6-parameter affine model.
[0870]
With reference to methods 1900, 2000, 2100, 2200, 2300, 2400, 2500, and 2600, a video block may be encoded in the video bitstream in which bit efficiency may be achieved by using a bitstream generation rule related to motion information prediction.
[0871]
The methods can include wherein four parameters related to the 6-parameter affine model are stored in the memory, and two other parameters related to the 6-parameter affine model are not stored in the memory.
[0872]
The methods can include wherein two parameters related to the 4-parameter affine model are stored in the memory, and two other parameters related to the 4-parameter affine model are not stored in the memory.
[0873]
The methods can include determining that the first video block is coded with the 4-parameter affine model, wherein storing the parameters includes storing four parameters related to the 4-parameter affine model.
[0874]
The methods can include wherein a first number of parameters related to the 4-parameter affine model are stored, and a second number of parameters related to the 6-parameter affine model are stored, the first number and the second number being the same.
[0875]
The methods can include wherein a first number of parameters related to the 4-parameter affine model are stored, and a second number of parameters related to the 6-parameter affine model are stored, the first number and the second number being different.
[0876]
The methods can include determining a characteristic of coding the first video block, the characteristic including one or more of: affine mode, a use of inter or merge mode, a size of the first video block, a picture type, wherein the parameters that are stored are based on the characteristic of the coding of the first video block.
[0877]
The methods can include storing one or more of: inter prediction direction, or reference index.
[0878]
The methods can include determining that the first video block is bi-predicted; and storing parameters used for list 0 and list 1 based on the determination that the first video block is bi-predicted.
[0879]
The methods can include wherein the parameters used for list 0 are stored in a first buffer, and the parameters used for list 1 are stored in a second buffer, the first buffer and the second buffer being different.
[0880]
The methods can include wherein the parameters used for list 0 and list 1 are stored with prediction from one of list 0 or list 1 to the other.
[0881]
The methods can include storing, in the memory, a width of the first video block, wherein performing further processing of the first video block is based on the width.
[0882]
The methods can include storing, in the memory, a height of the first video block, wherein performing further processing of the first video block is based on the height.
[0883]
The methods can include storing, in the memory, information indicative of a top-left coordinate of the first video block, wherein performing further processing of the first video block is based on the top-left coordinate.
[0884]
The methods can include determining the parameters without use of division operations.
[0885]
The methods can include clipping the parameters before storing the parameters in the memory.
[0886]
The methods can include wherein the parameters are stored after the first video block is decoded or encoded.
[0887]
The methods can include determining a characteristic of coding the first video block, the characteristic including one or more of: a coded affine mode, a number of affine-coded video blocks, a position of the first video block, or a dimension of the first video block, wherein the parameters that are stored are based on the characteristic of the coding of the first video block.
[0888]
The methods can include determining that a second video block is affine-coded; and determining that the first video block is a Kth affine-coded block, wherein the parameters associated with the first video block are stored in the memory based on the first video block being a Kth affine-coded block, and the second video block is not stored in the memory.
[0889]
The methods can include wherein K is 2 or 4.
[0890]
The methods can include wherein K is signaled from an encoder to a decoder in a video parameter set (VPS) , a sequence parameter set (SPS) , a picture parameter set (PPS) , a slice header, a tile group header, or a tile.
[0891]
The methods can include wherein the memory stores a maximum M sets of parameters.
[0892]
The methods can include wherein M is 8 or 16.
[0893]
The methods can include wherein M is signaled from an encoder to a decoder in a VPS, a SPS, a picture parameter set PPS, a slice header, a tile group header, a tile, a coding tree unit (CTU) line, or a CTU.
[0894]
The methods can include wherein modifying the buffer such that the buffer is not full includes removing an earliest stored parameter from the buffer.
[0895]
The methods can include wherein modifying the buffer such that the buffer is not full includes removing a latest stored parameter from the buffer.
[0896]
The methods can include performing a determination, by a processor, of third parameters associated with motion vectors for a first video block, the third parameters related to one or both of a 4-parameter affine model or a 6-parameter affine model of the motion vectors for the first video block; determining that the second parameters stored in the buffer are different than the third parameters; storing the third parameters in the buffer based on the determination that the second parameters are different than the third parameters; and performing further processing of the first video block using the third parameters.
[0897]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that the second parameters and the third parameters are associated with different inter prediction directions.
[0898]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that the second parameters and the third parameters are associated with different reference indices for list 0 when list 0 is used as a prediction direction.
[0899]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that the second parameters and the third parameters are associated with different reference indices for list 1 when list 1 is used as a prediction direction.
[0900]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that the second parameters include a first number of parameters and that the third parameters include a second number of parameters, the first number and the second numbers being different.
[0901]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that the second parameters include a first number of parameters and that the third parameters include a second number of parameters, the first number and the second numbers being different.
[0902]
The methods can include wherein the determining that the second parameters stored in the buffer are different than the third parameters includes determining that one the second parameters or the third parameters is associated with the 4-parameter affine model, and the other is associated with the 6-parameter affine model.
[0903]
The methods can include wherein refreshing the buffer includes having no parameters stored in the buffer.
[0904]
The methods can include wherein refreshing the buffer includes configuring the buffer to be in an empty state associated with no parameters being stored, and storing default parameters in the buffer based on the buffer being in the empty state.
[0905]
The methods can include wherein the default parameters are based on a sequence.
[0906]
The methods can include wherein the default parameters are based on a picture.
[0907]
The methods can include wherein the default parameters are based on a slice.
[0908]
The methods can include wherein the default parameters are based on a tile.
[0909]
The methods can include wherein the default parameters are based on a CTU line.
[0910]
The methods can include wherein the default parameters are based on a CTU.
[0911]
The methods can include wherein the default parameters are signaled from an encoder to a decoder in a VPS, a SPS, a picture parameter set PPS, a slice header, a tile group header, a tile, a CTU line, or a CTU.
[0912]
The methods can include determining that the first video block is a first block of a picture, wherein refreshing the buffer is based on the determination that the first video block is the first block of the picture.
[0913]
The methods can include determining that the first video block is a first block of a slice, wherein refreshing the buffer is based on the determination that the first video block is the first block of the slice.
[0914]
The methods can include determining that the first video block is a first block of a tile, wherein refreshing the buffer is based on the determination that the first video block is the first block of the tile.
[0915]
The methods can include determining that the first video block is a first block of a CTU line, wherein refreshing the buffer is based on the determination that the first video block is the first block of the CTU line.
[0916]
The methods can include determining that the first video block is a first block of a CTU, wherein refreshing the buffer is based on the determination that the first video block is the first block of the CTU.
[0917]
The methods can include wherein the parameters are used for motion vector prediction or motion vector coding of the second video block.
[0918]
The methods can include wherein the parameters are used for deriving control point motion vectors (CPMVs) of the second video block.
[0919]
The methods can include determining that the second video block is coded with the 4-parameter affine model, and performing further processing of the second video block prioritizes parameters associated with the 4-parameter affine model over parameters associated with the 6-parameter affine model.
[0920]
The methods can include determining that the second video block is coded with the 6-parameter affine model, and performing further processing of the second video block prioritizes parameters associated with the 6-parameter affine model over parameters associated with the 4-parameter affine model.
[0921]
The methods can include identifying motion information of the first video block, the first video block neighboring the second video block, and wherein performing further processing of the second video block includes using the motion information of the first video block.
[0922]
The methods can include wherein the motion information is also stored in the buffer, and the motion information and the parameters are used to derive CPMVs of the second video block.
[0923]
The methods can include wherein motion vectors are also stored in the buffer, and the motion vectors and the parameters are used to derive CPMVs of the second video block.
[0924]
The methods can include wherein the affine merge candidate list inherits inter--prediction direction and reference indices associated with the parameters.
[0925]
The methods can include wherein the parameters are used to generate advanced motion vector prediction (AMVP) candidates.
[0926]
The methods can include wherein the parameters refer to a same reference picture.
[0927]
The methods can include wherein a reference picture list associated with the parameters is the same as a target reference picture list.
[0928]
The methods can include wherein a reference index associated with the parameters is the same as a target reference index.
[0929]
The methods can include wherein a number of sets of parameters stored in the memory used to generate the affine merge candidate list is N.
[0930]
The methods can include wherein N is signaled from an encoder to a decoder in a VPS, a SPS, a picture parameter set PPS, a slice header, a tile group header, or a tile.
[0931]
The methods can include wherein N is based on a dimension of the second video block or coding mode information of the second video block.
[0932]
The methods can include wherein N is based on a standard profile, a level, or a tier.
[0933]
The methods can include wherein N is pre-defined.
[0934]
The methods can include wherein the affine merge candidate list is in an ascending order of indices.
[0935]
The methods can include wherein the affine merge candidate list is in a descending order of indices.
[0936]
The methods can include wherein the affine merge candidate list is in a descending or ascending order of indices based on a number of available candidates.
[0937]
The methods can include wherein the 4-parameter affine model is stored as a 6-parameter affine model with the same number of parameters, and some stored parameters of the 6-paramter affine model are derived from the parameters of the 4-paramete affine model.
[0938]
The methods can include storing a base motion vector (MV) in the memory, and wherein the further processing is also based on the base MV.
[0939]
The methods can include storing a coordinate of a position of a base motion vector (MV) in the memory, and wherein the further processing is also based on the base MV, and wherein the further processing is also based on the base MV.
[0940]
The methods can include wherein parameters indicative of a and b are also stored in the memory.
[0941]
The methods can include storing a base motion vector (MV) in the memory and parameters indicative of a, b, c, and d in the memory, and wherein the further processing is also based on the base MV.
[0942]
The methods can include storing a coordinate of a position of a base motion vector (MV) and parameters a, b, c, and d in the memory, and wherein the further processing is also based on the base MV.
[0943]
The methods can include identifying characteristics of the parameters, wherein the affine model is derived based on the characteristics, the characteristics including one or more of base motion vectors (MVs) of the parameters or positions of the MVs.
[0944]
The methods can include wherein deriving the affine model includes deriving one or both of control point motion vectors (CPMVs) or the MVs.
[0945]
The methods can include wherein deriving the affine model includes deriving the CPMVs, and the CPMVs of the first video block are derived from the MVs and parameters.
[0946]
The methods can include wherein deriving the affine model includes using motion information of a neighboring video block of the first video block.
[0947]
The methods can include wherein CPMVs associated with the first video block are derived from MVs of a neighboring video block of the first video block.
[0948]
The methods can include wherein the CPMVs are used to derive MVs for each sub-block of the first video block.
[0949]
The methods can include wherein a temporal motion vector prediction (TMVP) is also used with the parameters to derive the affine model.
[0950]
The methods can include wherein the TMVP is used to derive CPMVs or MVs of sub-blocks of the first video block.
[0951]
The methods can include wherein deriving the affine model is further based on motion information of a collocated video block in a collocated picture related to the first video block.
[0952]
The methods can include deriving affine merge candidates from the parameters; and adding a spatial neighboring video block that is non-adjacent to the first video block in an affine merge candidate list including the affine merge candidates.
[0953]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list after inherited affine merge candidates.
[0954]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list after a first constructed affine merge candidate.
[0955]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list after a first merge candidate constructed from spatial neighboring blocks.
[0956]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list after constructed affine merge candidates.
[0957]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list after zero affine merge candidates.
[0958]
The methods can include wherein the affine merge candidates and the spatial neighboring video block are included in the affine merge candidate list in order.
[0959]
The methods can include adding a temporal unit block in the affine merge candidate list.
[0960]
The methods can include wherein the temporal unit block is added in the merge candidate list after inherited affine merge candidates.
[0961]
The methods can include wherein the temporal unit block is added in the merge candidate list after a first constructed affine merge candidate.
[0962]
The methods can include wherein the temporal unit block is added in the merge candidate list after a first affine merge candidate constructed from spatial neighboring blocks of the first video block.
[0963]
The methods can include a spatial neighboring or non-adjacent video block of the first video block is added in the affine merge candidate list.
[0964]
The methods can include wherein the spatial neighboring or non-adjacent video block is added to the affine merge candidate list after inherited affine AMVP candidates.
[0965]
The methods can include wherein a size of the affine merge candidate list is increased based on a determination that affine merge candidates derived from the parameters are able to be put in the affine merge candidate list.
[0966]
The methods can include wherein a size of the affine merge candidate list is increased based on a determination that affine AMVP candidates derived from the parameters are able to be put in the affine merge candidate list.
[0967]
The methods can include deriving a virtual affine model based on multiple affine models stored in the memory, wherein performing further processing of the first video block includes using the virtual affine model.
[0968]
The methods can include wherein generating the affine merge candidate list includes excluding affine merge candidates that are inherited from spatial neighboring video blocks from being inserted in a sub-block based merge candidate list, and history-based merge candidates are inserted to the sub-block merge candidate list.
[0969]
The methods can include wherein the history-based merge candidates are inserted after ATMVP candidates.
[0970]
The methods can include wherein the history-based merge candidates are inserted before constructed affine merge candidates.
[0971]
The methods can include wherein generating the affine merge candidate list includes inserting affine merge candidates that are inherited from spatial neighboring video blocks in a sub-block based merge candidate based on a position of the spatial neighboring video blocks.
[0972]
The methods can include wherein the position is within a same coding tree unit (CTU) or a CTU row as the current video block.
[0973]
The methods can include wherein the position is outside a same coding tree unit (CTU) or a CTU row as the current video block.
[0974]
The methods can include wherein generating the affine merge candidate list includes excluding affine AMVP candidates that are inherited from spatial neighboring video blocks from being inserted in an affine motion vector prediction (MVP) candidate list, and history-based merge candidates are inserted in the affine MVP candidate list.
[0975]
The methods can include wherein the history-based merge candidates are inserted first into the affine MVP candidate list.
[0976]
The methods can include wherein generating the affine merge candidate list includes inserting an affine AMVP candidate inherited from a spatial neighboring video block in an affine MVP candidate list based on a position of the spatial neighboring video block.
[0977]
The methods can include wherein the position is within a same coding tree unit (CTU) or CTU row as the current video block.
[0978]
The methods can include wherein the position is not within a same CTU or CTU row as the current video block.
[0979]
The methods can include wherein the affine model parameters are also clipped before being used for coding or decoding affine-coded blocks.
[0980]
The methods can include wherein clipping boundaries are based on a precision of the affine model parameters.
[0981]
The methods can include wherein clipping boundaries are based on a width and a height of the first video block.
[0982]
The methods can include wherein clipping boundaries are signaled in a video parameter set (VPS) , a sequence parameter set (SPS) , a picture parameter set (PPS) , a picture header, a slice header, or a tile group header.
[0983]
The methods can include wherein clipping boundaries are based on a profile or a level of a standard.
[0984]
The methods can include wherein the inherited affine merge candidate is from a video block in a current coding tree unit (CTU) .
[0985]
The methods can include wherein the affine merge candidate is inserted before inherited affine merge candidates.
[0986]
The methods can include determining that the HMVP buffer is empty; and adding an inherited affine merge candidate into the list based on the determination that the HMVP buffer is empty.
[0987]
The methods can include wherein the inherited affine AMVP candidate is from a video block in a current coding tree unit (CTU) row.
[0988]
The methods can include wherein the affine HMVP buffer includes multiple buffers, each of the multiple buffers corresponding to storage of affine parameters or control point motion vectors (CPMVs) in different categories.
[0989]
The methods can include wherein the multiple buffers include a first buffer to store affine parameters in reference list 0 and a second buffer to store affine parameters in reference list 1.
[0990]
The methods can include wherein the multiple buffers are used to store affine parameters referring to different indices in different reference lists.
[0991]
The methods can include wherein the CPMVs or the affine parameters referring to a reference K in a list X are used to update the HMVP buffer for reference K in list X, wherein X is 0 or 1, and K is 0, 1, or 2.
[0992]
The methods can include wherein the CPMVs or the affine parameters referring to a reference K are used to update the HMVP buffer for reference L in list X, wherein K >= L, X is 0 or 1, and K is an integer.
[0993]
The methods can include wherein a size of each of the multiple buffers is different.
[0994]
The methods can include wherein the size is based on a reference picture index.
[0995]
The methods can include wherein the affine HMVP buffers are updated based on a coding mode or coding information of a current coding unit (CU) .
[0996]
The methods can include wherein the current CU is coded with affine merge mode, and the affine HMVP buffer is not updated based on the current CU being coded with affine merge mode.
[0997]
The methods can include wherein the affine HMVP buffer is updated based on the current CU being coded with affine mode.
[0998]
The methods can include wherein updating the HMPV buffer is skipped based on the current CU coded with affine merge mode and uses a shared merge list.
[0999]
FIG. 28 is a flowchart for a method 2800 of processing video. The method 2800 includes deriving (2802) , for a conversion between a current block of video and a bitstream representation of the current block, affine related information associated with an affine model to be used by the current block based on affine related information associated with an affine model used by a first block stored in a buffer, wherein the first block is affine coded prior to the current block; and performing (2804) the conversion by using the derived affine related information.
[1000]
In some examples, the affine model includes at least one of a 4-parameter affine model and a 6-parameter affine model.
[1001]
In some examples, the affine related information stored in the buffer includes a first set of affine parameters associated with the affine model for the first block.
[1002]
In some examples, when the 6-parameter affine model is applied to the conversion of the first block, six parameters related to the 6-parameter affine model are stored in the buffer, or when the 4-parameter affine model is applied to the conversion of the first block, four parameters related to the 4-parameter affine model are stored in the buffer.
[1003]
In some examples, when the 6-parameter affine model is applied to the conversion of the first block, four parameters related to the 6-parameter affine model are stored in the buffer, and two other parameters related to the 6-parameter affine model are not stored in the buffer.
[1004]
In some examples, when the 4-parameter affine model is applied to the conversion of the first block, two parameters related to the 4-parameter affine model are stored in the buffer, and two other parameters related to the 4-parameter affine model are not stored in the buffer.
[1005]
In some examples, six parameters related to the 6-parameter affine model are always stored in the buffer, and when the 4-parameter affine model is applied to the conversion of the first block, a first parameter of the six parameters is set to be same as a second parameter of the six parameters, and a third parameter of the six parameters is set to be a negative value of a fourth parameter of the six parameters.
[1006]
In some examples, four parameters related to the 6-parameter affine model are always stored in the buffer, and when the 4-parameter affine model is applied to the conversion of the first block, a first parameter of the four parameters is set to be same as a second parameter of the four parameters, and a third parameter of the four parameters is set to be a negative value of a fourth parameter of the four parameters.
[1007]
In some examples, a first number of parameters related to the 4-parameter affine model are stored, and a second number of parameters related to the 6-parameter affine model are stored, the first number and the second number being the same.
[1008]
In some examples, the first number and the second number are 4 or 6.
[1009]
In some examples, a first number of parameters related to the 4-parameter affine model are stored, and a second number of parameters related to the 6-parameter affine model are stored, the first number and the second number being different.
[1010]
In some examples, the first number is 4 and the second number is 6.
[1011]
In some examples, the method further comprising: determining a characteristic of the first block of video, wherein the characteristic including one or more of: affine mode, a use of inter or merge mode, a size of the first block, a picture type, wherein the affine parameters to be stored in the buffer are determined based on the characteristic of the first block of video.
[1012]
In some examples, side information and /or affine model type including 4-parameter affine model or 6-parameter affine model associated with the affine parameters for affine model is stored in the buffer, the side information includes at least one of: inter prediction direction including list 0 or list 1 or Bi-direction and reference index for list 0 and/or list 1.
[1013]
In some examples, when the first block is bi-predicted, the first set of affine parameters further include affine parameters used for list 0 and affine parameters used for list 1.
[1014]
In some examples, the affine parameters used for list 0 are stored in a first buffer and the affine parameters used for list 1 are stored in a second buffer different from the first buffer.
[1015]
In some examples, either of the parameters used for list 0 and the parameters used for list 1 are stored, and the stored affine parameters are used to predict the other parameters.
[1016]
In some examples, the affine related information includes a first set of control point motion vectors (CPMVs) associated with the affine model for the first block.
[1017]
In some examples, the method further comprising: storing a width of the first block together with the first set of CPMVs in the buffer; and/or storing a height of the first block together with the first set of CPMVs in the buffer; and/or storing information indicative of a top-left coordinate of the first block together with the first set of CPMVs in the buffer.
[1018]
In some examples, the affine related information includes a base motion vector (MV) associated with the affine model for the first block.
[1019]
In some examples, the method further comprising: when the 4-parameter affine model is applied to the conversion of the first block, storing the based MV together with two parameters related to the 4-parameter affine model in the buffer.
[1020]
In some examples, the method further comprising: storing a coordinate of the based MV together with the two parameters related to the 4-parameter affine model in the buffer.
[1021]
In some examples, the method further comprising: when the 6-parameter affine model is applied to the conversion of the first block, storing the based MV together with four parameters related to the 6-parameter affine model in the buffer.
[1022]
In some examples, storing a coordinate of the based MV together with the four parameters related to the 6-parameter affine model in the buffer.
[1023]
In some examples, a set of stored affine parameters and their associated base MV refer to the same reference picture if they refer to the same reference picture list.
[1024]
In some examples, the buffer is an affine history-based motion vector prediction (HMVP) buffer.
[1025]
In some examples, the method further comprising: determining, whether to store the affine related information associated with affine model for the first block based on a characteristic of the first block, the characteristic including one or more of: a coded affine mode including affine advanced motion vector prediction (AMVP) and/or affine merge, a number of affine-coded video blocks, a position of the first block, or a dimension of the first block.
[1026]
In some examples, the method further comprising: storing, for every Kth block of the video, affine related information associated with affine model for the block after decoding or encoding the block, K is an integer.
[1027]
In some examples, K is 2 or 4.
[1028]
In some examples, K is signaled in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , slice header, tile group header, tile.
[1029]
In some examples, a number of sets of affine related information stored in the buffer is less than or equal to a preset maximum M, M is an integer.
[1030]
In some examples, M is 8 or 16.
[1031]
In some examples, M is signaled in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , slice header, tile group header, tile, coding tree unit (CTU) , CTU line.
[1032]
In some examples, M is different for different standard profiles/levels/tiers.
[1033]
In some examples, the method further comprising: when the number of sets of affine related information stored in the buffer is less than the preset maximum M, storing a new set of affine related information to be stored after the last set of affine related information stored in the buffer.
[1034]
In some examples, the method further comprising: when the number of sets of affine related information stored in the buffer is equal to the preset maximum M, discarding a new set of affine related information to be stored.
[1035]
In some examples, the method further comprising: when the number of sets of affine related information stored in the buffer is equal to the preset maximum M, removing an entry for storing the set of affine related information stored in the buffer; and storing a new set of affine related information to be stored in the buffer.
[1036]
In some examples, removing the earliest entry stored in the buffer.
[1037]
[1038]
In some examples, removing the last entry stored in the buffer.
[1039]
In some examples, removing any entry stored in the buffer.
[1040]
In some examples, in response to the entry being removed, storing the new set of affine related information in the buffer at a position corresponding to the removed entry.
[1041]
In some examples, in response to the entry being removed, moving forward all entries after the removed entry in the buffer in an ascending order, and storing the new set of affine related information in the last entry of the buffer.
[1042]
In some examples, in response to the entry being removed, moving backward all entries before the removed entry in the buffer in an descending order, and storing the new set of affine related information in the first entry of the buffer.
[1043]
In some examples, the method further comprising refreshing the buffer.
[1044]
In some examples, the buffer is emptied when being refreshed.
[1045]
In some examples, the buffer is emptied when being refreshed, then one or more pieces of default affine related information are put into the buffer when being refreshed.
[1046]
In some examples, the default affine related information is different for at least one of: different sequences, different pictures, different slices, different tiles, different CTU lines, different CTUs.
[1047]
In some examples, the default affine related information is signaled in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , slice header, tile group header, tile, CTU, CTU line.
[1048]
In some examples, buffer is refreshed when starting coding or decoding the first block of a picture, or when starting coding or decoding the first block of a slice, or when starting coding or decoding the first block of a tile, or when starting coding or decoding the first block of a CTU line, or when starting coding or decoding the first block of a CTU.
[1049]
In some examples, the affine related information comprises at least one of affine parameters, CPMVs, a width, a height, or a top-left position, of the first block.
[1050]
In some examples, the method further comprising: making a decision regarding coding mode and/or other coding information of a coding unit (CU) of the first block; and determining whether updating the buffer based on the decision.
[1051]
In some examples, the method further comprising: in response to the decision indicating the CU is coded with affine merge mode and a merge candidate is derived from the buffer, the buffer is not updated after decoding the CU.
[1052]
In some examples, the method further comprising: in response to the decision indicating the CU is coded with affine merge mode and a merge candidate is derived from the buffer, the buffer is updated by moving associated affine parameters to the last entry of the buffer.
[1053]
In some examples, the method further comprising: whenever one block is coded with affine mode, the buffer is updated.
[1054]
In some examples, the method further comprising: when one block is coded with affine merge mode and the block uses shared merge list, updating of the affine HMVP buffer is skipped.
[1055]
In some examples, a maximum allowed size for the buffer is equal to 1.
[1056]
In some examples, no counter is used to record the number of sets of affine parameters stored in the buffer.
[1057]
In some examples, the buffer is at least one of the following: a table, or lookup table, or a First-In-First-Out (FIFO) table, or a stack, or a queue, or a list, or a link, or an array, or any other storage with any data structure.
[1058]
In some examples, for a 4-parameter affine model, the first set of affine parameters includes at least one variable of a, b, c, d, where (mv h 0, mv v 0) is motion vector of a top-left corner control point, (mv h 1, mv v 1) is motion vector of a top-right corner control point and (mv h 2, mv v 2) is motion vector of a bottom-left corner control point, w and h are width and height of the first block.
[1059]
In some examples, for a 6-parameter affine model, the first set of affine parameters includes at least one variable of a, b, c, d, e, f, or (e, f) = (mv x, mv y) , where (mv x, mv y) is any MV used for coding the first block block, where (mv h 0, mv v 0) is motion vector of a top-left corner control point, (mv h 1, mv v 1) is motion vector of a top-right corner control point and (mv h 2, mv v 2) is motion vector of a bottom-left corner control point, w and h are width and height of the first block.
[1060]
FIG. 29 is a flowchart for a method 2900 of processing video. The method 2900 includes, calculating (2902) a first set of affine parameters associated with the affine model for a first block which is affine-coded based on motion vectors (MV) associated with the affine model for the first block, a width of the first block and a height of the first block, and clipping (2904) the calculated first set of affine parameters.
[1061]
In some examples, the calculating the first set of affine parameters comprises: calculating, without use of division operation, the first set of affine parameters associated with the affine model for the first block based on motion vectors (MV) associated with the affine model for the first block, a width of the first block and a height of the first block, an integer number defining the calculation precision.
[1062]
In some examples, the method further comprising: clipping the first set of affine parameters before storing the affine parameters in the buffer.
[1063]
In some examples, the first set of affine parameters are clipped based on bit depth of the affine parameters.
[1064]
In some examples, an affine parameter of the first set of affine parameters is clipped to [-2 K-1, 2 K-1-1] , wherein K is an integer.
[1065]
In some examples, K is equal to 7.
[1066]
In some examples, the method further comprising: clipping the first set of affine parameters before deriving motion vectors (MV) for sub-blocks of the first block.
[1067]
In some examples, the first set of affine parameters are clipped based on a set of clipping boundaries associated with the affine parameters.
[1068]
In some examples, the clipping boundaries depend on at least one of: precision of the affine parameters which is determined by bit depth of the affine parameters, width and height of the first block, the profile of a standard or a level of a standard.
[1069]
In some examples, the clipping boundaries are signaled in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , picture header, slice header, tile group header.
[1070]
FIG. 30 is a flowchart for a method 3000 of processing video. The method 3000 includes, deriving (3002) , for a conversion between a current block of video and a bitstream representation of the current block, a virtual affine model for the current block from multiple affine models stored in a buffer for storing affine models; performing (3004) the conversion by using the virtual affine model.
[1071]
In some examples, parameters of a first affine model and a second affine model among the multiple affine models are combined to form the virtual affine model by taking one or more parameters from the first affine model and remaining parameters from the second affine model.
[1072]
In some examples, parameters of a first affine model and a second affine model among the multiple affine models are jointly used to generate the virtual affine model by using a function, wherein the function is averaging.
[1073]
In some examples, the virtual affine model for the current block includes at least one of a 4-parameter affine model and a 6-parameter affine model.
[1074]
In some examples, the conversion generates the current block of video from the bitstream representation.
[1075]
In some examples, the conversion generates the bitstream representation from the current block of video.
[1076]
FIG. 31 is a flowchart for a method 3100 of processing video. The method 3100 includes, deriving (3102) , for a conversion between a current block of video and a bitstream representation of the current block, a first set of affine parameters associated with affine model for the current block; comparing (3104) the first set of affine parameters to one or more of sets of affine parameters stored in a buffer for storing affine parameters so as to determine whether the first set of affine parameters is same or similar to at least one set of affine parameters; and deciding (3106) whether or how to update the buffer for storing affine parameters using the first set of affine parameters based on the determination.
[1077]
In some examples, the affine model for the current block includes at least one of a 4-parameter affine model and a 6-parameter affine model.
[1078]
In some examples, for one prediction direction, in response to one or more parameters of the first set of affine parameters is same as the corresponding one or more parameters of the at least one set of affine parameters stored in the buffer, determining the first set of affine parameters is same or similar to at least one set of affine parameters.
[1079]
In some examples, for one prediction direction, in response to an absolute difference between each of at least one parameter of the first set of affine parameters and a corresponding parameter of the at least one set of affine parameters stored in the buffer being less than a threshold corresponding to the each parameter, it is determined that the first set of affine parameters is same or similar to at least one set of affine parameters.
[1080]
In some examples, the first set of affine parameters comprises variable a, b, c or d, or variable a, b, c, d, e, f, or (e, f) = (mv x, mv y) , where (mv x, mv y) is any MV used for coding the first block block, where (mv h 0, mv v 0) is motion vector of a top-left corner control point, (mv h 1, mv v 1) is motion vector of a top-right corner control point and (mv h 2, mv v 2) is motion vector of a bottom-left corner control point, w and h are width and height of the current block.
[1081]
In some examples, the number of at least one parameter is one, and the at least one parameter comprises the variable a, b, c or d.
[1082]
In some examples, the number of at least one parameter is two and the at least one parameter comprises variables a and b or comprises variables c and d.
[1083]
In some examples, the number of at least one parameter is three and the at least one parameter comprises variables a, b and c.
[1084]
In some examples, the number of at least one parameter is four and the at least one parameter comprises variables a, b c and d.
[1085]
In some examples, the threshold is predefined number.
[1086]
In some examples, the threshold depends on coding information of the current block, wherein the coding information includes width and/or height of the current block.
[1087]
In some examples, the thresholds corresponding to different parameters are different for different standard profiles or levels or tiers.
[1088]
In some examples, the threshold is signaled in in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , slice header, tile group header, tile, coding tree unit (CTU) , CTU line.
[1089]
In some examples, in response to the first set of affine parameters and another set of affine parameters to be compared being associated with different inter prediction direction, it is determined that the two sets of affine parameters are not same or similar, wherein the inter prediction direction includes list 0, list 1 or Bi-direction.
[1090]
In some examples, when inter prediction direction list 0 is one prediction direction in use, in response to the first set of affine parameters and another set of affine parameters to be compared being associated with different reference indices for list 0, it is determined that the two sets of affine parameters are not same or similar.
[1091]
In some examples, when inter prediction direction list 1 is one prediction direction in use, in response to the first set of affine parameters and another set of affine parameters to be compared being associated with different reference indices for list 1, it is determined that the two sets of affine parameters are not same or similar.
[1092]
In some examples, in response to the first set of affine parameters and another set of affine parameters to be compared having different number of affine parameters or using different affine models, it is determined the two sets of affine parameters are not same.
[1093]
In some examples, when the first set of affine parameters and another set of affine parameters to be compared being both associated with inter prediction direction bi-prediction, in response to parameters for list 0 and parameters for list 1 of the two sets of affine parameters being both same or similar, it is determined that the two sets of affine parameters are same or similar.
[1094]
In some examples, the first set of affine parameters is compared to each set of affine parameters stored in the buffer for storing affine parameters.
[1095]
In some examples, the first set of affine parameters is compared to a subset of sets of affine parameters stored in the buffer for storing affine parameters.
[1096]
In some examples, the first set of affine parameters is compared to the first W or last W sets of affine parameters stored in the buffer for storing affine parameters, W is an integer.
[1097]
In some examples, the first set of affine parameters is compared to one set in each W sets of affine parameters stored in the buffer for storing affine parameters, W is an integer.
[1098]
In some examples, the method further comprising: in response to the determination indicating that the first set of affine parameters is same or similar to at least one set of affine parameters stored in the buffer, the first set of affine parameters is not stored in the buffer.
[1099]
In some examples, the method further comprising: in response to the determination indicating that the first set of affine parameter is same or similar to one set of affine parameters stored in the buffer, removing the one set of affine parameters from the buffer; storing the first set of affine parameters in the buffer at a position corresponding to the removed one set of affine parameters.
[1100]
In some examples, the method further comprising: in response to the determination indicating that the first set of affine parameter is same or similar to one set of affine parameters stored in the buffer, removing the one set of affine parameters from the buffer, moving forward all sets of affine parameters after the removed one set of affine parameters in the buffer in an ascending order, and storing the first set of affine parameters in the buffer at a position corresponding the last one set of affine parameters.
[1101]
In some examples, the method further comprising: in response to the determination indicating that the first set of affine parameter is same or similar to one set of affine parameters stored in the buffer, removing the one set of affine parameters from the buffer, moving backward all sets of affine parameters before the removed one set of affine parameters in the buffer in a descending order, and storing the first set of affine parameters in the buffer at a position corresponding the first one set of affine parameters.
[1102]
In some examples, the method further comprising: in response to the determination indicating that the first set of affine parameters is not same or similar to at least one set of affine parameters stored in the buffer, storing the first set of affine parameters in the buffer.
[1103]
In some examples, the method further comprising: performing the conversion using the first set of affine parameters.
[1104]
In some examples, the conversion generates the current block of video from the bitstream representation.
[1105]
In some examples, the conversion generates the bitstream representation from the current block of video.
[1106]
FIG. 32 is a flowchart for a method 3200 of processing video. The method 3200 includes, deriving (3202) for a conversion between a current block of video and a bitstream representation of the current block, affine related information associated with affine model for the current block based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; and performing (3204) the conversion by using the affine related information.
[1107]
In some examples, the affine model for the current block includes at least one of a 4-parameter affine model and a 6-parameter affine model.
[1108]
In some examples, the affine parameters stored in the buffer are used for motion vector prediction or motion vector coding of the current block.
[1109]
In some examples, the affine related information includes control point motion vectors (CPMVs) for the current block.
[1110]
In some examples, the affine related information includes motion vectors (MVs) used in motion compensation for sub-blocks of the current block.
[1111]
In some examples, the affine related information includes prediction for control point motion vectors (CPMVs) of the current block, wherein the prediction for CPMVs are used to predict the CPMVs of the current block when CPMVs need to be coded.
[1112]
In some examples, when the current block is coded with 4-parameter affine model, higher priority is assigned to 4-parameter affine model stored in the buffer and lower priority is assigned to 6-parameter affine model stored in the buffer.
[1113]
In some examples, when the current block is coded with 6-parameter affine model, higher priority is assigned to 6-parameter affine model stored in the buffer and lower priority is assigned to 4-parameter affine model stored in the buffer.
[1114]
In some examples, the deriving affine related information associated with affine model for the current block comprises: deriving the affine related information associated with affine model for the current block based on a set of the affine parameters stored in the buffer and additional motion information.
[1115]
In some examples, the addition motion information includes at least one of motion information of a neighboring block, or motion information associated with the set of the affine parameters, or motion information of a spatial neighboring or non-adjacent unit block, or motion information of a temporal neighboring unit block/a collocated unit block in a collocated picture, the motion information at least includes a motion vector, a reference list indication and a reference picture index.
[1116]
In some examples, deriving a CPMV for the current block is based on the set of the affine parameters, coordinate of a position for which the CPMV is to be derived, coordinate of a base position, and one of a base MV (mv h 0, mv v 0) of the spatial or temporal neighboring block, or a base MV (mv h 0, mv v 0) associated with the set of the affine parameters, or a base MV (mv h 0, mv v 0) of the spatial neighboring or non-adjacent unit block, or a base MV (mv h 0, mv v 0) of the temporal neighboring unit block, wherein the base position is associated with the based MV.
[1117]
In some examples, deriving a CPMV for the current block is based on a disparity between the position for which the CPMV is to be derived, and the base position.
[1118]
In some examples, the position is determined based on coordinate of a top-left corner of the current block, width and height of the current block, and the base position is determined based on coordinate of a top-left corner of the current block, dimensions of the neighbouring block or neighbouring unit block.
[1119]
In some examples, deriving a MV used in motion compensation for a sub-block of the current block is based on the set of the affine parameters, coordinate of a position for which the MV (mv h (x, y) , mv v (x, y) ) is to be derived, coordinate of a base position, and one of a base MV (mv h 0, mv v 0) of the spatial or temporal neighboring block or a base MV (mv h 0, mv v 0) associated with the set of the affine parameters, or a base MV (mv h 0, mv v 0) of the spatial neighboring or non-adjacent unit block, or a base MV (mv h 0, mv v 0) of the temporal neighboring unit block.
[1120]
In some examples, deriving a MV used in motion compensation for a sub-block of the current block is based on a disparity between the position for which the MV (mv h (x, y) , mv v (x, y) ) is to be derived, and the base position.
[1121]
In some examples, the position is determined based on coordinate of a top-left corner of the sub-block, a center of the sub-block and block size of the sub-block.
[1122]
In some examples, when the set of the affine parameters stored in the buffer is from a block coded with 4-parameter affine model, deriving the CPMV or MV (mv h (x, y) , mv v (x, y) ) is based on the 4-parameter affine model.
[1123]
In some examples, when the set of the affine parameters stored in the buffer is from a block coded with 6-parameter affine model, deriving the CPMV or MV (mv h (x, y) , mv v (x, y) ) is based on the 6-parameter affine model.
[1124]
In some examples, deriving the CPMV or MV (mv h (x, y) , mv v (x, y) ) is based on the 6-parameter affine model regardless the set of the affine parameters stored in the buffer is from a bock coded with 4-parameter affine model or 6-parameter affine model.
[1125]
In some examples, deriving CPMVs of the current block is based on the set of the affine parameters stored in the buffer and the motion vector, and the CPMVs of the current block serve as motion vector predictions (MVPs) for signaled CPMVs of the current block.
[1126]
In some examples, deriving CPMVs of the current block is based on the set of the affine parameters stored in the buffer and the motion vector, and the CPMVs of the current block serve are used to derive the MVs of each sub-block of the current block used for motion compensation.
[1127]
In some examples, when the current block is affine merge coded, deriving the MVs of each sub-block of the current block used for motion compensation is based on the set of the affine parameters stored in the buffer and the motion vector.
[1128]
In some examples, the motion vector of the neighboring unit block or the neighboring block and the set of the affine parameters are associated with same inter prediction direction, wherein the inter prediction direction includes list 0, list 1 or Bi-direction.
[1129]
In some examples, when inter prediction direction list 0 is one prediction direction in use, the motion vector and the set of the affine parameters are associated with same reference indices for list 0.
[1130]
In some examples, when inter prediction direction list 1 is one prediction direction in use, the motion vector and the set of the affine parameters are associated with same reference indices for list 1.
[1131]
In some examples, when the MV of the spatial neighboring unit block or neighboring block and the set of the affine parameters stored in the buffer refer to different reference pictures, the MV of the spatial neighboring unit block or neighboring block is scaled to refer to the same reference picture as the set of the affine parameters stored in the buffer to derive the affine model of the current block.
[1132]
In some examples, when the MV of the temporal neighboring unit block or neighboring block and the set of the affine parameters stored in the buffer refer to different reference pictures, the MV of the temporal unit block or neighboring block is scaled to refer to the same reference picture as the set of the affine parameters stored in the buffer to derive the affine model of the current block.
[1133]
FIG. 33 is a flowchart for a method 3300 of processing video. The method 3300 includes, deriving (3302) , for a conversion between a current block of video and a bitstream representation of the current block, affine model for the current block based on a set of affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; generating (3304) an affine merge candidate list , wherein the affine merge candidate list comprises an affine merge candidate for the current block based on the derived affine model for the current block; and performing (3306) the conversion based on the affine merge candidate list .
[1134]
In some examples, side information associated with the stored set of affine parameters is inherited by the affine merge candidate based on the derived affine model, wherein the side information includes inter-prediction direction which includes list 0, list 1 and Bi-direction, and reference indices for list 0/list 1.
[1135]
In some examples, the affine merge candidate based on the derived affine model is inserted into the affine merge candidate list after affine merge candidates inherited from neighboring blocks in the list, before constructed affine merge candidates in the list.
[1136]
In some examples, the affine merge candidate based on the derived affine model is inserted into the affine merge candidate list before all other affine merge candidates.
[1137]
In some examples, the affine merge candidate based on the derived affine model is inserted into the affine merge candidate list after constructed affine merge candidates in the list, before padding candidates in the list.
[1138]
In some examples, the affine merge candidate based on the derived affine model is inserted into the affine merge candidate list after constructed affine merge candidates not using temporal motion prediction in the list, before constructed affine merge candidates using temporal motion prediction in the list.
[1139]
In some examples, the affine merge candidate based on the derived affine model is inserted into the affine merge candidate list, and interleaved with constructed affine merge candidates in the list and padding candidates in the list.
[1140]
In some examples, the method further comprising: adding N candidates derived based on affine parameters stored in the buffer to an affine merge candidate list, N is a pre-defined integer.
[1141]
FIG. 34 is a flowchart for a method 3400 of processing video. The method 3400 includes, generating (3402) , for a conversion between a current block of video and a bitstream representation of the current block, an affine advanced motion vector prediction (AMVP) candidate list for the current block which is affine AMVP coded block, wherein the candidate list includes at least one AMVP candidate based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block; and performing (3404) the conversion based on the affine AMVP candidate list.
[1142]
In some examples, the stored affine parameters used to generate the affine AMVP candidate refer to same reference picture as target reference picture of the current block.
[1143]
In some examples, a reference picture list associated with the stored affine parameters is same as a target reference picture list of the current block.
[1144]
In some examples, a reference index associated with the stored affine parameters is same as a target reference index of the current block.
[1145]
In some examples, the affine AMVP candidate based on the affine parameters is inserted into the affine AMVP candidate list after affine AMVP candidates inherited from neighboring blocks in the list, before constructed affine AMVP candidates in the list.
[1146]
In some examples, the affine AMVP candidate based on the affine parameters is inserted into the affine AMVP candidate list before all other affine AMVP candidates.
[1147]
In some examples, the affine AMVP candidate based on the affine parameters is inserted into the affine AMVP candidate list after constructed affine AMVP candidates in the list, before High Efficiency Video Coding (HEVC) based AMVP candidates in the list.
[1148]
In some examples, the affine AMVP candidate based on the affine parameters is inserted into the affine AMVP candidate list after High Efficiency Video Coding (HEVC) based AMVP candidates in the list, before padding affine AMVP candidates in the list.
[1149]
In some examples, the affine AMVP candidate based on the affine parameters is inserted into the affine AMVP candidate list after constructed affine AMVP candidates not using temporal motion prediction in the list, before constructed affine AMVP candidates using temporal motion prediction in the list.
[1150]
In some examples, when the current block is coded with 4-parameter affine model, higher priority is assigned to a 4-parameter affine model stored in the buffer and lower priority is assigned to a 6-parameter affine model stored in the buffer.
[1151]
In some examples, when the current block is coded with 6-parameter affine model, higher priority is assigned to a 6-parameter affine model stored in the buffer and lower priority is assigned to a 4-parameter affine model stored in the buffer.
[1152]
In some examples, the method further comprising: adding N candidates derived based on affine parameters stored in the buffer to an affine AMVP candidate list, N is a pre-defined integer.
[1153]
In some examples, N is signaled in at least one of Sequence Parameter Set (SPS) , Video Parameter Set (VPS) , Picture Parameter Set (PPS) , slice header, tile group header, tile.
[1154]
In some examples, N depends on at least one of block dimension of the current block, coded mode information including AMVP mode and/or merge mode.
[1155]
In some examples, N depends on available candidates in the candidate list.
[1156]
In some examples, N depends on the available candidates of a certain type in the candidate list.
[1157]
In some examples, when N is greater than 1, the N candidates derived based on affine parameters stored in the buffer are added to the candidate list in an ascending order of indices, or in a descending order of indices, or in an order which is determined based on the number of available candidates in the candidate list.
[1158]
In some examples, the method further comprising: selecting the N sets of affine parameters from all sets of affine parameters stored in the buffer to derive the N candidates, N is an integer.
[1159]
In some examples, the selected N sets of affine parameters are the latest N sets of affine parameters in the buffer.
[1160]
In some examples, the selected N sets of affine parameters depend on indices of sets of affine model parameters in the buffer.
[1161]
FIG. 35 is a flowchart for a method 3500 of processing video. The method 3500 includes, deriving (3502) , for a conversion between a current block of video and a bitstream representation of the current block, affine candidates for the current block based on affine parameters stored in a buffer for storing affine related information of blocks coded prior the current block and one or multiple unit blocks; inserting (3504) the derived affine candidates into affine candidates list; and performing (3506) the conversion by using the affine candidates list.
[1162]
In some examples, the unit blocks include at least one of the group consisting of spatial neighboring/non-adjacent unit blocks and temporal neighboring unit/non-adjacent unit blocks.
[1163]
In some examples, the derived affine candidates are put before all other affine candidates, or right after inherited affine candidates in the list, or right after the first constructed affine candidate in the list, or right after the first affine candidate constructed from spatial neighboring blocks/non-adjacent blocks in the list, or right after all affine candidate derived from spatial neighboring blocks/non-adjacent blocks in the list, or right after all the constructed affine candidates in the list, or right before all the zero affine candidates.
[1164]
In some examples, when another affine candidate is inherited from a spatial or temporal neighboring/non-adjacent unit block, the spatial or temporal neighboring/non-adjacent unit block is not used to derive the affine candidate with the affine parameters stored in the buffer.
[1165]
In some examples, a spatial or temporal neighboring/non-adjacent unit block is used to derive an affine candidate with only one set of the affine parameters stored in the buffer.
[1166]
In some examples, at most N affine candidates derived from the affine parameters stored in the buffer and a unit block can be put into the affine candidate list, N is an integer.
[1167]
In some examples, a Generalized Bi-prediction improvement (GBI) index of the current block is inherited from the GBI index of a spatial or temporal neighboring/non-adjacent unit block if it chooses the affine candidates derived from the affine parameters stored in the buffer and the unit block.
[1168]
In some examples, the affine candidates derived from the affine parameters stored in the buffer and the unit blocks are put into the affine candidate list in order.
[1169]
In some examples, the method further comprising: searching available affine candidates derived from the affine parameters stored in the buffer and the unit blocks by using a two-level nested looping method; inserting the available affine candidates into the affine candidate list.
[1170]
In some examples, in a first level loop, visiting each set of the affine parameters stored in the buffer in order of from the beginning of a table to the end, or from the end of the table to the beginning, or any other predefined or adaptive order.
[1171]
In some examples, some sets of the affine parameters stored in the buffer are skipped in the first loop.
[1172]
In some examples, for each set of the affine parameters stored in the buffer, a second level loop is applied, wherein each unit block is visited in order.
[1173]
In some examples, only one spatial neighboring/non-adjacent unit block is included in the second level loop, or only one temporal neighboring/non-adjacent unit block is included in the second level loop.
[1174]
In some examples, with a set of affine parameters given in the first level loop and a spatial or temporal neighbouring unit block given in the second level loop, an affine candidate is generated and put into the affine candidate list if all or partial of the following conditions are satisfied,
[1175]
i. the spatial or temporal neighbouring/non-adjacent unit block is available;
[1176]
ii. the spatial or temporal neighbouring/non-adjacent unit block is inter-coded;
[1177]
iii. the spatial or temporal neighbouring/non-adjacent unit block is not out of the current CTU-row.
[1178]
iv. inter-prediction including list 0, list1, or bi-direction of the set of affine parameters and that of the spatial or temporal neighbouring/non-adjacent unit block are the same;
[1179]
v. reference index for list 0 of the set of affine parameters and that of the spatial or temporal neighbouring/non-adjacent unit block are the same;
[1180]
vi. reference index for list 1 of the set of affine parameters and that of the spatial or temporal neighbouring/non-adjacent unit block are the same;
[1181]
vii. POC of the reference picture for list 0 of the set of affine parameters is the same to the POC of one of the reference pictures of the spatial or temporal neighbouring/non-adjacent unit block.
[1182]
viii. POC of the reference picture for list 1 of the set of affine parameters is the same to the POC of one of the reference pictures of the spatial or temporal neighbouring/non-adjacent unit block.
[1183]
In some examples, when a spatial or temporal neighbouring unit block has been used to derive an inherited affine candidate, it is skipped in the second loop, and not to be used to derive an affine candidate with stored affine parameters.
[1184]
In some examples, when a spatial or temporal neighbouring block has been used to derive an affine candidate with a set of affine parameters stored in the buffer, it is skipped in the second loop, and not to be used to derive an affine candidate with another set of affine parameters stored in the buffer.
[1185]
In some examples, when a spatial or temporal neighbouring block is used to derive an affine candidate, all other neighbouring blocks after that neighbouring block are skipped and the second loop is broken so as to go back to the first loop, and a next set of affine parameters is visited in the first loop.
[1186]
In some examples, a size of the affine candidate list is increased by N when the affine candidates derived from the affine parameters stored in the buffer can be put into the list, wherein N is an integer.
[1187]
In some examples, the affine candidate is an affine merge candidate, and the affine candidate list is an affine merge candidate list.
[1188]
In some examples, the affine candidate is an affine AMVP candidate, and the affine candidate list is an affine AMVP candidate list.
[1189]
In some examples, the derived affine candidates are put right after the first translational affine AMVP candidate in the list or after all translational affine AMVP candidate in the list.
[1190]
FIG. 36 is a flowchart for a method 3600 of processing video. The method 3600 includes, deriving (3602) , for a conversion between a current block of video and a bitstream representation of the current block, affine candidates for the current block based on affine parameters stored in an affine history-based motion vector prediction (HMVP) buffer; inserting (3604) the derived affine candidates into affine candidates list; and performing (3606) the conversion by using the affine candidates list.
[1191]
In some examples, an affine candidate inherited from a spatial neighbouring block of the current block are not put into the list.
[1192]
In some examples, an affine candidates inherited from a spatial neighbouring block of the current block are excluded from the list.
[1193]
In some examples, the derived affine candidates are inserted into the list after affine candidates inherited from a block in a CTU row different from the current CTU row.
[1194]
In some examples, an affine candidate inherited from a block in the current CTU row is removed from the list.
[1195]
In some examples, whether an affine candidate inherited from a spatial neighbouring block of the current block is inserted into the list or not depends on the position of the spatial neighbouring block.
[1196]
In some examples, the affine candidate inherited from the spatial neighbouring block is inserted into the list when the spatial neighbouring block is in the same CTU or CTU row as the current block.
[1197]
In some examples, the affine candidate inherited from the spatial neighbouring block is put into the list when the spatial neighbouring block is not in the same CTU or CTU row as the current block.
[1198]
In some examples, whether to insert affine merge candidates inherited from a spatial neighbouring block of the current block depends on the affine HMVP buffer.
[1199]
In some examples, when the affine HMVP buffer is empty, the inherited affine merge candidates are added to the list; and when the affine HMVP buffer is not empty, the inherited affine merge candidates are excluded from the list.
[1200]
In some examples, whether to insert affine merge candidates inherited from a spatial neighbouring block of the current block depends on the block dimensions.
[1201]
In some examples, the affine candidate is an affine merge candidate, and the affine candidate list is an affine merge candidate list/sub-block based merge candidate list.
[1202]
In some examples, the affine candidate is an affine AMVP candidate, and the affine candidate list is an affine AMVP candidate list.
[1203]
In some examples, the derived affine merge candidates are inserted into the list just after alternative temporal motion vector prediction (ATMVP) candidate.
[1204]
In some examples, the derived affine merge candidates are inserted into the list before constructed affine merge candidates.
[1205]
In some examples, the derived affine AMVP candidates are inserted first into the list.
[1206]
In some examples, the base position is any position inside the neighbouring unit block.
[1207]
In some examples, the base position is determined based on coordinate of a top-left corner of the current block, dimensions of the neighbouring unit block.
[1208]
FIG. 37 is a flowchart for a method 3700 of processing video. The method 3700 includes, deriving (3702) , for a conversion between a current block of video and a bitstream representation of the current block, an affine model for the current block based on affine related information stored in at least one history motion vector prediction (HMVP) buffer of multiple HMVP buffers, the multiple HMVP buffers being used to store affine related information of blocks coded prior the current block in different categories; and performing (3704) the conversion by using the derived affine model.
[1209]
In some examples, the multiple HMVP buffers in different categories are related to different reference lists and/or different reference indices in the reference list, wherein the reference list and/or reference index is referred to to acquire affine related information.
[1210]
In some examples, the affine related information includes at least one of affine parameters and control point motion vectors (CPMVs) .
[1211]
In some examples, the method further comprising: updating the multiple HMVP buffers after decoding an affine coded coding unit (CU) .
[1212]
In some examples, the multiple HMVP buffers include a first HMVP buffer used to store affine parameters and/or CPMVs in reference list 0 and a second HMVP buffer used to store affine parameters and/or CPMVs in reference list 1.
[1213]
In some examples, the CPMVs or affine parameters for reference list 0 are used to update the first HMVP buffer.
[1214]
In some examples, the CPMVs or affine parameters for reference list 1 are used to update the second HMVP buffer.
[1215]
In some examples, in the multiple HMVP buffers include N HMVP buffers used to store affine parameters referring to a reference index K in reference list X, respectively, wherein N>1.
[1216]
In some examples, for different HMVP buffers of the N buffers, at least one of K and X is different.
[1217]
In some examples, X is 0 or 1, K is 0, 1, or 2, N is 6.
[1218]
In some examples, X is 0 or 1, K is 0, 1, 2 or 3, N is 8.
[1219]
In some examples, the CPMVs or affine parameters referring to the reference index K in list X are used to update the HMVP buffer for the same reference index K in the same list X.
[1220]
In some examples, the CPMVs or affine parameters referring to the reference index K, where K >= L, in list X are used to update the HMVP buffer for a reference index L in the same list X.
[1221]
In some examples, L is 1, 2, or 3.
[1222]
In some examples, the affine model for the current block is derived based on motion information of a spatial adjacent or non-adjacent neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[1223]
In some examples, the affine model for the current block is derived based on the motion vector (MV) of the spatial adjacent or non-adjacent neighbouring unit block referring to reference list X and the affine parameters stored in the HMVP buffer referring to same reference list X, X is 0 or 1.
[1224]
In some examples, the affine model for the current block is derived based on motion information of a temporal neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[1225]
In some examples, the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to reference list X and the affine parameters stored in the HMVP buffer referring to the same reference list X, X is 0 or 1.
[1226]
In some examples, the affine model for the current block is derived based on motion information of a spatial adjacent or non-adjacent neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[1227]
In some examples, the affine model for the current block is derived based on the MV of the spatial adjacent or non-adjacent neighbouring unit block referring to reference index K in list X and the affine parameters stored in the HMVP buffer referring to the same reference index K in the same list X.
[1228]
In some examples, the affine model for the current block is derived based on the MV of the spatial adjacent or non-adjacent neighbouring unit block referring to reference index K, where K >=L, in list X and the affine parameters stored in the HMVP buffer referring to a reference index L in the same list X.
[1229]
In some examples, the affine model for the current block is derived based on motion information of a temporal neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[1230]
In some examples, the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to reference index K in list X and the affine parameters stored in the HMVP buffer referring to same reference index K in the same list X.
[1231]
In some examples, the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to reference index K, where K >=L, in list X and the affine parameters stored in the HMVP buffer referring to a reference index L in the same list X.
[1232]
In some examples, X is 0 or 1 and K is 0, 1, or 2.
[1233]
In some examples, X is 0 or 1 and K is 0, 1, 2 or 3.
[1234]
In some examples, X is 0 or 1 and L is one of integers from 1 to 15.
[1235]
In some examples, the size of each of the multiple HMVP buffers is different.
[1236]
In some examples, the size depends on the reference index in the list.
[1237]
In some examples, the size of the HMVP buffer for reference 0 is 3, the size of the HMVP buffer for reference 1 is 2, and the size of the HMVP buffer for reference 2 is 1.
[1238]
In some examples, the conversion generates the current block of video from the bitstream representation.
[1239]
In some examples, the conversion generates the bitstream representation from the current block of video.
[1240]
It will be appreciated that the disclosed techniques may be embodied in video encoders or decoders to improve compression efficiency when the coding units being compressed have shaped that are significantly different than the traditional square shaped blocks or rectangular blocks that are half-square shaped. For example, new coding tools that use long or tall coding units such as 4x32 or 32x4 sized units may benefit from the disclosed techniques.
[1241]
The disclosed and other solutions, examples, embodiments, modules and the functional operations described in this document can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this document and their structural equivalents, or in combinations of one or more of them. The disclosed and other embodiments can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a 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 them. The term “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. A propagated signal is an artificially generated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus.
[1242]
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.
[1243]
The processes and logic flows described in this document 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) .
[1244]
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 non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[1245]
While this patent document contains many specifics, these should not be construed as limitations on the scope of any subject matter or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. 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.
[1246]
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.
[1247]
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 processing video, comprising: deriving, for a conversion between a current block of video and a bitstream representation of the current block, an affine model for the current block based on affine related information stored in at least one history motion vector prediction (HMVP) buffer of multiple HMVP buffers, the multiple HMVP buffers being used to store affine related information of blocks coded prior the current block in different categories; and performing the conversion by using the derived affine model.
[Claim 2]
The method of claim 1, wherein the multiple HMVP buffers in different categories are related to different reference lists and/or different reference indices in the reference list, wherein the reference list and/or reference index is referred to to acquire affine related information.
[Claim 3]
The method of claim 1 or 2, wherein the affine related information includes at least one of affine parameters and control point motion vectors (CPMVs) .
[Claim 4]
The method of anyone of claims 1-3, wherein further comprising: updating the multiple HMVP buffers after decoding an affine coded coding unit (CU) .
[Claim 5]
The method of any one of claims 1-4, wherein the multiple HMVP buffers include a first HMVP buffer used to store affine parameters and/or CPMVs in reference list 0 and a second HMVP buffer used to store affine parameters and/or CPMVs in reference list 1.
[Claim 6]
The method of claim 5, wherein the CPMVs or affine parameters for reference list 0 are used to update the first HMVP buffer.
[Claim 7]
The method of claim 5, wherein the CPMVs or affine parameters for reference list 1 are used to update the second HMVP buffer.
[Claim 8]
The method of any one of claims 1-4, wherein the multiple HMVP buffers include N HMVP buffers used to store affine parameters referring to a reference index K in reference list X, respectively, wherein N>1.
[Claim 9]
The method of claim 8, wherein for different HMVP buffers of the N buffers, at least one of K and X is different.
[Claim 10]
The method of claim 8 or 9, wherein X is 0 or 1, K is 0, 1, or 2, N is 6.
[Claim 11]
The method of claim 8 or 9, wherein X is 0 or 1, K is 0, 1, 2 or 3, N is 8.
[Claim 12]
The method of claim 8 or 9, wherein the CPMVs or affine parameters referring to the reference index K in list X are used to update the HMVP buffer for the same reference index K in the same list X.
[Claim 13]
The method of claim 8 or 9, wherein the CPMVs or affine parameters referring to the reference index K, where K >= L, in list X are used to update the HMVP buffer for a reference index L in the same list X.
[Claim 14]
The method of claim 13, wherein L is 1, 2, or 3.
[Claim 15]
The method of claim 5, wherein the affine model for the current block is derived based on motion information of a spatial adjacent or non-adjacent neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[Claim 16]
The method of claim 15, wherein the affine model for the current block is derived based on the motion vector (MV) of the spatial adjacent or non-adjacent neighbouring unit block referring to reference list X and the affine parameters stored in the HMVP buffer referring to the same reference list X, X is 0 or 1.
[Claim 17]
The method of claim 5, wherein the affine model for the current block is derived based on motion information of a temporal neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[Claim 18]
The method of claim 17, wherein the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to reference list X and the affine parameters stored in the HMVP buffer referring to the same reference list X, X is 0 or 1.
[Claim 19]
The method of claim 8, wherein the affine model for the current block is derived based on motion information of a spatial adjacent or non-adjacent neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[Claim 20]
The method of claim 19, wherein the affine model for the current block is derived based on the MV of the spatial adjacent or non-adjacent neighbouring unit block referring to a reference index K in list X and the affine parameters stored in the HMVP buffer referring to the same reference index K in the same list X.
[Claim 21]
The method of claim 19, wherein the affine model for the current block is derived based on the MV of the spatial adjacent or non-adjacent neighbouring unit block referring to a reference index K, where K >=L, in list X and the affine parameters stored in the HMVP buffer referring to a reference index L in the same list X.
[Claim 22]
The method of claim 8, wherein the affine model for the current block is derived based on motion information of a temporal neighbouring unit block and a set of affine parameters stored in one of the multiple HMVP buffers.
[Claim 23]
The method of claim 22, wherein the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to a reference index K in list X and the affine parameters stored in the HMVP buffer referring to the same reference index K in the same list X.
[Claim 24]
The method of claim 22, wherein the affine model for the current block is derived based on the MV of the temporal neighbouring unit block referring to a reference index K, where K >=L, in list X and the affine parameters stored in the HMVP buffer referring to a reference index L in the same list X.
[Claim 25]
The method of anyone of claim 20 and 23, wherein X is 0 or 1, and K is 0, 1, or 2.
[Claim 26]
The method of anyone of claim 20 and 23, wherein X is 0 or 1, and K is 0, 1, 2 or 3.
[Claim 27]
The method of anyone of claim 21 and 24, wherein X is 0 or 1, and L is one of integers from 1 to 15.
[Claim 28]
The method of any one of claims 1-27, wherein the size of each of the multiple HMVP buffers is different.
[Claim 29]
The method of claim 28, wherein the size depends on the reference index in the list.
[Claim 30]
The method of claim 29, wherein the size of the HMVP buffer for reference 0 is 3, the size of the HMVP buffer for reference 1 is 2, and the size of the HMVP buffer for reference 2 is 1.
[Claim 31]
The method of any one of claims 1 -30, wherein the conversion generates the current block of video from the bitstream representation.
[Claim 32]
The method of any one of claims 1 -30, wherein the conversion generates the bitstream representation from the current block of video.
[Claim 33]
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 claims 1 to 32.
[Claim 34]
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 claims 1 to 32.

Drawings

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