fixed compilation issues

pull/3591/head
Ilya Lavrenov 10 years ago
parent b2f851af06
commit 612b8ce2cb
  1. 6
      cmake/OpenCVCompilerOptions.cmake
  2. 15
      modules/core/src/convert.cpp
  3. 9
      modules/imgproc/src/color.cpp
  4. 2
      modules/imgproc/src/imgwarp.cpp
  5. 13
      modules/imgproc/src/pyramids.cpp

@ -227,6 +227,12 @@ if(MSVC)
if(ENABLE_AVX AND NOT MSVC_VERSION LESS 1600)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:AVX")
endif()
if(ENABLE_AVX2 AND NOT MSVC_VERSION LESS 1600)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:AVX2")
endif()
if(ENABLE_FMA3 AND NOT MSVC_VERSION LESS 1600)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:FMA")
endif()
if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:")
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE4.1")

@ -617,15 +617,18 @@ struct VMerge4<data_type>
}
MERGE2_KERNEL_TEMPLATE( uchar, __m128i, __m128i, _mm_deinterleave_epi8, si128);
MERGE3_KERNEL_TEMPLATE( uchar, __m128i, __m128i, _mm_interleave_epi8, si128);
MERGE4_KERNEL_TEMPLATE( uchar, __m128i, __m128i, _mm_interleave_epi8, si128);
MERGE2_KERNEL_TEMPLATE(ushort, __m128i, __m128i, _mm_deinterleave_epi16, si128);
MERGE2_KERNEL_TEMPLATE( int, __m128, float, _mm_deinterleave_ps, ps);
MERGE3_KERNEL_TEMPLATE( uchar, __m128i, __m128i, _mm_interleave_epi8, si128);
#if CV_SSE4_1
MERGE3_KERNEL_TEMPLATE(ushort, __m128i, __m128i, _mm_interleave_epi16, si128);
MERGE3_KERNEL_TEMPLATE( int, __m128, float, _mm_interleave_ps, ps);
MERGE4_KERNEL_TEMPLATE( uchar, __m128i, __m128i, _mm_interleave_epi8, si128);
MERGE4_KERNEL_TEMPLATE(ushort, __m128i, __m128i, _mm_interleave_epi16, si128);
#endif
MERGE2_KERNEL_TEMPLATE( int, __m128, float, _mm_deinterleave_ps, ps);
MERGE3_KERNEL_TEMPLATE( int, __m128, float, _mm_interleave_ps, ps);
MERGE4_KERNEL_TEMPLATE( int, __m128, float, _mm_interleave_ps, ps);
#endif
@ -4328,7 +4331,7 @@ cvtScale_<short, int, float>( const short* src, size_t sstep,
{
__m256 scale256 = _mm256_set1_ps(scale);
__m256 shift256 = _mm256_set1_ps(shift);
int shuffle = 0xD8;
const int shuffle = 0xD8;
for ( ; x <= size.width - 16; x += 16)
{

@ -1445,7 +1445,7 @@ struct RGB2Gray<float>
float32x4_t v_cb, v_cg, v_cr;
};
#elif CV_SSE2
#elif CV_SSE4_1
template <>
struct RGB2Gray<ushort>
@ -2106,7 +2106,7 @@ struct RGB2YCrCb_i<ushort>
int32x4_t v_c0, v_c1, v_c2, v_c3, v_c4, v_delta, v_delta2;
};
#elif CV_SSE2
#elif CV_SSE4_1
template <>
struct RGB2YCrCb_i<uchar>
@ -2247,8 +2247,6 @@ struct RGB2YCrCb_i<uchar>
__m128i v_zero;
};
#if CV_SSE4_1
template <>
struct RGB2YCrCb_i<ushort>
{
@ -2369,9 +2367,6 @@ struct RGB2YCrCb_i<ushort>
#endif // CV_SSE4_1
#endif
template<typename _Tp> struct YCrCb2RGB_f
{
typedef _Tp channel_type;

@ -2306,7 +2306,7 @@ struct ResizeAreaFastVec_SIMD_32f
if (cn == 1)
{
int shuffle_lo = _MM_SHUFFLE(2, 0, 2, 0), shuffle_hi = _MM_SHUFFLE(3, 1, 3, 1);
const int shuffle_lo = _MM_SHUFFLE(2, 0, 2, 0), shuffle_hi = _MM_SHUFFLE(3, 1, 3, 1);
for ( ; dx <= w - 4; dx += 4, S0 += 8, S1 += 8, D += 4)
{
__m128 v_row00 = _mm_loadu_ps(S0), v_row01 = _mm_loadu_ps(S0 + 4),

@ -236,7 +236,11 @@ struct PyrDownVec_32s16u
bool haveSSE;
};
#endif
#else
typedef PyrDownNoVec<int, ushort> PyrDownVec_32s16u;
#endif // CV_SSE4_1
struct PyrDownVec_32s16s
{
@ -288,7 +292,6 @@ struct PyrDownVec_32s16s
bool haveSSE;
};
struct PyrUpVec_32s8u
{
int operator()(int** src, uchar** dst, int, int width) const
@ -471,7 +474,11 @@ struct PyrUpVec_32s16u
}
};
#endif
#else
typedef PyrUpNoVec<int, ushort> PyrUpVec_32s16u;
#endif // CV_SSE4_1
struct PyrUpVec_32f
{

Loading…
Cancel
Save