fix android pack build

This commit is contained in:
Alexander Alekhin
2016-07-18 17:45:16 +03:00
parent 705e776f09
commit 2ec63e4dd1
6 changed files with 80 additions and 4 deletions

View File

@@ -193,7 +193,7 @@ enum CpuFeatures {
# endif
# define CV_POPCNT 1
# endif
# if defined __F16C__ || (defined _MSC_VER && _MSC_VER >= 1700)
# if defined HAVE_FP16 && (defined __F16C__ || (defined _MSC_VER && _MSC_VER >= 1700))
# include <immintrin.h>
# define CV_FP16 1
# endif
@@ -219,7 +219,7 @@ enum CpuFeatures {
#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)
# include <Intrin.h>
# include "arm_neon.h"
# include <arm_neon.h>
# define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true)
#elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__))
@@ -227,8 +227,12 @@ enum CpuFeatures {
# define CV_NEON 1
#endif
#if defined __GNUC__ && ((defined (__arm__) && (__ARM_FP & 0x2)) || defined(__aarch64__))
# define CV_FP16 1
#if defined(__ARM_NEON__) || defined(__aarch64__)
# include <arm_neon.h>
#endif
#if defined HAVE_FP16 && defined __GNUC__
# define CV_FP16 1
#endif
#if defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__

View File

@@ -4591,6 +4591,8 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t
float16x4_t v_dst = vcvt_f16_f32(v_src);
*(float16x4_t*)(dst + x) = v_dst;
#else
#error "Configuration error"
#endif
}
#endif
@@ -4643,6 +4645,8 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t
float32x4_t v_dst = vcvt_f32_f16(v_src);
*(float32x4_t*)(dst + x) = v_dst;
#else
#error "Configuration error"
#endif
}
#endif

View File

@@ -43,6 +43,23 @@
#include "precomp.hpp"
#include "opencl_kernels_imgproc.hpp"
#if CV_NEON && defined(__aarch64__)
#include <arm_neon.h>
namespace cv {
// Workaround with missing definitions of vreinterpretq_u64_f64/vreinterpretq_f64_u64
template <typename T> static inline
uint64x2_t vreinterpretq_u64_f64(T a)
{
return (uint64x2_t) a;
}
template <typename T> static inline
float64x2_t vreinterpretq_f64_u64(T a)
{
return (float64x2_t) a;
}
} // namespace cv
#endif
namespace cv
{