Fix vf_tcdump's compilation
[mplayer/kovensky.git] / libvo / csputils.h
blob54c6926b966c0f8b92869f90f6251fa6c2a8a7f3
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.
19 #ifndef MPLAYER_CSPUTILS_H
20 #define MPLAYER_CSPUTILS_H
22 #include <stdint.h>
24 enum mp_csp_standard {
25 MP_CSP_DEFAULT,
26 MP_CSP_BT_601,
27 MP_CSP_BT_709,
28 MP_CSP_SMPTE_240M,
29 MP_CSP_EBU,
30 MP_CSP_XYZ,
31 MP_CSP_COUNT
34 enum mp_csp_levelconv {
35 MP_CSP_LEVELCONV_TV_TO_PC,
36 MP_CSP_LEVELCONV_PC_TO_TV,
37 MP_CSP_LEVELCONV_NONE,
38 MP_CSP_LEVELCONV_COUNT
41 struct mp_csp_params {
42 enum mp_csp_standard format;
43 enum mp_csp_levelconv levelconv;
44 float brightness;
45 float contrast;
46 float hue;
47 float saturation;
48 float rgamma;
49 float ggamma;
50 float bgamma;
53 void mp_gen_gamma_map(unsigned char *map, int size, float gamma);
54 #define ROW_R 0
55 #define ROW_G 1
56 #define ROW_B 2
57 #define COL_Y 0
58 #define COL_U 1
59 #define COL_V 2
60 #define COL_C 3
61 void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]);
62 void mp_gen_yuv2rgb_map(struct mp_csp_params *params, uint8_t *map, int size);
64 #endif /* MPLAYER_CSPUTILS_H */