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 rgb64tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size);
00056 void rgb64tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size);
00057 void rgb48tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size);
00058 void rgb48tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size);
00059 void rgb64to48_nobswap(const uint8_t *src, uint8_t *dst, int src_size);
00060 void rgb64to48_bswap(const uint8_t *src, uint8_t *dst, int src_size);
00061 void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size);
00062 void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size);
00063 void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00064 void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size);
00065 void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00066 void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00067 void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size);
00068 void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size);
00069 void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size);
00070 void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size);
00071 void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size);
00072 void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size);
00073
00074 void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size);
00075 void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size);
00076 void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, int src_size);
00077 void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, int src_size);
00078
00079 void rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst,
00080 uint8_t *vdst, int width, int height, int lumStride,
00081 int chromStride, int srcStride);
00082
00087 extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00088 int width, int height,
00089 int lumStride, int chromStride, int dstStride);
00090
00094 extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00095 int width, int height,
00096 int lumStride, int chromStride, int dstStride);
00097
00102 extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00103 int width, int height,
00104 int lumStride, int chromStride, int srcStride);
00105
00110 extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00111 int width, int height,
00112 int lumStride, int chromStride, int dstStride);
00113
00117 extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
00118 int width, int height,
00119 int lumStride, int chromStride, int dstStride);
00120
00127 extern void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
00128 int width, int height,
00129 int lumStride, int chromStride, int srcStride);
00130 extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height,
00131 int srcStride, int dstStride);
00132
00133 extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst,
00134 int width, int height, int src1Stride,
00135 int src2Stride, int dstStride);
00136
00137 extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
00138 uint8_t *dst1, uint8_t *dst2,
00139 int width, int height,
00140 int srcStride1, int srcStride2,
00141 int dstStride1, int dstStride2);
00142
00143 extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
00144 uint8_t *dst,
00145 int width, int height,
00146 int srcStride1, int srcStride2,
00147 int srcStride3, int dstStride);
00148
00149 extern void (*uyvytoyuv420)(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 (*uyvytoyuv422)(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 extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00156 int width, int height,
00157 int lumStride, int chromStride, int srcStride);
00158 extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
00159 int width, int height,
00160 int lumStride, int chromStride, int srcStride);
00161
00162 void sws_rgb2rgb_init(void);
00163
00164 void rgb2rgb_init_x86(void);
00165
00166 #endif