Optimisation: caching the divisions used in the Laplace encoder.
diff --git a/libcelt/modes.c b/libcelt/modes.c
index c6cbe23..533dc74 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -38,6 +38,7 @@
#include "rate.h"
#include "os_support.h"
#include "stack_alloc.h"
+#include "quant_bands.h"
#ifdef STATIC_MODES
#include "static_modes.c"
@@ -319,6 +320,7 @@
mode->marker_end = MODEVALID;
#endif /* !STATIC_MODES */
mdct_init(&mode->mdct, 2*mode->mdctSize);
+ mode->prob = quant_prob_alloc(mode);
if (error)
*error = CELT_OK;
return mode;
@@ -353,6 +355,7 @@
#endif
#endif
mdct_clear(&mode->mdct);
+ quant_prob_free(mode->prob);
celt_free((CELTMode *)mode);
}