Closed GoogleCodeExporter closed 9 years ago
Looks like it's related to typedef uint8 __attribute__((vector_size(16))) uvec8;
Original comment by Artem.Se...@gmail.com
on 29 Jul 2013 at 3:59
Thanks for the report.
The function is likely BGRAToARGB that uses shuffle masks:
// Shuffle table for converting BGRA to ARGB.
static const uvec8 kShuffleMaskBGRAToARGB = {
3u, 2u, 1u, 0u, 7u, 6u, 5u, 4u, 11u, 10u, 9u, 8u, 15u, 14u, 13u, 12u
};
I saw a similar error on gcc 4.2 for OSX, but it related to static const:
// GCC 4.2 on OSX has link error when passing static or const to inline.
// TODO(fbarchard): Use static const when gcc 4.2 support is dropped.
#ifdef __APPLE__
#define CONST
#else
#define CONST static const
#endif
// Constants for ARGB
CONST vec8 kARGBToY = {
13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0
};
Could you try removing all 'static const'?
static const uvec8 kShuffleMaskBGRAToARGB = {
->
uvec8 kShuffleMaskBGRAToARGB = {
I'll go ahead and make a CONST macro, but ifdef'ed for APPLE.
If that works, whats a good macro to ifdef on?
Original comment by fbarch...@google.com
on 1 Aug 2013 at 8:30
Thanks. It works - now it compiles without any error.
Regarding macro - may be "__x86_64__". Unfortunately I'm not an expert in build
systems and I don't know what other platforms this bug affects.
Original comment by Artem.Se...@gmail.com
on 2 Aug 2013 at 8:25
This change keeps static, but removes const
https://webrtc-codereview.appspot.com/1944004/
Original comment by fbarch...@google.com
on 2 Aug 2013 at 8:49
Fixed r743
Another team ran into this issue with gcc 4.4.1 (but not 4.5.2) and removing
'const' worked around it. So I've done that for all platforms on vectors.
Original comment by fbarch...@google.com
on 2 Aug 2013 at 11:43
Re-opening, as I notice a downside to removing const:
data size has gone from 2C0 to 3E0 on row_win.obj
Appears to be duplicate data, mainly used for AVX2 constants:
// Constants for ARGB.
static vec8 kARGBToY = {
13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0
};
static lvec8 kARGBToY_AVX = {
13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0,
13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0, 13, 65, 33, 0
};
A fix would be to use the AVX constants for SSE as well.
Original comment by fbarch...@google.com
on 5 Aug 2013 at 6:41
r788 adds const for visual c, reducing the code size.
gcc version currently has no avx2, so no data size issue yet.
Original comment by fbarch...@google.com
on 12 Sep 2013 at 1:09
Original issue reported on code.google.com by
Artem.Se...@gmail.com
on 29 Jul 2013 at 3:08