Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

rgb2rgb.h

00001 /*
00002  *
00003  *  rgb2rgb.h, Software RGB to RGB convertor
00004  *  pluralize by Software PAL8 to RGB convertor
00005  *               Software YUV to YUV convertor
00006  *               Software YUV to RGB convertor
00007  */
00008 
00009 #ifndef RGB2RGB_INCLUDED
00010 #define RGB2RGB_INCLUDED
00011 
00012 // Note: do not fix the dependence on stdio.h
00013 
00014 /* A full collection of rgb to rgb(bgr) convertors */
00015 extern void (*rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00016 extern void (*rgb24to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00017 extern void (*rgb24to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00018 extern void (*rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00019 extern void (*rgb32to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00020 extern void (*rgb32to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00021 extern void (*rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00022 extern void (*rgb15to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00023 extern void (*rgb15to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00024 extern void (*rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00025 extern void (*rgb16to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00026 extern void (*rgb16to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
00027 extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00028 extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00029 extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00030 extern void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00031 extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00032 extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
00033 
00034 extern void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
00035 extern void rgb32tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
00036 extern void rgb16tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
00037 extern void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
00038 extern void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned src_size);
00039 extern void rgb16tobgr15(const uint8_t *src, uint8_t *dst, unsigned src_size);
00040 extern void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned src_size);
00041 extern void rgb15tobgr24(const uint8_t *src, uint8_t *dst, unsigned src_size);
00042 extern void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned src_size);
00043 extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, unsigned src_size);
00044 extern void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned src_size);
00045 
00046 
00047 extern void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00048 extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00049 extern void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00050 extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00051 extern void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00052 extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00053 extern void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00054 extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette);
00055 
00062 //void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00063 
00069 extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00070         unsigned int width, unsigned int height,
00071         int lumStride, int chromStride, int dstStride);
00072 
00077 extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00078         unsigned int width, unsigned int height,
00079         int lumStride, int chromStride, int dstStride);
00080 
00086 extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00087         unsigned int width, unsigned int height,
00088         int lumStride, int chromStride, int srcStride);
00089 
00095 extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00096         unsigned int width, unsigned int height,
00097         int lumStride, int chromStride, int dstStride);
00098 
00105 extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00106         unsigned int width, unsigned int height,
00107         int lumStride, int chromStride, int srcStride);
00108 extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
00109 
00110 extern void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
00111                             unsigned width, unsigned height, int src1Stride,
00112                             int src2Stride, int dstStride);
00113 
00114 extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
00115                         uint8_t *dst1, uint8_t *dst2,
00116                         unsigned width, unsigned height,
00117                         int srcStride1, int srcStride2,
00118                         int dstStride1, int dstStride2);
00119 
00120 extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
00121                         uint8_t *dst,
00122                         unsigned width, unsigned height,
00123                         int srcStride1, int srcStride2,
00124                         int srcStride3, int dstStride);
00125         
00126 
00127 #define MODE_RGB  0x1
00128 #define MODE_BGR  0x2
00129 
00130 static void yuv2rgb(uint8_t * image, uint8_t * py,
00131                               uint8_t * pu, uint8_t * pv,
00132                               unsigned h_size, unsigned v_size,
00133                               int rgb_stride, int y_stride, int uv_stride){
00134 printf("broken, this should use the swscaler\n");
00135 }
00136 
00137 static void yuv2rgb_init (unsigned bpp, int mode){
00138 printf("broken, this should use the swscaler\n");
00139 }
00140 
00141 void sws_rgb2rgb_init(int flags);
00142 
00143 #endif

Generated on Tue Dec 20 10:14:54 2005 for vlc-0.8.4a by  doxygen 1.4.2