Enumeration Types
The constant HmppResult enumerates the status values returned by HMPP functions, indicating whether an error occurs in the operation.
For details about the valid status values and error information of signal processing functions, see Return Values.
- The enumeration type HmppAlgMode defines the algorithm types used by some functions:
typedef enum { HMPP_ALG_AUTO, // Automatic algorithm selection based on the data scale. HMPP_ALG_DEFAULT, // Direct calculation based on definition. HMPP_ALG_FFT, // Use FFT to accelerate computing. } HmppAlgMode;
- The enumeration type HmppNormMode defines the algorithm types used by some functions:
typedef enum { HMPP_NORM_NORMAL, HMPP_NORM_BIASED, HMPP_NORM_UNBIASED, } HmppNormMode;
- The enumeration type HmppCmpOp defines the relational operator types in the threshold function:
typedef enum { HMPP_CMP_LESS, // When src[i] < level, assign the value of level to dst[i]. Otherwise, assign the value of src[i] to dst[i]. HMPP_CMP_GREATER // When src[i] > level, assign the value of level to dst[i]. Otherwise, assign the value of src[i] to dst[i]. } HmppCmpOp;
- The enumeration type HmppRoundMode defines the rounding modes used in the conversion function:
typedef enum { HMPP_RND_ZERO, // Round to zero. A floating-point input number is forcibly converted to integer output. HMPP_RND_NEAR, // Round to the nearest even number (banker's rounding). HMPP_RND_FINANCIAL // Round off. } HmppRoundMode;
- The enumeration type HmppHintAlgorithm defines the calculation methods used in some functions. For example, the calculation is fast but the accuracy is low, or the calculation is slow while the accuracy is ensured:
typedef enum { HMPP_ALGHINT_NONE, // Same as HmppAlgHintAccurate. The accuracy is ensured, but the calculation speed is slow. HMPP_ALGHINT_FAST, // Fast but less accurate calculation HMPP_ALGHINT_ACCURATE // Accurate but slow calculation } HmppHintAlgorithm;
- The enumeration type HmppZCType defines the calculation method types used in the function for computing the number of times of zero crossing:
typedef enum { HMPP_ZCR, HMPP_ZCX_OR, HMPP_ZCC } HmppZCType;
- The enumeration type HmppiBorderType defines the border types for border making:
typedef enum { HMPPI_BORDER_REPL = 1, HMPPI_BORDER_WRAP = 2, HMPPI_BORDER_MIRROR = 3, HMPPI_BORDER_MIRROR_R = 4, HMPPI_BORDER_DEFAULT = 5, HMPPI_BORDER_CONST = 6, HMPPI_BORDER_TRANSP = 7, HMPPI_BORDER_IN_MEM_TOP = 0x0010, HMPPI_BORDER_IN_MEM_BOTTOM = 0x0020, HMPPI_BORDER_IN_MEM_LEFT = 0x0040, HMPPI_BORDER_IN_MEM_RIGHT = 0x0080, HMPPI_BORDER_IN_MEM = HMPPI_BORDER_IN_MEM_LEFT | HMPPI_BORDER_IN_MEM_TOP | \ HMPPI_BORDER_IN_MEM_RIGHT | HMPPI_BORDER_IN_MEM_BOTTOM, // 0xF0 } HmppiBorderType;The border types for border making are described as follows:
- HMPP_BORDER_CONST:
The values for border pixels are set to a specified constant value. When a constant border is used, the values of all border pixels are set to the constant value you specify for parameter borderValue. In the figure below, the constant value is demoted as V. The squares marked in red correspond to the pixels copied from the source image ROI.

- HMPP_BORDER_DEFAULT:
Uses the HMPP_BORDER_CONST border type. The borderValue is set according to the selected basic operation (dilation or erosion). For example, borderValue in the dilation function interface is set to MIN_VALUE (minimum value of the source image's data type); and borderValue in the erosion function interface is set to MAX_VALUE (maximum value of the source image's data type). In the figure below, m indicates the fixed value of the source image's data type.

- HMPP_BORDER_REPL:
The values for border pixels are copied from the boundary pixels of the source image. When a copied border is used, the values of all border pixels are obtained from the source image's boundary pixels.

- HMPP_BORDER_IN_MEM:
The values for border pixels are obtained from the source image pixels in memory. Use this border type if the ROI does not cover the internal border pixels of the source image. In this case, the values for border pixels are obtained from the source image pixels in memory. In the figure below, squares marked in red correspond to the pixels copied from the source image ROI, and squares with black values correspond to source image pixels in memory.

- HMPP_BORDER_MIRROR:
Mirrored border. When a mirrored border is used, values for border pixels are obtained from the source image's boundary pixels. The squares marked in red correspond to the pixels copied from the source image ROI. Squares with green values correspond to border pixels that are mirrored from source image pixels.

- HMPP_BORDER_CONST:
- The enumeration type HmppAmrnbMode defines the encoding rates of the AMRNB standard.
typedef enum { HMPP_AMRNB_MR475, // 4.75 kbit/s bit rate HMPP_AMRNB_MR515, // 5.15 kbit/s bit rate HMPP_AMRNB_MR59, // 5.9 kbit/s bit rate HMPP_AMRNB_MR67, // 6.7 kbit/s bit rate HMPP_AMRNB_MR74, // 7.4 kbit/s bit rate HMPP_AMRNB_MR795, // 7.95 kbit/s bit rate HMPP_AMRNB_MR102, // 10.2 kbit/s bit rate HMPP_AMRNB_MR122 // 12.2 kbit/s bit rate } HmppAmrnbMode; - The enumeration type HmppAmrwbMode defines the encoding rates of the AMRWB standard.
typedef enum { HMPP_AMRWB_6600, // 6.6 kbit/s bit rate HMPP_AMRWB_8850, // 8.85 kbit/s bit rate HMPP_AMRWB_12650, // 12.65 kbit/s bit rate HMPP_AMRWB_14250, // 14.25 kbit/s bit rate HMPP_AMRWB_15850, // 15.85 kbit/s bit rate HMPP_AMRWB_18250, // 18.25 kbit/s bit rate HMPP_AMRWB_19850, // 19.85 kbit/s bit rate HMPP_AMRWB_23050, // 23.05 kbit/s bit rate HMPP_AMRWB_23850, // 23.85 kbit/s bit rate } HmppAmrwbMode;