Permalink
Browse files

brisk_2d does not use the SSE4.1 intrinsic instructions

brisk_2d use the SSE2 and SSSE3 intrinsic instructions.
"_mm_shuffle_epi8" is SSSE3, others is SSE2.
  • Loading branch information...
1 parent aa58bc5 commit 332d157e919c5d65c417cbbdd59aae64d2ffe31f @UnaNancyOwen UnaNancyOwen committed Feb 5, 2016
Showing with 8 additions and 7 deletions.
  1. +6 −5 keypoints/src/brisk_2d.cpp
  2. +2 −2 test/features/test_brisk.cpp
@@ -42,8 +42,9 @@
#include <pcl/keypoints/brisk_2d.h>
#include <pcl/point_types.h>
#include <pcl/impl/instantiate.hpp>
-#if defined(__SSE4_1__) && !defined(__i386__)
+#if defined(__SSSE3__) && !defined(__i386__)
#include <tmmintrin.h>
+#include <emmintrin.h>
#endif
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1568,7 +1569,7 @@ pcl::keypoints::brisk::Layer::halfsample (
int dstwidth, int dstheight)
{
(void)dstheight;
-#if defined(__SSE4_1__) && !defined(__i386__)
+#if defined(__SSSE3__) && !defined(__i386__)
const unsigned short leftoverCols = static_cast<unsigned short> ((srcwidth % 16) / 2); // take care with border...
const bool noleftover = (srcwidth % 16) == 0; // note: leftoverCols can be zero but this still false...
@@ -1720,7 +1721,7 @@ pcl::keypoints::brisk::Layer::halfsample (
(void) (srcheight);
(void) (dstimg);
(void) (dstwidth);
- PCL_ERROR("brisk without SSE4.1 support not implemented");
+ PCL_ERROR("brisk without SSSE3 support not implemented");
#endif
}
@@ -1733,7 +1734,7 @@ pcl::keypoints::brisk::Layer::twothirdsample (
int dstwidth, int dstheight)
{
(void)dstheight;
-#if defined(__SSE4_1__) && !defined(__i386__)
+#if defined(__SSSE3__) && !defined(__i386__)
const unsigned short leftoverCols = static_cast<unsigned short> (((srcwidth / 3) * 3) % 15);// take care with border...
// make sure the destination image is of the right size:
@@ -1834,7 +1835,7 @@ pcl::keypoints::brisk::Layer::twothirdsample (
(void) (srcheight);
(void) (dstimg);
(void) (dstwidth);
- PCL_ERROR("brisk without SSE4.1 support not implemented");
+ PCL_ERROR("brisk without SSSE3 support not implemented");
#endif
}
@@ -60,7 +60,7 @@ PointCloud<BRISKSignature512>::Ptr cloud_descriptors_gt (new PointCloud<BRISKSig
//////////////////////////////////////////////////////////////////////////////////////////////
TEST (PCL, BRISK_2D)
{
-#if defined(__SSE4_1__) && !defined(__i386__)
+#if defined(__SSSE3__) && !defined(__i386__)
// Compute BRISK keypoints
BriskKeypoint2D<PointT> brisk_keypoint_estimation;
brisk_keypoint_estimation.setThreshold (60);
@@ -120,7 +120,7 @@ TEST (PCL, BRISK_2D)
EXPECT_NEAR (0.0f, sqr_dist, 1e-4);
}
#else
- PCL_WARN ("Not compiled with SSE4.1, skipping test of Brisk.\n");
+ PCL_WARN ("Not compiled with SSSE3, skipping test of Brisk.\n");
#endif
}

0 comments on commit 332d157

Please sign in to comment.