Repository navigation
Look up pulse counts for small bit budgets - #267
Merged
Merged
Conversation
bitsToPulses ran a six-step search over the pulse-cost cache for every band. Invert the static cost tables once for budgets up to 256 eighth-bits, with one row per distinct cache start; larger budgets keep the search. The pulse counts don't change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
+ Coverage 95.88% 95.90% +0.01%
==========================================
Files 68 69 +1
Lines 10654 10675 +21
==========================================
+ Hits 10216 10238 +22
+ Misses 438 437 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JoTurk
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
bitsToPulses runs a six-step search over the pulse cache for every band of every frame, in both the encoder and the decoder. The cache never changes, so I precompute the result for budgets up to 256 eighth-bits. Bands that share a cache start share a row, so it ends up as 23 rows. Bigger budgets still go through the search.
The test checks every cache index and budget against the original search, ties included. Packets and decoded PCM are the same as before. It's a small one: about 2-3% off decoding and up to 2% off encoding on my test tracks.
Reference issue
N/A