Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
0a90d6dd
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
0a90d6dd
编写于
2月 21, 2014
作者:
R
Roman Donchenko
提交者:
OpenCV Buildbot
2月 21, 2014
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2266 from vpisarev:ipp_norm_fix
上级
9c5bd852
51dafc78
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
141 addition
and
108 deletion
+141
-108
modules/core/src/stat.cpp
modules/core/src/stat.cpp
+141
-108
未找到文件。
modules/core/src/stat.cpp
浏览文件 @
0a90d6dd
...
...
@@ -548,25 +548,31 @@ cv::Scalar cv::sum( InputArray _src )
{
IppiSize
sz
=
{
cols
,
rows
};
int
type
=
src
.
type
();
typedef
IppStatus
(
CV_STDCALL
*
ippiSumFunc
)(
const
void
*
,
int
,
IppiSize
,
double
*
,
int
);
ippiSumFunc
ippFunc
=
type
==
CV_8UC1
?
(
ippiSumFunc
)
ippiSum_8u_C1R
:
type
==
CV_8UC3
?
(
ippiSumFunc
)
ippiSum_8u_C3R
:
type
==
CV_8UC4
?
(
ippiSumFunc
)
ippiSum_8u_C4R
:
type
==
CV_16UC1
?
(
ippiSumFunc
)
ippiSum_16u_C1R
:
type
==
CV_16UC3
?
(
ippiSumFunc
)
ippiSum_16u_C3R
:
type
==
CV_16UC4
?
(
ippiSumFunc
)
ippiSum_16u_C4R
:
type
==
CV_16SC1
?
(
ippiSumFunc
)
ippiSum_16s_C1R
:
type
==
CV_16SC3
?
(
ippiSumFunc
)
ippiSum_16s_C3R
:
type
==
CV_16SC4
?
(
ippiSumFunc
)
ippiSum_16s_C4R
:
type
==
CV_32FC1
?
(
ippiSumFunc
)
ippiSum_32f_C1R
:
type
==
CV_32FC3
?
(
ippiSumFunc
)
ippiSum_32f_C3R
:
type
==
CV_32FC4
?
(
ippiSumFunc
)
ippiSum_32f_C4R
:
typedef
IppStatus
(
CV_STDCALL
*
ippiSumFuncHint
)(
const
void
*
,
int
,
IppiSize
,
double
*
,
IppHintAlgorithm
);
typedef
IppStatus
(
CV_STDCALL
*
ippiSumFuncNoHint
)(
const
void
*
,
int
,
IppiSize
,
double
*
);
ippiSumFuncHint
ippFuncHint
=
type
==
CV_32FC1
?
(
ippiSumFuncHint
)
ippiSum_32f_C1R
:
type
==
CV_32FC3
?
(
ippiSumFuncHint
)
ippiSum_32f_C3R
:
type
==
CV_32FC4
?
(
ippiSumFuncHint
)
ippiSum_32f_C4R
:
0
;
if
(
ippFunc
)
ippiSumFuncNoHint
ippFuncNoHint
=
type
==
CV_8UC1
?
(
ippiSumFuncNoHint
)
ippiSum_8u_C1R
:
type
==
CV_8UC3
?
(
ippiSumFuncNoHint
)
ippiSum_8u_C3R
:
type
==
CV_8UC4
?
(
ippiSumFuncNoHint
)
ippiSum_8u_C4R
:
type
==
CV_16UC1
?
(
ippiSumFuncNoHint
)
ippiSum_16u_C1R
:
type
==
CV_16UC3
?
(
ippiSumFuncNoHint
)
ippiSum_16u_C3R
:
type
==
CV_16UC4
?
(
ippiSumFuncNoHint
)
ippiSum_16u_C4R
:
type
==
CV_16SC1
?
(
ippiSumFuncNoHint
)
ippiSum_16s_C1R
:
type
==
CV_16SC3
?
(
ippiSumFuncNoHint
)
ippiSum_16s_C3R
:
type
==
CV_16SC4
?
(
ippiSumFuncNoHint
)
ippiSum_16s_C4R
:
0
;
CV_Assert
(
!
ippFuncHint
||
!
ippFuncNoHint
);
if
(
ippFuncHint
||
ippFuncNoHint
)
{
Ipp64f
res
[
4
];
if
(
ippFunc
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
,
ippAlgHintAccurate
)
>=
0
)
IppStatus
ret
=
ippFuncHint
?
ippFuncHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
,
ippAlgHintAccurate
)
:
ippFuncNoHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
);
if
(
ret
>=
0
)
{
Scalar
sc
;
for
(
int
i
=
0
;
i
<
cn
;
i
++
)
...
...
@@ -745,25 +751,32 @@ cv::Scalar cv::mean( InputArray _src, InputArray _mask )
}
else
{
typedef
IppStatus
(
CV_STDCALL
*
ippiMeanFunc
)(
const
void
*
,
int
,
IppiSize
,
double
*
,
int
);
ippiMeanFunc
ippFunc
=
type
==
CV_8UC1
?
(
ippiMeanFunc
)
ippiMean_8u_C1R
:
type
==
CV_8UC3
?
(
ippiMeanFunc
)
ippiMean_8u_C3R
:
type
==
CV_8UC4
?
(
ippiMeanFunc
)
ippiMean_8u_C4R
:
type
==
CV_16UC1
?
(
ippiMeanFunc
)
ippiMean_16u_C1R
:
type
==
CV_16UC3
?
(
ippiMeanFunc
)
ippiMean_16u_C3R
:
type
==
CV_16UC4
?
(
ippiMeanFunc
)
ippiMean_16u_C4R
:
type
==
CV_16SC1
?
(
ippiMeanFunc
)
ippiMean_16s_C1R
:
type
==
CV_16SC3
?
(
ippiMeanFunc
)
ippiMean_16s_C3R
:
type
==
CV_16SC4
?
(
ippiMeanFunc
)
ippiMean_16s_C4R
:
type
==
CV_32FC1
?
(
ippiMeanFunc
)
ippiMean_32f_C1R
:
type
==
CV_32FC3
?
(
ippiMeanFunc
)
ippiMean_32f_C3R
:
type
==
CV_32FC4
?
(
ippiMeanFunc
)
ippiMean_32f_C4R
:
typedef
IppStatus
(
CV_STDCALL
*
ippiMeanFuncHint
)(
const
void
*
,
int
,
IppiSize
,
double
*
,
IppHintAlgorithm
);
typedef
IppStatus
(
CV_STDCALL
*
ippiMeanFuncNoHint
)(
const
void
*
,
int
,
IppiSize
,
double
*
);
ippiMeanFuncHint
ippFuncHint
=
type
==
CV_32FC1
?
(
ippiMeanFuncHint
)
ippiMean_32f_C1R
:
type
==
CV_32FC3
?
(
ippiMeanFuncHint
)
ippiMean_32f_C3R
:
type
==
CV_32FC4
?
(
ippiMeanFuncHint
)
ippiMean_32f_C4R
:
0
;
ippiMeanFuncNoHint
ippFuncNoHint
=
type
==
CV_8UC1
?
(
ippiMeanFuncNoHint
)
ippiMean_8u_C1R
:
type
==
CV_8UC3
?
(
ippiMeanFuncNoHint
)
ippiMean_8u_C3R
:
type
==
CV_8UC4
?
(
ippiMeanFuncNoHint
)
ippiMean_8u_C4R
:
type
==
CV_16UC1
?
(
ippiMeanFuncNoHint
)
ippiMean_16u_C1R
:
type
==
CV_16UC3
?
(
ippiMeanFuncNoHint
)
ippiMean_16u_C3R
:
type
==
CV_16UC4
?
(
ippiMeanFuncNoHint
)
ippiMean_16u_C4R
:
type
==
CV_16SC1
?
(
ippiMeanFuncNoHint
)
ippiMean_16s_C1R
:
type
==
CV_16SC3
?
(
ippiMeanFuncNoHint
)
ippiMean_16s_C3R
:
type
==
CV_16SC4
?
(
ippiMeanFuncNoHint
)
ippiMean_16s_C4R
:
0
;
if
(
ippFunc
)
// Make sure only zero or one version of the function pointer is valid
CV_Assert
(
!
ippFuncHint
||
!
ippFuncNoHint
);
if
(
ippFuncHint
||
ippFuncNoHint
)
{
Ipp64f
res
[
4
];
if
(
ippFunc
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
,
ippAlgHintAccurate
)
>=
0
)
IppStatus
ret
=
ippFuncHint
?
ippFuncHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
,
ippAlgHintAccurate
)
:
ippFuncNoHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
res
);
if
(
ret
>=
0
)
{
Scalar
sc
;
for
(
int
i
=
0
;
i
<
cn
;
i
++
)
...
...
@@ -2073,54 +2086,64 @@ double cv::norm( InputArray _src, int normType, InputArray _mask )
}
else
{
typedef
IppStatus
(
CV_STDCALL
*
ippiNormFunc
)(
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
,
IppHintAlgorithm
hint
);
ippiNormFunc
ippFunc
=
typedef
IppStatus
(
CV_STDCALL
*
ippiNormFuncHint
)(
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
,
IppHintAlgorithm
hint
);
typedef
IppStatus
(
CV_STDCALL
*
ippiNormFuncNoHint
)(
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
);
ippiNormFuncHint
ippFuncHint
=
normType
==
NORM_L1
?
(
type
==
CV_32FC1
?
(
ippiNormFuncHint
)
ippiNorm_L1_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFuncHint
)
ippiNorm_L1_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFuncHint
)
ippiNorm_L1_32f_C4R
:
0
)
:
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
?
(
type
==
CV_32FC1
?
(
ippiNormFuncHint
)
ippiNorm_L2_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFuncHint
)
ippiNorm_L2_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFuncHint
)
ippiNorm_L2_32f_C4R
:
0
)
:
0
;
ippiNormFuncNoHint
ippFuncNoHint
=
normType
==
NORM_INF
?
(
type
==
CV_8UC1
?
(
ippiNormFunc
)
ippiNorm_Inf_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFunc
)
ippiNorm_Inf_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFunc
)
ippiNorm_Inf_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFunc
)
ippiNorm_Inf_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFunc
)
ippiNorm_Inf_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFunc
)
ippiNorm_Inf_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFunc
)
ippiNorm_Inf_16s_C1R
:
(
type
==
CV_8UC1
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_16s_C1R
:
//type == CV_16SC3 ? (ippiNormFunc)ippiNorm_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
//type == CV_16SC4 ? (ippiNormFunc)ippiNorm_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
type
==
CV_32FC1
?
(
ippiNormFunc
)
ippiNorm_Inf_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFunc
)
ippiNorm_Inf_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFunc
)
ippiNorm_Inf_32f_C4R
:
type
==
CV_32FC1
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFunc
NoHint
)
ippiNorm_Inf_32f_C4R
:
0
)
:
normType
==
NORM_L1
?
(
type
==
CV_8UC1
?
(
ippiNormFunc
)
ippiNorm_L1_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFunc
)
ippiNorm_L1_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFunc
)
ippiNorm_L1_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFunc
)
ippiNorm_L1_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFunc
)
ippiNorm_L1_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFunc
)
ippiNorm_L1_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFunc
)
ippiNorm_L1_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormFunc
)
ippiNorm_L1_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormFunc
)
ippiNorm_L1_16s_C4R
:
type
==
CV_32FC1
?
(
ippiNormFunc
)
ippiNorm_L1_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFunc
)
ippiNorm_L1_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFunc
)
ippiNorm_L1_32f_C4R
:
(
type
==
CV_8UC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L1_16s_C4R
:
0
)
:
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
?
(
type
==
CV_8UC1
?
(
ippiNormFunc
)
ippiNorm_L2_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFunc
)
ippiNorm_L2_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFunc
)
ippiNorm_L2_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFunc
)
ippiNorm_L2_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFunc
)
ippiNorm_L2_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFunc
)
ippiNorm_L2_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFunc
)
ippiNorm_L2_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormFunc
)
ippiNorm_L2_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormFunc
)
ippiNorm_L2_16s_C4R
:
type
==
CV_32FC1
?
(
ippiNormFunc
)
ippiNorm_L2_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormFunc
)
ippiNorm_L2_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormFunc
)
ippiNorm_L2_32f_C4R
:
(
type
==
CV_8UC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormFuncNoHint
)
ippiNorm_L2_16s_C4R
:
0
)
:
0
;
if
(
ippFunc
)
// Make sure only zero or one version of the function pointer is valid
CV_Assert
(
!
ippFuncHint
||
!
ippFuncNoHint
);
if
(
ippFuncHint
||
ippFuncNoHint
)
{
Ipp64f
norm_array
[
4
];
if
(
ippFunc
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
norm_array
,
ippAlgHintAccurate
)
>=
0
)
IppStatus
ret
=
ippFuncHint
?
ippFuncHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
norm_array
,
ippAlgHintAccurate
)
:
ippFuncNoHint
(
src
.
data
,
(
int
)
src
.
step
[
0
],
sz
,
norm_array
);
if
(
ret
>=
0
)
{
Ipp64f
norm
=
(
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
)
?
norm_array
[
0
]
*
norm_array
[
0
]
:
norm_array
[
0
];
for
(
int
i
=
1
;
i
<
cn
;
i
++
)
...
...
@@ -2493,54 +2516,64 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m
}
else
{
typedef
IppStatus
(
CV_STDCALL
*
ippiNormDiffFunc
)(
const
void
*
,
int
,
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
,
IppHintAlgorithm
hint
);
ippiNormDiffFunc
ippFunc
=
typedef
IppStatus
(
CV_STDCALL
*
ippiNormDiffFuncHint
)(
const
void
*
,
int
,
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
,
IppHintAlgorithm
hint
);
typedef
IppStatus
(
CV_STDCALL
*
ippiNormDiffFuncNoHint
)(
const
void
*
,
int
,
const
void
*
,
int
,
IppiSize
,
Ipp64f
*
);
ippiNormDiffFuncHint
ippFuncHint
=
normType
==
NORM_L1
?
(
type
==
CV_32FC1
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L1_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L1_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L1_32f_C4R
:
0
)
:
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
?
(
type
==
CV_32FC1
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L2_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L2_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFuncHint
)
ippiNormDiff_L2_32f_C4R
:
0
)
:
0
;
ippiNormDiffFuncNoHint
ippFuncNoHint
=
normType
==
NORM_INF
?
(
type
==
CV_8UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_16s_C1R
:
(
type
==
CV_8UC1
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_16s_C1R
:
//type == CV_16SC3 ? (ippiNormDiffFunc)ippiNormDiff_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
//type == CV_16SC4 ? (ippiNormDiffFunc)ippiNormDiff_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
type
==
CV_32FC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_Inf_32f_C4R
:
type
==
CV_32FC1
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFunc
NoHint
)
ippiNormDiff_Inf_32f_C4R
:
0
)
:
normType
==
NORM_L1
?
(
type
==
CV_8UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_16s_C4R
:
type
==
CV_32FC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L1_32f_C4R
:
(
type
==
CV_8UC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L1_16s_C4R
:
0
)
:
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
?
(
type
==
CV_8UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_16s_C4R
:
type
==
CV_32FC1
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_32f_C1R
:
type
==
CV_32FC3
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_32f_C3R
:
type
==
CV_32FC4
?
(
ippiNormDiffFunc
)
ippiNormDiff_L2_32f_C4R
:
(
type
==
CV_8UC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_8u_C1R
:
type
==
CV_8UC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_8u_C3R
:
type
==
CV_8UC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_8u_C4R
:
type
==
CV_16UC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16u_C1R
:
type
==
CV_16UC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16u_C3R
:
type
==
CV_16UC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16u_C4R
:
type
==
CV_16SC1
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16s_C1R
:
type
==
CV_16SC3
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16s_C3R
:
type
==
CV_16SC4
?
(
ippiNormDiffFuncNoHint
)
ippiNormDiff_L2_16s_C4R
:
0
)
:
0
;
if
(
ippFunc
)
// Make sure only zero or one version of the function pointer is valid
CV_Assert
(
!
ippFuncHint
||
!
ippFuncNoHint
);
if
(
ippFuncHint
||
ippFuncNoHint
)
{
Ipp64f
norm_array
[
4
];
if
(
ippFunc
(
src1
.
data
,
(
int
)
src1
.
step
[
0
],
src2
.
data
,
(
int
)
src2
.
step
[
0
],
sz
,
norm_array
,
ippAlgHintAccurate
)
>=
0
)
IppStatus
ret
=
ippFuncHint
?
ippFuncHint
(
src1
.
data
,
(
int
)
src1
.
step
[
0
],
src2
.
data
,
(
int
)
src2
.
step
[
0
],
sz
,
norm_array
,
ippAlgHintAccurate
)
:
ippFuncNoHint
(
src1
.
data
,
(
int
)
src1
.
step
[
0
],
src2
.
data
,
(
int
)
src2
.
step
[
0
],
sz
,
norm_array
);
if
(
ret
>=
0
)
{
Ipp64f
norm
=
(
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
)
?
norm_array
[
0
]
*
norm_array
[
0
]
:
norm_array
[
0
];
for
(
int
i
=
1
;
i
<
src1
.
channels
();
i
++
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录