mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Fix error in arguments of ipp function
This commit is contained in:
parent
e68a55cca2
commit
dfe6adebb9
@ -2442,30 +2442,43 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
typedef IppStatus (CV_STDCALL* ippiNormRelFunc)(const void *, int, const void *, int, IppiSize, Ipp64f *);
|
typedef IppStatus (CV_STDCALL* ippiNormRelFuncNoHint)(const void *, int, const void *, int, IppiSize, Ipp64f *);
|
||||||
ippiNormRelFunc ippFunc =
|
typedef IppStatus (CV_STDCALL* ippiNormRelFuncHint)(const void *, int, const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint);
|
||||||
|
ippiNormRelFuncNoHint ippFuncNoHint =
|
||||||
normType == NORM_INF ?
|
normType == NORM_INF ?
|
||||||
(type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_Inf_8u_C1R :
|
(type == CV_8UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_Inf_8u_C1R :
|
||||||
type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_Inf_16u_C1R :
|
type == CV_16UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_Inf_16u_C1R :
|
||||||
type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_Inf_16s_C1R :
|
type == CV_16SC1 ? (ippiNormRelFuncNoHint)ippiNormRel_Inf_16s_C1R :
|
||||||
type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_Inf_32f_C1R :
|
type == CV_32FC1 ? (ippiNormRelFuncNoHint)ippiNormRel_Inf_32f_C1R :
|
||||||
0) :
|
0) :
|
||||||
normType == NORM_L1 ?
|
normType == NORM_L1 ?
|
||||||
(type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_L1_8u_C1R :
|
(type == CV_8UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L1_8u_C1R :
|
||||||
type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_L1_16u_C1R :
|
type == CV_16UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L1_16u_C1R :
|
||||||
type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_L1_16s_C1R :
|
type == CV_16SC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L1_16s_C1R :
|
||||||
type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_L1_32f_C1R :
|
|
||||||
0) :
|
0) :
|
||||||
normType == NORM_L2 || normType == NORM_L2SQR ?
|
normType == NORM_L2 || normType == NORM_L2SQR ?
|
||||||
(type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_L2_8u_C1R :
|
(type == CV_8UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L2_8u_C1R :
|
||||||
type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_L2_16u_C1R :
|
type == CV_16UC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L2_16u_C1R :
|
||||||
type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_L2_16s_C1R :
|
type == CV_16SC1 ? (ippiNormRelFuncNoHint)ippiNormRel_L2_16s_C1R :
|
||||||
type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_L2_32f_C1R :
|
|
||||||
0) : 0;
|
0) : 0;
|
||||||
if( ippFunc )
|
ippiNormRelFuncHint ippFuncHint =
|
||||||
|
normType == NORM_L1 ?
|
||||||
|
(type == CV_32FC1 ? (ippiNormRelFuncHint)ippiNormRel_L1_32f_C1R :
|
||||||
|
0) :
|
||||||
|
normType == NORM_L2 || normType == NORM_L2SQR ?
|
||||||
|
(type == CV_32FC1 ? (ippiNormRelFuncHint)ippiNormRel_L2_32f_C1R :
|
||||||
|
0) : 0;
|
||||||
|
if (ippFuncNoHint)
|
||||||
{
|
{
|
||||||
Ipp64f norm;
|
Ipp64f norm;
|
||||||
if( ippFunc(src1.data, (int)src1.step[0], src2.data, (int)src2.step[0], sz, &norm) >= 0 )
|
if( ippFuncNoHint(src1.data, (int)src1.step[0], src2.data, (int)src2.step[0], sz, &norm) >= 0 )
|
||||||
|
return (double)norm;
|
||||||
|
setIppErrorStatus();
|
||||||
|
}
|
||||||
|
if (ippFuncHint)
|
||||||
|
{
|
||||||
|
Ipp64f norm;
|
||||||
|
if( ippFuncHint(src1.data, (int)src1.step[0], src2.data, (int)src2.step[0], sz, &norm, ippAlgHintAccurate) >= 0 )
|
||||||
return (double)norm;
|
return (double)norm;
|
||||||
setIppErrorStatus();
|
setIppErrorStatus();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user