comparison dsp/segmentation/cluster_segmenter.h @ 505:930b5b0f707d

Merge branch 'codestyle-and-tidy'
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 05 Jun 2019 12:55:15 +0100
parents 701233f8ed41
children
comparison
equal deleted inserted replaced
471:e3335cb213da 505:930b5b0f707d
1 #ifndef _CLUSTER_SEGMENTER_H 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 #define _CLUSTER_SEGMENTER_H
3
4 /* 2 /*
5 * cluster_segmenter.h 3 * cluster_segmenter.h
6 * soundbite 4 * soundbite
7 * 5 *
8 * Created by Mark Levy on 06/04/2006. 6 * Created by Mark Levy on 06/04/2006.
14 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
16 * 14 *
17 */ 15 */
18 16
17 #ifndef QM_DSP_CLUSTER_SEGMENTER_H
18 #define QM_DSP_CLUSTER_SEGMENTER_H
19
19 #include <stdio.h> 20 #include <stdio.h>
20 #include <stdlib.h> 21 #include <stdlib.h>
21 #include <math.h> 22 #include <math.h>
22 #include <float.h> 23 #include <float.h>
23 24
28 29
29 #ifdef __cplusplus 30 #ifdef __cplusplus
30 extern "C" { 31 extern "C" {
31 #endif 32 #endif
32 33
33 /* applies MPEG-7 normalisation to constant-Q features, storing normalised envelope (norm) in last feature dimension */ 34 /* applies MPEG-7 normalisation to constant-Q features,
35 storing normalised envelope (norm) in last feature dimension */
34 void mpeg7_constq(double** features, int nframes, int ncoeff); 36 void mpeg7_constq(double** features, int nframes, int ncoeff);
35 37
36 /* converts constant-Q features to normalised chroma */ 38 /* converts constant-Q features to normalised chroma */
37 void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma); 39 void cq2chroma(double** cq, int nframes, int ncoeff, int bins, double** chroma);
38 40
39 void create_histograms(int* x, int nx, int m, int hlen, double* h); 41 void create_histograms(int* x, int nx, int m, int hlen, double* h);
40 42
41 void cluster_segment(int* q, double** features, int frames_read, int feature_length, int nHMM_states, 43 void cluster_segment(int* q, double** features, int frames_read,
42 int histogram_length, int nclusters, int neighbour_limit); 44 int feature_length, int nHMM_states,
45 int histogram_length, int nclusters,
46 int neighbour_limit);
43 47
44 void constq_segment(int* q, double** features, int frames_read, int bins, int ncoeff, int feature_type, 48 void constq_segment(int* q, double** features, int frames_read,
45 int nHMM_states, int histogram_length, int nclusters, int neighbour_limit); 49 int bins, int ncoeff, int feature_type,
50 int nHMM_states, int histogram_length,
51 int nclusters, int neighbour_limit);
46 52
47 #ifdef __cplusplus 53 #ifdef __cplusplus
48 } 54 }
49 #endif 55 #endif
50 56