forked from len0rd/rockbox
Sync libopus to upstream release 1.1
Change-Id: I9fea7460fc33f60faff961b3389dd97b5191463c
This commit is contained in:
parent
d0918b98fa
commit
e3c2ed7a71
97 changed files with 977 additions and 578 deletions
|
@ -32,6 +32,9 @@
|
|||
#ifndef STACK_ALLOC_H
|
||||
#define STACK_ALLOC_H
|
||||
|
||||
#include "opus_types.h"
|
||||
#include "opus_defines.h"
|
||||
|
||||
#if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK))
|
||||
#error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode."
|
||||
#endif
|
||||
|
@ -92,6 +95,8 @@
|
|||
#define SAVE_STACK
|
||||
#define RESTORE_STACK
|
||||
#define ALLOC_STACK
|
||||
/* C99 does not allow VLAs of size zero */
|
||||
#define ALLOC_NONE 1
|
||||
|
||||
#elif defined(USE_ALLOCA)
|
||||
|
||||
|
@ -106,6 +111,7 @@
|
|||
#define SAVE_STACK
|
||||
#define RESTORE_STACK
|
||||
#define ALLOC_STACK
|
||||
#define ALLOC_NONE 0
|
||||
|
||||
#else
|
||||
|
||||
|
@ -143,6 +149,7 @@ extern char *global_stack_top;
|
|||
#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_NONE 0
|
||||
|
||||
#endif /* VAR_ARRAYS */
|
||||
|
||||
|
@ -159,7 +166,7 @@ extern char *global_stack_top;
|
|||
|
||||
#else
|
||||
|
||||
static inline int _opus_false(void) {return 0;}
|
||||
static OPUS_INLINE int _opus_false(void) {return 0;}
|
||||
#define OPUS_CHECK_ARRAY(ptr, len) _opus_false()
|
||||
#define OPUS_CHECK_VALUE(value) _opus_false()
|
||||
#define OPUS_PRINT_INT(value) do{}while(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue