Value: size32_t nrf_edgeai_feature_##feature_name(input_type* p_input, \
feature_type* p_features, \
void* p_pipeline_ctx, \
void* p_argument_ctx)
size_t size32_t
Architecture 32-bit size_t type definition.
Definition nrf_edgeai_ctypes.h:31
void(* nrf_edgeai_feature_get_arg_cb_t)(nrf_edgeai_features_domain_t domain, uint8_t feature_id, uint8_t args_num, void *p_argument_ctx, void *p_output_arguments)
Callback for getting feature argument while feature extraction.
Definition nrf_edgeai_dsp_pipeline_types.h:238
Mask for all avaliable features for feature extraction.
Definition nrf_edgeai_dsp_pipeline_types.h:216
Macro to declare time-domain DSP feature extraction functions for various data types.
All declared functions have the following prototype:
size32_t nrf_edgeai_feature_<feature_name>(
<input_type>* p_input,
<feature_type>* p_features,
void* p_pipeline_ctx,
void* p_argument_ctx
);
where:
- <feature_name> : Name of the feature (e.g., mean_i8, std_f32, etc.)
- <input_type> : Input data type (int8_t, int16_t, flt32_t)
- <feature_type> : Output feature data type (int16_t, int32_t, flt32_t)
These functions extract one or more time-domain features from the input signal buffer, storing the results in the output feature buffer. The feature_mask parameter allows selective extraction of features. The pipeline context and argument callback provide additional configuration or arguments for feature extraction.
Parameters of the expanded function:
p_input Pointer to the input signal buffer.
num Number of input samples.
p_features Pointer to the output feature buffer.
feature_mask Mask specifying which features to extract.
p_pipeline_ctx Pointer to the pipeline context (may be NULL).
get_argument Callback to get feature-specific arguments (may be NULL).
p_argument_ctx Pointer to argument context for the callback (may be NULL).
- Return: Number of features extracted and written to p_features.
- Note
- Use NRF_EDGEAI_DECLARE_FEATURE_FUNCTION_I8, NRF_EDGEAI_DECLARE_FEATURE_FUNCTION_I16, or NRF_EDGEAI_DECLARE_FEATURE_FUNCTION_F32 to declare feature functions for int8, int16, or float32 input types, respectively.