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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1382 - (view) (download)

1 : edgomez 1382 /*****************************************************************************
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 :     * $Id: colorspace.h,v 1.6 2004-03-22 22:36:23 edgomez Exp $
23 :     *
24 :     ****************************************************************************/
25 :    
26 : Isibaar 3 #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 851 /* colorspace conversion function (encoder) */
38 : Isibaar 3
39 : edgomez 851 typedef void (packedFunc) (uint8_t * x_ptr,
40 :     int x_stride,
41 :     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 :     int height,
48 :     int vflip);
49 : Isibaar 3
50 : edgomez 851 typedef packedFunc *packedFuncPtr;
51 : Isibaar 3
52 : edgomez 851
53 :     /* xxx_to_yv12 colorspace conversion functions (encoder) */
54 :    
55 :     extern packedFuncPtr rgb555_to_yv12;
56 :     extern packedFuncPtr rgb565_to_yv12;
57 :     extern packedFuncPtr bgr_to_yv12;
58 :     extern packedFuncPtr bgra_to_yv12;
59 :     extern packedFuncPtr abgr_to_yv12;
60 :     extern packedFuncPtr rgba_to_yv12;
61 : edgomez 1382 extern packedFuncPtr argb_to_yv12;
62 : edgomez 851 extern packedFuncPtr yuyv_to_yv12;
63 :     extern packedFuncPtr uyvy_to_yv12;
64 :    
65 :     extern packedFuncPtr rgb555i_to_yv12;
66 :     extern packedFuncPtr rgb565i_to_yv12;
67 :     extern packedFuncPtr bgri_to_yv12;
68 :     extern packedFuncPtr bgrai_to_yv12;
69 :     extern packedFuncPtr abgri_to_yv12;
70 :     extern packedFuncPtr rgbai_to_yv12;
71 : edgomez 1382 extern packedFuncPtr argbi_to_yv12;
72 : edgomez 851 extern packedFuncPtr yuyvi_to_yv12;
73 :     extern packedFuncPtr uyvyi_to_yv12;
74 :    
75 : Isibaar 3 /* plain c */
76 : edgomez 851 packedFunc rgb555_to_yv12_c;
77 :     packedFunc rgb565_to_yv12_c;
78 :     packedFunc bgr_to_yv12_c;
79 :     packedFunc bgra_to_yv12_c;
80 :     packedFunc abgr_to_yv12_c;
81 :     packedFunc rgba_to_yv12_c;
82 : edgomez 1382 packedFunc argb_to_yv12_c;
83 : edgomez 851 packedFunc yuyv_to_yv12_c;
84 :     packedFunc uyvy_to_yv12_c;
85 : Isibaar 3
86 : edgomez 851 packedFunc rgb555i_to_yv12_c;
87 :     packedFunc rgb565i_to_yv12_c;
88 :     packedFunc bgri_to_yv12_c;
89 :     packedFunc bgrai_to_yv12_c;
90 :     packedFunc abgri_to_yv12_c;
91 :     packedFunc rgbai_to_yv12_c;
92 : edgomez 1382 packedFunc argbi_to_yv12_c;
93 : edgomez 851 packedFunc yuyvi_to_yv12_c;
94 :     packedFunc uyvyi_to_yv12_c;
95 :    
96 : edgomez 1382 #ifdef ARCH_IS_IA32
97 : Isibaar 3 /* mmx */
98 : edgomez 851 packedFunc bgr_to_yv12_mmx;
99 :     packedFunc bgra_to_yv12_mmx;
100 :     packedFunc yuyv_to_yv12_mmx;
101 :     packedFunc uyvy_to_yv12_mmx;
102 : Isibaar 3
103 : edgomez 851 /* 3dnow */
104 :     packedFunc yuyv_to_yv12_3dn;
105 :     packedFunc uyvy_to_yv12_3dn;
106 :    
107 : Isibaar 3 /* xmm */
108 : edgomez 851 packedFunc yuyv_to_yv12_xmm;
109 :     packedFunc uyvy_to_yv12_xmm;
110 : edgomez 1382 #endif
111 : Isibaar 3
112 :    
113 : edgomez 851 /* yv12_to_xxx colorspace conversion functions (decoder) */
114 : Isibaar 3
115 : edgomez 851 extern packedFuncPtr yv12_to_rgb555;
116 :     extern packedFuncPtr yv12_to_rgb565;
117 :     extern packedFuncPtr yv12_to_bgr;
118 :     extern packedFuncPtr yv12_to_bgra;
119 :     extern packedFuncPtr yv12_to_abgr;
120 :     extern packedFuncPtr yv12_to_rgba;
121 : edgomez 1382 extern packedFuncPtr yv12_to_argb;
122 : edgomez 851 extern packedFuncPtr yv12_to_yuyv;
123 :     extern packedFuncPtr yv12_to_uyvy;
124 : Isibaar 3
125 : edgomez 851 extern packedFuncPtr yv12_to_rgb555i;
126 :     extern packedFuncPtr yv12_to_rgb565i;
127 :     extern packedFuncPtr yv12_to_bgri;
128 :     extern packedFuncPtr yv12_to_bgrai;
129 :     extern packedFuncPtr yv12_to_abgri;
130 :     extern packedFuncPtr yv12_to_rgbai;
131 : edgomez 1382 extern packedFuncPtr yv12_to_argbi;
132 : edgomez 851 extern packedFuncPtr yv12_to_yuyvi;
133 :     extern packedFuncPtr yv12_to_uyvyi;
134 : edgomez 195
135 : Isibaar 3 /* plain c */
136 : edgomez 851 packedFunc yv12_to_rgb555_c;
137 :     packedFunc yv12_to_rgb565_c;
138 :     packedFunc yv12_to_bgr_c;
139 :     packedFunc yv12_to_bgra_c;
140 :     packedFunc yv12_to_abgr_c;
141 :     packedFunc yv12_to_rgba_c;
142 : edgomez 1382 packedFunc yv12_to_argb_c;
143 : edgomez 851 packedFunc yv12_to_yuyv_c;
144 :     packedFunc yv12_to_uyvy_c;
145 : Isibaar 3
146 : edgomez 851 packedFunc yv12_to_rgb555i_c;
147 :     packedFunc yv12_to_rgb565i_c;
148 :     packedFunc yv12_to_bgri_c;
149 :     packedFunc yv12_to_bgrai_c;
150 :     packedFunc yv12_to_abgri_c;
151 :     packedFunc yv12_to_rgbai_c;
152 : edgomez 1382 packedFunc yv12_to_argbi_c;
153 : edgomez 851 packedFunc yv12_to_yuyvi_c;
154 :     packedFunc yv12_to_uyvyi_c;
155 : Isibaar 3
156 : edgomez 1382 #ifdef ARCH_IS_IA32
157 : Isibaar 3 /* mmx */
158 : edgomez 851 packedFunc yv12_to_bgr_mmx;
159 :     packedFunc yv12_to_bgra_mmx;
160 :     packedFunc yv12_to_yuyv_mmx;
161 :     packedFunc yv12_to_uyvy_mmx;
162 : Isibaar 3
163 : edgomez 851 packedFunc yv12_to_yuyvi_mmx;
164 :     packedFunc yv12_to_uyvyi_mmx;
165 : edgomez 1382 #endif
166 : suxen_drol 118
167 :    
168 : edgomez 851 typedef void (planarFunc) (
169 : edgomez 1382 uint8_t * y_dst, uint8_t * u_dst, uint8_t * v_dst,
170 : edgomez 851 int y_dst_stride, int uv_dst_stride,
171 : edgomez 1382 uint8_t * y_src, uint8_t * u_src, uint8_t * v_src,
172 : edgomez 851 int y_src_stride, int uv_src_stride,
173 :     int width, int height, int vflip);
174 :     typedef planarFunc *planarFuncPtr;
175 :    
176 :     extern planarFuncPtr yv12_to_yv12;
177 :    
178 :     planarFunc yv12_to_yv12_c;
179 : edgomez 1382
180 :     #ifdef ARCH_IS_IA32
181 : edgomez 851 planarFunc yv12_to_yv12_mmx;
182 :     planarFunc yv12_to_yv12_xmm;
183 : edgomez 1382 #endif
184 : edgomez 851
185 :    
186 : edgomez 195 #endif /* _COLORSPACE_H_ */

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