1mlib_VectorAve_U8(3MLIB)  mediaLib Library Functions  mlib_VectorAve_U8(3MLIB)
2
3
4

NAME

6       mlib_VectorAve_U8,   mlib_VectorAve_U8C,  mlib_VectorAve_S8,  mlib_Vec‐
7       torAve_S8C,    mlib_VectorAve_S16,    mlib_VectorAve_S16C,    mlib_Vec‐
8       torAve_S32, mlib_VectorAve_S32C - vector average, in place
9

SYNOPSIS

11       cc [ flag... ] file... -lmlib [ library... ]
12       #include <mlib.h>
13
14       mlib_status mlib_VectorAve_U8(mlib_u8 *xz,
15            const mlib_u8 *y, mlib_s32 n);
16
17
18       mlib_status mlib_VectorAve_U8C(mlib_u8 *xz,
19            const mlib_u8 *y, mlib_s32 n);
20
21
22       mlib_status mlib_VectorAve_S8(mlib_s8 *xz,
23            const mlib_s8 *y, mlib_s32 n);
24
25
26       mlib_status mlib_VectorAve_S8C(mlib_s8 *xz,
27            const mlib_s8 *y, mlib_s32 n);
28
29
30       mlib_status mlib_VectorAve_S16(mlib_s16 *xz,
31            const mlib_s16 *y, mlib_s32 n);
32
33
34       mlib_status mlib_VectorAve_S16C(mlib_s16 *xz,
35            const mlib_s16 *y, mlib_s32 n);
36
37
38       mlib_status mlib_VectorAve_S32(mlib_s32 *xz,
39            const mlib_s32 *y, mlib_s32 n);
40
41
42       mlib_status mlib_VectorAve_S32C(mlib_s32 *xz,
43            const mlib_s32 *y, mlib_s32 n);
44
45

DESCRIPTION

47       Each of these functions performs an in-place averaging of two vectors.
48
49
50       It uses the following equation:
51
52         xz[i] = (xz[i] + y[i] + 1) / 2
53
54
55
56       where  i  =  0, 1, ..., (n - 1) for real data; i = 0, 1, ..., (2*n - 1)
57       for complex data.
58

PARAMETERS

60       Each of the functions takes the following arguments:
61
62       xz    Pointer to the first element of the first source and  destination
63             vector.
64
65
66       y     Pointer to the first element of the second source vector.
67
68
69       n     Number of elements in the vectors.
70
71

RETURN VALUES

73       Each  of the functions returns MLIB_SUCCESS if successful. Otherwise it
74       returns MLIB_FAILURE.
75

ATTRIBUTES

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

SEE ALSO

91       mlib_VectorAve_U8_U8(3MLIB), attributes(5)
92
93
94
95SunOS 5.11                        23 May 2007         mlib_VectorAve_U8(3MLIB)
Impressum