1mlib_VectorAve_U8_U8(3MLIB)mediaLib Library Functionsmlib_VectorAve_U8_U8(3MLIB)
2
3
4
6 mlib_VectorAve_U8_U8, mlib_VectorAve_U8C_U8C, mlib_VectorAve_S8_S8,
7 mlib_VectorAve_S8C_S8C, mlib_VectorAve_S16_U8, mlib_VectorAve_S16_S8,
8 mlib_VectorAve_S16_S16, mlib_VectorAve_S16C_U8C, mlib_Vec‐
9 torAve_S16C_S8C, mlib_VectorAve_S16C_S16C, mlib_VectorAve_S32_S16,
10 mlib_VectorAve_S32_S32, mlib_VectorAve_S32C_S16C, mlib_Vec‐
11 torAve_S32C_S32C - vector average
12
14 cc [ flag... ] file... -lmlib [ library... ]
15 #include <mlib.h>
16
17 mlib_status mlib_VectorAve_U8_U8(mlib_u8 *z,
18 const mlib_u8 *x, const mlib_u8 *y, mlib_s32 n);
19
20
21 mlib_status mlib_VectorAve_U8C_U8C(mlib_u8 *z,
22 const mlib_u8 *x, const mlib_u8 *y, mlib_s32 n);
23
24
25 mlib_status mlib_VectorAve_S8_S8(mlib_s8 *z,
26 const mlib_s8 *x, const mlib_s8 *y, mlib_s32 n);
27
28
29 mlib_status mlib_VectorAve_S8C_S8C(mlib_s8 *z,
30 const mlib_s8 *x, const mlib_s8 *y, mlib_s32 n);
31
32
33 mlib_status mlib_VectorAve_S16_U8(mlib_s16 *z,
34 const mlib_u8 *x, const mlib_u8 *y, mlib_s32 n);
35
36
37 mlib_status mlib_VectorAve_S16_S8(mlib_s16 *z,
38 const mlib_s8 *x, const mlib_s8 *y, mlib_s32 n);
39
40
41 mlib_status mlib_VectorAve_S16_S16(mlib_s16 *z,
42 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 n);
43
44
45 mlib_status mlib_VectorAve_S16C_U8C(mlib_s16 *z,
46 const mlib_u8 *x, const mlib_u8 *y, mlib_s32 n);
47
48
49 mlib_status mlib_VectorAve_S16C_S8C(mlib_s16 *z,
50 const mlib_s8 *x, const mlib_s8 *y, mlib_s32 n);
51
52
53 mlib_status mlib_VectorAve_S16C_S16C(mlib_s16 *z,
54 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 n);
55
56
57 mlib_status mlib_VectorAve_S32_S16(mlib_s32 *z,
58 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 n);
59
60
61 mlib_status mlib_VectorAve_S32_S32(mlib_s32 *z,
62 const mlib_s32 *x, const mlib_s32 *y, mlib_s32 n);
63
64
65 mlib_status mlib_VectorAve_S32C_S16C(mlib_s32 *z,
66 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 n);
67
68
69 mlib_status mlib_VectorAve_S32C_S32C(mlib_s32 *z,
70 const mlib_s32 *x, const mlib_s32 *y, mlib_s32 n);
71
72
74 Each of these functions computes the average of two vectors.
75
76
77 It uses the following equation:
78
79 z[i] = (x[i] + y[i] + 1) / 2
80
81
82
83 where i = 0, 1, ..., (n - 1) for real data; i = 0, 1, ..., (2*n - 1)
84 for complex data.
85
87 Each of the functions takes the following arguments:
88
89 z Pointer to the first element of the destination vector.
90
91
92 x Pointer to the first element of the first source vector.
93
94
95 y Pointer to the first element of the second source vector.
96
97
98 n Number of elements in the vectors.
99
100
102 Each of the functions returns MLIB_SUCCESS if successful. Otherwise it
103 returns MLIB_FAILURE.
104
106 See attributes(5) for descriptions of the following attributes:
107
108
109
110
111 ┌─────────────────────────────┬─────────────────────────────┐
112 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
113 ├─────────────────────────────┼─────────────────────────────┤
114 │Interface Stability │Committed │
115 ├─────────────────────────────┼─────────────────────────────┤
116 │MT-Level │MT-Safe │
117 └─────────────────────────────┴─────────────────────────────┘
118
120 mlib_VectorAve_U8(3MLIB), attributes(5)
121
122
123
124SunOS 5.11 23 May 2007 mlib_VectorAve_U8_U8(3MLIB)