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  * $Id: echo.h,v 1.1 2009/09/22 13:11:04 steveu Exp $
00028  */
00029 
00030 /*! \file */
00031 
00032 #if !defined(_SPANDSP_PRIVATE_ECHO_H_)
00033 #define _SPANDSP_PRIVATE_ECHO_H_
00034 
00035 /*!
00036     G.168 echo canceller descriptor. This defines the working state for a line
00037     echo canceller.
00038 */
00039 struct echo_can_state_s
00040 {
00041     int tx_power[4];
00042     int rx_power[3];
00043     int clean_rx_power;
00044 
00045     int rx_power_threshold;
00046     int nonupdate_dwell;
00047 
00048     int curr_pos;
00049         
00050     int taps;
00051     int tap_mask;
00052     int adaption_mode;
00053     
00054     int32_t supp_test1;
00055     int32_t supp_test2;
00056     int32_t supp1;
00057     int32_t supp2;
00058     int vad;
00059     int cng;
00060 
00061     int16_t geigel_max;
00062     int geigel_lag;
00063     int dtd_onset;
00064     int tap_set;
00065     int tap_rotate_counter;
00066 
00067     int32_t latest_correction;  /* Indication of the magnitude of the latest
00068                                    adaption, or a code to indicate why adaption
00069                                    was skipped, for test purposes */
00070     int32_t last_acf[28];
00071     int narrowband_count;
00072     int narrowband_score;
00073 
00074     fir16_state_t fir_state;
00075     /*! Echo FIR taps (16 bit version) */
00076     int16_t *fir_taps16[4];
00077     /*! Echo FIR taps (32 bit version) */
00078     int32_t *fir_taps32;
00079 
00080     /* DC and near DC blocking filter states */
00081     int32_t tx_hpf[2];
00082     int32_t rx_hpf[2];
00083    
00084     /* Parameters for the optional Hoth noise generator */
00085     int cng_level;
00086     int cng_rndnum;
00087     int cng_filter;
00088     
00089     /* Snapshot sample of coeffs used for development */
00090     int16_t *snapshot;       
00091 };
00092 
00093 #endif
00094 /*- End of file ------------------------------------------------------------*/

Generated on Mon Jan 3 02:31:15 2011 for spandsp by  doxygen 1.4.7