subreader.c: fix excessive memory use with some external subtitles
[mplayer/kovensky.git] / libvo / csputils.h
blob4723c7006dadbe8b0e7a929f53ccde9781f4dde5
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 struct mp_csp_params {
35 enum mp_csp_standard format;
36 float brightness;
37 float contrast;
38 float hue;
39 float saturation;
40 float rgamma;
41 float ggamma;
42 float bgamma;
45 void mp_gen_gamma_map(unsigned char *map, int size, float gamma);
46 #define ROW_R 0
47 #define ROW_G 1
48 #define ROW_B 2
49 #define COL_Y 0
50 #define COL_U 1
51 #define COL_V 2
52 #define COL_C 3
53 void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]);
54 void mp_gen_yuv2rgb_map(struct mp_csp_params *params, uint8_t *map, int size);
56 #endif /* MPLAYER_CSPUTILS_H */