We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ef4fc53 + 2685427 commit 0375c21Copy full SHA for 0375c21
1 file changed
src/include/sof/audio/format.h
@@ -53,6 +53,13 @@
53
#define MINUS_80DB_Q1_31 214748 /* 10^(-80/20) */
54
#define MINUS_90DB_Q1_31 67909 /* 10^(-90/20) */
55
56
+/* Align the number to the nearest alignment value */
57
+#define ALIGN_UP(size, alignment) \
58
+ (((size) % (alignment) == 0) ? (size) : \
59
+ ((size) - ((size) % (alignment)) + (alignment)))
60
+#define ALIGN_DOWN(size, alignment) \
61
+ ((size) - ((size) % (alignment)))
62
+
63
/* Compute the number of shifts
64
* This will result in a compiler overflow error if shift bits are out of
65
* range as INT64_MAX/MIN is greater than 32 bit Q shift parameter
0 commit comments