Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
bd314bf9
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd314bf9
编写于
11月 22, 2013
作者:
A
Alexander Smorkalov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
VFPv4 detection implemented. Some Tegra5 related updates.
上级
fd759223
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
115 addition
and
38 deletion
+115
-38
platforms/android/service/engine/jni/BinderComponent/HardwareDetector.cpp
...d/service/engine/jni/BinderComponent/HardwareDetector.cpp
+4
-0
platforms/android/service/engine/jni/BinderComponent/HardwareDetector.h
...oid/service/engine/jni/BinderComponent/HardwareDetector.h
+3
-2
platforms/android/service/engine/jni/BinderComponent/ProcReader.h
...s/android/service/engine/jni/BinderComponent/ProcReader.h
+2
-1
platforms/android/service/engine/jni/NativeService/CommonPackageManager.cpp
...service/engine/jni/NativeService/CommonPackageManager.cpp
+7
-1
platforms/android/service/engine/jni/Tests/OpenCVEngineTest.cpp
...rms/android/service/engine/jni/Tests/OpenCVEngineTest.cpp
+16
-16
platforms/android/service/engine/jni/Tests/PackageInfoTest.cpp
...orms/android/service/engine/jni/Tests/PackageInfoTest.cpp
+49
-12
platforms/android/service/engine/jni/Tests/PackageManagmentTest.cpp
...android/service/engine/jni/Tests/PackageManagmentTest.cpp
+18
-2
platforms/android/service/engine/src/org/opencv/engine/HardwareDetector.java
...ervice/engine/src/org/opencv/engine/HardwareDetector.java
+3
-2
platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java
...engine/src/org/opencv/engine/manager/ManagerActivity.java
+13
-2
未找到文件。
platforms/android/service/engine/jni/BinderComponent/HardwareDetector.cpp
浏览文件 @
bd314bf9
...
@@ -91,6 +91,10 @@ int GetCpuID()
...
@@ -91,6 +91,10 @@ int GetCpuID()
{
{
result
|=
FEATURES_HAS_NEON2
;
result
|=
FEATURES_HAS_NEON2
;
}
}
if
(
features
.
end
()
!=
features
.
find
(
CPU_INFO_VFPV4_STR
))
{
result
|=
FEATURES_HAS_VFPv4
;
}
if
(
features
.
end
()
!=
features
.
find
(
CPU_INFO_VFPV3_STR
))
if
(
features
.
end
()
!=
features
.
find
(
CPU_INFO_VFPV3_STR
))
{
{
if
(
features
.
end
()
!=
features
.
find
(
CPU_INFO_VFPV3D16_STR
))
if
(
features
.
end
()
!=
features
.
find
(
CPU_INFO_VFPV3D16_STR
))
...
...
platforms/android/service/engine/jni/BinderComponent/HardwareDetector.h
浏览文件 @
bd314bf9
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#define FEATURES_HAS_VFPv4 4L
#define FEATURES_HAS_VFPv4 4L
#define FEATURES_HAS_NEON 8L
#define FEATURES_HAS_NEON 8L
#define FEATURES_HAS_NEON2 16L
#define FEATURES_HAS_NEON2 16L
#define FEATURES_HAS_SSE 1L
#define FEATURES_HAS_SSE 1L
#define FEATURES_HAS_SSE2 2L
#define FEATURES_HAS_SSE2 2L
#define FEATURES_HAS_SSSE3 4L
#define FEATURES_HAS_SSSE3 4L
...
@@ -28,8 +29,8 @@
...
@@ -28,8 +29,8 @@
#define PLATFORM_TEGRA 1L
#define PLATFORM_TEGRA 1L
#define PLATFORM_TEGRA2 2L
#define PLATFORM_TEGRA2 2L
#define PLATFORM_TEGRA3 3L
#define PLATFORM_TEGRA3 3L
#define PLATFORM_TEGRA4
4L
#define PLATFORM_TEGRA4
i
4L
#define PLATFORM_TEGRA4
i
5L
#define PLATFORM_TEGRA4
5L
#define PLATFORM_TEGRA5 6L
#define PLATFORM_TEGRA5 6L
int
DetectKnownPlatforms
();
int
DetectKnownPlatforms
();
...
...
platforms/android/service/engine/jni/BinderComponent/ProcReader.h
浏览文件 @
bd314bf9
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
#define CPU_INFO_NEON_STR "neon"
#define CPU_INFO_NEON_STR "neon"
#define CPU_INFO_NEON2_STR "neon2"
#define CPU_INFO_NEON2_STR "neon2"
#define CPU_INFO_VFPV3_STR "vfpv3"
#define CPU_INFO_VFPV3D16_STR "vfpv3d16"
#define CPU_INFO_VFPV3D16_STR "vfpv3d16"
#define CPU_INFO_VFPV3_STR "vfpv3"
#define CPU_INFO_VFPV4_STR "vfpv4"
#define CPU_INFO_SSE_STR "sse"
#define CPU_INFO_SSE_STR "sse"
#define CPU_INFO_SSE2_STR "sse2"
#define CPU_INFO_SSE2_STR "sse2"
...
...
platforms/android/service/engine/jni/NativeService/CommonPackageManager.cpp
浏览文件 @
bd314bf9
...
@@ -187,16 +187,22 @@ std::vector<std::pair<int, int> > CommonPackageManager::InitArmRating()
...
@@ -187,16 +187,22 @@ std::vector<std::pair<int, int> > CommonPackageManager::InitArmRating()
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv6
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA2
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA2
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_VFPv3
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv3d16
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA3
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA3
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA4i
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA4i
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
result
.
push_back
(
std
::
pair
<
int
,
int
>
(
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
...
...
platforms/android/service/engine/jni/Tests/OpenCVEngineTest.cpp
浏览文件 @
bd314bf9
...
@@ -193,11 +193,11 @@ TEST(OpenCVEngineTest, GetPathForCompatiblePackage2)
...
@@ -193,11 +193,11 @@ TEST(OpenCVEngineTest, GetPathForCompatiblePackage2)
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra3/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra3/lib"
,
String8
(
result
).
string
());
#else
#else
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
#
else
#
else
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
#
endif
#
endif
#endif
#endif
}
}
...
@@ -205,18 +205,18 @@ TEST(OpenCVEngineTest, GetPathForCompatiblePackage3)
...
@@ -205,18 +205,18 @@ TEST(OpenCVEngineTest, GetPathForCompatiblePackage3)
{
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
);
Starter
.
PackageManager
->
InstallVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_
VFPv4
|
FEATURES_HAS_
NEON
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4"
));
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4"
));
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra4/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra4/lib"
,
String8
(
result
).
string
());
#else
#else
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
#
else
#
else
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
#
endif
#
endif
#endif
#endif
}
}
TEST
(
OpenCVEngineTest
,
InstallAndGetVersion
)
TEST
(
OpenCVEngineTest
,
InstallAndGetVersion
)
...
@@ -226,15 +226,15 @@ TEST(OpenCVEngineTest, InstallAndGetVersion)
...
@@ -226,15 +226,15 @@ TEST(OpenCVEngineTest, InstallAndGetVersion)
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
EXPECT_TRUE
(
Engine
->
InstallVersion
(
String16
(
"2.4"
)));
EXPECT_TRUE
(
Engine
->
InstallVersion
(
String16
(
"2.4"
)));
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4"
));
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4"
));
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra3/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra3/lib"
,
String8
(
result
).
string
());
#else
#else
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
String8
(
result
).
string
());
#
else
#
else
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
#
endif
#
endif
#endif
#endif
}
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_2
)
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_2
)
...
...
platforms/android/service/engine/jni/Tests/PackageInfoTest.cpp
浏览文件 @
bd314bf9
...
@@ -34,6 +34,13 @@ TEST(PackageInfo, FullNameArmv7VFPv3)
...
@@ -34,6 +34,13 @@ TEST(PackageInfo, FullNameArmv7VFPv3)
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a"
,
name
.
c_str
());
}
}
TEST
(
PackageInfo
,
FullNameArmv7VFPv4
)
{
PackageInfo
info
(
2030300
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv4
);
string
name
=
info
.
GetFullName
();
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a"
,
name
.
c_str
());
}
TEST
(
PackageInfo
,
FullNameArmv7VFPv3Neon
)
TEST
(
PackageInfo
,
FullNameArmv7VFPv3Neon
)
{
{
PackageInfo
info
(
2030000
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
);
PackageInfo
info
(
2030000
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
);
...
@@ -74,30 +81,60 @@ TEST(PackageInfo, FullNameTegra3)
...
@@ -74,30 +81,60 @@ TEST(PackageInfo, FullNameTegra3)
{
{
PackageInfo
info
(
2030000
,
PLATFORM_TEGRA3
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
PackageInfo
info
(
2030000
,
PLATFORM_TEGRA3
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
string
name
=
info
.
GetFullName
();
string
name
=
info
.
GetFullName
();
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"org.opencv.lib_v23_tegra3"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v23_tegra3"
,
name
.
c_str
());
#else
#else
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a_neon"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a_neon"
,
name
.
c_str
());
#
else
#
else
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v23_armv7a"
,
name
.
c_str
());
#
endif
#
endif
#endif
#endif
}
}
TEST
(
PackageInfo
,
FullNameTegra4
)
TEST
(
PackageInfo
,
FullNameTegra4
)
{
{
PackageInfo
info
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
PackageInfo
info
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
string
name
=
info
.
GetFullName
();
string
name
=
info
.
GetFullName
();
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"org.opencv.lib_v24_tegra4"
,
name
.
c_str
());
#else
# ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a_neon"
,
name
.
c_str
());
# else
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a"
,
name
.
c_str
());
# endif
#endif
}
TEST
(
PackageInfo
,
FullNameTegra4i
)
{
PackageInfo
info
(
2040700
,
PLATFORM_TEGRA4i
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
string
name
=
info
.
GetFullName
();
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"org.opencv.lib_v24_tegra4"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v24_tegra4"
,
name
.
c_str
());
#else
#else
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
#
ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a_neon"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a_neon"
,
name
.
c_str
());
#
else
#
else
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a"
,
name
.
c_str
());
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a"
,
name
.
c_str
());
#endif
# endif
#endif
#endif
}
TEST
(
PackageInfo
,
FullNameTegra5
)
{
PackageInfo
info
(
2040700
,
PLATFORM_TEGRA5
,
ARCH_ARMv7
|
FEATURES_HAS_NEON
);
string
name
=
info
.
GetFullName
();
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"org.opencv.lib_v24_tegra5"
,
name
.
c_str
());
#else
# ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a_neon"
,
name
.
c_str
());
# else
EXPECT_STREQ
(
"org.opencv.lib_v24_armv7a"
,
name
.
c_str
());
# endif
#endif
}
}
TEST
(
PackageInfo
,
FullNameX86SSE2
)
TEST
(
PackageInfo
,
FullNameX86SSE2
)
...
...
platforms/android/service/engine/jni/Tests/PackageManagmentTest.cpp
浏览文件 @
bd314bf9
...
@@ -105,8 +105,8 @@ TEST(PackageManager, GetPackagePathForTegra3)
...
@@ -105,8 +105,8 @@ TEST(PackageManager, GetPackagePathForTegra3)
TEST
(
PackageManager
,
GetPackagePathForTegra4
)
TEST
(
PackageManager
,
GetPackagePathForTegra4
)
{
{
PackageManagerStub
pm
;
PackageManagerStub
pm
;
EXPECT_TRUE
(
pm
.
InstallVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
));
EXPECT_TRUE
(
pm
.
InstallVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_
VFPv4
|
FEATURES_HAS_
NEON
));
string
path
=
pm
.
GetPackagePathByVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_NEON
);
string
path
=
pm
.
GetPackagePathByVersion
(
2040400
,
PLATFORM_TEGRA4
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_
VFPv4
|
FEATURES_HAS_
NEON
);
#ifdef __SUPPORT_TEGRA3
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra4/lib"
,
path
.
c_str
());
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra4/lib"
,
path
.
c_str
());
#else
#else
...
@@ -118,6 +118,22 @@ TEST(PackageManager, GetPackagePathForTegra4)
...
@@ -118,6 +118,22 @@ TEST(PackageManager, GetPackagePathForTegra4)
#endif
#endif
}
}
TEST
(
PackageManager
,
GetPackagePathForTegra5
)
{
PackageManagerStub
pm
;
EXPECT_TRUE
(
pm
.
InstallVersion
(
2040400
,
PLATFORM_TEGRA5
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
));
string
path
=
pm
.
GetPackagePathByVersion
(
2040400
,
PLATFORM_TEGRA5
,
ARCH_ARMv7
|
FEATURES_HAS_VFPv3
|
FEATURES_HAS_VFPv4
|
FEATURES_HAS_NEON
);
#ifdef __SUPPORT_TEGRA3
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_tegra5/lib"
,
path
.
c_str
());
#else
#ifdef __SUPPORT_ARMEABI_V7A_FEATURES
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a_neon/lib"
,
path
.
c_str
());
#else
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
path
.
c_str
());
#endif
#endif
}
#ifdef __SUPPORT_MIPS
#ifdef __SUPPORT_MIPS
TEST
(
PackageManager
,
GetPackagePathForMips
)
TEST
(
PackageManager
,
GetPackagePathForMips
)
{
{
...
...
platforms/android/service/engine/src/org/opencv/engine/HardwareDetector.java
浏览文件 @
bd314bf9
...
@@ -19,8 +19,9 @@ public class HardwareDetector
...
@@ -19,8 +19,9 @@ public class HardwareDetector
// ARM specific features
// ARM specific features
public
static
final
int
FEATURES_HAS_VFPv3d16
=
0x01
;
public
static
final
int
FEATURES_HAS_VFPv3d16
=
0x01
;
public
static
final
int
FEATURES_HAS_VFPv3
=
0x02
;
public
static
final
int
FEATURES_HAS_VFPv3
=
0x02
;
public
static
final
int
FEATURES_HAS_NEON
=
0x04
;
public
static
final
int
FEATURES_HAS_VFPv4
=
0x04
;
public
static
final
int
FEATURES_HAS_NEON2
=
0x08
;
public
static
final
int
FEATURES_HAS_NEON
=
0x08
;
public
static
final
int
FEATURES_HAS_NEON2
=
0x16
;
// X86 specific features
// X86 specific features
public
static
final
int
FEATURES_HAS_SSE
=
0x01
;
public
static
final
int
FEATURES_HAS_SSE
=
0x01
;
...
...
platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java
浏览文件 @
bd314bf9
...
@@ -111,10 +111,14 @@ public class ManagerActivity extends Activity
...
@@ -111,10 +111,14 @@ public class ManagerActivity extends Activity
{
{
HardwarePlatformView
.
setText
(
"Tegra 4i"
);
HardwarePlatformView
.
setText
(
"Tegra 4i"
);
}
}
else
else
if
(
HardwareDetector
.
PLATFORM_TEGRA4
==
Platfrom
)
{
{
HardwarePlatformView
.
setText
(
"Tegra 4"
);
HardwarePlatformView
.
setText
(
"Tegra 4"
);
}
}
else
{
HardwarePlatformView
.
setText
(
"Tegra 5"
);
}
}
}
else
else
{
{
...
@@ -478,7 +482,14 @@ public class ManagerActivity extends Activity
...
@@ -478,7 +482,14 @@ public class ManagerActivity extends Activity
// TODO: update if package will be published
// TODO: update if package will be published
if
((
features
&
HardwareDetector
.
FEATURES_HAS_NEON
)
==
HardwareDetector
.
FEATURES_HAS_NEON
)
if
((
features
&
HardwareDetector
.
FEATURES_HAS_NEON
)
==
HardwareDetector
.
FEATURES_HAS_NEON
)
{
{
return
"with Neon"
;
if
((
features
&
HardwareDetector
.
FEATURES_HAS_VFPv4
)
==
HardwareDetector
.
FEATURES_HAS_VFPv4
)
{
return
"with Neon and VFPv4"
;
}
else
{
return
"with Neon"
;
}
}
}
else
if
((
features
&
HardwareDetector
.
FEATURES_HAS_VFPv3
)
==
HardwareDetector
.
FEATURES_HAS_VFPv3
)
else
if
((
features
&
HardwareDetector
.
FEATURES_HAS_VFPv3
)
==
HardwareDetector
.
FEATURES_HAS_VFPv3
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录