-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert dwa encoder to use algorithm quantize
Convert the quantization from a massive table to a bit-fiddling algorithm which is more code but significantly faster (in some cases, almost 2x). This also eliminates the giant lookup tables from the binary, which reduces the compiled size of the core library. Beside the identity table (value in, same value out), those quantization tables are preserved in the unit tests to ensure correct behavior. The tests are defaulted to a light-er weight test, which should test the variety of error tolerance ranges, but there is a deeper test that can be enabled by switching an ifdef in the compression tables test. As a motivation for improvement, with this change, the size for the core library is reduced by more than half (2.2MB to 0.99MB) while performance is improved from 0.23s for an encode to 0.155s on x86_64 with avx2 / f16c enabled anyway. Other platforms will hopefully experience similar improvements. Signed-off-by: Kimball Thurston <[email protected]>
- Loading branch information
Showing
9 changed files
with
56,853 additions
and
62,446 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.