Commit 4869e846 authored by marina.kolpakova's avatar marina.kolpakova

partly merged with sbromle/opencv fixes branch

parents f08996bd 8506ce06
...@@ -120,15 +120,15 @@ CV_INLINE IppiSize ippiSize(int width, int height) ...@@ -120,15 +120,15 @@ CV_INLINE IppiSize ippiSize(int width, int height)
# else # else
# define CV_SSSE3 0 # define CV_SSSE3 0
# endif # endif
# if defined __SSE4_1__ || _MSC_VER >= 1600 # if defined __SSE4_1__ || (defined _MSC_VER && _MSC_VER >= 1600)
# include <smmintrin.h> # include <smmintrin.h>
# define CV_SSE4_1 1 # define CV_SSE4_1 1
# endif # endif
# if defined __SSE4_2__ || _MSC_VER >= 1600 # if defined __SSE4_2__ || (defined _MSC_VER && _MSC_VER >= 1600)
# include <nmmintrin.h> # include <nmmintrin.h>
# define CV_SSE4_2 1 # define CV_SSE4_2 1
# endif # endif
# if defined __AVX__ || _MSC_VER >= 1600 # if defined __AVX__ || (defined _MSC_VER && _MSC_VER >= 1600)
# include <immintrin.h> # include <immintrin.h>
# define CV_AVX 1 # define CV_AVX 1
# endif # endif
......
...@@ -225,7 +225,7 @@ template <> ...@@ -225,7 +225,7 @@ template <>
int countNonZero_ <uchar> (const uchar* src, int len) int countNonZero_ <uchar> (const uchar* src, int len)
{ {
int i=0, nz = 0; int i=0, nz = 0;
#if CV_SSE4_2 #if (defined CV_SSE4_2 && CV_SSE4_2)
if(USE_SSE4_2)//5x-6x if(USE_SSE4_2)//5x-6x
{ {
__m128i pattern = _mm_setzero_si128 (); __m128i pattern = _mm_setzero_si128 ();
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#ifdef HAVE_OPENNI #ifdef HAVE_OPENNI
#if TBB_INTERFACE_VERSION < 5000 #if defined TBB_INTERFACE_VERSION && TBB_INTERFACE_VERSION < 5000
# undef HAVE_TBB # undef HAVE_TBB
#endif #endif
...@@ -575,7 +575,12 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index ) ...@@ -575,7 +575,12 @@ CvCapture_OpenNI::CvCapture_OpenNI( int index )
// Chose device according to index // Chose device according to index
xn::NodeInfoList::Iterator it = devicesList.Begin(); xn::NodeInfoList::Iterator it = devicesList.Begin();
for( int i = 0; i < index; ++i ) it++; for( int i = 0; i < index && it!=devicesList.End(); ++i ) it++;
if ( it == devicesList.End() )
{
std::cerr << "CvCapture_OpenNI::CvCapture_OpenNI : Failed device with index " << index << std::endl;
return;
}
xn::NodeInfo deviceNode = *it; xn::NodeInfo deviceNode = *it;
status = context.CreateProductionTree( deviceNode, productionNode ); status = context.CreateProductionTree( deviceNode, productionNode );
......
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