libswscale/rgb2rgb_template.c File Reference

#include <stddef.h>

Go to the source code of this file.

Defines

#define MMREG_SIZE   8
#define PREFETCH   "prefetch"
#define PAVGB   "pavgusb"
#define EMMS   "femms"
#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, long src_size)
static void rgb32tobgr24_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb15to16_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb16to15_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb32to16_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb32tobgr16_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb32to15_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb32tobgr15_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb24tobgr16_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb24to16_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb24tobgr15_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb24to15_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb15tobgr24_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb16tobgr24_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb15to32_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb16to32_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb32tobgr32_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void rgb24tobgr24_TMPL (const uint8_t *src, uint8_t *dst, long src_size)
static void yuvPlanartoyuy2_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, long width, long height, long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
static void yv12toyuy2_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
static void yv12touyvy_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long lumStride, long chromStride, long srcStride)
 Height should be a multiple of 2 and width should be a multiple of 16.
static void yvu9toyv12_TMPL (const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, long width, long height, long lumStride, long chromStride)
static void planar2x_TMPL (const uint8_t *src, uint8_t *dst, long srcWidth, long srcHeight, long srcStride, long dstStride)
static void uyvytoyv12_TMPL (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long lumStride, long chromStride, long 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, long width, long height, long src1Stride, long src2Stride, long dstStride)
static void vu9_to_vu12_TMPL (const uint8_t *src1, const uint8_t *src2, uint8_t *dst1, uint8_t *dst2, long width, long height, long srcStride1, long srcStride2, long dstStride1, long dstStride2)
static void yvu9_to_yuy2_TMPL (const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, uint8_t *dst, long width, long height, long srcStride1, long srcStride2, long srcStride3, long 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, long width, long height, long lumStride, long chromStride, long srcStride)
static void yuyvtoyuv422_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, long width, long height, long lumStride, long chromStride, long srcStride)
static void uyvytoyuv420_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, long width, long height, long lumStride, long chromStride, long srcStride)
static void uyvytoyuv422_TMPL (uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, long width, long height, long lumStride, long chromStride, long srcStride)
static void rgb2rgb_init_TMPL (void)


Define Documentation

#define EMMS   "femms"

#define MMREG_SIZE   8

Definition at line 39 of file rgb2rgb_template.c.

#define MOVNTQ   "movq"

#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 1110 of file rgb2rgb_template.c.

Referenced by rgb15to32_TMPL(), and rgb16to32_TMPL().

#define PAVGB   "pavgusb"

Definition at line 44 of file rgb2rgb_template.c.

#define PREFETCH   "prefetch"

Definition at line 43 of file rgb2rgb_template.c.

#define SFENCE   " # nop"

#define STORE_BGR24_MMX

Definition at line 125 of file rgb2rgb_template.c.

Referenced by rgb15tobgr24_TMPL(), rgb16tobgr24_TMPL(), and rgb32tobgr24_TMPL().


Function Documentation

static void extract_even2_TMPL ( const uint8_t *  src,
uint8_t *  dst0,
uint8_t *  dst1,
x86_reg  count 
) [static]

Definition at line 2599 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 2647 of file rgb2rgb_template.c.

static void extract_even_TMPL ( const uint8_t *  src,
uint8_t *  dst,
x86_reg  count 
) [static]

Definition at line 2560 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 2700 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 2749 of file rgb2rgb_template.c.

static void interleaveBytes_TMPL ( const uint8_t *  src1,
const uint8_t *  src2,
uint8_t *  dest,
long  width,
long  height,
long  src1Stride,
long  src2Stride,
long  dstStride 
) [static]

Definition at line 2289 of file rgb2rgb_template.c.

static void planar2x_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  srcWidth,
long  srcHeight,
long  srcStride,
long  dstStride 
) [inline, static]

Definition at line 1766 of file rgb2rgb_template.c.

static void rgb15to16_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 218 of file rgb2rgb_template.c.

static void rgb15to32_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 1122 of file rgb2rgb_template.c.

static void rgb15tobgr24_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 890 of file rgb2rgb_template.c.

static void rgb16to15_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 264 of file rgb2rgb_template.c.

static void rgb16to32_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 1175 of file rgb2rgb_template.c.

static void rgb16tobgr24_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 997 of file rgb2rgb_template.c.

static void rgb24to15_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 808 of file rgb2rgb_template.c.

static void rgb24to16_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 686 of file rgb2rgb_template.c.

static void rgb24tobgr15_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 747 of file rgb2rgb_template.c.

static void rgb24tobgr16_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 625 of file rgb2rgb_template.c.

static void rgb24tobgr24_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 1292 of file rgb2rgb_template.c.

static void rgb24tobgr32_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 67 of file rgb2rgb_template.c.

static void rgb24toyv12_TMPL ( const uint8_t *  src,
uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  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 1998 of file rgb2rgb_template.c.

static void rgb2rgb_init_TMPL ( void   )  [inline, static]

Definition at line 2908 of file rgb2rgb_template.c.

static void rgb32to15_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 470 of file rgb2rgb_template.c.

static void rgb32to16_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 315 of file rgb2rgb_template.c.

static void rgb32tobgr15_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 566 of file rgb2rgb_template.c.

static void rgb32tobgr16_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 411 of file rgb2rgb_template.c.

static void rgb32tobgr24_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 162 of file rgb2rgb_template.c.

static void rgb32tobgr32_TMPL ( const uint8_t *  src,
uint8_t *  dst,
long  src_size 
) [inline, static]

Definition at line 1228 of file rgb2rgb_template.c.

static void uyvytoyuv420_TMPL ( uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
const uint8_t *  src,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  srcStride 
) [static]

Definition at line 2856 of file rgb2rgb_template.c.

static void uyvytoyuv422_TMPL ( uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
const uint8_t *  src,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  srcStride 
) [static]

Definition at line 2883 of file rgb2rgb_template.c.

static void uyvytoyv12_TMPL ( const uint8_t *  src,
uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  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 1874 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,
long  width,
long  height,
long  srcStride1,
long  srcStride2,
long  dstStride1,
long  dstStride2 
) [inline, static]

Definition at line 2368 of file rgb2rgb_template.c.

static void yuv422ptouyvy_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  dstStride 
) [inline, static]

Width should be a multiple of 16.

Definition at line 1618 of file rgb2rgb_template.c.

static void yuv422ptoyuy2_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  dstStride 
) [inline, static]

Width should be a multiple of 16.

Definition at line 1628 of file rgb2rgb_template.c.

static void yuvPlanartouyvy_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  dstStride,
long  vertLumPerChroma 
) [inline, static]

Definition at line 1511 of file rgb2rgb_template.c.

static void yuvPlanartoyuy2_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  dstStride,
long  vertLumPerChroma 
) [inline, static]

Definition at line 1361 of file rgb2rgb_template.c.

static void yuy2toyv12_TMPL ( const uint8_t *  src,
uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  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 1639 of file rgb2rgb_template.c.

static void yuyvtoyuv420_TMPL ( uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
const uint8_t *  src,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  srcStride 
) [static]

Definition at line 2804 of file rgb2rgb_template.c.

static void yuyvtoyuv422_TMPL ( uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
const uint8_t *  src,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  srcStride 
) [static]

Definition at line 2831 of file rgb2rgb_template.c.

static void yv12touyvy_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  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 1607 of file rgb2rgb_template.c.

static void yv12toyuy2_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  dst,
long  width,
long  height,
long  lumStride,
long  chromStride,
long  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 1503 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,
long  width,
long  height,
long  srcStride1,
long  srcStride2,
long  srcStride3,
long  dstStride 
) [inline, static]

Definition at line 2470 of file rgb2rgb_template.c.

static void yvu9toyv12_TMPL ( const uint8_t *  ysrc,
const uint8_t *  usrc,
const uint8_t *  vsrc,
uint8_t *  ydst,
uint8_t *  udst,
uint8_t *  vdst,
long  width,
long  height,
long  lumStride,
long  chromStride 
) [inline, static]

Definition at line 1756 of file rgb2rgb_template.c.


Generated on Fri Oct 26 02:36:55 2012 for FFmpeg by  doxygen 1.5.8