Uses GCC vector intrinsics; may be suboptimal on particularly old GCC versions.
// included at the end because it needs x264_t
#include "macroblock.h"
-#include "rectangle.h"
#if HAVE_MMX
#include "x86/util.h"
#endif
+#include "rectangle.h"
+
#endif
{
/* height 1, width 16 doesn't occur */
assert( h != 1 );
+#if HAVE_VECTOREXT && defined(__SSE__)
+ v4si v16 = {v,v,v,v};
+
+ M128( d+s*0+0 ) = (__m128)v16;
+ M128( d+s*1+0 ) = (__m128)v16;
+ if( h == 2 ) return;
+ M128( d+s*2+0 ) = (__m128)v16;
+ M128( d+s*3+0 ) = (__m128)v16;
+#else
if( WORD_SIZE == 8 )
{
do
d += s;
} while( --h );
}
+#endif
}
else
assert(0);
#define M128_ZERO ((__m128){0,0,0,0})
#define x264_union128_t x264_union128_sse_t
typedef union { __m128 i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; uint8_t d[16]; } MAY_ALIAS x264_union128_sse_t;
+#if HAVE_VECTOREXT
+typedef uint32_t v4si __attribute__((vector_size (16)));
+#endif
#endif
#endif
EXE=""
# list of all preprocessor HAVE values we can define
-CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F VISUALIZE SWSCALE LAVF FFMS GPAC GF_MALLOC AVS GPL"
+CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F VISUALIZE SWSCALE LAVF FFMS GPAC GF_MALLOC AVS GPL VECTOREXT"
# parse options
fi
fi
+cc_check "stdint.h" "" "uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3};" && define HAVE_VECTOREXT
+
if [ "$pic" = "yes" ] ; then
CFLAGS="$CFLAGS -fPIC"
ASFLAGS="$ASFLAGS -DPIC"