libavcodec/x86/cavsdsp_mmx.c File Reference

#include "libavutil/common.h"
#include "libavutil/x86_cpu.h"
#include "libavcodec/dsputil.h"
#include "dsputil_mmx.h"

Go to the source code of this file.

Defines

#define QPEL_CAVSV1(A, B, C, D, E, F, OP)
#define QPEL_CAVSV2(A, B, C, D, E, F, OP)
#define QPEL_CAVSV3(A, B, C, D, E, F, OP)
#define QPEL_CAVSVNUM(VOP, OP, ADD, MUL1, MUL2)
#define QPEL_CAVS(OPNAME, OP, MMX)
#define CAVS_MC(OPNAME, SIZE, MMX)
#define PUT_OP(a, b, temp, size)   "mov" #size " " #a ", " #b " \n\t"
#define AVG_3DNOW_OP(a, b, temp, size)
#define AVG_MMX2_OP(a, b, temp, size)
#define dspfunc(PFX, IDX, NUM)
#define dspfunc(PFX, IDX, NUM)

Functions

static void cavs_idct8_1d (int16_t *block, uint64_t bias)
static void cavs_idct8_add_mmx (uint8_t *dst, int16_t *block, int stride)
void ff_put_cavs_qpel8_mc00_mmx2 (uint8_t *dst, uint8_t *src, int stride)
void ff_avg_cavs_qpel8_mc00_mmx2 (uint8_t *dst, uint8_t *src, int stride)
void ff_put_cavs_qpel16_mc00_mmx2 (uint8_t *dst, uint8_t *src, int stride)
void ff_avg_cavs_qpel16_mc00_mmx2 (uint8_t *dst, uint8_t *src, int stride)
void ff_cavsdsp_init_mmx2 (DSPContext *c, AVCodecContext *avctx)
void ff_cavsdsp_init_3dnow (DSPContext *c, AVCodecContext *avctx)


Define Documentation

#define AVG_3DNOW_OP ( a,
b,
temp,
size   ) 

Value:

"mov" #size " " #b ", " #temp "   \n\t"\
"pavgusb " #temp ", " #a "        \n\t"\
"mov" #size " " #a ", " #b "      \n\t"

Definition at line 417 of file cavsdsp_mmx.c.

#define AVG_MMX2_OP ( a,
b,
temp,
size   ) 

Value:

"mov" #size " " #b ", " #temp "   \n\t"\
"pavgb " #temp ", " #a "          \n\t"\
"mov" #size " " #a ", " #b "      \n\t"

Definition at line 421 of file cavsdsp_mmx.c.

#define CAVS_MC ( OPNAME,
SIZE,
MMX   ) 

Value:

static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\
    OPNAME ## cavs_qpel ## SIZE ## _h_ ## MMX(dst, src, stride, stride);\
}\
\
static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\
    OPNAME ## cavs_qpel ## SIZE ## _v1_ ## MMX(dst, src, stride, stride);\
}\
\
static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\
    OPNAME ## cavs_qpel ## SIZE ## _v2_ ## MMX(dst, src, stride, stride);\
}\
\
static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\
    OPNAME ## cavs_qpel ## SIZE ## _v3_ ## MMX(dst, src, stride, stride);\
}\

Definition at line 399 of file cavsdsp_mmx.c.

#define dspfunc ( PFX,
IDX,
NUM   ) 

Value:

c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \
    c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_3dnow; \
    c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_3dnow; \
    c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_3dnow; \
    c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_3dnow; \

#define dspfunc ( PFX,
IDX,
NUM   ) 

Value:

c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \
    c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_mmx2; \
    c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_mmx2; \
    c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_mmx2; \
    c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_mmx2; \

#define PUT_OP ( a,
b,
temp,
size   )     "mov" #size " " #a ", " #b " \n\t"

Definition at line 416 of file cavsdsp_mmx.c.

#define QPEL_CAVS ( OPNAME,
OP,
MMX   ) 

Definition at line 306 of file cavsdsp_mmx.c.

#define QPEL_CAVSV1 ( A,
B,
C,
D,
E,
F,
OP   ) 

Value:

"movd (%0), "#F"            \n\t"\
        "movq "#C", %%mm6           \n\t"\
        "pmullw %5, %%mm6           \n\t"\
        "movq "#D", %%mm7           \n\t"\
        "pmullw %6, %%mm7           \n\t"\
        "psllw $3, "#E"             \n\t"\
        "psubw "#E", %%mm6          \n\t"\
        "psraw $3, "#E"             \n\t"\
        "paddw %%mm7, %%mm6         \n\t"\
        "paddw "#E", %%mm6          \n\t"\
        "paddw "#B", "#B"           \n\t"\
        "pxor %%mm7, %%mm7          \n\t"\
        "add %2, %0                 \n\t"\
        "punpcklbw %%mm7, "#F"      \n\t"\
        "psubw "#B", %%mm6          \n\t"\
        "psraw $1, "#B"             \n\t"\
        "psubw "#A", %%mm6          \n\t"\
        "paddw %4, %%mm6            \n\t"\
        "psraw $7, %%mm6            \n\t"\
        "packuswb %%mm6, %%mm6      \n\t"\
        OP(%%mm6, (%1), A, d)            \
        "add %3, %1                 \n\t"

Definition at line 185 of file cavsdsp_mmx.c.

#define QPEL_CAVSV2 ( A,
B,
C,
D,
E,
F,
OP   ) 

Value:

"movd (%0), "#F"            \n\t"\
        "movq "#C", %%mm6           \n\t"\
        "paddw "#D", %%mm6          \n\t"\
        "pmullw %5, %%mm6           \n\t"\
        "add %2, %0                 \n\t"\
        "punpcklbw %%mm7, "#F"      \n\t"\
        "psubw "#B", %%mm6          \n\t"\
        "psubw "#E", %%mm6          \n\t"\
        "paddw %4, %%mm6            \n\t"\
        "psraw $3, %%mm6            \n\t"\
        "packuswb %%mm6, %%mm6      \n\t"\
        OP(%%mm6, (%1), A, d)            \
        "add %3, %1                 \n\t"

Definition at line 210 of file cavsdsp_mmx.c.

#define QPEL_CAVSV3 ( A,
B,
C,
D,
E,
F,
OP   ) 

Value:

"movd (%0), "#F"            \n\t"\
        "movq "#C", %%mm6           \n\t"\
        "pmullw %6, %%mm6           \n\t"\
        "movq "#D", %%mm7           \n\t"\
        "pmullw %5, %%mm7           \n\t"\
        "psllw $3, "#B"             \n\t"\
        "psubw "#B", %%mm6          \n\t"\
        "psraw $3, "#B"             \n\t"\
        "paddw %%mm7, %%mm6         \n\t"\
        "paddw "#B", %%mm6          \n\t"\
        "paddw "#E", "#E"           \n\t"\
        "pxor %%mm7, %%mm7          \n\t"\
        "add %2, %0                 \n\t"\
        "punpcklbw %%mm7, "#F"      \n\t"\
        "psubw "#E", %%mm6          \n\t"\
        "psraw $1, "#E"             \n\t"\
        "psubw "#F", %%mm6          \n\t"\
        "paddw %4, %%mm6            \n\t"\
        "psraw $7, %%mm6            \n\t"\
        "packuswb %%mm6, %%mm6      \n\t"\
        OP(%%mm6, (%1), A, d)            \
        "add %3, %1                 \n\t"

Definition at line 226 of file cavsdsp_mmx.c.

#define QPEL_CAVSVNUM ( VOP,
OP,
ADD,
MUL1,
MUL2   ) 

Definition at line 251 of file cavsdsp_mmx.c.


Function Documentation

static void cavs_idct8_1d ( int16_t *  block,
uint64_t  bias 
) [inline, static]

Definition at line 36 of file cavsdsp_mmx.c.

Referenced by cavs_idct8_add_mmx().

static void cavs_idct8_add_mmx ( uint8_t *  dst,
int16_t *  block,
int  stride 
) [static]

Definition at line 113 of file cavsdsp_mmx.c.

Referenced by ff_cavsdsp_init_3dnow(), and ff_cavsdsp_init_mmx2().

void ff_avg_cavs_qpel16_mc00_mmx2 ( uint8_t *  dst,
uint8_t *  src,
int  stride 
)

Definition at line 1788 of file dsputil_mmx.c.

void ff_avg_cavs_qpel8_mc00_mmx2 ( uint8_t *  dst,
uint8_t *  src,
int  stride 
)

Definition at line 1782 of file dsputil_mmx.c.

void ff_cavsdsp_init_3dnow ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 461 of file cavsdsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_cavsdsp_init_mmx2 ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 445 of file cavsdsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_put_cavs_qpel16_mc00_mmx2 ( uint8_t *  dst,
uint8_t *  src,
int  stride 
)

Definition at line 1785 of file dsputil_mmx.c.

void ff_put_cavs_qpel8_mc00_mmx2 ( uint8_t *  dst,
uint8_t *  src,
int  stride 
)

Definition at line 1779 of file dsputil_mmx.c.


Generated on Fri Oct 26 02:35:45 2012 for FFmpeg by  doxygen 1.5.8