diff options
author | Tim Blechmann <tim@klingt.org> | 2024-03-25 11:41:53 +0800 |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2024-03-25 18:03:14 +0800 |
commit | 540c6fab72b6c56fafa5b4263bc6e913580c99cd (patch) | |
tree | 1576c34e56d42b0339cc0ae59efc4eb52048b075 /src/multimedia | |
parent | 45366033234880be0925c5c1e657c873b3fc09bc (diff) |
Video - rename ALIGN to QT_MEDIA_ALIGN
ALIGN clashes with the macos macro of the same name as defined in
`usr/include/i386/param.h`
Pick-to: 6.5 6.6 6.7
Change-Id: I58ca673f38c75f1976d96dbb72bb494ae7e8036e
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
Diffstat (limited to 'src/multimedia')
4 files changed, 6 insertions, 6 deletions
diff --git a/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp b/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp index 2991f00c6..6802cca74 100644 --- a/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp +++ b/src/multimedia/video/qvideoframeconversionhelper_avx2.cpp @@ -42,7 +42,7 @@ void convert_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output) auto *pixel = reinterpret_cast<const Pixel *>(src); int x = 0; - ALIGN(32, argb, x, width) { + QT_MEDIA_ALIGN(32, argb, x, width) { *argb = pixel->convert(); ++pixel; ++argb; @@ -99,7 +99,7 @@ void QT_FASTCALL qt_copy_pixels_with_mask_avx2(uint32_t *dst, const uint32_t *sr size_t x = 0; - ALIGN(32, dst, x, size) + QT_MEDIA_ALIGN(32, dst, x, size) *(dst++) = *(src++) | mask; for (; x < size - (8 * 4 + 1); x += 8 * 4) { diff --git a/src/multimedia/video/qvideoframeconversionhelper_p.h b/src/multimedia/video/qvideoframeconversionhelper_p.h index 6b540840e..17490a817 100644 --- a/src/multimedia/video/qvideoframeconversionhelper_p.h +++ b/src/multimedia/video/qvideoframeconversionhelper_p.h @@ -133,7 +133,7 @@ using BGRX8888 = RgbPixel<2, 1, 0>; stride = 0; \ } -#define ALIGN(boundary, ptr, x, length) \ +#define QT_MEDIA_ALIGN(boundary, ptr, x, length) \ for (; ((reinterpret_cast<qintptr>(ptr) & (boundary - 1)) != 0) && x < length; ++x) QT_END_NAMESPACE diff --git a/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp b/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp index 11037c911..b7049d806 100644 --- a/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp +++ b/src/multimedia/video/qvideoframeconversionhelper_sse2.cpp @@ -29,7 +29,7 @@ void convert_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output) auto *pixel = reinterpret_cast<const Pixel *>(src); int x = 0; - ALIGN(16, argb, x, width) { + QT_MEDIA_ALIGN(16, argb, x, width) { *argb = pixel->convert(); ++pixel; ++argb; @@ -86,7 +86,7 @@ void QT_FASTCALL qt_copy_pixels_with_mask_sse2(uint32_t *dst, const uint32_t *sr size_t x = 0; - ALIGN(16, dst, x, size) + QT_MEDIA_ALIGN(16, dst, x, size) *(dst++) = *(src++) | mask; for (; x < size - (4 * 4 - 1); x += 4 * 4) { diff --git a/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp b/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp index f01b442ae..10a244fb0 100644 --- a/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp +++ b/src/multimedia/video/qvideoframeconversionhelper_ssse3.cpp @@ -34,7 +34,7 @@ void convert_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output) const auto *pixel = reinterpret_cast<const Pixel *>(src); int x = 0; - ALIGN(16, argb, x, width) { + QT_MEDIA_ALIGN(16, argb, x, width) { *argb = pixel->convert(); ++pixel; ++argb; |