Adelsbach/VSIPL
Core Light Programming Reference Guide
DD-00014-015
Core Light

11.1 vsip_dfir_create_p - Create a FIR Filter

typedef enum _vsip_symmetry { 
  VSIP_NONSYM            = 0, 
  VSIP_SYM_EVEN_LEN_ODD  = 1, 
  VSIP_SYM_EVEN_LEN_EVEN = 2 
} vsip_symmetry; 
 
typedef enum _vsip_obj_state { 
  VSIP_STATE_NO_SAVE = 1, 
  VSIP_STATE_SAVE    = 2 
} vsip_obj_state; 
 
typedef enum _vsip_alg_hint { 
  VSIP_ALG_TIME  = 0, 
  VSIP_ALG_SPACE = 1, 
  VSIP_ALG_NOISE = 2 
} vsip_alg_hint; 
 
vsip_fir_f *vsip_fir_create_f(const vsip_vview_f *kernel, vsip_symmetry symm, 
                              vsip_length n, vsip_length d, 
                              vsip_obj_state state, 
                              vsip_length ntimes, vsip_alg_hint hint); 
vsip_cfir_f *vsip_cfir_create_f(const vsip_cvview_f *kernel, vsip_symmetry symm, 
                                vsip_length n, vsip_length d, 
                                vsip_obj_state state, 
                                vsip_length ntimes, vsip_alg_hint hint);
Description

This function creates a FIR (Finite Impulse Response) filter with the specified kernel, symmetry, length, decimation factor, state, number of times to apply the filter, and algorithm hint.

Parameters
Return Value
Example

vsip_vview_f *kernel_view; 
vsip_symmetry symm = VSIP_NONSYM; 
vsip_length length = 10; 
vsip_length decimation = 1; 
vsip_obj_state state = VSIP_STATE_SAVE; 
vsip_length ntimes = 1; 
vsip_alg_hint hint = VSIP_ALG_TIME; 
vsip_fir_f *fir_filter; 
 
// Assuming kernel_view has been properly initialized 
fir_filter = vsip_fir_create_f(kernel_view, symm, length, decimation, state, ntimes, hint); 
 
if (fir_filter == NULL) { 
    // Handle error 
}