[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.3.2.2, Thu Nov 7 10:28:15 2002 UTC revision 1.4, Sun Nov 17 00:20:30 2002 UTC
# Line 1  Line 1 
1    /*****************************************************************************
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$
52     *
53     ****************************************************************************/
54    
55  #ifndef _COLORSPACE_H  #ifndef _COLORSPACE_H
56    
57  #define _COLORSPACE_H  #define _COLORSPACE_H
58    
59  #include "../portab.h"  #include "../portab.h"
# Line 9  Line 64 
64  void colorspace_init(void);  void colorspace_init(void);
65    
66    
67    /* input color conversion functions (encoder) */
68    
69  /* colorspace conversion function (encoder) */  typedef void (color_inputFunc) (uint8_t * y_out,
70                                                                    uint8_t * u_out,
71  typedef void (packedFunc) (uint8_t * x_ptr,                                                                  uint8_t * v_out,
72                                                                   int x_stride,                                                                  uint8_t * src,
                                                                  uint8_t * y_src,  
                                                                  uint8_t * v_src,  
                                                                  uint8_t * u_src,  
                                                                  int y_stride,  
                                                                  int uv_stride,  
73                                                                   int width,                                                                   int width,
74                                                                   int height,                                                                   int height,
75                                                                   int vflip);                                                                  int stride);
   
 typedef packedFunc *packedFuncPtr;  
76    
77    typedef color_inputFunc *color_inputFuncPtr;
78    
79  /* xxx_to_yv12 colorspace conversion functions (encoder) */  extern color_inputFuncPtr rgb555_to_yv12;
80    extern color_inputFuncPtr rgb565_to_yv12;
81  extern packedFuncPtr rgb555_to_yv12;  extern color_inputFuncPtr rgb24_to_yv12;
82  extern packedFuncPtr rgb565_to_yv12;  extern color_inputFuncPtr rgb32_to_yv12;
83  extern packedFuncPtr bgr_to_yv12;  extern color_inputFuncPtr yuv_to_yv12;
84  extern packedFuncPtr bgra_to_yv12;  extern color_inputFuncPtr yuyv_to_yv12;
85  extern packedFuncPtr abgr_to_yv12;  extern color_inputFuncPtr uyvy_to_yv12;
 extern packedFuncPtr rgba_to_yv12;  
 extern packedFuncPtr yuyv_to_yv12;  
 extern packedFuncPtr uyvy_to_yv12;  
   
 extern packedFuncPtr rgb555i_to_yv12;  
 extern packedFuncPtr rgb565i_to_yv12;  
 extern packedFuncPtr bgri_to_yv12;  
 extern packedFuncPtr bgrai_to_yv12;  
 extern packedFuncPtr abgri_to_yv12;  
 extern packedFuncPtr rgbai_to_yv12;  
 extern packedFuncPtr yuyvi_to_yv12;  
 extern packedFuncPtr uyvyi_to_yv12;  
   
86    
87  /* plain c */  /* plain c */
88  packedFunc rgb555_to_yv12_c;  color_inputFunc rgb555_to_yv12_c;
89  packedFunc rgb565_to_yv12_c;  color_inputFunc rgb565_to_yv12_c;
90  packedFunc bgr_to_yv12_c;  color_inputFunc rgb24_to_yv12_c;
91  packedFunc bgra_to_yv12_c;  color_inputFunc rgb32_to_yv12_c;
92  packedFunc abgr_to_yv12_c;  color_inputFunc yuv_to_yv12_c;
93  packedFunc rgba_to_yv12_c;  color_inputFunc yuyv_to_yv12_c;
94  packedFunc yuyv_to_yv12_c;  color_inputFunc uyvy_to_yv12_c;
 packedFunc uyvy_to_yv12_c;  
   
 packedFunc rgb555i_to_yv12_c;  
 packedFunc rgb565i_to_yv12_c;  
 packedFunc bgri_to_yv12_c;  
 packedFunc bgrai_to_yv12_c;  
 packedFunc abgri_to_yv12_c;  
 packedFunc rgbai_to_yv12_c;  
 packedFunc yuyvi_to_yv12_c;  
 packedFunc uyvyi_to_yv12_c;  
   
95    
96  /* mmx */  /* mmx */
97  packedFunc bgr_to_yv12_mmx;  color_inputFunc rgb24_to_yv12_mmx;
98  packedFunc bgra_to_yv12_mmx;  color_inputFunc rgb32_to_yv12_mmx;
99  packedFunc yuyv_to_yv12_mmx;  color_inputFunc yuv_to_yv12_mmx;
100  packedFunc uyvy_to_yv12_mmx;  color_inputFunc yuyv_to_yv12_mmx;
101    color_inputFunc uyvy_to_yv12_mmx;
 /* 3dnow */  
 packedFunc yuyv_to_yv12_3dn;  
 packedFunc uyvy_to_yv12_3dn;  
102    
103  /* xmm */  /* xmm */
104  packedFunc yuyv_to_yv12_xmm;  color_inputFunc yuv_to_yv12_xmm;
 packedFunc uyvy_to_yv12_xmm;  
105    
106    
107  /* yv12_to_xxx colorspace conversion functions (decoder) */  /* output color conversion functions (decoder) */
108    
109  extern packedFuncPtr yv12_to_rgb555;  typedef void (color_outputFunc) (uint8_t * dst,
110  extern packedFuncPtr yv12_to_rgb565;                                                                   int dst_stride,
111  extern packedFuncPtr yv12_to_bgr;                                                                   uint8_t * y_src,
112  extern packedFuncPtr yv12_to_bgra;                                                                   uint8_t * v_src,
113  extern packedFuncPtr yv12_to_abgr;                                                                   uint8_t * u_src,
114  extern packedFuncPtr yv12_to_rgba;                                                                   int y_stride,
115  extern packedFuncPtr yv12_to_yuyv;                                                                   int uv_stride,
116  extern packedFuncPtr yv12_to_uyvy;                                                                   int width,
117                                                                     int height);
118  extern packedFuncPtr yv12_to_rgb555i;  
119  extern packedFuncPtr yv12_to_rgb565i;  typedef color_outputFunc *color_outputFuncPtr;
120  extern packedFuncPtr yv12_to_bgri;  
121  extern packedFuncPtr yv12_to_bgrai;  extern color_outputFuncPtr yv12_to_rgb555;
122  extern packedFuncPtr yv12_to_abgri;  extern color_outputFuncPtr yv12_to_rgb565;
123  extern packedFuncPtr yv12_to_rgbai;  extern color_outputFuncPtr yv12_to_rgb24;
124  extern packedFuncPtr yv12_to_yuyvi;  extern color_outputFuncPtr yv12_to_rgb32;
125  extern packedFuncPtr yv12_to_uyvyi;  extern color_outputFuncPtr yv12_to_yuv;
126    extern color_outputFuncPtr yv12_to_yuyv;
127    extern color_outputFuncPtr yv12_to_uyvy;
128    
129  /* plain c */  /* plain c */
130  packedFunc yv12_to_rgb555_c;  void init_yuv_to_rgb(void);
131  packedFunc yv12_to_rgb565_c;  
132  packedFunc yv12_to_bgr_c;  color_outputFunc yv12_to_rgb555_c;
133  packedFunc yv12_to_bgra_c;  color_outputFunc yv12_to_rgb565_c;
134  packedFunc yv12_to_abgr_c;  color_outputFunc yv12_to_rgb24_c;
135  packedFunc yv12_to_rgba_c;  color_outputFunc yv12_to_rgb32_c;
136  packedFunc yv12_to_yuyv_c;  color_outputFunc yv12_to_yuv_c;
137  packedFunc yv12_to_uyvy_c;  color_outputFunc yv12_to_yuyv_c;
138    color_outputFunc yv12_to_uyvy_c;
 packedFunc yv12_to_rgb555i_c;  
 packedFunc yv12_to_rgb565i_c;  
 packedFunc yv12_to_bgri_c;  
 packedFunc yv12_to_bgrai_c;  
 packedFunc yv12_to_abgri_c;  
 packedFunc yv12_to_rgbai_c;  
 packedFunc yv12_to_yuyvi_c;  
 packedFunc yv12_to_uyvyi_c;  
139    
140  /* mmx */  /* mmx */
141  packedFunc yv12_to_bgr_mmx;  color_outputFunc yv12_to_rgb24_mmx;
142  packedFunc yv12_to_bgra_mmx;  color_outputFunc yv12_to_rgb32_mmx;
143  packedFunc yv12_to_yuyv_mmx;  color_outputFunc yv12_to_yuyv_mmx;
144  packedFunc yv12_to_uyvy_mmx;  color_outputFunc yv12_to_uyvy_mmx;
   
 packedFunc yv12_to_yuyvi_mmx;  
 packedFunc yv12_to_uyvyi_mmx;  
   
   
 typedef void (planarFunc) (  
                                 uint8_t * y_dst, uint8_t * u_dst, uint8_t * v_dst,  
                                 int y_dst_stride, int uv_dst_stride,  
                                 uint8_t * y_src, uint8_t * u_src, uint8_t * v_src,  
                                 int y_src_stride, int uv_src_stride,  
                                 int width, int height, int vflip);  
 typedef planarFunc *planarFuncPtr;  
   
 extern planarFuncPtr yv12_to_yv12;  
   
 planarFunc yv12_to_yv12_c;  
 planarFunc yv12_to_yv12_mmx;  
 planarFunc yv12_to_yv12_xmm;  
145    
146    
147    void user_to_yuv_c(uint8_t * y_out,
148                                       uint8_t * u_out,
149                                       uint8_t * v_out,
150                                       int stride,
151                                       DEC_PICTURE * picture,
152                                       int width,
153                                       int height);
154    
155  #endif                                                  /* _COLORSPACE_H_ */  #endif                                                  /* _COLORSPACE_H_ */

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

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