3 #define defaulttrue =true
9 /* RGB to RGB and RGB from/to YCbRr (YUV) conversions written by Bisqwit
10 * Copyright (C) 1992,2008 Joel Yliluoma (http://iki.fi/bisqwit/)
17 * I420 = YCbCr where Y is issued for each pixel,
18 * followed by Cr for 2x2 pixels,
19 * followed by Cb for 2x2 pixels
20 * YUY2 = YCbCr where for each pixel, Y is issued,
21 * followed by Cr for 2x1 pixels (if even pixel)
22 * or Cb for 2x1 pixels (if odd pixel)
24 * Note: Not all functions honor the swap_red_blue setting.
27 void Convert32To24Frame(const void* data
, unsigned char* dest
, unsigned npixels
)
28 __attribute__((noinline
));
30 void Convert15To24Frame(const void* data
, unsigned char* dest
, unsigned npixels
, bool swap_red_blue defaulttrue
)
31 __attribute__((noinline
));
33 void Convert16To24Frame(const void* data
, unsigned char* dest
, unsigned npixels
, bool swap_red_blue defaulttrue
)
34 __attribute__((noinline
));
36 void Convert15To32Frame(const void* data
, unsigned char* dest
, unsigned npixels
, bool swap_red_blue defaulttrue
)
37 __attribute__((noinline
));
39 void Convert16To32Frame(const void* data
, unsigned char* dest
, unsigned npixels
, bool swap_red_blue defaulttrue
)
40 __attribute__((noinline
));
42 void Convert24To16Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
44 void Convert24To15Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
46 void Convert_I420To24Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
, bool swap_red_blue defaulttrue
)
47 __attribute__((noinline
));
49 void Convert15To_I420Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
50 void Convert16To_I420Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
51 void Convert24To_I420Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
52 void Convert32To_I420Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
54 void Convert_YUY2To24Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
, bool swap_red_blue defaulttrue
)
55 __attribute__((noinline
));
57 void Convert15To_YUY2Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
58 void Convert16To_YUY2Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
59 void Convert24To_YUY2Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);
60 void Convert32To_YUY2Frame(const void* data
, unsigned char* dest
, unsigned npixels
, unsigned width
);