Make the bsinc table layout more efficient
commit520dd5c77972cad13d1a97e228903b3c5bdc384f
authorChris Robinson <chris.kcat@gmail.com>
Wed, 16 Aug 2017 09:05:10 +0000 (16 02:05 -0700)
committerChris Robinson <chris.kcat@gmail.com>
Wed, 16 Aug 2017 09:05:10 +0000 (16 02:05 -0700)
tree29d72d9414d1b9d98ebcd80eab3b987eb4425279
parent4dd53ab9429f0ca561dfd45f8f6022ae9871455a
Make the bsinc table layout more efficient

The old layout separated filters, scale deltas, phase deltas, and scale phase
deltas into separate segments that each contained a numbers of scale and phase
entries, Since processing a sample needed a filter and one of each delta entry
relating to a particular scale and phase, the memory needed would be spread
across the whole table. And since subsequent samples would use a different
phase, it would jump around the table a whole lot as well.

The new layout packs the data in a way more consistent with its use. The
filters, scale deltas, phase deltas, and scale phase deltas are interleaved,
such that for a particular scale and phase, the filter and delta entries used
are contiguous. And the phase entries for a particular scale are kept together,
so the ~500 to ~1000 samples processed per source update stay within the same
3KB to 6KB area of the 70+KB table, which is much more cache friendly.
Alc/ALu.c
Alc/bsinc_inc.c
utils/bsincgen.c