]> git.sesse.net Git - vlc/commitdiff
block: align to 32 bytes
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 14 Mar 2013 18:11:46 +0000 (20:11 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 15 Mar 2013 14:39:57 +0000 (16:39 +0200)
This is required by libavcodec AVX optimizations for audio decoding.

src/misc/block.c

index b9a3ddb9335f3abb28f1d571a47c38496e6aa4ee..59a096bf89b2595ac2643614445a92698887e289 100644 (file)
@@ -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)