vo_glamo: sub.h was moved to sub directory in c9026cb3210205b07e2e068467a18ee40f9259a3
[mplayer/glamo.git] / libvo / csputils.h
blobacc8f59459e4b048c60ed05ab453070fe7ad054d
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 * You can alternatively redistribute this file and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
24 #ifndef MPLAYER_CSPUTILS_H
25 #define MPLAYER_CSPUTILS_H
27 #include <stdint.h>
29 enum mp_csp_standard {
30 MP_CSP_DEFAULT,
31 MP_CSP_BT_601,
32 MP_CSP_BT_709,
33 MP_CSP_SMPTE_240M,
34 MP_CSP_EBU,
35 MP_CSP_XYZ,
36 MP_CSP_COUNT
39 enum mp_csp_levelconv {
40 MP_CSP_LEVELCONV_TV_TO_PC,
41 MP_CSP_LEVELCONV_PC_TO_TV,
42 MP_CSP_LEVELCONV_NONE,
43 MP_CSP_LEVELCONV_COUNT
46 struct mp_csp_params {
47 enum mp_csp_standard format;
48 enum mp_csp_levelconv levelconv;
49 float brightness;
50 float contrast;
51 float hue;
52 float saturation;
53 float rgamma;
54 float ggamma;
55 float bgamma;
58 void mp_gen_gamma_map(unsigned char *map, int size, float gamma);
59 #define ROW_R 0
60 #define ROW_G 1
61 #define ROW_B 2
62 #define COL_Y 0
63 #define COL_U 1
64 #define COL_V 2
65 #define COL_C 3
66 void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]);
67 void mp_gen_yuv2rgb_map(struct mp_csp_params *params, uint8_t *map, int size);
69 #endif /* MPLAYER_CSPUTILS_H */