Frame indices are dense and consecutive, so use a vector instead of a std::map. Due to possibly negative frame indices, use zig-zag encoding. IndexedMap was not usable, as it attempted to copy the null value, which is not possible with a std::unique_ptr. This is just a minor performance improvement, but a low-hanging fruit.
4.9 KiB
4.9 KiB