History-based motion vector prediction with default parameters
Video coding and decoding techniques, including history-based motion vector prediction with default parameters, are described. One example video processing method includes resetting for a conversion between a video unit of a video and a bitstream of the video, a history-based motion vector prediction (HMVP) table of size N by adding K HMVP motion candidates to the HMVP table, where the K HMVP motion candidates have default values, where N and K are positive integers, and where K≤N; and performing the conversion between the video unit and the bitstream using the HMVP table resulting from the resetting.
1. A method of video processing, comprising:
resetting, for a conversion between a video unit of a video and a bitstream of the video, a history-based motion vector prediction (HMVP) table of size N by adding K HMVP motion candidates to the HMVP table,
wherein the K HMVP motion candidates have default values,
wherein each of the K HMVP motion candidates are identical,
wherein N and K are positive integers, and
wherein K≤N; and
performing the conversion between the video unit and the bitstream using the HMVP table resulting from the resetting.
2. The method of claim 1 ,
wherein a first m candidates in the HMVP table are different from each other,
wherein each of a last (K−m) candidates in the HMVP table is identical to one of the first m candidates, or
wherein a last (K−m) candidates in the HMVP table are different from each other,
wherein each of a first m candidates in the HMVP table is identical to one of the last (K−m) candidates, or
wherein a first m candidates in the HMVP table are different from each other,
wherein a last (K−m) candidates in the HMVP table comprise one or more copies of the first m candidates,
wherein m<K.
3. The method of claim 1 , wherein at least one of the K HMVP motion candidates is a uni-prediction motion candidate, or,
the video unit is a P slice or P picture, and wherein a prediction direction of the uni-prediction motion candidate is set to list 0 (L0), or
the video unit is a B slice or B picture, and wherein a prediction direction of the uni-prediction motion candidate is set to list 0 (L0) or list 1 (L1).
4. The method of claim 3 , wherein a motion vector of the uni-prediction motion candidate is set to (0, 0); or (−m×W, 0), wherein m and W are integers; or (0, −q×H), wherein q and H are integers; or (−m×W, −q×H), wherein m, q, H and W are integers.
5. The method of claim 4 , wherein W is an allowed width for a prediction unit (PU), a coding unit (CU), or a transform unit (TU) of a video block of the video unit, and wherein H is an allowed height for the prediction unit (PU), the coding unit (CU), or the transform unit (TU) of the video block of the video unit.
6. The method of claim 1 , wherein at least one of the K HMVP motion candidates is a bi-prediction motion candidate,
the video unit is a P slice or picture, and wherein each prediction direction of the bi-prediction motion candidate is set to list 0 (L0); or
the video unit is a B slice or B picture, and wherein at least one prediction direction of the bi-prediction motion candidate is set to list 0 (L0) or list 1 (L1).
7. The method of claim 6 , wherein a motion vector of the bi-prediction motion candidate is set to (0, 0); or (−m×W, 0), wherein m and W are integers; or (0, −q×H),
wherein q and H are integers; or (−m×W, −q×H), wherein m, q, H and W are integers.
8. The method of claim 7 , wherein W is an allowed width for a prediction unit (PU), a coding unit (CU), or a transform unit (TU) associated with a video block of the video unit, and wherein H is an allowed height for the prediction unit (PU), the coding unit (CU), or the transform unit (TU) associated with the video block of the video unit.
9. The method of claim 1 , wherein at least one of the K HMVP motion candidates comprises motion information from a second video unit different from the video unit, optionally, the video unit comprises a first coding tree unit (CTU) row or a first picture, and wherein the second video unit comprises a second CTU or a second picture.
10. The method of claim 1 ,
wherein the K HMVP motion candidates for the video unit is adaptively changed to obtain a second set of K HMVP motion candidates for a second video unit of the video,
wherein the second video unit is different from the video unit.
11. The method of claim 1 , further comprising:
adding, to the history-based motion vector prediction (HMVP) table for the video unit, HMVP motion candidates from a first set of K HMVP motion candidates,
wherein the first set of K HMVP motion candidates for the video unit is adaptively changed from a second set of K HMVP motion candidates included in the HMVP table for a second video unit of the video,
wherein the second video unit is different from the video unit,
wherein the first set of K HMVP motion candidates and the second set of K HMVP motion candidates have default values,
wherein the HMVP table has a size of N,
wherein N and K are positive integers, and
wherein K≤N; and
wherein the bitstream includes syntax elements indicative of the first set of K HMVP motion candidates added to a HMVP table.
12. The method of claim 11 , wherein the video unit comprises a first coding tree unit (CTU) row, and wherein the second video unit comprises a second CTU row; or the video unit comprises a first tile, and wherein the second video unit comprises a second tile.
13. The method of claim 11 , wherein the K HMVP motion candidates used for the HMVP table is different than that used for another HMVP table, optionally, a selection of the K HMVP motion candidates is based on the HMVP table used for a coding mode associated with a video block of the video unit.
14. The method of claim 1 , further comprising:
determining, prior to the performing the conversion, that N HMVP motion candidates have been filled in the HMVP table; and
adding, based on the determining, another motion candidate to the HMVP table according to a rule.
15. The method of claim 1 , further comprising:
determining that an additional HMVP motion candidate is not to be added to the HMVP table upon determining that the additional HMVP motion candidate is identical or similar to at least one HMVP motion candidate in the HMVP table.
16. The method of claim 1 , wherein the conversion includes encoding the video unit into the bitstream.
17. The method of claim 1 , wherein the conversion includes decoding the video unit from the bitstream.
18. An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
reset, for a conversion between a video unit of a video and a bitstream of the video, a history-based motion vector prediction (HMVP) table of size N by adding K HMVP motion candidates to the HMVP table,
wherein the K HMVP motion candidates have default values,
wherein each of the K HMVP motion candidates are identical,
wherein N and K are positive integers, and
wherein K≤N; and
perform the conversion between the video unit and the bitstream using the HMVP table resulting from the resetting.
19. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises:
resetting a history-based motion vector prediction (HMVP) table of size N by adding K HMVP motion candidates to the HMVP table,
wherein the K HMVP motion candidates have default values,
wherein each of the K HMVP motion candidates are identical,
wherein N and K are positive integers, and
wherein K≤N; and
generating the bitstream using the HMVP table resulting from the resetting.