Implementation cost of the sample rate converter
src, a multistage sample rate converter with default values.
src combines three filter stages to convert from 192 kHz to 44.1 kHz. Determine its computational cost: the number of coefficients, the number of states, the number of multiplications per unit sample, and the number of additions per unit sample.
src = dsp.SampleRateConverter; cst = cost(src)
cst = struct with fields: NumCoefficients: 8631 NumStates: 138 MultiplicationsPerInputSample: 27.6672 AdditionsPerInputSample: 26.6875
Repeat the computation allowing a tolerance of 10% in the output sample rate.
src.OutputRateTolerance = 0.1; ctl = cost(src)
ctl = struct with fields: NumCoefficients: 44 NumStates: 80 MultiplicationsPerInputSample: 14.2500 AdditionsPerInputSample: 13.5000
c— Output structure
Output structure with information about the computational cost of
Number of filter coefficients (excluding coefficients with values 0, 1 or −1)
Number of filter states
Number of multiplication operations performed for each input sample
Number of addition operations performed for each input sample