mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 08:44:11 +08:00
Merge pull request #1623 from alalek:android_pack_fix_contrib
* android: fix build warnings * build: fix warnings
This commit is contained in:

committed by
GitHub

parent
d6bbcd685d
commit
ebc142b1d8
@@ -391,7 +391,6 @@ bool RetinaOCLImpl::convertToColorPlanes(const UMat& input, UMat &output)
|
||||
else
|
||||
{
|
||||
CV_Error(-1, "Retina ocl only support 1, 3, 4 channel input");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
void RetinaOCLImpl::convertToInterleaved(const UMat& input, bool colorMode, UMat &output)
|
||||
@@ -449,8 +448,8 @@ void RetinaOCLImpl::getMagnoRAW(OutputArray retinaOutput_magno)
|
||||
|
||||
// unimplemented interfaces:
|
||||
void RetinaOCLImpl::applyFastToneMapping(InputArray /*inputImage*/, OutputArray /*outputToneMappedImage*/) { NOT_IMPLEMENTED; }
|
||||
const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; return Mat(); }
|
||||
const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; return Mat(); }
|
||||
const Mat RetinaOCLImpl::getMagnoRAW() const { NOT_IMPLEMENTED; }
|
||||
const Mat RetinaOCLImpl::getParvoRAW() const { NOT_IMPLEMENTED; }
|
||||
|
||||
///////////////////////////////////////
|
||||
///////// BasicRetinaFilter ///////////
|
||||
|
@@ -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
|
||||
*/
|
||||
|
||||
/* Convention is to define __BYTE_ORDER == to one of these values */
|
||||
#if !defined(__BIG_ENDIAN)
|
||||
#define __BIG_ENDIAN 4321
|
||||
#endif
|
||||
#if !defined(__LITTLE_ENDIAN)
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386))
|
||||
# define UNALIGNED_SAFE 1
|
||||
#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
|
||||
|
||||
/* gcc (usually) defines xEL/EB macros for ARM and MIPS endianess */
|
||||
#if !defined(__BYTE_ORDER)
|
||||
#if defined(__ARMEL__) || defined(__MIPSEL__)
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
#if defined(__ARMEB__) || defined(__MIPSEB__)
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#endif
|
||||
#ifndef UNALIGNED_SAFE
|
||||
# define UNALIGNED_SAFE 1
|
||||
#elif defined(UNALIGNED_SAFE) && !UNALIGNED_SAFE == 0
|
||||
# undef UNALIGNED_SAFE
|
||||
#endif
|
||||
|
||||
/* Now find best way we can to READ_UINT32 */
|
||||
#if __BYTE_ORDER==__LITTLE_ENDIAN
|
||||
/* CPU endian matches murmurhash algorithm, so read 32-bit word directly */
|
||||
#define READ_UINT32(ptr) (*((uint32_t*)(ptr)))
|
||||
#elif __BYTE_ORDER==__BIG_ENDIAN
|
||||
/* TODO: Add additional cases below where a compiler provided bswap32 is available */
|
||||
#if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
|
||||
#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
|
||||
#if (defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(i386)) \
|
||||
|| (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
# define READ_UINT32(ptr) (*((uint32_t*)(ptr)))
|
||||
#elif (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
&& defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
|
||||
# define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr))))
|
||||
#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 */
|
||||
#define UNALIGNED_SAFE
|
||||
#ifndef READ_UINT32
|
||||
/* 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
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@@ -58,6 +58,8 @@ namespace cv {
|
||||
double rank;
|
||||
Rect bounding_box;
|
||||
|
||||
Region() : id(0), level(0), merged_to(0), rank(0) {}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const Region& n);
|
||||
|
||||
bool operator <(const Region& n) const {
|
||||
|
Reference in New Issue
Block a user