+#define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit
+
+void (*rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb24to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb24to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb32to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb32to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb32to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb15to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb15to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb15to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb16to15)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb16to24)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+void (*rgb16to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
+//void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+//void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size);
+
+void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
+ unsigned int width, unsigned int height,
+ int lumStride, int chromStride, int dstStride);
+void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
+ unsigned int width, unsigned int height,
+ int lumStride, int chromStride, int dstStride);
+void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
+ unsigned int width, unsigned int height,
+ int lumStride, int chromStride, int dstStride);
+void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
+ unsigned int width, unsigned int height,
+ int lumStride, int chromStride, int srcStride);
+void (*rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
+ unsigned int width, unsigned int height,
+ int lumStride, int chromStride, int srcStride);
+void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride);
+void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
+ unsigned width, unsigned height, int src1Stride,
+ int src2Stride, int dstStride);
+void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
+ uint8_t *dst1, uint8_t *dst2,
+ unsigned width, unsigned height,
+ int srcStride1, int srcStride2,
+ int dstStride1, int dstStride2);
+void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3,
+ uint8_t *dst,
+ unsigned width, unsigned height,
+ int srcStride1, int srcStride2,
+ int srcStride3, int dstStride);
+
+#if defined(ARCH_X86) || defined(ARCH_X86_64)
+static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL;
+static const uint64_t mmx_one __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL;
+static const uint64_t mask32b attribute_used __attribute__((aligned(8))) = 0x000000FF000000FFULL;
+static const uint64_t mask32g attribute_used __attribute__((aligned(8))) = 0x0000FF000000FF00ULL;
+static const uint64_t mask32r attribute_used __attribute__((aligned(8))) = 0x00FF000000FF0000ULL;