[cvs] / xvidcore / src / image / colorspace.h Repository:
ViewVC logotype

Annotation of /xvidcore/src/image/colorspace.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (view) (download)

1 : edgomez 1.6 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - Colorspace related header -
5 :     *
6 :     * Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
7 :     *
8 :     * This program is free software ; you can redistribute it and/or modify
9 :     * it 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 : chl 1.8 * $Id: colorspace.h,v 1.7 2004/04/05 20:36:36 edgomez Exp $
23 : edgomez 1.6 *
24 :     ****************************************************************************/
25 :    
26 : Isibaar 1.1 #ifndef _COLORSPACE_H
27 :     #define _COLORSPACE_H
28 :    
29 :     #include "../portab.h"
30 :    
31 :     /* initialize tables */
32 :    
33 :     void colorspace_init(void);
34 :    
35 :    
36 :    
37 : edgomez 1.5 /* colorspace conversion function (encoder) */
38 : Isibaar 1.1
39 : edgomez 1.5 typedef void (packedFunc) (uint8_t * x_ptr,
40 :     int x_stride,
41 : edgomez 1.3 uint8_t * y_src,
42 :     uint8_t * v_src,
43 :     uint8_t * u_src,
44 :     int y_stride,
45 :     int uv_stride,
46 :     int width,
47 : edgomez 1.5 int height,
48 :     int vflip);
49 :    
50 :     typedef packedFunc *packedFuncPtr;
51 : edgomez 1.3
52 : Isibaar 1.1
53 : edgomez 1.5 /* xxx_to_yv12 colorspace conversion functions (encoder) */
54 :    
55 :     extern packedFuncPtr rgb555_to_yv12;
56 :     extern packedFuncPtr rgb565_to_yv12;
57 : chl 1.8 extern packedFuncPtr rgb_to_yv12;
58 : edgomez 1.5 extern packedFuncPtr bgr_to_yv12;
59 :     extern packedFuncPtr bgra_to_yv12;
60 :     extern packedFuncPtr abgr_to_yv12;
61 :     extern packedFuncPtr rgba_to_yv12;
62 : edgomez 1.6 extern packedFuncPtr argb_to_yv12;
63 : edgomez 1.5 extern packedFuncPtr yuyv_to_yv12;
64 :     extern packedFuncPtr uyvy_to_yv12;
65 :    
66 :     extern packedFuncPtr rgb555i_to_yv12;
67 :     extern packedFuncPtr rgb565i_to_yv12;
68 : chl 1.8 extern packedFuncPtr rgbi_to_yv12;
69 : edgomez 1.5 extern packedFuncPtr bgri_to_yv12;
70 :     extern packedFuncPtr bgrai_to_yv12;
71 :     extern packedFuncPtr abgri_to_yv12;
72 :     extern packedFuncPtr rgbai_to_yv12;
73 : edgomez 1.6 extern packedFuncPtr argbi_to_yv12;
74 : edgomez 1.5 extern packedFuncPtr yuyvi_to_yv12;
75 :     extern packedFuncPtr uyvyi_to_yv12;
76 :    
77 : Isibaar 1.1 /* plain c */
78 : edgomez 1.5 packedFunc rgb555_to_yv12_c;
79 :     packedFunc rgb565_to_yv12_c;
80 : chl 1.8 packedFunc rgb_to_yv12_c;
81 : edgomez 1.5 packedFunc bgr_to_yv12_c;
82 :     packedFunc bgra_to_yv12_c;
83 :     packedFunc abgr_to_yv12_c;
84 :     packedFunc rgba_to_yv12_c;
85 : edgomez 1.6 packedFunc argb_to_yv12_c;
86 : edgomez 1.5 packedFunc yuyv_to_yv12_c;
87 :     packedFunc uyvy_to_yv12_c;
88 :    
89 :     packedFunc rgb555i_to_yv12_c;
90 :     packedFunc rgb565i_to_yv12_c;
91 : chl 1.8 packedFunc rgbi_to_yv12_c;
92 : edgomez 1.5 packedFunc bgri_to_yv12_c;
93 :     packedFunc bgrai_to_yv12_c;
94 :     packedFunc abgri_to_yv12_c;
95 :     packedFunc rgbai_to_yv12_c;
96 : edgomez 1.6 packedFunc argbi_to_yv12_c;
97 : edgomez 1.5 packedFunc yuyvi_to_yv12_c;
98 :     packedFunc uyvyi_to_yv12_c;
99 : Isibaar 1.1
100 : edgomez 1.6 #ifdef ARCH_IS_IA32
101 : Isibaar 1.1 /* mmx */
102 : edgomez 1.5 packedFunc bgr_to_yv12_mmx;
103 :     packedFunc bgra_to_yv12_mmx;
104 :     packedFunc yuyv_to_yv12_mmx;
105 :     packedFunc uyvy_to_yv12_mmx;
106 :    
107 :     /* 3dnow */
108 :     packedFunc yuyv_to_yv12_3dn;
109 :     packedFunc uyvy_to_yv12_3dn;
110 :    
111 :     /* xmm */
112 :     packedFunc yuyv_to_yv12_xmm;
113 :     packedFunc uyvy_to_yv12_xmm;
114 : edgomez 1.6 #endif
115 : edgomez 1.5
116 : edgomez 1.7 #ifdef ARCH_IS_PPC
117 :     packedFunc bgra_to_yv12_altivec_c;
118 :     packedFunc abgr_to_yv12_altivec_c;
119 :     packedFunc rgba_to_yv12_altivec_c;
120 :     packedFunc argb_to_yv12_altivec_c;
121 :    
122 :     packedFunc yuyv_to_yv12_altivec_c;
123 :     packedFunc uyvy_to_yv12_altivec_c;
124 :     #endif
125 : suxen_drol 1.2
126 : edgomez 1.5 /* yv12_to_xxx colorspace conversion functions (decoder) */
127 :    
128 :     extern packedFuncPtr yv12_to_rgb555;
129 :     extern packedFuncPtr yv12_to_rgb565;
130 : chl 1.8 extern packedFuncPtr yv12_to_rgb;
131 : edgomez 1.5 extern packedFuncPtr yv12_to_bgr;
132 :     extern packedFuncPtr yv12_to_bgra;
133 :     extern packedFuncPtr yv12_to_abgr;
134 :     extern packedFuncPtr yv12_to_rgba;
135 : edgomez 1.6 extern packedFuncPtr yv12_to_argb;
136 : edgomez 1.5 extern packedFuncPtr yv12_to_yuyv;
137 :     extern packedFuncPtr yv12_to_uyvy;
138 :    
139 :     extern packedFuncPtr yv12_to_rgb555i;
140 :     extern packedFuncPtr yv12_to_rgb565i;
141 : chl 1.8 extern packedFuncPtr yv12_to_rgbi;
142 : edgomez 1.5 extern packedFuncPtr yv12_to_bgri;
143 :     extern packedFuncPtr yv12_to_bgrai;
144 :     extern packedFuncPtr yv12_to_abgri;
145 :     extern packedFuncPtr yv12_to_rgbai;
146 : edgomez 1.6 extern packedFuncPtr yv12_to_argbi;
147 : edgomez 1.5 extern packedFuncPtr yv12_to_yuyvi;
148 :     extern packedFuncPtr yv12_to_uyvyi;
149 :    
150 :     /* plain c */
151 :     packedFunc yv12_to_rgb555_c;
152 :     packedFunc yv12_to_rgb565_c;
153 : chl 1.8 packedFunc yv12_to_rgb_c;
154 : edgomez 1.5 packedFunc yv12_to_bgr_c;
155 :     packedFunc yv12_to_bgra_c;
156 :     packedFunc yv12_to_abgr_c;
157 :     packedFunc yv12_to_rgba_c;
158 : edgomez 1.6 packedFunc yv12_to_argb_c;
159 : edgomez 1.5 packedFunc yv12_to_yuyv_c;
160 :     packedFunc yv12_to_uyvy_c;
161 :    
162 :     packedFunc yv12_to_rgb555i_c;
163 :     packedFunc yv12_to_rgb565i_c;
164 : chl 1.8 packedFunc yv12_to_rgbi_c;
165 : edgomez 1.5 packedFunc yv12_to_bgri_c;
166 :     packedFunc yv12_to_bgrai_c;
167 :     packedFunc yv12_to_abgri_c;
168 :     packedFunc yv12_to_rgbai_c;
169 : edgomez 1.6 packedFunc yv12_to_argbi_c;
170 : edgomez 1.5 packedFunc yv12_to_yuyvi_c;
171 :     packedFunc yv12_to_uyvyi_c;
172 :    
173 : edgomez 1.6 #ifdef ARCH_IS_IA32
174 : edgomez 1.5 /* mmx */
175 :     packedFunc yv12_to_bgr_mmx;
176 :     packedFunc yv12_to_bgra_mmx;
177 :     packedFunc yv12_to_yuyv_mmx;
178 :     packedFunc yv12_to_uyvy_mmx;
179 :    
180 :     packedFunc yv12_to_yuyvi_mmx;
181 :     packedFunc yv12_to_uyvyi_mmx;
182 : edgomez 1.6 #endif
183 : edgomez 1.5
184 : edgomez 1.7 #ifdef ARCH_IS_PPC
185 :     packedFunc yv12_to_yuyv_altivec_c;
186 :     packedFunc yv12_to_uyvy_altivec_c;
187 :     #endif
188 : edgomez 1.5
189 :     typedef void (planarFunc) (
190 : edgomez 1.6 uint8_t * y_dst, uint8_t * u_dst, uint8_t * v_dst,
191 : edgomez 1.5 int y_dst_stride, int uv_dst_stride,
192 : edgomez 1.6 uint8_t * y_src, uint8_t * u_src, uint8_t * v_src,
193 : edgomez 1.5 int y_src_stride, int uv_src_stride,
194 :     int width, int height, int vflip);
195 :     typedef planarFunc *planarFuncPtr;
196 :    
197 :     extern planarFuncPtr yv12_to_yv12;
198 :    
199 :     planarFunc yv12_to_yv12_c;
200 : edgomez 1.6
201 :     #ifdef ARCH_IS_IA32
202 : edgomez 1.5 planarFunc yv12_to_yv12_mmx;
203 :     planarFunc yv12_to_yv12_xmm;
204 : edgomez 1.6 #endif
205 : suxen_drol 1.2
206 : Isibaar 1.1
207 : edgomez 1.3 #endif /* _COLORSPACE_H_ */

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4