Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SSE fast-12 probably fixed. Can be disabled with --disable-ssefast12

All SSE FAST detectors pass "make test-fast" with valgrind.

All FAST detectors now use SSE by default id possible.
  • Loading branch information...
commit 4c3238fd0c30740fa77b5f34b5be7f7aeb55826c 1 parent f742a2c
edrosten authored
Showing with 53 additions and 33 deletions.
  1. +10 −19 configure
  2. +6 −14 configure.in
  3. +37 −0 cvd_src/faster_corner_12.cxx
View
29 configure
@@ -859,9 +859,9 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-ssefast12 Enable currently broken SSE FAST-12 detector
--disable-ssefast9 Disable the probably OK SSE FAST-9 detector
--disable-ssefast10 Disable the probably OK SSE FAST-10 detector
+ --disable-ssefast12 Disable the probably OK SSE FAST-12 detector
--enable-missingfast=7,8,... compile without certain FAST detectors.
Optional Packages:
@@ -9220,11 +9220,6 @@ echo --------------------------------
echo Checking for extra build options
echo --------------------------------
-# Check whether --enable-ssefast12 or --disable-ssefast12 was given.
-if test "${enable_ssefast12+set}" = set; then
- enableval="$enable_ssefast12"
-
-fi;
# Check whether --enable-ssefast9 or --disable-ssefast9 was given.
if test "${enable_ssefast9+set}" = set; then
enableval="$enable_ssefast9"
@@ -9235,6 +9230,11 @@ if test "${enable_ssefast10+set}" = set; then
enableval="$enable_ssefast10"
fi;
+# Check whether --enable-ssefast12 or --disable-ssefast12 was given.
+if test "${enable_ssefast12+set}" = set; then
+ enableval="$enable_ssefast12"
+
+fi;
if test "$enable_ssefast9" != "no"
then
@@ -9248,23 +9248,14 @@ then
fi
-if test "$enable_ssefast12" = yes
+if test "$enable_ssefast12" != "no"
then
- if test "$sse2" = no
- then
- { echo "$as_me:$LINENO: WARNING: \"SSE2 is disabled. The FAST test program will be useless.\"" >&5
-echo "$as_me: WARNING: \"SSE2 is disabled. The FAST test program will be useless.\"" >&2;}
- fi
-
- echo
- echo -------------------------------------------------------------------
- echo Run ldd on fast_test to make sure it\'s linked to the right library!
- echo -------------------------------------------------------------------
- echo
-
have_faster12=yes
+fi
+if test "$enable_ssefast12$enable_ssefast10$enable_ssefast9" != "nonono" && test
+then
hidden_options="$hidden_options faster_test";
fi
View
20 configure.in
@@ -1122,9 +1122,9 @@ echo --------------------------------
echo Checking for extra build options
echo --------------------------------
-AC_ARG_ENABLE(ssefast12, [ --enable-ssefast12 Enable currently broken SSE FAST-12 detector])
AC_ARG_ENABLE(ssefast9, [ --disable-ssefast9 Disable the probably OK SSE FAST-9 detector])
AC_ARG_ENABLE(ssefast10, [ --disable-ssefast10 Disable the probably OK SSE FAST-10 detector])
+AC_ARG_ENABLE(ssefast12, [ --disable-ssefast12 Disable the probably OK SSE FAST-12 detector])
if test "$enable_ssefast9" != "no"
then
@@ -1136,21 +1136,13 @@ then
AC_SUBST(have_faster10, yes)
fi
-if test "$enable_ssefast12" = yes
+if test "$enable_ssefast12" != "no"
then
- if test "$sse2" = no
- then
- AC_MSG_WARN("SSE2 is disabled. The FAST test program will be useless.")
- fi
-
- echo
- echo -------------------------------------------------------------------
- echo Run ldd on fast_test to make sure it\'s linked to the right library!
- echo -------------------------------------------------------------------
- echo
-
- AC_SUBST(have_faster12,yes)
+ AC_SUBST(have_faster12, yes)
+fi
+if test "$enable_ssefast12$enable_ssefast10$enable_ssefast9" != "nonono" && test
+then
hidden_options="$hidden_options faster_test";
fi
View
37 cvd_src/faster_corner_12.cxx
@@ -93,6 +93,43 @@ namespace CVD
}
}
}
+
+ //Do the edge of the row, using the old-fasioned 4 point test
+ for(int j=(w/16) * 16; j < w-3; j++, p++)
+ {
+ int cb = *p + barrier;
+ int c_b = *p - barrier;
+ int num_above= (p[stride] > cb) + (p[-stride] > cb);
+ int num_below= (p[stride] < c_b) + (p[-stride] < c_b);
+
+ if(!num_above && !num_below)
+ continue;
+
+ //Look left
+ num_above+= p[-3] > cb;
+ num_below+= p[-3] < c_b;
+
+ if(num_above & 2) //num_above is 2 or 3
+ {
+ if(!(num_above & 1)) //num_above is 2
+ num_above += p[3] > cb;
+
+
+ //Only do a complete check if num_above is 3
+ if((num_above&1) && is_corner_12<Greater>(p, w, barrier))
+ passed.push_back(p);
+ }
+ else if(num_below & 2)
+ {
+ if(!(num_below & 1))
+ num_below += p[3] < c_b;
+
+
+ if((num_below&1) && is_corner_12<Less>(p, w, barrier))
+ passed.push_back(p);
+ }
+ }
+
passed.push_back(0);
}
corners.reserve(passed.size());
Please sign in to comment.
Something went wrong with that request. Please try again.