mirror of
https://github.com/xiph/opus.git
synced 2025-05-30 07:07:42 +00:00
Use a table for PVQ encoding/decoding.
58.4% speedup (2.4x faster) on test_unit_cwrs32 (no custom modes). Gives a 3.2% speedup on ./opus_demo restricted-lowdelay 48000 2 96000 comp48-stereo.sw /dev/null on a 600 MHz Cortex A8.
This commit is contained in:
parent
9d05628407
commit
006273c59f
3 changed files with 342 additions and 389 deletions
|
@ -345,6 +345,14 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error)
|
|||
mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands);
|
||||
if (mode->eBands==NULL)
|
||||
goto failure;
|
||||
#if !defined(SMALL_FOOTPRINT)
|
||||
/* Make sure we don't allocate a band larger than our PVQ table.
|
||||
208 should be enough, but let's be paranoid. */
|
||||
if ((mode->eBands[mode->nbEBands] - mode->eBands[mode->nbEBands-1])<<LM >
|
||||
208) {
|
||||
goto failure;
|
||||
}
|
||||
#endif
|
||||
|
||||
mode->effEBands = mode->nbEBands;
|
||||
while (mode->eBands[mode->effEBands] > mode->shortMdctSize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue