comparison spandsp-0.0.6pre17/src/spandsp/private/echo.h @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 /*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/echo.h - An echo cancellor, suitable for electrical and acoustic
5 * cancellation. This code does not currently comply with
6 * any relevant standards (e.g. G.164/5/7/8).
7 *
8 * Written by Steve Underwood <steveu@coppice.org>
9 *
10 * Copyright (C) 2001 Steve Underwood
11 *
12 * All rights reserved.
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 2.1,
16 * as published by the Free Software Foundation.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 * $Id: echo.h,v 1.1 2009/09/22 13:11:04 steveu Exp $
28 */
29
30 /*! \file */
31
32 #if !defined(_SPANDSP_PRIVATE_ECHO_H_)
33 #define _SPANDSP_PRIVATE_ECHO_H_
34
35 /*!
36 G.168 echo canceller descriptor. This defines the working state for a line
37 echo canceller.
38 */
39 struct echo_can_state_s
40 {
41 int tx_power[4];
42 int rx_power[3];
43 int clean_rx_power;
44
45 int rx_power_threshold;
46 int nonupdate_dwell;
47
48 int curr_pos;
49
50 int taps;
51 int tap_mask;
52 int adaption_mode;
53
54 int32_t supp_test1;
55 int32_t supp_test2;
56 int32_t supp1;
57 int32_t supp2;
58 int vad;
59 int cng;
60
61 int16_t geigel_max;
62 int geigel_lag;
63 int dtd_onset;
64 int tap_set;
65 int tap_rotate_counter;
66
67 int32_t latest_correction; /* Indication of the magnitude of the latest
68 adaption, or a code to indicate why adaption
69 was skipped, for test purposes */
70 int32_t last_acf[28];
71 int narrowband_count;
72 int narrowband_score;
73
74 fir16_state_t fir_state;
75 /*! Echo FIR taps (16 bit version) */
76 int16_t *fir_taps16[4];
77 /*! Echo FIR taps (32 bit version) */
78 int32_t *fir_taps32;
79
80 /* DC and near DC blocking filter states */
81 int32_t tx_hpf[2];
82 int32_t rx_hpf[2];
83
84 /* Parameters for the optional Hoth noise generator */
85 int cng_level;
86 int cng_rndnum;
87 int cng_filter;
88
89 /* Snapshot sample of coeffs used for development */
90 int16_t *snapshot;
91 };
92
93 #endif
94 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.