/
tran_det.h
63 lines (49 loc) · 1.44 KB
/
tran_det.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
Transient detector prototypes
*/
#ifndef __TRAN_DET_H
#define __TRAN_DET_H
typedef struct
{
float *transients;
float *thresholds;
float tran_thr;
float split_thr;
int tran_fc;
int buffer_length;
int no_cols;
int no_rows;
int mode;
float prevLowBandEnergy;
float totalHighBandEnergy;
}
SBR_TRANSIENT_DETECTOR;
typedef SBR_TRANSIENT_DETECTOR *HANDLE_SBR_TRANSIENT_DETECTOR;
/*************/
/* Functions */
/*************/
void transientDetect (float **Energies,
HANDLE_SBR_TRANSIENT_DETECTOR h_sbrTransientDetector,
int *tran_vector,
int timeStep
);
int
CreateSbrTransientDetector (int chan,
HANDLE_SBR_TRANSIENT_DETECTOR h_sbrTransientDetector,
int sampleFreq,
int totalBitrate,
int codecBitrate,
int tran_thr,
int mode,
int tran_fc
);
void deleteSbrTransientDetector (HANDLE_SBR_TRANSIENT_DETECTOR h_sbrTransientDetector);
void
frameSplitter(float **Energies,
HANDLE_SBR_TRANSIENT_DETECTOR h_sbrTransientDetector,
unsigned char * freqBandTable,
int nSfb,
int timeStep,
int no_cols,
int *tran_vector);
#endif