From 0ebf074be440dc5ba30802fdccfc786c6d4acbd7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 22 Jun 2017 07:27:36 +0200 Subject: tracker/pt: replace point extraction algorithm Profiling over a longer time period showed a bottleneck while iterating pixels with `cv::floodFill()'. Contours are actually faster, and we have MeanShift to establish the proper center basing on pixel intensities. --- compat/util.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'compat') diff --git a/compat/util.hpp b/compat/util.hpp index 3a53e203..4ad01544 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -94,29 +94,29 @@ auto qptr(xs... args) template using qshared = QSharedPointer; #if defined _MSC_VER -# define OTR_NEVER_INLINE __declspec(noinline) +# define never_inline __declspec(noinline) #elif defined __GNUG__ -# define OTR_NEVER_INLINE __attribute__((noinline)) +# define never_inline __attribute__((noinline)) #else -# define OTR_NEVER_INLINE +# define never_inline #endif #if defined _MSC_VER || defined __GNUG__ -# define OTR_RESTRICT __restrict +# define restrict __restrict #else -# define OTR_RESTRICT +# define restrict #endif #if defined _MSC_VER -# define OTR_ALWAYS_INLINE __forceinline +# define force_inline __forceinline #elif defined __GNUG__ -# define OTR_ALWAYS_INLINE __attribute__((always_inline)) +# define force_inline __attribute__((always_inline, gnu_inline)) #else -# define OTR_ALWAYS_INLINE inline +# define force_inline inline #endif #if defined __GNUG__ -# define OTR_FLATTEN __attribute__((flatten)) +# define flatten __attribute__((flatten, noinline)) #else -# define OTR_FLATTEN OTR_ALWAYS_INLINE +# define flatten #endif -- cgit v1.2.3