1mlib_ImageSqrShift(3MLIB) mediaLib Library Functions mlib_ImageSqrShift(3MLIB)
2
3
4
6 mlib_ImageSqrShift - square with shifting
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageSqrShift(mlib_image *dst, const mlib_image *src,
13 mlib_s32 shift);
14
15
17 The mlib_ImageSqrShift() function computes the square of each pixel in
18 the source image and scales the result by the shift factor.
19
20
21 It uses the following equation:
22
23 dst[x][y][i] = src[x][y][i] * src[x][y][i] * 2**(-shift)
24
25
27 The function takes the following arguments:
28
29 dst Pointer to destination image.
30
31
32 src Pointer to source image.
33
34
35 shift Right shifting factor. 0 ≤ shift ≤ 31.
36
37
39 The function returns MLIB_SUCCESS if successful. Otherwise it returns
40 MLIB_FAILURE.
41
43 See attributes(5) for descriptions of the following attributes:
44
45
46
47
48 ┌─────────────────────────────┬─────────────────────────────┐
49 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │Interface Stability │Committed │
52 ├─────────────────────────────┼─────────────────────────────┤
53 │MT-Level │MT-Safe │
54 └─────────────────────────────┴─────────────────────────────┘
55
57 mlib_ImageSqrShift_Inp(3MLIB), attributes(5)
58
59
60
61SunOS 5.11 2 Mar 2007 mlib_ImageSqrShift(3MLIB)