)]}'
{
  "commit": "ffaff5c59b3e88996a9f5c91bd4c2b5262237b42",
  "tree": "13d45046671cb8eb0262beef1d5ffc4f52682ce8",
  "parents": [
    "13bcfa0ea8556f355b7bfa9158a473a1723c442b"
  ],
  "author": {
    "name": "Ihor Buhaiov",
    "email": "freedbrt@gmail.com",
    "time": "Sun Oct 11 00:41:51 2026 +0200"
  },
  "committer": {
    "name": "Ihor Buhaiov",
    "email": "freedbrt@gmail.com",
    "time": "Fri Oct 23 13:52:07 2026 -0700"
  },
  "message": "Store the IntraBC hash table in flat arrays\n\nThe IntraBC hash table kept a Vector for every bucket. Building it for a\n2560x1440 key frame meant millions of push_back calls with reallocs, one\nmalloc for every new bucket, and a free for every bucket at the end of\nthe frame. At speed 11 with screen content this was most of the time\nIntraBC adds to a key frame.\n\nStore the entries of each block size in one array instead, bucket after\nbucket. A first pass counts the entries of each bucket in raster order,\ncapped at 256, and counts runs of equal hashes at once. A prefix sum\ngives the start of each bucket, and the existing hierarchical loop then\nfills the buckets. How many entries a bucket keeps does not depend on\nthe visit order, and the fill visits the blocks in the same order as\nbefore, so every bucket holds the same entries in the same order and\nthe output does not change.\n\nThe arrays are kept from frame to frame and only grow when a frame needs\nmore, and they are freed with the encoder. Worker threads read a shallow\ncopy of the table, which does not change while they run.\nav1_intrabc_hash_search() now reads the entries through a pointer.\n\nOn five 2560x1440 screen recordings at speed 11 with IntraBC on (one is\n2559 wide), 20 key frames each, key frames use 14% to 19% less CPU at 1\nthread on an Apple M3 Pro, and 18% to 22% less on an AMD Ryzen 9 5900X\nbuilt with MSVC. The wall time at 4 threads drops by 26% to 34% on the\nM3 Pro and by 32% to 36% on the 5900X. That is 20 to 32 ms per key\nframe on the M3 Pro and 50 to 80 ms on the 5900X. On the M3 Pro,\nbuilding the 8x8 table takes 4.5 to 8.5 ms per frame instead of 12 to\n37 ms.\n\nBug: 576320193\nChange-Id: I6f517a0a89c5ad846900ad7830eb24a96120917a\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a14b18a02e3458ac090a490f716c787cadbe2a92",
      "old_mode": 33188,
      "old_path": "av1/encoder/encodeframe.c",
      "new_id": "8f8f5fef1addea8095b236d7cc4076c1022ea712",
      "new_mode": 33188,
      "new_path": "av1/encoder/encodeframe.c"
    },
    {
      "type": "modify",
      "old_id": "c1b5ea6a1a57f8a0f5188f3914e95240b2cbe637",
      "old_mode": 33188,
      "old_path": "av1/encoder/hash_motion.c",
      "new_id": "783c165186dc356ec0d4b0c6445272ca0ba262ea",
      "new_mode": 33188,
      "new_path": "av1/encoder/hash_motion.c"
    },
    {
      "type": "modify",
      "old_id": "cd5ffb77d0182e78baec0afe840cb706ef4ef71a",
      "old_mode": 33188,
      "old_path": "av1/encoder/hash_motion.h",
      "new_id": "936feaff9b00c0598dfc622eabce717e4f7f8da3",
      "new_mode": 33188,
      "new_path": "av1/encoder/hash_motion.h"
    },
    {
      "type": "modify",
      "old_id": "ed454bd032da24e9d3f545ea1be9cfb05abf8b4f",
      "old_mode": 33188,
      "old_path": "av1/encoder/mcomp.c",
      "new_id": "53b65a307a7d9744abdd39f7b92e1de4d5d82f03",
      "new_mode": 33188,
      "new_path": "av1/encoder/mcomp.c"
    }
  ]
}
