1mlib_ImageColorRGB2YCC_Fp(3mMeLdIiBa)Lib Library Funcmtliiobn_sImageColorRGB2YCC_Fp(3MLIB)
2
3
4
6 mlib_ImageColorRGB2YCC_Fp - RGB to YCC color conversion
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageColorRGB2YCC_Fp(mlib_image *dst,
13 const mlib_image *src);
14
15
17 The mlib_ImageColorRGB2YCC_Fp() function performs a color space conver‐
18 sion from computer R'G'B' to ITU-R Rec.601 Y'CbCr.
19
20
21 The source and destination images must be three-channel images.
22
23
24 It uses the following equation:
25
26 |Y'| |cmat[0] cmat[1] cmat[2]| |R'| |offset[0]|
27 |Cb| = |cmat[3] cmat[4] cmat[5]| * |G'| + |offset[1]|
28 |Cr| |cmat[6] cmat[7] cmat[8]| |B'| |offset[2]|
29
30
31
32 where
33
34 cmat[] = { 65.738/256, 129.057/256, 25.064/256,
35 -37.945/256, -74.494/256, 112.439/256,
36 112.439/256, -94.154/256, -18.285/256 };
37 offset[] = { 16, 128, 128 };
38 src[x][y] = { R', G', B' };
39 dst[x][y] = { Y', Cb, Cr };
40
41
43 The function takes the following arguments:
44
45 dst Pointer to destination image.
46
47
48 src Pointer to source image.
49
50
52 The function returns MLIB_SUCCESS if successful. Otherwise it returns
53 MLIB_FAILURE.
54
56 See attributes(5) for descriptions of the following attributes:
57
58
59
60
61 ┌─────────────────────────────┬─────────────────────────────┐
62 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
63 ├─────────────────────────────┼─────────────────────────────┤
64 │Interface Stability │Committed │
65 ├─────────────────────────────┼─────────────────────────────┤
66 │MT-Level │MT-Safe │
67 └─────────────────────────────┴─────────────────────────────┘
68
70 mlib_ImageColorConvert2(3MLIB), mlib_ImageColorConvert2_Fp(3MLIB),
71 mlib_ImageColorRGB2YCC(3MLIB), mlib_ImageColorXYZ2RGB(3MLIB),
72 mlib_ImageColorXYZ2RGB_Fp(3MLIB), mlib_ImageColorYCC2RGB(3MLIB),
73 mlib_ImageColorYCC2RGB_Fp(3MLIB), attributes(5)
74
75
76
77SunOS 5.11 2 Mar 2007 mlib_ImageColorRGB2YCC_Fp(3MLIB)