Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy B. Terriberry <tterribe@xiph.org>2013-05-08 21:32:37 +0400
committerTimothy B. Terriberry <tterribe@xiph.org>2013-05-08 21:37:17 +0400
commitc152d602aa6f68b4bc9483393985511bb2d83e86 (patch)
tree7feb495f759f9d87d0b16c71996cf54ba443ca9f /silk/macros.h
parentdc58579c2c7e060084554018e9a2e8c25097a255 (diff)
Use dynamic stack allocation in the SILK encoder.
This makes all remaining large stack allocations use the vararray macros. This continues the work of 6f2d9f50 to allow compiling with NONTHREADSAFE_PSEUDOSTACK to move the memory for large buffers off the stack for devices where it is very limited. It also does this for some additional large buffers used by the PLC in the decoder.
Diffstat (limited to 'silk/macros.h')
-rw-r--r--silk/macros.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/silk/macros.h b/silk/macros.h
index 2612fc7a..31344cf4 100644
--- a/silk/macros.h
+++ b/silk/macros.h
@@ -123,12 +123,15 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32)
}
/* Row based */
-#define matrix_ptr(Matrix_base_adr, row, column, N) *(Matrix_base_adr + ((row)*(N)+(column)))
-#define matrix_adr(Matrix_base_adr, row, column, N) (Matrix_base_adr + ((row)*(N)+(column)))
+#define matrix_ptr(Matrix_base_adr, row, column, N) \
+ (*((Matrix_base_adr) + ((row)*(N)+(column))))
+#define matrix_adr(Matrix_base_adr, row, column, N) \
+ ((Matrix_base_adr) + ((row)*(N)+(column)))
/* Column based */
#ifndef matrix_c_ptr
-# define matrix_c_ptr(Matrix_base_adr, row, column, M) *(Matrix_base_adr + ((row)+(M)*(column)))
+# define matrix_c_ptr(Matrix_base_adr, row, column, M) \
+ (*((Matrix_base_adr) + ((row)+(M)*(column))))
#endif
#endif /* SILK_MACROS_H */