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