)]}'
{
  "commit": "4a29b019382bf1ea835637e1b45fda6d5ade80ff",
  "tree": "4492f8610fe477567852d6dbe6b523968147624e",
  "parents": [
    "7ae03d8977c63acfe08f63a6c03418b26c2b871d"
  ],
  "author": {
    "name": "Bohan",
    "email": "bohanli@google.com",
    "time": "Wed Mar 18 10:28:57 2026 -0700"
  },
  "committer": {
    "name": "Bohan Li",
    "email": "bohanli@google.com",
    "time": "Wed Mar 18 10:53:21 2026 -0700"
  },
  "message": "Fix tpl stored ref frame indices\n\nSome details on this:\n\n- gf_group-\u003eref_frame_list stores the absolute slot idx from ext rc;\n\nAnd:\n\n- src_stats-\u003eref_frame_index comes from best_rf_idx in function mode_estimation;\n- best_rf_idx was used to retrieve the ref like this:\n    const YV12_BUFFER_CONFIG *ref_frame_ptr \u003d tpl_data-\u003esrc_ref_frame[rf_idx];\n- tpl_data-\u003esrc_ref_frame[rf_idx] comes from tpl_data-\u003etpl_frame[tpl_frame-\u003eref_map_index[rf_idx]];\n- tpl_frame-\u003eref_map_index[i - LAST_FRAME] \u003d ref_picture_map[remapped_ref_idx[i- LAST_FRAME]];\n- ref_picture_map handles the map from ref slot idx to the actual frame idx in tpl\n- remapped_ref_idx[rf - LAST_FRAME] \u003d gf_group.ref_frame_list[gf_index][rf];\n\nTherefore if a block has src_stats-\u003eref_frame_index[i] \u003d\u003d X, then that\nmeans it uses ref frame stored at\ntpl_data-\u003etpl_frame[tpl_frame-\u003eref_map_index[X]], which is\ntpl_data-\u003etpl_frame[ref_picture_map[remapped_ref_idx[X]]], which is\ntpl_data-\u003etpl_frame[ref_picture_map[gf_group.ref_frame_list[gf_index][X+LAST_FRAME]]],\n\nSo that ultimately means if a block has src_stats-\u003eref_frame_index[i] \u003d\u003d\nX, then it uses ref slot\ngf_group.ref_frame_list[gf_index][X+LAST_FRAME].\n\nChange-Id: I85f758da85575f2eeb00a75811118d0155462f0e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5dcf47b6f528674188a5e308986c6317332dec33",
      "old_mode": 33188,
      "old_path": "av1/encoder/tpl_model.c",
      "new_id": "0269f4351ec2e72618261828338e3ff99545aebb",
      "new_mode": 33188,
      "new_path": "av1/encoder/tpl_model.c"
    }
  ]
}
