libavcodec/x86/cavsdsp_mmx.c File Reference

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

Go to the source code of this file.

Defines

#define QPEL_CAVSV1(A, B, C, D, E, F, OP, MUL2)
#define QPEL_CAVSV2(A, B, C, D, E, F, OP, MUL2)
#define QPEL_CAVSV3(A, B, C, D, E, F, OP, MUL2)
#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)
static void ff_cavsdsp_init_mmx2 (CAVSDSPContext *c, AVCodecContext *avctx)
static void ff_cavsdsp_init_3dnow (CAVSDSPContext *c, AVCodecContext *avctx)
void ff_cavsdsp_init_mmx (CAVSDSPContext *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 419 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 423 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 401 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 418 of file cavsdsp_mmx.c.

#define QPEL_CAVS ( OPNAME,
OP,
MMX   ) 

Definition at line 308 of file cavsdsp_mmx.c.

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

Value:

"movd (%0), "#F"            \n\t"\
        "movq "#C", %%mm6           \n\t"\
        "pmullw %5, %%mm6           \n\t"\
        "movq "#D", %%mm7           \n\t"\
        "pmullw "MANGLE(MUL2)", %%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 187 of file cavsdsp_mmx.c.

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

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 212 of file cavsdsp_mmx.c.

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

Value:

"movd (%0), "#F"            \n\t"\
        "movq "#C", %%mm6           \n\t"\
        "pmullw "MANGLE(MUL2)", %%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 228 of file cavsdsp_mmx.c.

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

Definition at line 253 of file cavsdsp_mmx.c.


Function Documentation

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

Definition at line 38 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 115 of file cavsdsp_mmx.c.

Referenced by ff_cavsdsp_init_3dnow(), and ff_cavsdsp_init_mmx2().

static void ff_cavsdsp_init_3dnow ( CAVSDSPContext c,
AVCodecContext avctx 
) [static]

Definition at line 458 of file cavsdsp_mmx.c.

Referenced by ff_cavsdsp_init_mmx().

void ff_cavsdsp_init_mmx ( CAVSDSPContext c,
AVCodecContext avctx 
)

Definition at line 474 of file cavsdsp_mmx.c.

Referenced by ff_cavsdsp_init().

static void ff_cavsdsp_init_mmx2 ( CAVSDSPContext c,
AVCodecContext avctx 
) [static]

Definition at line 442 of file cavsdsp_mmx.c.

Referenced by ff_cavsdsp_init_mmx().


Generated on Fri Oct 26 02:46:11 2012 for FFmpeg by  doxygen 1.5.8