Unverified Commit ebc142b1 authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #1623 from alalek:android_pack_fix_contrib

* android: fix build warnings

* build: fix warnings
parent d6bbcd68
...@@ -391,7 +391,6 @@ bool RetinaOCLImpl::convertToColorPlanes(const UMat& input, UMat &output) ...@@ -391,7 +391,6 @@ bool RetinaOCLImpl::convertToColorPlanes(const UMat& input, UMat &output)
else else
{ {
CV_Error(-1, "Retina ocl only support 1, 3, 4 channel input"); CV_Error(-1, "Retina ocl only support 1, 3, 4 channel input");
return false;
} }
} }
void RetinaOCLImpl::convertToInterleaved(const UMat& input, bool colorMode, UMat &output) void RetinaOCLImpl::convertToInterleaved(const UMat& input, bool colorMode, UMat &output)
...@@ -449,8 +448,8 @@ void RetinaOCLImpl::getMagnoRAW(OutputArray retinaOutput_magno) ...@@ -449,8 +448,8 @@ void RetinaOCLImpl::getMagnoRAW(OutputArray retinaOutput_magno)
// unimplemented interfaces: // unimplemented interfaces:
void RetinaOCLImpl::applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) { NOT_IMPLEMENTED; } void RetinaOCLImpl::applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) { NOT_IMPLEMENTED; }
const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; return Mat(); } const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; }
const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; return Mat(); } const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; }
/////////////////////////////////////// ///////////////////////////////////////
///////// BasicRetinaFilter /////////// ///////// BasicRetinaFilter ///////////
......
...@@ -78,59 +78,30 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou ...@@ -78,59 +78,30 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou
* ROTL32(x,r) Rotate x left by r bits * ROTL32(x,r) Rotate x left by r bits
*/ */
/* Convention is to define __BYTE_ORDER == to one of these values */ #if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386))
#if !defined(__BIG_ENDIAN) # define UNALIGNED_SAFE 1
#define __BIG_ENDIAN 4321
#endif
#if !defined(__LITTLE_ENDIAN)
#define __LITTLE_ENDIAN 1234
#endif
/* I386 */
#if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386)
#define __BYTE_ORDER __LITTLE_ENDIAN
#define UNALIGNED_SAFE
#endif
/* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
* or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
#if !defined(__BYTE_ORDER)
#if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#endif #endif
/* gcc (usually) defines xEL/EB macros for ARM and MIPS endianess */ #ifndef UNALIGNED_SAFE
#if !defined(__BYTE_ORDER) # define UNALIGNED_SAFE 1
#if defined(__ARMEL__) || defined(__MIPSEL__) #elif defined(UNALIGNED_SAFE) && !UNALIGNED_SAFE == 0
#define __BYTE_ORDER __LITTLE_ENDIAN # undef UNALIGNED_SAFE
#endif
#if defined(__ARMEB__) || defined(__MIPSEB__)
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#endif #endif
/* Now find best way we can to READ_UINT32 */ /* Now find best way we can to READ_UINT32 */
#if __BYTE_ORDER==__LITTLE_ENDIAN #if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386)) \
/* CPU endian matches murmurhash algorithm, so read 32-bit word directly */ || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define READ_UINT32(ptr) (*((uint32_t*)(ptr))) # define READ_UINT32(ptr) (*((uint32_t*)(ptr)))
#elif __BYTE_ORDER==__BIG_ENDIAN #elif (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
/* TODO: Add additional cases below where a compiler provided bswap32 is available */ && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
#if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3)) # define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr))))
#define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr))))
#else
/* Without a known fast bswap32 we're just as well off doing this */
#define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
#define UNALIGNED_SAFE
#endif #endif
#else
/* Unknown endianess so last resort is to read individual bytes */
#define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
/* Since we're not doing word-reads we can skip the messing about with realignment */ #ifndef READ_UINT32
#define UNALIGNED_SAFE /* Unknown endianess so last resort is to read individual bytes */
# define READ_UINT32(ptr) (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
# undef UNALIGNED_SAFE
# define UNALIGNED_SAFE 1
#endif #endif
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
......
...@@ -58,6 +58,8 @@ namespace cv { ...@@ -58,6 +58,8 @@ namespace cv {
double rank; double rank;
Rect bounding_box; Rect bounding_box;
Region() : id(0), level(0), merged_to(0), rank(0) {}
friend std::ostream& operator<<(std::ostream& os, const Region& n); friend std::ostream& operator<<(std::ostream& os, const Region& n);
bool operator <(const Region& n) const { bool operator <(const Region& n) const {
......
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