mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-30 07:41:39 +00:00 
			
		
		
		
	This patch includes the iLBC source code for distribution with Asterisk. Clarification regarding the iLBC source code was provided by Google, and the appropriate licenses have been included in the codecs/ilbc folder. Review: https://reviewboard.asterisk.org/r/1675 Review: https://reviewboard.asterisk.org/r/1649 (closes issue: ASTERISK-18943) Reporter: Leif Madsen Tested by: Matt Jordan ........ Merged revisions 351450 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351451 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| 
 | |
|    /******************************************************************
 | |
| 
 | |
|        iLBC Speech Coder ANSI-C Source Code
 | |
| 
 | |
|        hpOutput.c
 | |
| 
 | |
|        Copyright (C) The Internet Society (2004).
 | |
|        All Rights Reserved.
 | |
| 
 | |
|    ******************************************************************/
 | |
| 
 | |
|    #include "constants.h"
 | |
| 
 | |
|    /*----------------------------------------------------------------*
 | |
|     *  Output high-pass filter
 | |
|     *---------------------------------------------------------------*/
 | |
| 
 | |
|    void hpOutput(
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|        float *In,  /* (i) vector to filter */
 | |
|        int len,/* (i) length of vector to filter */
 | |
|        float *Out, /* (o) the resulting filtered vector */
 | |
|        float *mem  /* (i/o) the filter state */
 | |
|    ){
 | |
|        int i;
 | |
|        float *pi, *po;
 | |
| 
 | |
|        /* all-zero section*/
 | |
| 
 | |
|        pi = &In[0];
 | |
|        po = &Out[0];
 | |
|        for (i=0; i<len; i++) {
 | |
|            *po = hpo_zero_coefsTbl[0] * (*pi);
 | |
|            *po += hpo_zero_coefsTbl[1] * mem[0];
 | |
|            *po += hpo_zero_coefsTbl[2] * mem[1];
 | |
| 
 | |
|            mem[1] = mem[0];
 | |
|            mem[0] = *pi;
 | |
|            po++;
 | |
|            pi++;
 | |
| 
 | |
|        }
 | |
| 
 | |
|        /* all-pole section*/
 | |
| 
 | |
|        po = &Out[0];
 | |
|        for (i=0; i<len; i++) {
 | |
|            *po -= hpo_pole_coefsTbl[1] * mem[2];
 | |
|            *po -= hpo_pole_coefsTbl[2] * mem[3];
 | |
| 
 | |
|            mem[3] = mem[2];
 | |
|            mem[2] = *po;
 | |
|            po++;
 | |
|        }
 | |
|    }
 | |
| 
 |