[vlc-commits] gradfun: use standard alignment syntax

Rémi Denis-Courmont git at videolan.org
Sun Feb 26 21:00:26 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 26 21:58:46 2017 +0200| [cc693b5f7bccda25589ca9eff1b56cf286a863ad] | committer: Rémi Denis-Courmont

gradfun: use standard alignment syntax

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc693b5f7bccda25589ca9eff1b56cf286a863ad
---

 modules/video_filter/gradfun.c | 1 +
 modules/video_filter/gradfun.h | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_filter/gradfun.c b/modules/video_filter/gradfun.c
index 0b8f36e..88c9b1e 100644
--- a/modules/video_filter/gradfun.c
+++ b/modules/video_filter/gradfun.c
@@ -96,6 +96,7 @@ vlc_module_end()
 #   define HAVE_6REGS 0
 #endif
 #define av_clip_uint8 clip_uint8_vlc
+#include <stdalign.h>
 #include "gradfun.h"
 
 static picture_t *Filter(filter_t *, picture_t *);
diff --git a/modules/video_filter/gradfun.h b/modules/video_filter/gradfun.h
index 9edaf66..6ba56fb 100644
--- a/modules/video_filter/gradfun.h
+++ b/modules/video_filter/gradfun.h
@@ -38,9 +38,9 @@ struct vf_priv_s {
                       uint8_t *src, int sstride, int width);
 };
 
-static const uint16_t __attribute__((aligned(16))) pw_7f[8] = {127,127,127,127,127,127,127,127};
-static const uint16_t __attribute__((aligned(16))) pw_ff[8] = {255,255,255,255,255,255,255,255};
-static const uint16_t __attribute__((aligned(16))) dither[8][8] = {
+static alignas (16) const uint16_t pw_7f[8] = {127,127,127,127,127,127,127,127};
+static alignas (16) const uint16_t pw_ff[8] = {255,255,255,255,255,255,255,255};
+static alignas (16) const uint16_t dither[8][8] = {
     {  0, 96, 24,120,  6,102, 30,126 },
     { 64, 32, 88, 56, 70, 38, 94, 62 },
     { 16,112,  8,104, 22,118, 14,110 },



More information about the vlc-commits mailing list