[FFmpeg-cvslog] libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(

Martin Storsjö git at videolan.org
Thu Oct 26 20:09:03 EEST 2017


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Mar 29 13:44:28 2017 +0300| [10f4511f14a4e830c0ed471df4cd1cc2a18a481a] | committer: Martin Storsjö

libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx(

Previously, the former form always produced a manually aligned,
padded buffer, while the latter can use DECLARE_ALIGNED, if that
amount of stack alignment is supported.

libavutil/internal.h needs to include mem.h, since it uses
the DECLARE_ALIGNED macro.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10f4511f14a4e830c0ed471df4cd1cc2a18a481a
---

 libavutil/internal.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavutil/internal.h b/libavutil/internal.h
index d96762c75d..8a0076f985 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -38,6 +38,7 @@
 #include "attributes.h"
 #include "dict.h"
 #include "macros.h"
+#include "mem.h"
 #include "pixfmt.h"
 
 #if ARCH_X86
@@ -97,24 +98,24 @@
     DECLARE_ALIGNED(a, t, la_##v) s o;                  \
     t (*v) o = la_##v
 
-#define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
+#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_##a(t, v, __VA_ARGS__)
 
 #if HAVE_LOCAL_ALIGNED_8
 #   define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,))
 #else
-#   define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
+#   define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,))
 #endif
 
 #if HAVE_LOCAL_ALIGNED_16
 #   define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,))
 #else
-#   define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
+#   define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,))
 #endif
 
 #if HAVE_LOCAL_ALIGNED_32
 #   define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_D(32, t, v, __VA_ARGS__,,))
 #else
-#   define LOCAL_ALIGNED_32(t, v, ...) LOCAL_ALIGNED(32, t, v, __VA_ARGS__)
+#   define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,))
 #endif
 
 #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\



More information about the ffmpeg-cvslog mailing list