1mlib_ImageColorRGB2YCC(3MLImBe)diaLib Library Functiomnlsib_ImageColorRGB2YCC(3MLIB)
2
3
4

NAME

6       mlib_ImageColorRGB2YCC - RGB to YCC color conversion
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageColorRGB2YCC(mlib_image *dst, const mlib_image *src);
13
14

DESCRIPTION

16       The mlib_ImageColorRGB2YCC() function performs a color space conversion
17       from computer R'G'B' to ITU-R Rec.601 Y'CbCr.
18
19
20       The source and destination images must be three-channel images.
21
22
23       It uses the following equation:
24
25         |Y'|   |cmat[0] cmat[1] cmat[2]|   |R'|   |offset[0]|
26         |Cb| = |cmat[3] cmat[4] cmat[5]| * |G'| + |offset[1]|
27         |Cr|   |cmat[6] cmat[7] cmat[8]|   |B'|   |offset[2]|
28
29
30
31       where
32
33         cmat[] = { 65.738/256, 129.057/256,  25.064/256,
34                   -37.945/256, -74.494/256, 112.439/256,
35                   112.439/256, -94.154/256, -18.285/256 };
36         offset[] = { 16, 128, 128 };
37         src[x][y] = { R', G', B' };
38         dst[x][y] = { Y', Cb, Cr };
39
40

PARAMETERS

42       The function takes the following arguments:
43
44       dst    Pointer to destination image.
45
46
47       src    Pointer to source image.
48
49

RETURN VALUES

51       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
52       MLIB_FAILURE.
53

ATTRIBUTES

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

SEE ALSO

69       mlib_ImageColorConvert2(3MLIB),      mlib_ImageColorConvert2_Fp(3MLIB),
70       mlib_ImageColorRGB2YCC_Fp(3MLIB),        mlib_ImageColorXYZ2RGB(3MLIB),
71       mlib_ImageColorXYZ2RGB_Fp(3MLIB),        mlib_ImageColorYCC2RGB(3MLIB),
72       mlib_ImageColorYCC2RGB_Fp(3MLIB), attributes(5)
73
74
75
76SunOS 5.11                        2 Mar 2007     mlib_ImageColorRGB2YCC(3MLIB)
Impressum