[vlc-commits] block: align to 32 bytes
Rémi Denis-Courmont
git at videolan.org
Sat Mar 16 18:32:43 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 14 20:11:46 2013 +0200| [26e8a752a16e25d17f48d95997655b4be6229b8b] | committer: Rémi Denis-Courmont
block: align to 32 bytes
This is required by libavcodec AVX optimizations for audio decoding.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=26e8a752a16e25d17f48d95997655b4be6229b8b
---
src/misc/block.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/misc/block.c b/src/misc/block.c
index b9a3ddb..59a096b 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -117,11 +117,15 @@ static void BlockMetaCopy( block_t *restrict out, const block_t *in )
out->i_length = in->i_length;
}
-/* Memory alignment (must be a multiple of sizeof(void*) and a power of two) */
-#define BLOCK_ALIGN 16
-/* Initial reserved header and footer size (must be multiple of alignment) */
+/** Initial memory alignment of data block.
+ * @note This must be a multiple of sizeof(void*) and a power of two.
+ * libavcodec AVX optimizations require at least 32-bytes. */
+#define BLOCK_ALIGN 32
+
+/** Initial reserved header and footer size. */
#define BLOCK_PADDING 32
-/* Maximum size of reserved footer before we release with realloc() */
+
+/* Maximum size of reserved footer before shrinking with realloc(). */
#define BLOCK_WASTE_SIZE 2048
block_t *block_Alloc (size_t size)
More information about the vlc-commits
mailing list