ref: 242eee35a870676f089731f73e6c886249411e24
parent: 0b2c46dc24b4f79d556c04a1a38e665120a7b3e4
author: Gregory Maxwell <[email protected]>
date: Tue Feb 3 11:07:01 EST 2009
Enlarge CELT pseudo-stack for floating point unless an architecture specific value has been set. This fixes a crash bug for some platforms with 512 sample frames and stereo.
--- a/libcelt/arch.h
+++ b/libcelt/arch.h
@@ -237,6 +237,12 @@
#endif /* !CONFIG_TI_C54X */
-
+#ifndef GLOBAL_STACK_SIZE
+#ifdef FIXED_POINT
+#define GLOBAL_STACK_SIZE 25000
+#else
+#define GLOBAL_STACK_SIZE 40000
+#endif
+#endif
#endif /* ARCH_H */
--- a/libcelt/stack_alloc.h
+++ b/libcelt/stack_alloc.h
@@ -131,7 +131,7 @@
#define VARDECL(type, var) type *var
#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
#define SAVE_STACK char *_saved_stack = global_stack;
-#define ALLOC_STACK (global_stack = (global_stack==0) ? celt_alloc_scratch(25000) : global_stack)
+#define ALLOC_STACK (global_stack = (global_stack==0) ? celt_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack)
#endif