Asterisk - The Open Source Telephony Project
18.5.0
|
SpanDSP - a series of DSP components for telephony. More...
Go to the source code of this file.
Data Structures | |
struct | plc_state_t |
Macros | |
#define | CORRELATION_SPAN 160 |
#define | PLC_HISTORY_LEN (CORRELATION_SPAN + PLC_PITCH_MIN) |
#define | PLC_PITCH_MAX 40 |
#define | PLC_PITCH_MIN 120 |
#define | PLC_PITCH_OVERLAP_MAX (PLC_PITCH_MIN >> 2) |
Functions | |
int | plc_fillin (plc_state_t *s, int16_t amp[], int len) |
Fill-in a block of missing audio samples. More... | |
plc_state_t * | plc_init (plc_state_t *s) |
Process a block of received V.29 modem audio samples. More... | |
int | plc_rx (plc_state_t *s, int16_t amp[], int len) |
Process a block of received audio samples. More... | |
SpanDSP - a series of DSP components for telephony.
Copyright (C) 2004 Steve Underwood
All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This version may be optionally licenced under the GNU LGPL licence.
A license has been granted to Digium (via disclaimer) for the use of this code.
Definition in file plc.h.
#define CORRELATION_SPAN 160 |
The length over which the AMDF function looks for similarity (20 ms)
Definition at line 99 of file plc.h.
Referenced by plc_fillin().
#define PLC_HISTORY_LEN (CORRELATION_SPAN + PLC_PITCH_MIN) |
History buffer length. The buffer much also be at leat 1.25 times PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for the pitch assessment.
Definition at line 103 of file plc.h.
Referenced by normalise_history(), plc_fillin(), and save_history().
#define PLC_PITCH_MAX 40 |
#define PLC_PITCH_MIN 120 |
#define PLC_PITCH_OVERLAP_MAX (PLC_PITCH_MIN >> 2) |
int plc_fillin | ( | plc_state_t * | s, |
int16_t | amp[], | ||
int | len | ||
) |
Fill-in a block of missing audio samples.
Fill-in a block of missing audio samples.
s | The packet loss concealer context. |
amp | The audio sample buffer. |
len | The number of samples to be synthesised. |
Definition at line 175 of file plc.c.
References amdf_pitch(), ATTENUATION_INCREMENT, CORRELATION_SPAN, fsaturate(), plc_state_t::history, len(), plc_state_t::missing_samples, normalise_history(), plc_state_t::pitch, plc_state_t::pitch_offset, plc_state_t::pitchbuf, PLC_HISTORY_LEN, PLC_PITCH_MAX, PLC_PITCH_MIN, and save_history().
Referenced by adjust_frame_for_plc().
plc_state_t* plc_init | ( | plc_state_t * | s | ) |
Process a block of received V.29 modem audio samples.
Process a block of received V.29 modem audio samples.
s | The packet loss concealer context. |
int plc_rx | ( | plc_state_t * | s, |
int16_t | amp[], | ||
int | len | ||
) |
Process a block of received audio samples.
Process a block of received audio samples.
s | The packet loss concealer context. |
amp | The audio sample buffer. |
len | The number of samples in the buffer. |
Definition at line 132 of file plc.c.
References ATTENUATION_INCREMENT, fsaturate(), len(), plc_state_t::missing_samples, plc_state_t::pitch, plc_state_t::pitch_offset, plc_state_t::pitchbuf, and save_history().
Referenced by adjust_frame_for_plc().