private/echo.h

Go to the documentation of this file.
00001 /*
00002  * SpanDSP - a series of DSP components for telephony
00003  *
00004  * private/echo.h - An echo cancellor, suitable for electrical and acoustic
00005  *                      cancellation. This code does not currently comply with
00006  *                      any relevant standards (e.g. G.164/5/7/8).
00007  *
00008  * Written by Steve Underwood <steveu@coppice.org>
00009  *
00010  * Copyright (C) 2001 Steve Underwood
00011  *
00012  * All rights reserved.
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License version 2.1,
00016  * as published by the Free Software Foundation.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU Lesser General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public
00024  * License along with this program; if not, write to the Free Software
00025  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00026  */
00027 
00028 /*! \file */
00029 
00030 #if !defined(_SPANDSP_PRIVATE_ECHO_H_)
00031 #define _SPANDSP_PRIVATE_ECHO_H_
00032 
00033 /*!
00034     G.168 echo canceller descriptor. This defines the working state for a line
00035     echo canceller.
00036 */
00037 struct echo_can_state_s
00038 {
00039     int tx_power[4];
00040     int rx_power[3];
00041     int clean_rx_power;
00042 
00043     int rx_power_threshold;
00044     int nonupdate_dwell;
00045 
00046     int curr_pos;
00047         
00048     int taps;
00049     int tap_mask;
00050     int adaption_mode;
00051     
00052     int32_t supp_test1;
00053     int32_t supp_test2;
00054     int32_t supp1;
00055     int32_t supp2;
00056     int vad;
00057     int cng;
00058 
00059     int16_t geigel_max;
00060     int geigel_lag;
00061     int dtd_onset;
00062     int tap_set;
00063     int tap_rotate_counter;
00064 
00065     int32_t latest_correction;  /* Indication of the magnitude of the latest
00066                                    adaption, or a code to indicate why adaption
00067                                    was skipped, for test purposes */
00068     int32_t last_acf[28];
00069     int narrowband_count;
00070     int narrowband_score;
00071 
00072     fir16_state_t fir_state;
00073     /*! Echo FIR taps (16 bit version) */
00074     int16_t *fir_taps16[4];
00075     /*! Echo FIR taps (32 bit version) */
00076     int32_t *fir_taps32;
00077 
00078     /* DC and near DC blocking filter states */
00079     int32_t tx_hpf[2];
00080     int32_t rx_hpf[2];
00081    
00082     /* Parameters for the optional Hoth noise generator */
00083     int cng_level;
00084     int cng_rndnum;
00085     int cng_filter;
00086     
00087     /* Snapshot sample of coeffs used for development */
00088     int16_t *snapshot;       
00089 };
00090 
00091 #endif
00092 /*- End of file ------------------------------------------------------------*/

Generated on Thu Oct 18 15:29:14 2012 for spandsp by  doxygen 1.4.7