#include <stddef.h>
Go to the source code of this file.
Defines | |
#define | PREFETCH " # nop" |
#define | EMMS "emms" |
#define | MOVNTQ "movq" |
#define | SFENCE " # nop" |
#define | STORE_BGR24_MMX |
#define | PACK_RGB32 |
Functions | |
static void | rgb24tobgr32_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb32tobgr24_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb15to16_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb16to15_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb32to16_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb32tobgr16_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb32to15_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb32tobgr15_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb24tobgr16_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb24to16_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb24tobgr15_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb24to15_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb15tobgr24_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb16tobgr24_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb15to32_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb16to32_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | shuffle_bytes_2103_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | rgb24tobgr24_TMPL (const uint8_t *src, uint8_t *dst, int src_size) |
static void | yuvPlanartoyuy2_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride, int vertLumPerChroma) |
static void | yv12toyuy2_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride) |
Height should be a multiple of 2 and width should be a multiple of 16. | |
static void | yuvPlanartouyvy_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride, int vertLumPerChroma) |
static void | yv12touyvy_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride) |
Height should be a multiple of 2 and width should be a multiple of 16 (If this is a problem for anyone then tell me, and I will fix it. | |
static void | yuv422ptouyvy_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride) |
Width should be a multiple of 16. | |
static void | yuv422ptoyuy2_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride) |
Width should be a multiple of 16. | |
static void | yuy2toyv12_TMPL (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride) |
Height should be a multiple of 2 and width should be a multiple of 16. | |
static void | uyvytoyv12_TMPL (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride) |
Height should be a multiple of 2 and width should be a multiple of 16. | |
static void | rgb24toyv12_TMPL (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride) |
Height should be a multiple of 2 and width should be a multiple of 2. | |
static void | interleaveBytes_TMPL (const uint8_t *src1, const uint8_t *src2, uint8_t *dest, int width, int height, int src1Stride, int src2Stride, int dstStride) |
static void | vu9_to_vu12_TMPL (const uint8_t *src1, const uint8_t *src2, uint8_t *dst1, uint8_t *dst2, int width, int height, int srcStride1, int srcStride2, int dstStride1, int dstStride2) |
static void | yvu9_to_yuy2_TMPL (const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, int width, int height, int srcStride1, int srcStride2, int srcStride3, int dstStride) |
static void | extract_even_TMPL (const uint8_t *src, uint8_t *dst, x86_reg count) |
static void | extract_even2_TMPL (const uint8_t *src, uint8_t *dst0, uint8_t *dst1, x86_reg count) |
static void | extract_even2avg_TMPL (const uint8_t *src0, const uint8_t *src1, uint8_t *dst0, uint8_t *dst1, x86_reg count) |
static void | extract_odd2_TMPL (const uint8_t *src, uint8_t *dst0, uint8_t *dst1, x86_reg count) |
static void | extract_odd2avg_TMPL (const uint8_t *src0, const uint8_t *src1, uint8_t *dst0, uint8_t *dst1, x86_reg count) |
static void | yuyvtoyuv420_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) |
static void | yuyvtoyuv422_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) |
static void | uyvytoyuv420_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) |
static void | uyvytoyuv422_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) |
static void | rgb2rgb_init_TMPL (void) |
#define EMMS "emms" |
Definition at line 49 of file rgb2rgb_template.c.
Referenced by interleaveBytes_TMPL(), rgb15to16_TMPL(), rgb15to32_TMPL(), rgb15tobgr24_TMPL(), rgb16to15_TMPL(), rgb16to32_TMPL(), rgb16tobgr24_TMPL(), rgb24to15_TMPL(), rgb24to16_TMPL(), rgb24tobgr15_TMPL(), rgb24tobgr16_TMPL(), rgb24tobgr24_TMPL(), rgb24tobgr32_TMPL(), rgb24toyv12_TMPL(), rgb32to15_TMPL(), rgb32to16_TMPL(), rgb32tobgr15_TMPL(), rgb32tobgr16_TMPL(), rgb32tobgr24_TMPL(), shuffle_bytes_2103_TMPL(), uyvytoyuv420_TMPL(), uyvytoyuv422_TMPL(), uyvytoyv12_TMPL(), vu9_to_vu12_TMPL(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2toyv12_TMPL(), yuyvtoyuv420_TMPL(), yuyvtoyuv422_TMPL(), and yvu9_to_yuy2_TMPL().
#define MOVNTQ "movq" |
Definition at line 56 of file rgb2rgb_template.c.
Referenced by extract_even2_TMPL(), extract_even2avg_TMPL(), extract_even_TMPL(), extract_odd2_TMPL(), extract_odd2avg_TMPL(), interleaveBytes_TMPL(), rgb15to16_TMPL(), rgb16to15_TMPL(), rgb24to15_TMPL(), rgb24to16_TMPL(), rgb24tobgr15_TMPL(), rgb24tobgr16_TMPL(), rgb24tobgr24_TMPL(), rgb24tobgr32_TMPL(), rgb24toyv12_TMPL(), rgb32to15_TMPL(), rgb32to16_TMPL(), rgb32tobgr15_TMPL(), rgb32tobgr16_TMPL(), shuffle_bytes_2103_TMPL(), uyvytoyv12_TMPL(), vu9_to_vu12_TMPL(), yuv2yuv1_ar_TMPL(), yuv2yuv1_TMPL(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2toyv12_TMPL(), and yvu9_to_yuy2_TMPL().
#define PACK_RGB32 |
Value:
"packuswb %%mm7, %%mm0 \n\t" /* 00 00 00 00 B3 B2 B1 B0 */ \ "packuswb %%mm7, %%mm1 \n\t" /* 00 00 00 00 G3 G2 G1 G0 */ \ "packuswb %%mm7, %%mm2 \n\t" /* 00 00 00 00 R3 R2 R1 R0 */ \ "punpcklbw %%mm1, %%mm0 \n\t" /* G3 B3 G2 B2 G1 B1 G0 B0 */ \ "punpcklbw %%mm6, %%mm2 \n\t" /* FF R3 FF R2 FF R1 FF R0 */ \ "movq %%mm0, %%mm3 \n\t" \ "punpcklwd %%mm2, %%mm0 \n\t" /* FF R1 G1 B1 FF R0 G0 B0 */ \ "punpckhwd %%mm2, %%mm3 \n\t" /* FF R3 G3 B3 FF R2 G2 B2 */ \ MOVNTQ" %%mm0, %0 \n\t" \ MOVNTQ" %%mm3, 8%0 \n\t" \
Definition at line 1037 of file rgb2rgb_template.c.
Referenced by rgb15to32_TMPL(), and rgb16to32_TMPL().
#define PREFETCH " # nop" |
Definition at line 42 of file rgb2rgb_template.c.
#define SFENCE " # nop" |
Definition at line 57 of file rgb2rgb_template.c.
Referenced by interleaveBytes_TMPL(), rgb15to16_TMPL(), rgb15to32_TMPL(), rgb15tobgr24_TMPL(), rgb16to15_TMPL(), rgb16to32_TMPL(), rgb16tobgr24_TMPL(), rgb24to15_TMPL(), rgb24to16_TMPL(), rgb24tobgr15_TMPL(), rgb24tobgr16_TMPL(), rgb24tobgr24_TMPL(), rgb24tobgr32_TMPL(), rgb24toyv12_TMPL(), rgb32to15_TMPL(), rgb32to16_TMPL(), rgb32tobgr15_TMPL(), rgb32tobgr16_TMPL(), rgb32tobgr24_TMPL(), shuffle_bytes_2103_TMPL(), uyvytoyuv420_TMPL(), uyvytoyuv422_TMPL(), uyvytoyv12_TMPL(), vu9_to_vu12_TMPL(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2toyv12_TMPL(), yuyvtoyuv420_TMPL(), yuyvtoyuv422_TMPL(), and yvu9_to_yuy2_TMPL().
#define STORE_BGR24_MMX |
Definition at line 109 of file rgb2rgb_template.c.
Referenced by rgb15tobgr24_TMPL(), rgb16tobgr24_TMPL(), and rgb32tobgr24_TMPL().
static void extract_even2_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst0, | |||
uint8_t * | dst1, | |||
x86_reg | count | |||
) | [static] |
Definition at line 2257 of file rgb2rgb_template.c.
static void extract_even2avg_TMPL | ( | const uint8_t * | src0, | |
const uint8_t * | src1, | |||
uint8_t * | dst0, | |||
uint8_t * | dst1, | |||
x86_reg | count | |||
) | [static] |
Definition at line 2304 of file rgb2rgb_template.c.
static void extract_even_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
x86_reg | count | |||
) | [static] |
Definition at line 2219 of file rgb2rgb_template.c.
static void extract_odd2_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst0, | |||
uint8_t * | dst1, | |||
x86_reg | count | |||
) | [static] |
Definition at line 2358 of file rgb2rgb_template.c.
static void extract_odd2avg_TMPL | ( | const uint8_t * | src0, | |
const uint8_t * | src1, | |||
uint8_t * | dst0, | |||
uint8_t * | dst1, | |||
x86_reg | count | |||
) | [static] |
Definition at line 2406 of file rgb2rgb_template.c.
static void interleaveBytes_TMPL | ( | const uint8_t * | src1, | |
const uint8_t * | src2, | |||
uint8_t * | dest, | |||
int | width, | |||
int | height, | |||
int | src1Stride, | |||
int | src2Stride, | |||
int | dstStride | |||
) | [static] |
Definition at line 1965 of file rgb2rgb_template.c.
static void rgb15to16_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 189 of file rgb2rgb_template.c.
static void rgb15to32_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 1049 of file rgb2rgb_template.c.
static void rgb15tobgr24_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 825 of file rgb2rgb_template.c.
static void rgb16to15_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 233 of file rgb2rgb_template.c.
static void rgb16to32_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 1091 of file rgb2rgb_template.c.
static void rgb16tobgr24_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 928 of file rgb2rgb_template.c.
static void rgb24to15_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 747 of file rgb2rgb_template.c.
static void rgb24to16_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 633 of file rgb2rgb_template.c.
static void rgb24tobgr15_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 690 of file rgb2rgb_template.c.
static void rgb24tobgr16_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 576 of file rgb2rgb_template.c.
static void rgb24tobgr24_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 1195 of file rgb2rgb_template.c.
static void rgb24tobgr32_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 64 of file rgb2rgb_template.c.
static void rgb24toyv12_TMPL | ( | const uint8_t * | src, | |
uint8_t * | ydst, | |||
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [inline, static] |
Height should be a multiple of 2 and width should be a multiple of 2.
(If this is a problem for anyone then tell me, and I will fix it.) Chrominance data is only taken from every second line, others are ignored in the C version. FIXME: Write HQ version.
Definition at line 1720 of file rgb2rgb_template.c.
static void rgb2rgb_init_TMPL | ( | void | ) | [inline, static] |
Definition at line 2562 of file rgb2rgb_template.c.
static void rgb32to15_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 429 of file rgb2rgb_template.c.
static void rgb32to16_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 282 of file rgb2rgb_template.c.
static void rgb32tobgr15_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 521 of file rgb2rgb_template.c.
static void rgb32tobgr16_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 374 of file rgb2rgb_template.c.
static void rgb32tobgr24_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 146 of file rgb2rgb_template.c.
static void shuffle_bytes_2103_TMPL | ( | const uint8_t * | src, | |
uint8_t * | dst, | |||
int | src_size | |||
) | [inline, static] |
Definition at line 1133 of file rgb2rgb_template.c.
static void uyvytoyuv420_TMPL | ( | uint8_t * | ydst, | |
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
const uint8_t * | src, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [static] |
Definition at line 2511 of file rgb2rgb_template.c.
static void uyvytoyuv422_TMPL | ( | uint8_t * | ydst, | |
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
const uint8_t * | src, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [static] |
Definition at line 2537 of file rgb2rgb_template.c.
static void uyvytoyv12_TMPL | ( | const uint8_t * | src, | |
uint8_t * | ydst, | |||
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [inline, static] |
Height should be a multiple of 2 and width should be a multiple of 16.
(If this is a problem for anyone then tell me, and I will fix it.) Chrominance data is only taken from every second line, others are ignored. FIXME: Write HQ version.
Definition at line 1614 of file rgb2rgb_template.c.
static void vu9_to_vu12_TMPL | ( | const uint8_t * | src1, | |
const uint8_t * | src2, | |||
uint8_t * | dst1, | |||
uint8_t * | dst2, | |||
int | width, | |||
int | height, | |||
int | srcStride1, | |||
int | srcStride2, | |||
int | dstStride1, | |||
int | dstStride2 | |||
) | [inline, static] |
Definition at line 2038 of file rgb2rgb_template.c.
static void yuv422ptouyvy_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride | |||
) | [inline, static] |
static void yuv422ptoyuy2_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride | |||
) | [inline, static] |
static void yuvPlanartouyvy_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride, | |||
int | vertLumPerChroma | |||
) | [inline, static] |
Definition at line 1327 of file rgb2rgb_template.c.
static void yuvPlanartoyuy2_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride, | |||
int | vertLumPerChroma | |||
) | [inline, static] |
Definition at line 1262 of file rgb2rgb_template.c.
static void yuy2toyv12_TMPL | ( | const uint8_t * | src, | |
uint8_t * | ydst, | |||
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [inline, static] |
Height should be a multiple of 2 and width should be a multiple of 16.
(If this is a problem for anyone then tell me, and I will fix it.)
Definition at line 1416 of file rgb2rgb_template.c.
static void yuyvtoyuv420_TMPL | ( | uint8_t * | ydst, | |
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
const uint8_t * | src, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [static] |
Definition at line 2461 of file rgb2rgb_template.c.
static void yuyvtoyuv422_TMPL | ( | uint8_t * | ydst, | |
uint8_t * | udst, | |||
uint8_t * | vdst, | |||
const uint8_t * | src, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | srcStride | |||
) | [static] |
Definition at line 2487 of file rgb2rgb_template.c.
static void yv12touyvy_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride | |||
) | [inline, static] |
Height should be a multiple of 2 and width should be a multiple of 16 (If this is a problem for anyone then tell me, and I will fix it.
)
Definition at line 1384 of file rgb2rgb_template.c.
static void yv12toyuy2_TMPL | ( | const uint8_t * | ysrc, | |
const uint8_t * | usrc, | |||
const uint8_t * | vsrc, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | lumStride, | |||
int | chromStride, | |||
int | dstStride | |||
) | [inline, static] |
Height should be a multiple of 2 and width should be a multiple of 16.
(If this is a problem for anyone then tell me, and I will fix it.)
Definition at line 1319 of file rgb2rgb_template.c.
static void yvu9_to_yuy2_TMPL | ( | const uint8_t * | src1, | |
const uint8_t * | src2, | |||
const uint8_t * | src3, | |||
uint8_t * | dst, | |||
int | width, | |||
int | height, | |||
int | srcStride1, | |||
int | srcStride2, | |||
int | srcStride3, | |||
int | dstStride | |||
) | [inline, static] |
Definition at line 2132 of file rgb2rgb_template.c.