[Pixman] Latest GIT source for 'pixman-sse2.c'
John Emmas
johne53 at tiscali.co.uk
Sat Oct 5 10:29:47 PDT 2013
Hello all, please bear with me. This email is a bit long-winded!
I'm a contributer to the well know 'Mixbus' Digital Audio Workstation
and to the 'Ardour' DAW on which it is based. Mixbus and Ardour are
open source, cross-platform projects and I work on the Windows versions
which I build with MSVC. Both products use the Pixman library.
I've been building our products successfully for over 2 years and so
far, I've never encountered any problems with Pixman. However, after
updating from Git today, the module 'pixman/pixman-sse2.c' will no
longer compile. At line 5708, MSVC gives me this compiler error:-
error C2275: '__m128i' : illegal use of this type as an expression
The actual line seems to be a macro, namely:-
BILINEAR_INTERPOLATE_ONE_PIXEL (pix)
but that macro ends up calling another macro,
BILINEAR_INTERPOLATE_ONE_PIXEL_HELPER(pix, phase)
From experience, I STRONGLY SUSPECT that the error is caused by these
lines at the top of macro #2:-
#define BILINEAR_INTERPOLATE_ONE_PIXEL_HELPER(pix, phase) \
do { \
__m128i xmm_wh, xmm_a, xmm_b; \
(void)xmm_ux4; /* suppress warning: unused variable 'xmm_ux4'
*/ \
// Rest of macro
} while (0)
In effect, all those variables are getting declared half way down the
calling function (in this case,
'scaled_bilinear_scanline_sse2_8888_8888_SRC'). Standard 'C' does not
allow you to declare variables half way down a function and
unfortunately, MSVC is petty strict about it. FWIW macro #1 suffers
from the same problem :-(
Any thoughts anyone? As an exercise I've already tried force-building
as C++ but that just gave me a whole different set of errors, so I'd be
grateful for any assistance anyone can offer. The current code is
simply not buildable with MSVC any more. Hope someone can help....
John Emmas
More information about the Pixman
mailing list