summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/opj_malloc.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-06-21 12:12:58 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-06-21 12:12:58 +0200
commitfd0dc535ad9ae0d369d1039aaf56235583ca64ea (patch)
tree138e06bb4f02607e0ea51a8ee39ef379d71085b3 /src/lib/openjp2/opj_malloc.h
parentf6e3475cc9328e5378e96e72b5adf29fb07c5feb (diff)
IDWT 5x3: generalize SSE2 version for AVX2
Thanks to our macros that abstract SSE use, the functions can use AVX2 when available (at compile time) This brings an extra 23% speed improvement on bench_dwt in 64bit builds with AVX2 compared to SSE2.
Diffstat (limited to 'src/lib/openjp2/opj_malloc.h')
-rw-r--r--src/lib/openjp2/opj_malloc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/openjp2/opj_malloc.h b/src/lib/openjp2/opj_malloc.h
index c8c2fc2d..7503c28d 100644
--- a/src/lib/openjp2/opj_malloc.h
+++ b/src/lib/openjp2/opj_malloc.h
@@ -72,6 +72,14 @@ void * opj_aligned_realloc(void *ptr, size_t size);
void opj_aligned_free(void* ptr);
/**
+Allocate memory aligned to a 32 byte boundary
+@param size Bytes to allocate
+@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
+*/
+void * opj_aligned_32_malloc(size_t size);
+void * opj_aligned_32_realloc(void *ptr, size_t size);
+
+/**
Reallocate memory blocks.
@param m Pointer to previously allocated memory block
@param s New size in bytes