Capsim Block Documentation
This star computes the LPC parameters of the input samples.
Port | Type | Name | |
---|---|---|---|
0 | float | x |
Num | Type | Name | Initial Value | Description |
---|---|---|---|---|
0 | int | n | ||
1 | int | numberOfOutputs | ||
2 | float* | x_P | ||
3 | FILE* | fp |
int i; int j; int nrot; float tmp1,tmp2; float a_A[21]; float rc_A[21]; float alpha; float* vector(); int result; float realAz,imgAz,Az; float theta,dtheta; |
---|
if(m > 20) { fprintf(stderr,"lpc: Order > 20 \n"); return(2); } numberOfOutputs=NO_OUTPUT_BUFFERS(); if(numberOfOutputs > 1) { fprintf(stderr,"lpc: Number of Outputs > 1 \n"); return(1); } /* * Initialize the tapped delay line to zero. * */ x_P=vector(N); for (i=0; i |
---|
while(IT_IN(0)) { n += 1 ; /* * Shift input sample into tapped delay line */ tmp2=x(0); for(i=0; i |
---|
/* * close the file */ if(strcmp(fileName,"stdout") != 0) fclose(fp); |
---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks) Copyright (C) 1989-2017 Silicon DSP Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.silicondsp.com Silicon DSP Corporation Las Vegas, Nevada */ |
---|
/* lpc.s */ /*********************************************************************** lpc() ************************************************************************ This star computes the LPC parameters of the input samples. The method is based on the routines of "Linear Prediction Analysis Programs (AUTO-COVAR)", by A. H. Gray and J.D. Markel in IEEE Press Programs for Digital Signal Processing. |
---|