Visible to Intel only — GUID: GUID-642D9177-64E7-46D7-9446-023AF71C0B4D
Visible to Intel only — GUID: GUID-642D9177-64E7-46D7-9446-023AF71C0B4D
Appendix A: Handling of Special Cases
Some mathematical functions implemented in Intel IPP are not defined for all possible argument values. This appendix describes how the corresponding Intel IPP image processing functions handle situations when their input arguments fall outside the range of function definition or may lead to ambiguously determined output results.
Table Special Cases for Intel IPP Image Processing Functions below summarizes these special cases for different functions and lists result values together with status codes returned by the functions. The status codes ending with Err (except for the ippStsNoErr status) indicate an error. When an error occurs, the function execution is interrupted. All other status codes indicate that the input argument is outside the range, but the function execution is continued with the corresponding result value.
Function Base Name |
Data Type |
Case Description |
Result Value |
Status Code |
---|---|---|---|---|
16s 32f |
Sqrt (x <0) Sqrt (x <0) |
0 NAN_32F |
ippStsSqrtNegArg ippStsSqrtNegArg |
|
8u
16s
32f
16sc
32sc
32fc
|
Div (0/0) Div (x/0)
Div (0/0) Div (x/0), x>0 Div (x/0), x<0
Div (0/0) Div (x/0), x>0 Div (x/0), x<0 Div (0/0) Div (x/0),
Div (0/0) Div (x/0), x>0 Div (x/0), x<0
Div (0/0) Div (x/0), x>0 Div (x/0), x<0 |
0 IPP_MAX_8U
0 IPP_MAX_16S IPP_MIN_16S
NAN_32F INF_32F INF_NEG_32F 0 0
0 IPP_MAX_32S IPP_MIN_32S
NAN_32F INF_32F INF_NEG_32F |
ippStsDivByZero ippStsDivByZero
ippStsDivByZero ippStsDivByZero ippStsDivByZero
ippStsDivByZero ippStsDivByZero ippStsDivByZero ippStsDivByZero ippStsDivByZero
ippStsDivByZero ippStsDivByZero ippStsDivByZero |
|
all |
Div(x/const), const=0 |
- |
ippStsDivByZeroErr |
|
8u
16s
32f
|
Ln (0)
Ln (0) Ln (x<0)
Ln (x<0) Ln(x<IPP_MINABS_32F) |
0
IPP_MIN_16S IPP_MIN_16S
NAN_32F INF_NEG_32F |
ippStsLnZeroArg
ippStsLnZeroArg ippStsLnNegArg
ippStsLnNegArg ippStsLnZeroArg |
|
8u
16s
32f |
overflow
overflow
overflow |
IPP_MAX_8U
IPP_MAX_16S
INF_32F |
ippStsNoErr
ippStsNoErr
ippStsNoErr |
Here x denotes an input value. For the definition of the constants used, see Image Data Types and Ranges in Intel® Integrated Performance Primitives Concepts.
Note that flavors of the same math function operating on different data types may produce diferent results for the equal argument values. However, for a given function and a fixed data type, handling of special cases is the same for all function flavors that have different descriptors in their names. For example, logarithm function ippiLn operating on 16s data treats zero argument values in the same way for all its flavors ippiLn_16s_C1RSfs, ippiLn_16s_C3RSfs, ippiLn_16s_C1IRSfs, and ippiLn_16s_C3IRSfs.