NS API Functions#

group ns_func

Functions

void ns_init(ns_state_t *ns)#

Initialise the NS.

This function initialises the NS state with the provided configuration. It must be called at startup to initialise the NS before processing any frames, and can be called at any time after that to reset the NS instance, returning the internal NS state to its defaults.

Example

ns_state_t ns;
ns_init(&ns);

Parameters:
  • ns[out] NS state structure

void ns_process_frame(ns_state_t *ns, int32_t output[NS_FRAME_ADVANCE], const int32_t input[NS_FRAME_ADVANCE])#

Perform NS processing on a frame of input data.

This function updates the NS’s internal state based on the input 1.31 frame, and returns an output 1.31 frame containing the result of the NS algorithm applied to the input.

The input and output pointers can be equal to perform the processing in-place.

Example

int32_t input[NS_FRAME_ADVANCE];
int32_t output[NS_FRAME_ADVANCE];
ns_state_t ns;
ns_init(&ns);
ns_process_frame(&ns, output, input);

Parameters:
  • ns[inout] NS state structure

  • output[out] Array to return the resulting frame of data

  • input[in] Array of frame data on which to perform the NS