1mlib_SignalUpSample_S16_S16m(e3dMiLaILBi)b Library Fumnlcitbi_oSnisgnalUpSample_S16_S16(3MLIB)
2
3
4

NAME

6       mlib_SignalUpSample_S16_S16,  mlib_SignalUpSample_S16S_S16S,  mlib_Sig‐
7       nalUpSample_F32_F32, mlib_SignalUpSample_F32S_F32S - signal upsampling
8

SYNOPSIS

10       cc [ flag... ] file... -lmlib [ library... ]
11       #include <mlib.h>
12
13       mlib_status mlib_SignalUpSample_S16_S16(mlib_s16 *dst,
14            const mlib_s16 *src, mlib_s32 factor, mlib_s32 phase,
15            mlib_s32 n);
16
17
18       mlib_status mlib_SignalUpSample_S16S_S16S(mlib_s16 *dst,
19            const mlib_s16 *src, mlib_s32 factor, mlib_s32 phase,
20            mlib_s32 n);
21
22
23       mlib_status mlib_SignalUpSample_F32_F32(mlib_f32 *dst,
24            const mlib_f32 *src, mlib_s32 factor, mlib_s32 phase,
25            mlib_s32 n);
26
27
28       mlib_status mlib_SignalUpSample_F32S_F32S(mlib_f32 *dst,
29            const mlib_f32 *src, mlib_s32 factor, mlib_s32 phase,
30            mlib_s32 n);
31
32

DESCRIPTION

34       Each of these functions performs upsampling.
35
36
37       For monaural signals, the following equation is used:
38
39         dst[i] = src[k]  if i == k*factor + phase
40         dst[i] = 0       if i != k*factor + phase
41
42
43
44       where k = 0, 1, ..., (n - 1); i = 0, 1, ..., (n*factor - 1).
45
46
47       For stereo signals, the following equation is used:
48
49         dst[2*i]     = src[2*k]      if i == k*factor + phase
50         dst[2*i]     = 0             if i != k*factor + phase
51
52         dst[2*i + 1] = src[2*k + 1]  if i == k*factor + phase
53         dst[2*i + 1] = 0             if i != k*factor + phase
54
55
56
57       where k = 0, 1, ..., (n - 1); i = 0, 1, ..., (n*factor - 1).
58

PARAMETERS

60       Each of the functions takes the following arguments:
61
62       dst       Output signal array.
63
64
65       src       Input signal array.
66
67
68       factor    Factor by which to upsample. factor ≥ 1.
69
70
71       phase     Parameter that  determines  relative  position  of  an  input
72                 value, within the output signal. 0 ≤ phase < factor.
73
74
75       n         Number of samples in the input signal array.
76
77

RETURN VALUES

79       Each  of the functions returns MLIB_SUCCESS if successful. Otherwise it
80       returns MLIB_FAILURE.
81

ATTRIBUTES

83       See attributes(5) for descriptions of the following attributes:
84
85
86
87
88       ┌─────────────────────────────┬─────────────────────────────┐
89       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
90       ├─────────────────────────────┼─────────────────────────────┤
91       │Interface Stability          │Committed                    │
92       ├─────────────────────────────┼─────────────────────────────┤
93       │MT-Level                     │MT-Safe                      │
94       └─────────────────────────────┴─────────────────────────────┘
95

SEE ALSO

97       mlib_SignalDownSample_S16_S16(3MLIB), attributes(5)
98
99
100
101SunOS 5.11                        2 Mar 2007mlib_SignalUpSample_S16_S16(3MLIB)
Impressum