Mercurial > mplayer.hg
annotate libvo/csputils.h @ 30419:b77bfd94aaf3
Add missing license headers.
author | diego |
---|---|
date | Sat, 30 Jan 2010 13:49:24 +0000 |
parents | aeab18b1923d |
children | 4b888c2d2a1d |
rev | line source |
---|---|
30108
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
1 /* |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
2 * This file is part of MPlayer. |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
3 * |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
7 * (at your option) any later version. |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
8 * |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
13 * |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
17 */ |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
18 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
19 #ifndef MPLAYER_CSPUTILS_H |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
20 #define MPLAYER_CSPUTILS_H |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
21 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
22 #include <stdint.h> |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
23 |
30109
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
24 enum mp_csp_standard { |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
25 MP_CSP_DEFAULT, |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
26 MP_CSP_BT_601, |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
27 MP_CSP_BT_709, |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
28 MP_CSP_SMPTE_240M, |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
29 MP_CSP_EBU, |
30121
28cbec606cbb
Slightly generalize code to generate YUV->RGB conversion table and add
reimar
parents:
30109
diff
changeset
|
30 MP_CSP_XYZ, |
30109
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
31 MP_CSP_COUNT |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
32 }; |
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
33 |
30293
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
34 enum mp_csp_levelconv { |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
35 MP_CSP_LEVELCONV_TV_TO_PC, |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
36 MP_CSP_LEVELCONV_PC_TO_TV, |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
37 MP_CSP_LEVELCONV_NONE, |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
38 MP_CSP_LEVELCONV_COUNT |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
39 }; |
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
40 |
30108
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
41 struct mp_csp_params { |
30109
0f25d3062987
First steps to supporting different YUV->RGB conversion definitions.
reimar
parents:
30108
diff
changeset
|
42 enum mp_csp_standard format; |
30293
aeab18b1923d
Add support for adjustable TV <-> PC level conversion.
reimar
parents:
30121
diff
changeset
|
43 enum mp_csp_levelconv levelconv; |
30108
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
44 float brightness; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
45 float contrast; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
46 float hue; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
47 float saturation; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
48 float rgamma; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
49 float ggamma; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
50 float bgamma; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
51 }; |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
52 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
53 void mp_gen_gamma_map(unsigned char *map, int size, float gamma); |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
54 #define ROW_R 0 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
55 #define ROW_G 1 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
56 #define ROW_B 2 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
57 #define COL_Y 0 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
58 #define COL_U 1 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
59 #define COL_V 2 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
60 #define COL_C 3 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
61 void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]); |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
62 void mp_gen_yuv2rgb_map(struct mp_csp_params *params, uint8_t *map, int size); |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
63 |
0898adc64a6f
Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents:
diff
changeset
|
64 #endif /* MPLAYER_CSPUTILS_H */ |