00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SWSCALE_RGB2RGB_H
00027 #define SWSCALE_RGB2RGB_H
00028
00029 #include <inttypes.h>
00030
00031 #include "libswscale/swscale.h"
00032 #include "libavutil/avutil.h"
00033
00034
00035 extern void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size);
00036 extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
00037 extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
00038 extern void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
00039 extern void (*rgb32to16) (const uint8_t *src, uint8_t *dst, int src_size);
00040 extern void (*rgb32to15) (const uint8_t *src, uint8_t *dst, int src_size);
00041 extern void (*rgb15to16) (const uint8_t *src, uint8_t *dst, int src_size);
00042 extern void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
00043 extern void (*rgb15to32) (const uint8_t *src, uint8_t *dst, int src_size);
00044 extern void (*rgb16to15) (const uint8_t *src, uint8_t *dst, int src_size);
00045 extern void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
00046 extern void (*rgb16to32) (const uint8_t *src, uint8_t *dst, int src_size);
00047 extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size);
00048 extern void (*rgb24to16) (const uint8_t *src, uint8_t *dst, int src_size);
00049 extern void (*rgb24to15) (const uint8_t *src, uint8_t *dst, int src_size);
00050 extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
00051 extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
00052 extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
00053
00054 void rgb24to32 (const uint8_t *src, uint8_t *dst, int src_size);
00055 void rgb32to24 (const uint8_t *src, uint8_t *dst, int src_size);
00056 void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00057 void rgb16to24 (const uint8_t *src, uint8_t *dst, int src_size);
00058 void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00059 void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00060 void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00061 void rgb15to24 (const uint8_t *src, uint8_t *dst, int src_size);
00062 void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00063 void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00064 void bgr8torgb8 (const uint8_t *src, uint8_t *dst, int src_size);
00065
00066 void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size);
00067 void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size);
00068 void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, int src_size);
00069 void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, int src_size);
00070
00071 void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
00072 uint8_t *vdst, int width, int height, int lumStride,
00073 int chromStride, int srcStride);
00074
00079 extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00080 int width, int height,
00081 int lumStride, int chromStride, int dstStride);
00082
00086 extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00087 int width, int height,
00088 int lumStride, int chromStride, int dstStride);
00089
00094 extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00095 int width, int height,
00096 int lumStride, int chromStride, int srcStride);
00097
00102 extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00103 int width, int height,
00104 int lumStride, int chromStride, int dstStride);
00105
00109 extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00110 int width, int height,
00111 int lumStride, int chromStride, int dstStride);
00112
00119 extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00120 int width, int height,
00121 int lumStride, int chromStride, int srcStride);
00122 extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,
00123 int srcStride, int dstStride);
00124
00125 extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
00126 int width, int height, int src1Stride,
00127 int src2Stride, int dstStride);
00128
00129 extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
00130 uint8_t *dst1, uint8_t *dst2,
00131 int width, int height,
00132 int srcStride1, int srcStride2,
00133 int dstStride1, int dstStride2);
00134
00135 extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
00136 uint8_t *dst,
00137 int width, int height,
00138 int srcStride1, int srcStride2,
00139 int srcStride3, int dstStride);
00140
00141
00142 extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00143 int width, int height,
00144 int lumStride, int chromStride, int srcStride);
00145 extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00146 int width, int height,
00147 int lumStride, int chromStride, int srcStride);
00148 extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00149 int width, int height,
00150 int lumStride, int chromStride, int srcStride);
00151 extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00152 int width, int height,
00153 int lumStride, int chromStride, int srcStride);
00154
00155 void sws_rgb2rgb_init(void);
00156
00157 void rgb2rgb_init_x86(void);
00158
00159 #endif