Methods and apparatus of motion vector rounding, clipping and storage for inter prediction based on mantissa-exponent representations
View Patent ↗A method for video coding is provided. The method may include: identifying motion vectors (MVs) and control point motion vectors (CPMVs) for spatial MV prediction and affine motion inheritance, respectively; converting the MVs and the CPMVs into a mantissa-exponent format; and storing mantissa-exponent representations of the MVs and the CPMVs in a memory.
1. A method for video coding, comprising:
identifying motion vectors (MVs) for spatial MV prediction and control point motion vectors (CPMVs) for affine motion inheritance;
identifying a subset of the MVs and the CPMVs located in a top coding tree unit (CTU) row;
converting the MVs and the CPMVs in the subset into first mantissa-exponent representations in a first mantissa-exponent format;
converting the rest of the MVs and the CPMVs into second mantissa-exponent representations in a second mantissa-exponent format; and
storing mantissa-exponent representations of the MVs and the CPMVs in a memory,
wherein the first mantissa-exponent format has a more aggressive compression ratio than the second mantissa-exponent format.
2. The method of claim 1 , further comprising:
identifying MVs used for history-based motion vector prediction (HMVP) and converting the MVs used for HMVP into mantissa-exponent representations in the mantissa-exponent format; and
storing mantissa-exponent representations of the MVs used for HMVP in the memory.
3. The method of claim 1 , further comprising:
identifying MVs used for HMVP and storing the MVs used for HMVP into the memory without conversion.
4. An apparatus for video coding, comprising:
a processor; and
a memory configured to store instructions executable by the processor;
wherein the processor, upon execution of the instructions, is configured to:
identify motion vectors (MVs) for spatial MV prediction and control point motion vectors (CPMVs) for affine motion inheritance;
identify a subset of the MVs and the CPMVs located in a top coding tree unit (CTU) row;
convert the MVs and the CPMVs in the subset into first mantissa-exponent representations in a first mantissa-exponent format;
convert the rest of the MVs and the CPMVs into second mantissa-exponent representations in a second mantissa-exponent format; and
store mantissa-exponent representations of the MVs and the CPMVs in a memory,
wherein the first mantissa-exponent format has a more aggressive compression ratio than the second mantissa-exponent format.
5. The apparatus of claim 4 , wherein the processor is further configured to:
identify MVs used for history-based motion vector prediction (HMVP) and convert the MVs used for HMVP into mantissa-exponent representations in the mantissa-exponent format; and
store mantissa-exponent representations of the MVs used for HMVP in the memory.
6. The apparatus of claim 4 , wherein the processor is further configured to:
identify MVs used for HMVP and store the MVs used for HMVP into the memory without conversion.
7. A non-transitory computer readable storage medium, comprising instructions stored therein, wherein, upon execution of the instructions by a processor, the instructions cause the processor to:
identify motion vectors (MVs) for spatial MV prediction and control point motion vectors (CPMVs) for affine motion inheritance;
identify a subset of the MVs and the CPMVs located in a top coding tree unit (CTU) row;
convert the MVs and the CPMVs in the subset into first mantissa-exponent representations in a first mantissa-exponent format;
convert the rest of the MVs and the CPMVs into second mantissa-exponent representations in a second mantissa-exponent format; and
store mantissa-exponent representations of the MVs and the CPMVs in a memory,
wherein the first mantissa-exponent format has a more aggressive compression ratio than the second mantissa-exponent format.
8. The non-transitory computer readable storage medium of claim 7 , wherein the instructions further cause the processor to:
identify MVs used for history-based motion vector prediction (HMVP) and convert the MVs used for HMVP into mantissa-exponent representations in the mantissa-exponent format; and
store mantissa-exponent representations of the d MVs used for HMVP in the memory.
9. The non-transitory computer readable storage medium of claim 7 , wherein the processor is further configured to:
identify MVs used for HMVP and store the MVs used for HMVP into the memory without conversion.