Search area refinement for decoder motion refinement
An example device includes one or more processors configured to determine a first search area in a first reference picture for a current block of the video data. The one or more processors are configured to determine a first initial reference block in the first search area. The one or more processors are configured to apply a local illumination compensation model to the first search area to generate a refined first search area. The one or more processors are configured to apply template matching to the refined first search area to determine a first candidate motion vector having a lowest template matching cost for the refined first search area. The one or more processors are configured to decode the current block based on the first candidate motion vector.
1 . A method of decoding video data, the method comprising:
determining a first search area in a first reference picture for a current block of the video data, the first reference picture comprising a list 0 (L0) reference picture;
determining a first initial reference block in the first search area;
determining a second search area in a second reference picture for a current block of the video data, the second reference picture comprising a list 1 (L1) reference picture;
determining a second initial reference block in the second search area;
determining a minimum difference between a L0 template prediction and an L1 template prediction;
determining at least one of a first local illumination compensation (LIC) model or a second LIC model based on the minimum difference;
applying the first LIC model to the first search area to generate a refined first search area;
applying template matching to the refined first search area to determine a first candidate motion vector having a lowest template matching cost for the refined first search area;
applying the second LIC model to the second search area to generate a refined second search area;
applying template matching to the refined second search area to determine a second candidate motion vector having a lowest template matching cost for the refined second search area; and
decoding the current block based on the first candidate motion vector and the second candidate motion vector.
2 . The method of claim 1 , further comprising determining to decode the current block using decoder side motion vector refinement.
3 . The method of claim 1 , further comprising determining the first LIC model based on reconstructed neighbor samples of the current block.
4 . The method of claim 1 , wherein applying template matching comprises determining the first candidate motion vector having the lowest template matching cost for the refined first search area between a first reference template in the first reference picture and a reconstructed template in a current picture, the current picture comprising the current block.
5 . The method of claim 1 , wherein applying template matching comprises determining the first candidate motion vector having the lowest template matching cost for the refined first search area between a first reference template in the first reference picture and a second reference template in a second reference picture.
6 . The method of claim 1 , wherein applying the first LIC model comprises determining a LIC template, the LIC template comprising an above template and a left template.
7 . The method of claim 1 , wherein the applying the first LIC model comprises determining a LIC template, wherein the LIC template is a rectangular block.
8 . The method of claim 1 , wherein the first LIC model comprises a smoothing filter configured to remove high frequencies from the first search area.
9 . The method of claim 1 , further comprising encoding the current block prior to decoding the current block.
10 . A device for decoding video data, the device comprising:
one or more memories configured to store the video data; and
one or more processors, the one or more processors communicatively coupled to the one or more memories and configured to:
determine a first search area in a first reference picture for a current block of the video data, the first reference picture comprising a list 0 (L0) reference picture;
determine a first initial reference block in the first search area;
determine a second search area in a second reference picture for a current block of the video data, the second reference picture comprising a list 1 (L1) reference picture;
determine a second initial reference block in the second search area;
determine a minimum difference between a L0 template prediction and an L1 template prediction;
determine at least one of a first local illumination compensation (LIC) model or a second LIC model based on the minimum difference;
apply the first LIC model to the first search area to generate a refined first search area;
apply template matching to the refined first search area to determine a first candidate motion vector having a lowest template matching cost for the refined first search area;
apply the second LIC model to the second search area to generate a refined second search area;
apply template matching to the refined second search area to determine a second candidate motion vector having a lowest template matching cost for the refined second search area; and
decode the current block based on the first candidate motion vector and the second candidate motion vector.
11 . The device of claim 10 , wherein the one or more processors are further configured to determine to decode the current block using decoder side motion vector refinement.
12 . The device of claim 10 , wherein the one or more processors are further configured to determine the first LIC model based on reconstructed neighbor samples of the current block.
13 . The device of claim 10 , wherein to apply template matching, the one or more processors are configured to determine the first candidate motion vector having the lowest template matching cost for the refined first search area between a first reference template in the first reference picture and a reconstructed template in a current picture, the current picture comprising the current block.
14 . The device of claim 10 , wherein to apply template matching, the one or more processors are configured to determine the first candidate motion vector having the lowest template matching cost for the refined first search area between a first reference template in the first reference picture and a second reference template in a second reference picture.
15 . The device of claim 10 , wherein to apply the first LIC model, the one or more processors are configured to determine a LIC template, the LIC template comprising an above template and a left template.
16 . The device of claim 10 , wherein to apply the first LIC model, the one or more processors are configured to determine a LIC template, wherein the LIC template is a rectangular block.
17 . The device of claim 10 , wherein the first LIC model comprises a smoothing filter configured to remove high frequencies from the first search area.
18 . The device of claim 10 , further comprising a display configured to display decoded video data.
19 . The device of claim 10 , wherein the one or more processors are further configured to encode the current block prior to decoding the current block.
20 . A device for decoding video data, the device comprising:
means for determining a first search area in a first reference picture for a current block of the video data, the first reference picture comprising a list 0 (L0) reference picture;
means for determining a first initial reference block in the first search area;
means for determining a second search area in a second reference picture for a current block of the video data, the second reference picture comprising a list 1 (L1) reference picture;
means for determining a second initial reference block in the second search area;
means for determining a minimum difference between a L0 template prediction and an L1 template prediction;
means for determining at least one of a first local illumination compensation (LIC) model or a second LIC model based on the minimum difference;
means for applying the first LIC model to the first search area to generate a refined first search area;
means for applying template matching to the refined first search area to determine a first candidate motion vector having a lowest template matching cost for the refined first search area;
means for applying the second LIC model to the second search area to generate a refined second search area;
means for applying template matching to the refined second search area to determine a second candidate motion vector having a lowest template matching cost for the refined second search area; and
means for decoding the current block based on the first candidate motion vector and the second candidate motion vector.