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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Sun Nov 17 00:20:30 2002 UTC revision 1.5, Sat Feb 15 15:22:18 2003 UTC
# Line 1  Line 1 
 /*****************************************************************************  
  *  
  *  XVID MPEG4 Codec  
  *  - Colorspace functions - header files  
  *  
  *  This file is part of XviD, a free MPEG-4 video encoder/decoder  
  *  
  *  XviD is free software; you can redistribute it and/or modify it  
  *  under the terms of the GNU General Public License as published by  
  *  the Free Software Foundation; either version 2 of the License, or  
  *  (at your option) any later version.  
  *  
  *  This program is distributed in the hope that it will be useful,  
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of  
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
  *  GNU General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with this program; if not, write to the Free Software  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  
  *  
  *  Under section 8 of the GNU General Public License, the copyright  
  *  holders of XVID explicitly forbid distribution in the following  
  *  countries:  
  *  
  *    - Japan  
  *    - United States of America  
  *  
  *  Linking XviD statically or dynamically with other modules is making a  
  *  combined work based on XviD.  Thus, the terms and conditions of the  
  *  GNU General Public License cover the whole combination.  
  *  
  *  As a special exception, the copyright holders of XviD give you  
  *  permission to link XviD with independent modules that communicate with  
  *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the  
  *  license terms of these independent modules, and to copy and distribute  
  *  the resulting combined work under terms of your choice, provided that  
  *  every copy of the combined work is accompanied by a complete copy of  
  *  the source code of XviD (the version of XviD used to produce the  
  *  combined work), being distributed under the terms of the GNU General  
  *  Public License plus this exception.  An independent module is a module  
  *  which is not derived from or based on XviD.  
  *  
  *  Note that people who make modified versions of XviD are not obligated  
  *  to grant this special exception for their modified versions; it is  
  *  their choice whether to do so.  The GNU General Public License gives  
  *  permission to release a modified version without this exception; this  
  *  exception also makes it possible to release a modified version which  
  *  carries forward this exception.  
  *  
  * $Id$  
  *  
  ****************************************************************************/  
   
1  #ifndef _COLORSPACE_H  #ifndef _COLORSPACE_H
   
2  #define _COLORSPACE_H  #define _COLORSPACE_H
3    
4  #include "../portab.h"  #include "../portab.h"
# Line 64  Line 9 
9  void colorspace_init(void);  void colorspace_init(void);
10    
11    
 /* input color conversion functions (encoder) */  
12    
13  typedef void (color_inputFunc) (uint8_t * y_out,  /* colorspace conversion function (encoder) */
14                                                                  uint8_t * u_out,  
15                                                                  uint8_t * v_out,  typedef void (packedFunc) (uint8_t * x_ptr,
16                                                                  uint8_t * src,                                                                   int x_stride,
17                                                                     uint8_t * y_src,
18                                                                     uint8_t * v_src,
19                                                                     uint8_t * u_src,
20                                                                     int y_stride,
21                                                                     int uv_stride,
22                                                                  int width,                                                                  int width,
23                                                                  int height,                                                                  int height,
24                                                                  int stride);                                                                   int vflip);
25    
26    typedef packedFunc *packedFuncPtr;
27    
 typedef color_inputFunc *color_inputFuncPtr;  
28    
29  extern color_inputFuncPtr rgb555_to_yv12;  /* xxx_to_yv12 colorspace conversion functions (encoder) */
30  extern color_inputFuncPtr rgb565_to_yv12;  
31  extern color_inputFuncPtr rgb24_to_yv12;  extern packedFuncPtr rgb555_to_yv12;
32  extern color_inputFuncPtr rgb32_to_yv12;  extern packedFuncPtr rgb565_to_yv12;
33  extern color_inputFuncPtr yuv_to_yv12;  extern packedFuncPtr bgr_to_yv12;
34  extern color_inputFuncPtr yuyv_to_yv12;  extern packedFuncPtr bgra_to_yv12;
35  extern color_inputFuncPtr uyvy_to_yv12;  extern packedFuncPtr abgr_to_yv12;
36    extern packedFuncPtr rgba_to_yv12;
37    extern packedFuncPtr yuyv_to_yv12;
38    extern packedFuncPtr uyvy_to_yv12;
39    
40    extern packedFuncPtr rgb555i_to_yv12;
41    extern packedFuncPtr rgb565i_to_yv12;
42    extern packedFuncPtr bgri_to_yv12;
43    extern packedFuncPtr bgrai_to_yv12;
44    extern packedFuncPtr abgri_to_yv12;
45    extern packedFuncPtr rgbai_to_yv12;
46    extern packedFuncPtr yuyvi_to_yv12;
47    extern packedFuncPtr uyvyi_to_yv12;
48    
49    
50  /* plain c */  /* plain c */
51  color_inputFunc rgb555_to_yv12_c;  packedFunc rgb555_to_yv12_c;
52  color_inputFunc rgb565_to_yv12_c;  packedFunc rgb565_to_yv12_c;
53  color_inputFunc rgb24_to_yv12_c;  packedFunc bgr_to_yv12_c;
54  color_inputFunc rgb32_to_yv12_c;  packedFunc bgra_to_yv12_c;
55  color_inputFunc yuv_to_yv12_c;  packedFunc abgr_to_yv12_c;
56  color_inputFunc yuyv_to_yv12_c;  packedFunc rgba_to_yv12_c;
57  color_inputFunc uyvy_to_yv12_c;  packedFunc yuyv_to_yv12_c;
58    packedFunc uyvy_to_yv12_c;
59    
60    packedFunc rgb555i_to_yv12_c;
61    packedFunc rgb565i_to_yv12_c;
62    packedFunc bgri_to_yv12_c;
63    packedFunc bgrai_to_yv12_c;
64    packedFunc abgri_to_yv12_c;
65    packedFunc rgbai_to_yv12_c;
66    packedFunc yuyvi_to_yv12_c;
67    packedFunc uyvyi_to_yv12_c;
68    
69    
70  /* mmx */  /* mmx */
71  color_inputFunc rgb24_to_yv12_mmx;  packedFunc bgr_to_yv12_mmx;
72  color_inputFunc rgb32_to_yv12_mmx;  packedFunc bgra_to_yv12_mmx;
73  color_inputFunc yuv_to_yv12_mmx;  packedFunc yuyv_to_yv12_mmx;
74  color_inputFunc yuyv_to_yv12_mmx;  packedFunc uyvy_to_yv12_mmx;
75  color_inputFunc uyvy_to_yv12_mmx;  
76    /* 3dnow */
77    packedFunc yuyv_to_yv12_3dn;
78    packedFunc uyvy_to_yv12_3dn;
79    
80  /* xmm */  /* xmm */
81  color_inputFunc yuv_to_yv12_xmm;  packedFunc yuyv_to_yv12_xmm;
82    packedFunc uyvy_to_yv12_xmm;
83    
84    
85  /* output color conversion functions (decoder) */  /* yv12_to_xxx colorspace conversion functions (decoder) */
86    
87  typedef void (color_outputFunc) (uint8_t * dst,  extern packedFuncPtr yv12_to_rgb555;
88                                                                   int dst_stride,  extern packedFuncPtr yv12_to_rgb565;
89                                                                   uint8_t * y_src,  extern packedFuncPtr yv12_to_bgr;
90                                                                   uint8_t * v_src,  extern packedFuncPtr yv12_to_bgra;
91                                                                   uint8_t * u_src,  extern packedFuncPtr yv12_to_abgr;
92                                                                   int y_stride,  extern packedFuncPtr yv12_to_rgba;
93                                                                   int uv_stride,  extern packedFuncPtr yv12_to_yuyv;
94                                                                   int width,  extern packedFuncPtr yv12_to_uyvy;
95                                                                   int height);  
96    extern packedFuncPtr yv12_to_rgb555i;
97  typedef color_outputFunc *color_outputFuncPtr;  extern packedFuncPtr yv12_to_rgb565i;
98    extern packedFuncPtr yv12_to_bgri;
99  extern color_outputFuncPtr yv12_to_rgb555;  extern packedFuncPtr yv12_to_bgrai;
100  extern color_outputFuncPtr yv12_to_rgb565;  extern packedFuncPtr yv12_to_abgri;
101  extern color_outputFuncPtr yv12_to_rgb24;  extern packedFuncPtr yv12_to_rgbai;
102  extern color_outputFuncPtr yv12_to_rgb32;  extern packedFuncPtr yv12_to_yuyvi;
103  extern color_outputFuncPtr yv12_to_yuv;  extern packedFuncPtr yv12_to_uyvyi;
 extern color_outputFuncPtr yv12_to_yuyv;  
 extern color_outputFuncPtr yv12_to_uyvy;  
104    
105  /* plain c */  /* plain c */
106  void init_yuv_to_rgb(void);  packedFunc yv12_to_rgb555_c;
107    packedFunc yv12_to_rgb565_c;
108  color_outputFunc yv12_to_rgb555_c;  packedFunc yv12_to_bgr_c;
109  color_outputFunc yv12_to_rgb565_c;  packedFunc yv12_to_bgra_c;
110  color_outputFunc yv12_to_rgb24_c;  packedFunc yv12_to_abgr_c;
111  color_outputFunc yv12_to_rgb32_c;  packedFunc yv12_to_rgba_c;
112  color_outputFunc yv12_to_yuv_c;  packedFunc yv12_to_yuyv_c;
113  color_outputFunc yv12_to_yuyv_c;  packedFunc yv12_to_uyvy_c;
114  color_outputFunc yv12_to_uyvy_c;  
115    packedFunc yv12_to_rgb555i_c;
116    packedFunc yv12_to_rgb565i_c;
117    packedFunc yv12_to_bgri_c;
118    packedFunc yv12_to_bgrai_c;
119    packedFunc yv12_to_abgri_c;
120    packedFunc yv12_to_rgbai_c;
121    packedFunc yv12_to_yuyvi_c;
122    packedFunc yv12_to_uyvyi_c;
123    
124  /* mmx */  /* mmx */
125  color_outputFunc yv12_to_rgb24_mmx;  packedFunc yv12_to_bgr_mmx;
126  color_outputFunc yv12_to_rgb32_mmx;  packedFunc yv12_to_bgra_mmx;
127  color_outputFunc yv12_to_yuyv_mmx;  packedFunc yv12_to_yuyv_mmx;
128  color_outputFunc yv12_to_uyvy_mmx;  packedFunc yv12_to_uyvy_mmx;
129    
130    packedFunc yv12_to_yuyvi_mmx;
131    packedFunc yv12_to_uyvyi_mmx;
132    
133    
134    typedef void (planarFunc) (
135                                    uint8_t * y_dst, uint8_t * u_dst, uint8_t * v_dst,
136                                    int y_dst_stride, int uv_dst_stride,
137                                    uint8_t * y_src, uint8_t * u_src, uint8_t * v_src,
138                                    int y_src_stride, int uv_src_stride,
139                                    int width, int height, int vflip);
140    typedef planarFunc *planarFuncPtr;
141    
142    extern planarFuncPtr yv12_to_yv12;
143    
144    planarFunc yv12_to_yv12_c;
145    planarFunc yv12_to_yv12_mmx;
146    planarFunc yv12_to_yv12_xmm;
147    
148    
 void user_to_yuv_c(uint8_t * y_out,  
                                    uint8_t * u_out,  
                                    uint8_t * v_out,  
                                    int stride,  
                                    DEC_PICTURE * picture,  
                                    int width,  
                                    int height);  
   
149  #endif                                                  /* _COLORSPACE_H_ */  #endif                                                  /* _COLORSPACE_H_ */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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