colormodels.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef COLORMODELS_H
00026 #define COLORMODELS_H
00027
00028 #ifdef __GNUC__
00029 #pragma GCC visibility push(default)
00030 #endif
00031
00040
00041 #define BC_COMPRESSED 1
00042
00049 #define BC_RGB565 2
00050
00057 #define BC_BGR565 3
00058
00064 #define BC_BGR888 4
00065
00071 #define BC_BGR8888 5
00072
00079 #define BC_RGB888 6
00080
00086 #define BC_RGBA8888 7
00087
00093 #define BC_RGB161616 8
00094
00100 #define BC_RGBA16161616 9
00101
00107 #define BC_YUVA8888 10
00108
00114 #define BC_YUV422 13
00115
00116
00123 #define BC_YUV420P 14
00124
00130 #define BC_YUV422P 15
00131
00137 #define BC_YUV444P 16
00138
00144 #define BC_YUV411P 17
00145
00146
00152 #define BC_YUVJ420P 18
00153
00159 #define BC_YUVJ422P 19
00160
00166 #define BC_YUVJ444P 20
00167
00168
00174 #define BC_YUV422P16 21
00175
00181 #define BC_YUV444P16 22
00182
00187 #define BC_YUV422P10 23
00188
00194 #define BC_YUVJ422P10 24
00195
00196
00197
00198
00199 #define FOURCC_YV12 0x32315659
00200 #define FOURCC_YUV2 0x32595559
00201 #define FOURCC_I420 0x30323449
00202
00203
00204
00205
00206 #ifdef __cplusplus
00207 extern "C" {
00208 #endif
00209
00210 int cmodel_calculate_pixelsize(int colormodel);
00211 int cmodel_calculate_datasize(int w, int h, int bytes_per_line, int color_model);
00212 int cmodel_calculate_max(int colormodel);
00213 int cmodel_components(int colormodel);
00214 int cmodel_is_yuv(int colormodel);
00215
00216 void cmodel_transfer(unsigned char **output_rows,
00217 unsigned char **input_rows,
00218 int in_x,
00219 int in_y,
00220 int in_w,
00221 int in_h,
00222 int out_w,
00223 int out_h,
00224 int in_colormodel,
00225 int out_colormodel,
00226 int in_rowspan,
00227 int out_rowspan,
00228 int in_rowspan_uv,
00229 int out_rowspan_uv );
00230
00231 int cmodel_bc_to_x(int color_model);
00232
00233 int cmodel_is_planar(int color_model);
00234
00235
00236
00237
00238
00239 #ifdef __cplusplus
00240 }
00241 #endif
00242
00243 #ifdef __GNUC__
00244 #pragma GCC visibility pop
00245 #endif
00246
00247 #endif