Commit ae7273d2 authored by Sam Hocevar's avatar Sam Hocevar

* modules/video_chroma/i420_rgb_mmx.h: work around a GCC 3.4.x bug.

    /* Using i586-mingw32msvc-gcc 3.4.2: */
    uint32_t i; __m64 mm0 = (__m64)(uint64_t)i;           /* ICE */
    uint32_t i; uint64_t tmp = i; __m64 mm0 = (__m64)tmp; /* OK */
parent b9730ddd
......@@ -283,6 +283,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
{
# if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
INTRINSICS_INIT_16
INTRINSICS_YUV_MUL
INTRINSICS_YUV_ADD
......@@ -311,6 +312,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
{
# if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
INTRINSICS_INIT_16
INTRINSICS_YUV_MUL
INTRINSICS_YUV_ADD
......@@ -341,6 +343,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
# if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
# endif
#endif
p_y -= i_rewind;
......@@ -496,6 +499,7 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
#elif defined (MODULE_NAME_IS_i420_rgb_mmx)
# if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
INTRINSICS_INIT_32
INTRINSICS_YUV_MUL
INTRINSICS_YUV_ADD
......@@ -525,6 +529,7 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
# if defined (HAVE_MMX_INTRINSICS)
__m64 mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
uint64_t tmp64;
# endif
#endif
p_y -= i_rewind;
......
......@@ -54,8 +54,10 @@ movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
"
#define INTRINSICS_INIT_16 \
mm0 = (__m64)(uint64_t)*(uint32_t *)p_u; \
mm1 = (__m64)(uint64_t)*(uint32_t *)p_v; \
tmp64 = *(uint32_t *)p_u; \
mm0 = (__m64)tmp64; \
tmp64 = *(uint32_t *)p_v; \
mm1 = (__m64)tmp64; \
mm4 = (__m64)(uint64_t)0; \
mm6 = (__m64)*(uint64_t *)p_y; \
/* *(uint16_t *)p_buffer = 0; */
......@@ -74,9 +76,11 @@ movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
"
#define INTRINSICS_INIT_32 \
mm0 = (__m64)(uint64_t)*(uint32_t *)p_u; \
tmp64 = *(uint32_t *)p_u; \
mm0 = (__m64)tmp64; \
*(uint16_t *)p_buffer = 0; \
mm1 = (__m64)(uint64_t)*(uint32_t *)p_v; \
tmp64 = *(uint32_t *)p_v; \
mm1 = (__m64)tmp64; \
mm4 = (__m64)(uint64_t)0; \
mm6 = (__m64)*(uint64_t *)p_y;
......@@ -290,15 +294,18 @@ movq %%mm5, 8(%3) # store pixel 4-7 \n\
mm0 = _mm_unpacklo_pi8(mm0, mm1); \
mm2 = _mm_slli_pi16(mm2, 2); \
mm0 = _mm_or_si64(mm0, mm2); \
mm6 = (__m64)*(uint64_t *)(p_y + 8); \
tmp64 = *(uint64_t *)(p_y + 8); \
mm6 = (__m64)tmp64; \
*(uint64_t *)p_buffer = (uint64_t)mm0; \
\
mm7 = _mm_unpackhi_pi8(mm7, mm4); \
mm5 = _mm_unpackhi_pi8(mm5, mm1); \
mm7 = _mm_slli_pi16(mm7, 2); \
mm0 = (__m64)(uint64_t)*(uint32_t *)(p_u + 4); \
tmp64 = (uint64_t)*(uint32_t *)(p_u + 4); \
mm0 = (__m64)tmp64; \
mm5 = _mm_or_si64(mm5, mm7); \
mm1 = (__m64)(uint64_t)*(uint32_t *)(p_v + 4); \
tmp64 = (uint64_t)*(uint32_t *)(p_v + 4); \
mm1 = (__m64)tmp64; \
*(uint64_t *)(p_buffer + 4) = (uint64_t)mm5;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment