Parent Directory | Revision Log
Revision 651 - (view) (download)
1 : | edgomez | 651 | /***************************************************************************** |
2 : | * | ||
3 : | * XVID MPEG4 Codec | ||
4 : | * - Colorspace functions - header files | ||
5 : | * | ||
6 : | * This file is part of XviD, a free MPEG-4 video encoder/decoder | ||
7 : | * | ||
8 : | * XviD is free software; you can redistribute it and/or modify it | ||
9 : | * under the terms of the GNU General Public License as published by | ||
10 : | * the Free Software Foundation; either version 2 of the License, or | ||
11 : | * (at your option) any later version. | ||
12 : | * | ||
13 : | * This program is distributed in the hope that it will be useful, | ||
14 : | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 : | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 : | * GNU General Public License for more details. | ||
17 : | * | ||
18 : | * You should have received a copy of the GNU General Public License | ||
19 : | * along with this program; if not, write to the Free Software | ||
20 : | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 : | * | ||
22 : | * Under section 8 of the GNU General Public License, the copyright | ||
23 : | * holders of XVID explicitly forbid distribution in the following | ||
24 : | * countries: | ||
25 : | * | ||
26 : | * - Japan | ||
27 : | * - United States of America | ||
28 : | * | ||
29 : | * Linking XviD statically or dynamically with other modules is making a | ||
30 : | * combined work based on XviD. Thus, the terms and conditions of the | ||
31 : | * GNU General Public License cover the whole combination. | ||
32 : | * | ||
33 : | * As a special exception, the copyright holders of XviD give you | ||
34 : | * permission to link XviD with independent modules that communicate with | ||
35 : | * XviD solely through the VFW1.1 and DShow interfaces, regardless of the | ||
36 : | * license terms of these independent modules, and to copy and distribute | ||
37 : | * the resulting combined work under terms of your choice, provided that | ||
38 : | * every copy of the combined work is accompanied by a complete copy of | ||
39 : | * the source code of XviD (the version of XviD used to produce the | ||
40 : | * combined work), being distributed under the terms of the GNU General | ||
41 : | * Public License plus this exception. An independent module is a module | ||
42 : | * which is not derived from or based on XviD. | ||
43 : | * | ||
44 : | * Note that people who make modified versions of XviD are not obligated | ||
45 : | * to grant this special exception for their modified versions; it is | ||
46 : | * their choice whether to do so. The GNU General Public License gives | ||
47 : | * permission to release a modified version without this exception; this | ||
48 : | * exception also makes it possible to release a modified version which | ||
49 : | * carries forward this exception. | ||
50 : | * | ||
51 : | * $Id: colorspace.h,v 1.4 2002-11-17 00:20:30 edgomez Exp $ | ||
52 : | * | ||
53 : | ****************************************************************************/ | ||
54 : | |||
55 : | Isibaar | 3 | #ifndef _COLORSPACE_H |
56 : | edgomez | 651 | |
57 : | Isibaar | 3 | #define _COLORSPACE_H |
58 : | |||
59 : | #include "../portab.h" | ||
60 : | suxen_drol | 118 | #include "../divx4.h" |
61 : | Isibaar | 3 | |
62 : | /* initialize tables */ | ||
63 : | |||
64 : | void colorspace_init(void); | ||
65 : | |||
66 : | |||
67 : | /* input color conversion functions (encoder) */ | ||
68 : | |||
69 : | edgomez | 195 | typedef void (color_inputFunc) (uint8_t * y_out, |
70 : | uint8_t * u_out, | ||
71 : | uint8_t * v_out, | ||
72 : | uint8_t * src, | ||
73 : | int width, | ||
74 : | int height, | ||
75 : | int stride); | ||
76 : | Isibaar | 3 | |
77 : | edgomez | 195 | typedef color_inputFunc *color_inputFuncPtr; |
78 : | Isibaar | 3 | |
79 : | extern color_inputFuncPtr rgb555_to_yv12; | ||
80 : | extern color_inputFuncPtr rgb565_to_yv12; | ||
81 : | extern color_inputFuncPtr rgb24_to_yv12; | ||
82 : | extern color_inputFuncPtr rgb32_to_yv12; | ||
83 : | extern color_inputFuncPtr yuv_to_yv12; | ||
84 : | extern color_inputFuncPtr yuyv_to_yv12; | ||
85 : | extern color_inputFuncPtr uyvy_to_yv12; | ||
86 : | |||
87 : | /* plain c */ | ||
88 : | color_inputFunc rgb555_to_yv12_c; | ||
89 : | color_inputFunc rgb565_to_yv12_c; | ||
90 : | color_inputFunc rgb24_to_yv12_c; | ||
91 : | color_inputFunc rgb32_to_yv12_c; | ||
92 : | color_inputFunc yuv_to_yv12_c; | ||
93 : | color_inputFunc yuyv_to_yv12_c; | ||
94 : | color_inputFunc uyvy_to_yv12_c; | ||
95 : | |||
96 : | /* mmx */ | ||
97 : | color_inputFunc rgb24_to_yv12_mmx; | ||
98 : | color_inputFunc rgb32_to_yv12_mmx; | ||
99 : | color_inputFunc yuv_to_yv12_mmx; | ||
100 : | color_inputFunc yuyv_to_yv12_mmx; | ||
101 : | color_inputFunc uyvy_to_yv12_mmx; | ||
102 : | |||
103 : | /* xmm */ | ||
104 : | color_inputFunc yuv_to_yv12_xmm; | ||
105 : | |||
106 : | |||
107 : | /* output color conversion functions (decoder) */ | ||
108 : | |||
109 : | edgomez | 195 | typedef void (color_outputFunc) (uint8_t * dst, |
110 : | int dst_stride, | ||
111 : | uint8_t * y_src, | ||
112 : | uint8_t * v_src, | ||
113 : | uint8_t * u_src, | ||
114 : | int y_stride, | ||
115 : | int uv_stride, | ||
116 : | int width, | ||
117 : | int height); | ||
118 : | Isibaar | 3 | |
119 : | edgomez | 195 | typedef color_outputFunc *color_outputFuncPtr; |
120 : | |||
121 : | Isibaar | 3 | extern color_outputFuncPtr yv12_to_rgb555; |
122 : | extern color_outputFuncPtr yv12_to_rgb565; | ||
123 : | extern color_outputFuncPtr yv12_to_rgb24; | ||
124 : | extern color_outputFuncPtr yv12_to_rgb32; | ||
125 : | extern color_outputFuncPtr yv12_to_yuv; | ||
126 : | extern color_outputFuncPtr yv12_to_yuyv; | ||
127 : | extern color_outputFuncPtr yv12_to_uyvy; | ||
128 : | |||
129 : | /* plain c */ | ||
130 : | void init_yuv_to_rgb(void); | ||
131 : | |||
132 : | color_outputFunc yv12_to_rgb555_c; | ||
133 : | color_outputFunc yv12_to_rgb565_c; | ||
134 : | color_outputFunc yv12_to_rgb24_c; | ||
135 : | color_outputFunc yv12_to_rgb32_c; | ||
136 : | color_outputFunc yv12_to_yuv_c; | ||
137 : | color_outputFunc yv12_to_yuyv_c; | ||
138 : | color_outputFunc yv12_to_uyvy_c; | ||
139 : | |||
140 : | /* mmx */ | ||
141 : | color_outputFunc yv12_to_rgb24_mmx; | ||
142 : | color_outputFunc yv12_to_rgb32_mmx; | ||
143 : | color_outputFunc yv12_to_yuyv_mmx; | ||
144 : | color_outputFunc yv12_to_uyvy_mmx; | ||
145 : | |||
146 : | suxen_drol | 118 | |
147 : | edgomez | 195 | void user_to_yuv_c(uint8_t * y_out, |
148 : | uint8_t * u_out, | ||
149 : | uint8_t * v_out, | ||
150 : | int stride, | ||
151 : | suxen_drol | 118 | DEC_PICTURE * picture, |
152 : | edgomez | 195 | int width, |
153 : | int height); | ||
154 : | suxen_drol | 118 | |
155 : | edgomez | 195 | #endif /* _COLORSPACE_H_ */ |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |