1mlib_MatrixAve_U8_U8(3MLIB)mediaLib Library Functionsmlib_MatrixAve_U8_U8(3MLIB)
2
3
4
6 mlib_MatrixAve_U8_U8, mlib_MatrixAve_U8C_U8C, mlib_MatrixAve_S8_S8,
7 mlib_MatrixAve_S8C_S8C, mlib_MatrixAve_S16_U8, mlib_MatrixAve_S16_S8,
8 mlib_MatrixAve_S16_S16, mlib_MatrixAve_S16C_U8C, mlib_Matrix‐
9 Ave_S16C_S8C, mlib_MatrixAve_S16C_S16C, mlib_MatrixAve_S32_S16,
10 mlib_MatrixAve_S32_S32, mlib_MatrixAve_S32C_S16C, mlib_Matrix‐
11 Ave_S32C_S32C - matrix average
12
14 cc [ flag... ] file... -lmlib [ library... ]
15 #include <mlib.h>
16
17 mlib_status mlib_MatrixAve_U8_U8(mlib_u8 *z, const mlib_u8 *x,
18 const mlib_u8 *y, mlib_s32 m, mlib_s32 n);
19
20
21 mlib_status mlib_MatrixAve_U8C_U8C(mlib_u8 *z, const mlib_u8 *x,
22 const mlib_u8 *y, mlib_s32 m, mlib_s32 n);
23
24
25 mlib_status mlib_MatrixAve_S8_S8(mlib_s8 *z, const mlib_s8 *x,
26 const mlib_s8 *y, mlib_s32 m, mlib_s32 n);
27
28
29 mlib_status mlib_MatrixAve_S8C_S8C(mlib_s8 *z, const mlib_s8 *x,
30 const mlib_s8 *y, mlib_s32 m, mlib_s32 n);
31
32
33 mlib_status mlib_MatrixAve_S16_U8(mlib_s16 *z, const mlib_u8 *x,
34 const mlib_u8 *y, mlib_s32 m, mlib_s32 n);
35
36
37 mlib_status mlib_MatrixAve_S16_S8(mlib_s16 *z, const mlib_s8 *x,
38 const mlib_s8 *y, mlib_s32 m, mlib_s32 n);
39
40
41 mlib_status mlib_MatrixAve_S16_S16(mlib_s16 *z, const mlib_s16 *x,
42 const mlib_s16 *y, mlib_s32 m, mlib_s32 n);
43
44
45 mlib_status mlib_MatrixAve_S16C_U8C(mlib_s16 *z, const mlib_u8 *x,
46 const mlib_u8 *y, mlib_s32 m, mlib_s32 n);
47
48
49 mlib_status mlib_MatrixAve_S16C_S8C(mlib_s16 *z, const mlib_s8 *x,
50 const mlib_s8 *y, mlib_s32 m, mlib_s32 n);
51
52
53 mlib_status mlib_MatrixAve_S16C_S16C(mlib_s16 *z,
54 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 m, mlib_s32 n);
55
56
57 mlib_status mlib_MatrixAve_S32_S16(mlib_s32 *z, const mlib_s16 *x,
58 const mlib_s16 *y, mlib_s32 m, mlib_s32 n);
59
60
61 mlib_status mlib_MatrixAve_S32_S32(mlib_s32 *z, const mlib_s32 *x,
62 const mlib_s32 *y, mlib_s32 m, mlib_s32 n);
63
64
65 mlib_status mlib_MatrixAve_S32C_S16C(mlib_s32 *z,
66 const mlib_s16 *x, const mlib_s16 *y, mlib_s32 m, mlib_s32 n);
67
68
69 mlib_status mlib_MatrixAve_S32C_S32C(mlib_s32 *z, const mlib_s32 *x,
70 const mlib_s32 *y, mlib_s32 m, mlib_s32 n);
71
72
74 Each of these functions computes the average of the first source matrix
75 and the second source matrix and writes the output to the destination
76 matrix.
77
78
79 It uses the following equation:
80
81 z[i] = (x[i] + y[i] + 1) / 2
82
83
84
85 where i = 0, 1, ..., (m*n - 1) for real data; i = 0, 1, ..., (m*n*2 -
86 1) for complex data.
87
89 Each of the functions takes the following arguments:
90
91 z Pointer to the destination matrix.
92
93
94 x Pointer to the first source matrix.
95
96
97 y Pointer to the second source matrix.
98
99
100 m Number of rows in the matrices.
101
102
103 n Number of columns in the matrices.
104
105
107 Each of the functions returns MLIB_SUCCESS if successful. Otherwise it
108 returns MLIB_FAILURE.
109
111 See attributes(5) for descriptions of the following attributes:
112
113
114
115
116 ┌─────────────────────────────┬─────────────────────────────┐
117 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
118 ├─────────────────────────────┼─────────────────────────────┤
119 │Interface Stability │Committed │
120 ├─────────────────────────────┼─────────────────────────────┤
121 │MT-Level │MT-Safe │
122 └─────────────────────────────┴─────────────────────────────┘
123
125 mlib_MatrixAve_U8(3MLIB), attributes(5)
126
127
128
129SunOS 5.11 23 May 2007 mlib_MatrixAve_U8_U8(3MLIB)