Commit 26e8a752 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

block: align to 32 bytes

This is required by libavcodec AVX optimizations for audio decoding.
parent 6d3de8c0
...@@ -117,11 +117,15 @@ static void BlockMetaCopy( block_t *restrict out, const block_t *in ) ...@@ -117,11 +117,15 @@ static void BlockMetaCopy( block_t *restrict out, const block_t *in )
out->i_length = in->i_length; out->i_length = in->i_length;
} }
/* Memory alignment (must be a multiple of sizeof(void*) and a power of two) */ /** Initial memory alignment of data block.
#define BLOCK_ALIGN 16 * @note This must be a multiple of sizeof(void*) and a power of two.
/* Initial reserved header and footer size (must be multiple of alignment) */ * libavcodec AVX optimizations require at least 32-bytes. */
#define BLOCK_ALIGN 32
/** Initial reserved header and footer size. */
#define BLOCK_PADDING 32 #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 #define BLOCK_WASTE_SIZE 2048
block_t *block_Alloc (size_t size) block_t *block_Alloc (size_t size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment