AN2384 Freescale Semiconductor / Motorola, AN2384 Datasheet - Page 20

no-image

AN2384

Manufacturer Part Number
AN2384
Description
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Functional Interface
5
The DTMF detector consists of two C-callable functions,
and fsl_dtmf_det() for running the DTMF detector process.
5.1 fsl_dtmf_det_init
The fsl_dtmf_det_init function is called when a voice channel is opened to initialize all channel-
dependent data. The interface is provided as:
5.2 fsl_dtmf_det
The fsl_dtmf_det function is called for per channel DTMF detection with the following interface, and it
returns the number of keys contained in the detected_keys vector:
5.3 Code Size and Performance
No reference input files exist, so files from Mitel tests are used to determine how many millions of cycles per
second (MCPS) the program requires per channel. Table 6 shows the results obtained with the hand-optimized
assembly code.
20
Functional Interface
void fsl_dtmf_det_init (DTMF_detector_data *dtmf_det_chan)
INT8 fsl_dtmf_det (FRACTION16 *samples, INT8 *detected_keys, DTMF_detector_data
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core, Rev. 1
Code
Key
DTMF_detector_data is an 8-byte aligned channel-dependent data structure.
*dtmf_det_chan is a pointer to the channel-dependent data.
FRACTION16 is a data type for an 8-byte aligned 16-bit signed fraction.
DTMF_detector_data is an 8-byte aligned channel-dependent data structure.
INT16 is a data type for a 16-bit signed integer.
*samples is a pointer to the linear data input.
*detected_keys is a pointer to the output where keys are coded according to the following table.
*dtmf_det_chan is a pointer to the channel-dependent data.
buffer_size is the number of samples to be processed in the input buffer.
*dtmf_det_chan, INT16 buffer_size);
Mitel Test 1
Mitel Test 2
Mitel Test 3
Mitel Test 4
Input File
1
1
2
2
3
3
5
4
Table 6. Assembly Code Results
Minimum MCPS
6
5
0.1540
0.1540
0.1540
0.1540
7
6
9
7
fsl_dtmf_det_init
10
8
Average MCPS
11
9
0.3409
0.1914
0.1775
0.2066
14
0
13
*
() for DTMF detector initialization
15
#
4
Maximum MCPS
A
0.3755
0.3945
0.4385
0.4310
8
B
Freescale Semiconductor
12
C
16
D

Related parts for AN2384