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 (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
00051 extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
00052
00053 extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
00054
00055 void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size);
00056 void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size);
00057 void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00058 void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size);
00059 void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00060 void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00061 void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00062 void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size);
00063 void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00064 void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00065 void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size);
00066 void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size);
00067
00068 void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size);
00069 void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size);
00070 void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, int src_size);
00071 void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, int src_size);
00072
00073 void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
00074 uint8_t *vdst, int width, int height, int lumStride,
00075 int chromStride, int srcStride);
00076
00081 extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00082 int width, int height,
00083 int lumStride, int chromStride, int dstStride);
00084
00088 extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00089 int width, int height,
00090 int lumStride, int chromStride, int dstStride);
00091
00096 extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00097 int width, int height,
00098 int lumStride, int chromStride, int srcStride);
00099
00104 extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00105 int width, int height,
00106 int lumStride, int chromStride, int dstStride);
00107
00111 extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00112 int width, int height,
00113 int lumStride, int chromStride, int dstStride);
00114
00121 extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00122 int width, int height,
00123 int lumStride, int chromStride, int srcStride);
00124 extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,
00125 int srcStride, int dstStride);
00126
00127 extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
00128 int width, int height, int src1Stride,
00129 int src2Stride, int dstStride);
00130
00131 extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
00132 uint8_t *dst1, uint8_t *dst2,
00133 int width, int height,
00134 int srcStride1, int srcStride2,
00135 int dstStride1, int dstStride2);
00136
00137 extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
00138 uint8_t *dst,
00139 int width, int height,
00140 int srcStride1, int srcStride2,
00141 int srcStride3, int dstStride);
00142
00143 extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00144 int width, int height,
00145 int lumStride, int chromStride, int srcStride);
00146 extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00147 int width, int height,
00148 int lumStride, int chromStride, int srcStride);
00149 extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00150 int width, int height,
00151 int lumStride, int chromStride, int srcStride);
00152 extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00153 int width, int height,
00154 int lumStride, int chromStride, int srcStride);
00155
00156 void sws_rgb2rgb_init(void);
00157
00158 void rgb2rgb_init_x86(void);
00159
00160 #endif