1mlib_ImageColorYCC2RGB_Fp(3mMeLdIiBa)Lib Library Funcmtliiobn_sImageColorYCC2RGB_Fp(3MLIB)
2
3
4
6 mlib_ImageColorYCC2RGB_Fp - YCC to RGB color conversion
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageColorYCC2RGB_Fp(mlib_image *dst,
13 const mlib_image *src);
14
15
17 The mlib_ImageColorYCC2RGB_Fp() function performs a color space conver‐
18 sion from ITU-R Rec.601 Y'CbCr to computer R'G'B'.
19
20
21 The source and destination images must be three-channel images.
22
23
24 It uses the following equation:
25
26 |R'| |cmat[0] cmat[1] cmat[2]| |Y'| |offset[0]|
27 |G'| = |cmat[3] cmat[4] cmat[5]| * |Cb| + |offset[1]|
28 |B'| |cmat[6] cmat[7] cmat[8]| |Cr| |offset[2]|
29
30
31
32 where
33
34 cmat[] = { 298.082/256, 0.000/256, 408.583/256,
35 298.082/256, -100.291/256, -208.120/256,
36 298.082/256, 516.411/256, 0.000/256 };
37 offset[] = { -222.922, 135.575, -276.836 };
38 src[x][y] = { Y', Cb, Cr };
39 dst[x][y] = { R', G', B' };
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_ImageColorRGB2XYZ(3MLIB), mlib_ImageColorRGB2XYZ_Fp(3MLIB),
72 mlib_ImageColorRGB2YCC(3MLIB), mlib_ImageColorRGB2YCC_Fp(3MLIB),
73 mlib_ImageColorYCC2RGB(3MLIB), attributes(5)
74
75
76
77SunOS 5.11 2 Mar 2007 mlib_ImageColorYCC2RGB_Fp(3MLIB)