1mlib_ImageDivShift1_Inp(3MLmIeBd)iaLib Library Functimolnisb_ImageDivShift1_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageDivShift1_Inp - division with shifting, in place
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageDivShift1_Inp(mlib_image *src1dst,
13            const mlib_image *src2, mlib_s32 shift);
14
15

DESCRIPTION

17       The  mlib_ImageDivShift1_Inp() function divides the second source image
18       into the first source image on a pixel-by-pixel basis.  It  scales  the
19       result  by  a left shift and writes the result to the destination image
20       on a pixel-by-pixel basis.
21
22
23       It uses the following equation:
24
25         src1dst[x][y][i] = src1dst[x][y][i] / src2[x][y][i] * 2**shift
26
27
28
29       In the case of src2[x][y][i] = 0,
30
31         src1dst[x][y][i] = 0              if src1dst[x][y][i] = 0
32         src1dst[x][y][i] = DATA_TYPE_MAX  if src1dst[x][y][i] > 0
33         src1dst[x][y][i] = DATA_TYPE_MIN  if src1dst[x][y][i] < 0
34
35
36
37       where DATA_TYPE is MLIB_U8, MLIB_S16,  MLIB_U16,  or  MLIB_S32  for  an
38       image  of type MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, or MLIB_INT, respec‐
39       tively.
40

PARAMETERS

42       The function takes the following arguments:
43
44       src1dst    Pointer to first source and destination image.
45
46
47       src2       Pointer to second source image.
48
49
50       shift      Left shifting factor. 0 ≤ shift ≤ 31.
51
52

RETURN VALUES

54       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
55       MLIB_FAILURE.
56

ATTRIBUTES

58       See attributes(5) for descriptions of the following attributes:
59
60
61
62
63       ┌─────────────────────────────┬─────────────────────────────┐
64       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │Interface Stability          │Committed                    │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │MT-Level                     │MT-Safe                      │
69       └─────────────────────────────┴─────────────────────────────┘
70

SEE ALSO

72       mlib_ImageDivShift(3MLIB),              mlib_ImageDivShift2_Inp(3MLIB),
73       attributes(5)
74
75
76
77SunOS 5.11                        2 Mar 2007    mlib_ImageDivShift1_Inp(3MLIB)
Impressum