libswscale/x86/yuv2rgb_template.c File Reference

Go to the source code of this file.

Defines

#define EMMS   "femms"
#define MOVNTQ   "movq"
#define SFENCE   " # nop"
#define YUV2RGB
#define YUV422_UNSHIFT
#define YUV2RGB_LOOP(depth)
#define YUV2RGB_INIT
#define YUV2RGB_ENDLOOP(depth)
#define YUV2RGB_OPERANDS
#define YUV2RGB_OPERANDS_ALPHA
#define RGB_PLANAR2PACKED24(red, blue)
#define REG_BLUE   "0"
#define REG_RED   "1"
#define REG_GREEN   "2"
#define REG_ALPHA   "3"
#define RGB_PLANAR2PACKED32(red, green, blue, alpha)

Functions

static int yuv420_rgb16_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuv420_rgb15_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuv420_rgb24_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuv420_bgr24_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuv420_rgb32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuva420_rgb32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuv420_bgr32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
static int yuva420_bgr32_TMPL (SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])


Define Documentation

#define EMMS   "femms"

Definition at line 35 of file yuv2rgb_template.c.

#define MOVNTQ   "movq"

Definition at line 44 of file yuv2rgb_template.c.

#define REG_ALPHA   "3"

#define REG_BLUE   "0"

#define REG_GREEN   "2"

#define REG_RED   "1"

#define RGB_PLANAR2PACKED24 ( red,
blue   ) 

Definition at line 336 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL().

#define RGB_PLANAR2PACKED32 ( red,
green,
blue,
alpha   ) 

Definition at line 444 of file yuv2rgb_template.c.

Referenced by yuva420_bgr32_TMPL().

#define SFENCE   " # nop"

Definition at line 45 of file yuv2rgb_template.c.

#define YUV2RGB

#define YUV2RGB_ENDLOOP ( depth   ) 

Value:

"add $"AV_STRINGIFY(depth*8)", %1    \n\t" \
        "add                       $4, %0    \n\t" \
        " js                       1b        \n\t" \

Definition at line 152 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL(), yuv420_bgr32_TMPL(), yuv420_rgb15_TMPL(), yuv420_rgb16_TMPL(), yuv420_rgb24_TMPL(), yuv420_rgb32_TMPL(), yuva420_bgr32_TMPL(), and yuva420_rgb32_TMPL().

#define YUV2RGB_INIT

Value:

/* This MMX assembly code deals with a SINGLE scan line at a time, \
         * it converts 8 pixels in each iteration. */                      \
        __asm__ volatile (                                                 \
        /* load data for start of next scan line */                        \
        "movd    (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ \
        "movd    (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ \
        "movq (%5, %0, 2), %%mm6;" /* Load 8  Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ \
        /*                                                                 \
        ".balign 16     \n\t"                                              \
        */                                                                 \
        "1:             \n\t"                                              \

Definition at line 135 of file yuv2rgb_template.c.

#define YUV2RGB_LOOP ( depth   ) 

Value:

h_size= (c->dstW+7)&~7;                                   \
    if(h_size*depth > FFABS(dstStride[0])) h_size-=8;         \
\
    __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ );    \
    for (y= 0; y<srcSliceH; y++ ) {                           \
        uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0]; \
        const uint8_t *py = src[0] + y*srcStride[0];          \
        const uint8_t *pu = src[1] + (y>>1)*srcStride[1];     \
        const uint8_t *pv = src[2] + (y>>1)*srcStride[2];     \
        x86_reg index= -h_size/2;                                \

Definition at line 123 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL(), yuv420_bgr32_TMPL(), yuv420_rgb15_TMPL(), yuv420_rgb16_TMPL(), yuv420_rgb24_TMPL(), yuv420_rgb32_TMPL(), yuva420_bgr32_TMPL(), and yuva420_rgb32_TMPL().

#define YUV2RGB_OPERANDS

Value:

: "+r" (index), "+r" (image) \
        : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index) \
        ); \
    } \
    __asm__ volatile (SFENCE"\n\t"EMMS); \
    return srcSliceH; \

Definition at line 157 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL(), yuv420_bgr32_TMPL(), yuv420_rgb15_TMPL(), yuv420_rgb16_TMPL(), yuv420_rgb24_TMPL(), and yuv420_rgb32_TMPL().

#define YUV2RGB_OPERANDS_ALPHA

Value:

: "+r" (index), "+r" (image) \
        : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index), "r" (pa - 2*index) \
        ); \
    } \
    __asm__ volatile (SFENCE"\n\t"EMMS); \
    return srcSliceH; \

Definition at line 165 of file yuv2rgb_template.c.

Referenced by yuva420_bgr32_TMPL(), and yuva420_rgb32_TMPL().

#define YUV422_UNSHIFT

Value:

if(c->srcFormat == PIX_FMT_YUV422P) {\
        srcStride[1] *= 2;               \
        srcStride[2] *= 2;               \
    }                                    \

Definition at line 117 of file yuv2rgb_template.c.

Referenced by yuv420_bgr24_TMPL(), yuv420_rgb15_TMPL(), yuv420_rgb16_TMPL(), yuv420_rgb24_TMPL(), and yuv420_rgb32_TMPL().


Function Documentation

static int yuv420_bgr24_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 407 of file yuv2rgb_template.c.

static int yuv420_bgr32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 519 of file yuv2rgb_template.c.

static int yuv420_rgb15_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 230 of file yuv2rgb_template.c.

static int yuv420_rgb16_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 173 of file yuv2rgb_template.c.

static int yuv420_rgb24_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 390 of file yuv2rgb_template.c.

static int yuv420_rgb32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 483 of file yuv2rgb_template.c.

static int yuva420_bgr32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 536 of file yuv2rgb_template.c.

static int yuva420_rgb32_TMPL ( SwsContext c,
const uint8_t *  src[],
int  srcStride[],
int  srcSliceY,
int  srcSliceH,
uint8_t *  dst[],
int  dstStride[] 
) [inline, static]

Definition at line 500 of file yuv2rgb_template.c.


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