blob: 57954b1b9f2575538408bf0d50bce281e3b538c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Fix alignment of vector of floats in babl-rgb-converter.c
Bug: https://bugs.gentoo.org/857708
Upstream-Bug: https://gitlab.gnome.org/GNOME/babl/-/issues/76
Signed-off-by: Alexander Bezrukov <phmagic@mail.ru>
diff -ur a/babl/base/babl-rgb-converter.c b/babl/base/babl-rgb-converter.c
--- a/babl/base/babl-rgb-converter.c
+++ b/babl/base/babl-rgb-converter.c
@@ -306,7 +306,8 @@
uint8_t *rgb_in_u8 = (void*)src_char;
uint8_t *rgb_out_u8 = (void*)dst_char;
- float rgba_out[4*samples];
+ // The alignment is necessary for SIMD intrinsics in babl_matrix_mul_vectorff_buf4_sse2()
+ float __attribute__ ((aligned (16))) rgba_out[4*samples];
for (i = 0; i < samples; i++)
{
|