)]}'
{
  "commit": "2b1c4eb51aa05df5514e5cb8f37e50d15e8fb534",
  "tree": "b7d6f927a2a8ecfea65602818d48d35cccd9ed5e",
  "parents": [
    "e0607ac99db5a4b0a66a9a97124821f3466f72a5"
  ],
  "author": {
    "name": "Rachel Barker",
    "email": "rachelbarker@google.com",
    "time": "Mon Mar 27 17:15:37 2023 +0000"
  },
  "committer": {
    "name": "Urvang Joshi",
    "email": "urvang@google.com",
    "time": "Tue Mar 28 05:35:52 2023 +0000"
  },
  "message": "Fix fullpel search limits\n\n(Ported from libaom commit fa59a65)\n\nMotion search is divided into a full-pixel search followed by\na sub-pixel refinement step. These two steps have separate sets\nof limits for which motion vectors they will consider, set by\nthe functions:\n\nfullpel: av1_set_mv_search_range()\nsubpel: av1_set_subpel_mv_search_range()\n\nThe subpel search limits are very simple - we allow\nref_mv +/- 1023 pixels, with some appropriate clamping.\n\nFor fullpel search, it appears that the intended logic was to allow\nany full-pixel MV which lies within the subpel limits. Put another\nway, the fullpel limits should be the same as the subpel limits, but\npushed inwards to full-pixel values.\n\nThe code in av1_set_mv_search_range almost does this, but the\nrounding isn\u0027t quite right. This sometimes causes the limits to be\noff by 1 pixel. That allows the fullpel search to select a motion\nvector which is outside of the subpel limits. That MV can then be\ncarried through the subpixel search.\n\nThis does not truly break anything, since the range of MV diffs\nthat we can encode is larger than what we search. But it\u0027s definitely\nnot intended, and in rare cases could trip an assertion in\nav1_refine_warped_mv, as seen in the linked bug report.\n\nBy fixing the rounding, we can remove this discrepancy and prevent\nthe assertion failure. It also allows one extra row/column of fullpel\nmotion vectors which are inside the subpel limits, but which were\nnot being searched.\n\nAlso add assertions in many places to check that this issue does\nnot reoccur.\n\nSTATS_CHANGED\n\nBug: aomedia:3384\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ff230482333e8a1fbcb41fbea4b3673196376ee8",
      "old_mode": 33188,
      "old_path": "av1/encoder/mcomp.c",
      "new_id": "479b0aad50f8ff9fd9f67ce5b677c9f734bc803e",
      "new_mode": 33188,
      "new_path": "av1/encoder/mcomp.c"
    },
    {
      "type": "modify",
      "old_id": "9d334fba8c5465f23e745211a35736762e3c0895",
      "old_mode": 33188,
      "old_path": "av1/encoder/motion_search_facade.c",
      "new_id": "5d9d4fd9b2c8db0517b29ddf4457205c87cb81f7",
      "new_mode": 33188,
      "new_path": "av1/encoder/motion_search_facade.c"
    },
    {
      "type": "modify",
      "old_id": "913693d2e32fff0833bdfd91a981bae5bd4c94b2",
      "old_mode": 33188,
      "old_path": "av1/encoder/temporal_filter.c",
      "new_id": "f00c3e24c67fea4268d87c0bc09f5948df4beb7b",
      "new_mode": 33188,
      "new_path": "av1/encoder/temporal_filter.c"
    },
    {
      "type": "modify",
      "old_id": "e6ba2509ef0a28536cdc8775e91367f9c8b49f88",
      "old_mode": 33188,
      "old_path": "av1/encoder/tpl_model.c",
      "new_id": "f91ed5bd5b9159be28fe1f41cf41377525d5fa2e",
      "new_mode": 33188,
      "new_path": "av1/encoder/tpl_model.c"
    }
  ]
}
