Skip to content

Commit

Permalink
Optimize ADPCM (sosCODEC) decompression
Browse files Browse the repository at this point in the history
This commit optimizes ADPCM decompression in game by:

* Removing any unsupported modes that the game do not use.
* Using a table of possible values instead of computing them on each
  iteration.
* Generating a custom function for 16 bit stereo and mono by using
  a template function.

This new table is built by employing a dynamic programming techinque.
The possible values are bound and the product of the dimensions are
small, hence this techinque is quite effective in optimizing things
by precomputing the values.

Both mono 8-bits and stereo 8-bits function are not generated as no
sample ingame uses them.

Signed-off-by: Giuliano Belinassi <[email protected]>
  • Loading branch information
giulianobelinassi authored and OmniBlade committed Jun 12, 2024
1 parent ecf1f36 commit 7e25f07
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 229 deletions.
Loading

0 comments on commit 7e25f07

Please sign in to comment.