Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches

◆ nrf_axon_fir_2d_16_16_24_decimate()

nrf_axon_result_e nrf_axon_fir_2d_16_16_24_decimate ( const int16_t * input_ptr,
const int16_t * filter_ptr,
int32_t * out_ptr,
uint16_t input_height,
uint16_t filter_height,
uint16_t decimate_width,
uint8_t rounding_bits,
nrf_axon_syncmode_blocking_e block_mode,
bool keep_reservation )

"FIR" => "Finite Impulse Response" filter with decimation multiple. Filter coefficients are MAC'd with the input. Input elements are multiplied with filter elements in the same order. in the order. ie, for filter length F, output x[n] = input[n]*filter[0] + input[n+1]*filter[F+1]+...input[n+F-1]*filter[F-1]. After each output is generated, the input skips ahead by decimate_width. The filter output starts at out_ptr[0].

This implementation uses a 2D strategy for optimized performance. Therefore, the input and filter dimensions are described in length = height * width, where width is also the decimation factor. Use axon_fir_2d_16_16_32_decimate() if the input and filter dimensions cannot be described with height * width and/or decimation factor = 1.

Input is int16, filter is int16, and output is int24, sign extended to int32.

Parameters
input_ptrpointer to the input, 16bit integer.
filter_ptrpointer to the filter coefficients, 16bit integer.
out_ptrpointer to the output, saturated to int24, sign-extended to int32. 1st valid output starts at offset 0. Output can overlap/overwrite input.
input_heightheight of the input shape (in elements). Minimum 4, maximum 256, input_height * decimation_width <= 512 input_height >= filter_height.
filter_heightheight of the filter shape (in elements). Minimum 2, maximum 16, input_height * decimation_width <= 512 input_height >= filter_height.
decimation_widthcombined decimation factor and input/filter width. minimum 2, maximum 16.
rounding_bitsnumber of bits to round the output by.
block_moderecommnended to be set to NRF_AXON_SYNC_MODE_BLOCKING_POLLING.
keep_reservationset to true if there are subsequent axon operations to execute immediately on completion. true prevents axon from be taken by another user and/or being powered off. Set to false if axon will not be used immediately after to free axon for other users and/or power down if idle.
Returns
kAxonResultSuccess on success or a negative error code (see nrf_axon_result_e)