1mlib_SignalCrossCorrel_S16(m3eMdLiIaBL)ib Library Funmcltiibo_nSsignalCrossCorrel_S16(3MLIB)
2
3
4

NAME

6       mlib_SignalCrossCorrel_S16,  mlib_SignalCrossCorrel_S16S,  mlib_Signal‐
7       CrossCorrel_F32, mlib_SignalCrossCorrel_F32S - signal cross correlation
8

SYNOPSIS

10       cc [ flag... ] file... -lmlib [ library... ]
11       #include <mlib.h>
12
13       mlib_status mlib_SignalCrossCorrel_S16(mlib_d64 *correl,
14            const mlib_s16 *src1, const mlib_s16 *src2, mlib_s32 n);
15
16
17       mlib_status mlib_SignalCrossCorrel_S16S(mlib_d64 *correl,
18            const mlib_s16 *src1, const mlib_s16 *src2, mlib_s32 n);
19
20
21       mlib_status mlib_SignalCrossCorrel_F32(mlib_d64 *correl,
22            const mlib_f32 *src1, const mlib_f32 *src2, mlib_s32 n);
23
24
25       mlib_status mlib_SignalCrossCorrel_F32S(mlib_d64 *correl,
26            const mlib_f32 *src1, const mlib_f32 *src2, mlib_s32 n);
27
28

DESCRIPTION

30       Each of these functions performs cross correlation.
31
32
33       For monaural signals, the following equation is used:
34
35                      1    n-1
36         correl[0] = --- * SUM (src1[i] * src2[i])
37                      n    i=0
38
39
40
41       For stereo signals, the following equation is used:
42
43                      1    n-1
44         correl[0] = --- * SUM (src1[2*i] * src2[2*i])
45                      n    i=0
46
47                      1    n-1
48         correl[1] = --- * SUM (src1[2*i + 1] * src2[2*i + 1])
49                      n    i=0
50
51

PARAMETERS

53       Each of the functions takes the following arguments:
54
55       correl    Pointer to the cross correlation array. In  the  stereo  ver‐
56                 sion,  correl[0] contains the cross correlation of channel 0,
57                 and correl[1] contains the cross correlation of channel 1.
58
59
60       src1      First source signal array.
61
62
63       src2      Second source signal array.
64
65
66       n         Number of samples in the source signal arrays.
67
68

RETURN VALUES

70       Each of the functions returns MLIB_SUCCESS if successful. Otherwise  it
71       returns MLIB_FAILURE.
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │Committed                    │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │MT-Level                     │MT-Safe                      │
85       └─────────────────────────────┴─────────────────────────────┘
86

SEE ALSO

88       mlib_SignalAutoCorrel_S16(3MLIB), attributes(5)
89
90
91
92SunOS 5.11                        2 Mar 2007 mlib_SignalCrossCorrel_S16(3MLIB)
Impressum