Block-adaptive search range and cost factors for decoder-side motion vector (MV) derivation techniques
A method of decoding video data may comprise decoding data from an encoded bitstream to generate motion vectors and performing a decoder-side motion vector refinement (DMVR) process on one or more of the motion vectors. Performing the DMVR process may include determining one or more characteristics of current video block being decoded and determining a search area for the DMVR process for the current video block based on the determined one or more characteristics of the current video block.
1. A method of decoding video data, the method comprising:
decoding data from an encoded bitstream to generate motion vectors; and
performing a decoder-side motion vector refinement (DMVR) process on one or more of the motion vectors, wherein performing the DMVR process includes:
determining, among a height or a width, at least one dimension of a current video block being decoded to be a determined at least one dimension;
determining a size of a search range for the DMVR process for the current video block based on the determined at least one dimension of the current video block, wherein the size of the search range defines a local search area;
determining one or more motion vector offsets within the local search area; and
determining a refined motion vector from the one or more motion vector offsets.
2. The method of claim 1 , further comprising determining the size of the search range for the DMVR process for the current video block based on a height and a width of the current video block.
3. The method of claim 2 , further comprising determining the size of the search range for the DMVR process based on the height and the width of the current block and based on a scale factor.
4. The method of claim 3 , wherein the scale factor is stored in the decoder and not signaled in the encoded bitstream.
5. The method of claim 3 , further comprising deriving the scale factor based on one or more syntax elements decoded from the encoded bitstream.
6. The method of claim 1 , wherein the current video block is a first video block of the encoded bitstream, the determined at least one dimension is a first determined at least one dimension, and the size of the search range is a first search range size, the method further comprising:
determining, among a height or a width, at least one dimension of a second video block of the encoded bitstream being decoded to be a second determined at least one dimension; and
determining a second search range size for a DMVR process for the second video block based on the second determined at least one dimension of the second video block,
wherein the second search range size has at least one different dimension than the first search range size.
7. The method of claim 1 , further comprising further determining the size of the search range for the DMVR process based on a resolution associated with a video sequence that includes the current video block.
8. The method of claim 1 , wherein the DMVR process includes:
determining respective cost factors and respective priority variables for each of the one or more motion vector offsets based on a distance of the one or more motion vector offsets to a center of the local search area; and
determining, according to a search order based on the respective priority variables, the refined motion vector from the one or more motion vector offsets using the respective cost factors.
9. The method of claim 1 , wherein the DVMR process includes:
terminating the DMVR process for the current video block prior to evaluating all candidate blocks having a respective motion vector offset in the local search area upon identifying an acceptable candidate block associated with a cost factor and distortion that satisfy a threshold.
10. A device configured to decode video data, the device comprising one or more processors configured to:
decode data from an encoded bitstream to generate motion vectors; and
perform a decoder-side motion vector refinement (DMVR) process on one or more of the motion vectors, wherein in performing the DMVR process, the one or more processors are configured to:
determine, among a height or a width, at least one dimension of a current video block being decoded to be a determined at least one dimension;
determine a size of a search range for the DMVR process for the current video block based on the determined at least one dimension of the current video block, wherein the size of the search range defines a local search area;
determine one or more motion vector offsets within the local search area; and
determine a refined motion vector from the one or more motion vector offsets.
11. The device of claim 10 , wherein the one or more processors are further configured to determine the size of the search range for the DMVR process for the current video block based on a height and a width of the current video block.
12. The device of claim 11 , wherein the one or more processors are further configured to determine the size of the search range for the DMVR process based on the height and the width of the current block and based on a scale factor.
13. The device of claim 12 , further comprising a memory, wherein the scale factor is stored in the memory and not signaled in the encoded bitstream.
14. The device of claim 12 , wherein the one or more processors are configured to derive the scale factor based on one or more syntax elements decoded from the encoded bitstream.
15. The device of claim 10 , wherein the current video block is a first video block of the encoded bitstream, the determined at least one dimension is a first determined at least one dimension, and the size of the search range is a first search range size, wherein the one or more processors are further configured to:
determine, among a height and a width, at least one dimension of a second video block of the encoded bitstream being decoded to be a second determined at least one dimension; and
determine a second search range size for a DMVR process for the second video block based on the second determined at least one dimension of the second video block,
wherein the second search range size has at least one different dimension than the first search range size.
16. The device of claim 10 , wherein the one or more processors are further configured to:
determine the size of the search range for the DMVR process based on a resolution associated with a video sequence that includes the current video block.
17. The device of claim 10 , wherein to perform the DMVR process, the one or more processors are configured to:
determine respective cost factors and respective priority variables for each of the one or more motion vector offsets based on a distance of the one or more motion vector offsets to a center of the local search area; and
determine, according to a search order based on the respective priority variables, the refined motion vector from the one or more motion vector offsets using the respective cost factors.
18. The device of claim 10 , wherein to perform the DMVR process, the one or more processors are configured to:
terminate the DMVR process for the current video block prior to evaluating all candidate blocks having a respective motion vector offset in the local search area, upon identifying an acceptable candidate block associated with a cost factor and distortion that satisfy a threshold.
19. The device of claim 10 , wherein the device includes a display configured to display the video data.
20. The device of claim 10 , further comprising memory configured to store the video data.
21. A device for decoding video data, the device comprising:
means for decoding data from an encoded bitstream to generate motion vectors; and
means for performing a decoder-side motion vector refinement (DMVR) process on one or more of the motion vectors, wherein means for performing the DMVR process includes:
means for determining, among a height or a width, at least one dimension of a current video block being decoded to be a determined at least one dimension;
means for determining a size of a search range for the DMVR process for the current video block based on the determined at least one dimension of the current video block, wherein the size of the search range defines a local search area;
means for determining one or more motion vector offsets within the local search area; and
means for determining a refined motion vector from the one or more motion vector offsets.
22. A computer-readable storage medium storing instructions that, when executed, cause one or more processors of a video decoding device to:
decode data from an encoded bitstream to generate motion vectors; and
perform a decoder-side motion vector refinement (DMVR) process on one or more of the motion vectors, wherein in performing the DMVR process, the instructions cause the one or more processors to:
determine, among a height or a width, at least one dimension of a current video block being decoded to be a determined at least one dimension;
determine a size of a search range for the DMVR process for the current video block based on the determined at least one dimension of the current video block, wherein the size of the search range defines a local search area;
determine one or more motion vector offsets within the local search area; and
determine a refined motion vector from the one or more motion vector offsets.
23. The method of claim 8 , wherein determining, according to the search order based on the respective priority variables, the refined motion vector from the one or more motion vector offsets using the respective cost factors comprises:
performing a cost tuning process starting with a motion vector offset associated with a respective priority variable having a highest priority, the cost tuning process comprising:
calculating a matching cost for the motion vector offset;
applying cost tuning to the matching cost using the respective cost factor associated with the motion vector offset to generate a tuned matching cost;
updating a best motion vector offset based on the tuned matching cost being smaller than a best cost; and
terminating the process and using the best motion vector offset to determine the refined motion vector based on the tuned matching cost being smaller than a cost threshold, or
repeating the cost tuning process for a next motion vector offset associated with a respective priority variable having a next highest priority.
24. The device of claim 17 , wherein to determine, according to the search order based on the respective priority variables, the refined motion vector from the one or more motion vector offsets using the respective cost factors, the one or more processors are configured to:
perform a cost tuning process starting with a motion vector offset associated with a respective priority variable having a highest priority, wherein to perform the cost tuning process the one or more processors are configured to:
calculate a matching cost for the motion vector offset;
apply cost tuning to the matching cost using the respective cost factor associated with the motion vector offset to generate a tuned matching cost;
update a best motion vector offset based on the tuned matching cost being smaller than a best cost; and
terminate the process and using the best motion vector offset to determine the refined motion vector based on the tuned matching cost being smaller than a cost threshold, or
repeat the cost tuning process for a next motion vector offset associated with a respective priority variable having a next highest priority.