libavcodec/x86/idct_sse2_xvid.c File Reference

SSE2 idct compatible with xvidmmx. More...

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

Go to the source code of this file.

Defines

#define X8(x)   x,x,x,x,x,x,x,x
#define ROW_SHIFT   11
#define COL_SHIFT   6
#define ROW1   "%%xmm6"
#define ROW3   "%%xmm4"
#define ROW5   "%%xmm5"
#define ROW7   "%%xmm7"
#define CLEAR_ODD(r)   "pxor "r","r" \n\t"
#define PUT_ODD(dst)   "pshufhw $0x1B, %%xmm2, "dst" \n\t"
#define ROW0   "(%0)"
#define REG0   "%%xmm4"
#define ROW2   "2*16(%0)"
#define REG2   "%%xmm4"
#define ROW4   "4*16(%0)"
#define REG4   "%%xmm6"
#define ROW6   "6*16(%0)"
#define REG6   "%%xmm6"
#define CLEAR_EVEN(r)
#define PUT_EVEN(dst)
#define XMMS   "%%xmm2"
#define MOV_32_ONLY   "movdqa "
#define SREG2   "%%xmm7"
#define TAN3   "%%xmm0"
#define TAN1   "%%xmm2"
#define ROUND(x)   "paddd "MANGLE(x)
#define JZ(reg, to)
#define JNZ(reg, to)
#define TEST_ONE_ROW(src, reg, clear)
#define TEST_TWO_ROWS(row1, row2, reg1, reg2, clear1, clear2)
#define iMTX_MULT(src, table, rounder, put)
 IDCT pass on rows.
#define iLLM_HEAD
#define iLLM_PASS(dct)
 IDCT pass on columns.
#define iLLM_PASS_SPARSE(dct)
 IDCT pass on columns, assuming rows 4-7 are zero.

Functions

 DECLARE_ASM_CONST (16, int16_t, tan1)[]
 DECLARE_ASM_CONST (16, int16_t, tan2)[]
 DECLARE_ASM_CONST (16, int16_t, tan3)[]
 DECLARE_ASM_CONST (16, int16_t, sqrt2)[]
 DECLARE_ASM_CONST (8, uint8_t, m127)[]
 DECLARE_ASM_CONST (16, int16_t, iTab1)[]
 DECLARE_ASM_CONST (16, int16_t, iTab2)[]
 DECLARE_ASM_CONST (16, int16_t, iTab3)[]
 DECLARE_ASM_CONST (16, int16_t, iTab4)[]
 DECLARE_ASM_CONST (16, int32_t, walkenIdctRounders)[]
void ff_idct_xvid_sse2 (short *block)
void ff_idct_xvid_sse2_put (uint8_t *dest, int line_size, short *block)
void ff_idct_xvid_sse2_add (uint8_t *dest, int line_size, short *block)


Detailed Description

SSE2 idct compatible with xvidmmx.

Definition in file idct_sse2_xvid.c.


Define Documentation

#define CLEAR_EVEN (  ) 

Definition at line 136 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define CLEAR_ODD (  )     "pxor "r","r" \n\t"

Definition at line 105 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define COL_SHIFT   6

Definition at line 54 of file idct_sse2_xvid.c.

#define iLLM_HEAD

Value:

"movdqa   "MANGLE(tan3)", "TAN3"  \n\t" \
    "movdqa   "MANGLE(tan1)", "TAN1"  \n\t" \

Definition at line 201 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define iLLM_PASS ( dct   ) 

IDCT pass on columns.

Definition at line 206 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define iLLM_PASS_SPARSE ( dct   ) 

IDCT pass on columns, assuming rows 4-7 are zero.

Definition at line 284 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define iMTX_MULT ( src,
table,
rounder,
put   ) 

Value:

"movdqa        "src", %%xmm3      \n\t" \
    "movdqa       %%xmm3, %%xmm0      \n\t" \
    "pshufd   $0x11, %%xmm3, %%xmm1   \n\t" /* 4602 */ \
    "punpcklqdq   %%xmm0, %%xmm0      \n\t" /* 0246 */ \
    "pmaddwd     "table", %%xmm0      \n\t" \
    "pmaddwd  16+"table", %%xmm1      \n\t" \
    "pshufd   $0xBB, %%xmm3, %%xmm2   \n\t" /* 5713 */ \
    "punpckhqdq   %%xmm3, %%xmm3      \n\t" /* 1357 */ \
    "pmaddwd  32+"table", %%xmm2      \n\t" \
    "pmaddwd  48+"table", %%xmm3      \n\t" \
    "paddd        %%xmm1, %%xmm0      \n\t" \
    "paddd        %%xmm3, %%xmm2      \n\t" \
    rounder",     %%xmm0              \n\t" \
    "movdqa       %%xmm2, %%xmm3      \n\t" \
    "paddd        %%xmm0, %%xmm2      \n\t" \
    "psubd        %%xmm3, %%xmm0      \n\t" \
    "psrad           $11, %%xmm2      \n\t" \
    "psrad           $11, %%xmm0      \n\t" \
    "packssdw     %%xmm0, %%xmm2      \n\t" \
    put                                     \
    "1:                               \n\t"
IDCT pass on rows.

Definition at line 178 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define JNZ ( reg,
to   ) 

Value:

"testl     "reg","reg"            \n\t" \
    "jnz       "to"                   \n\t"

Definition at line 154 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define JZ ( reg,
to   ) 

Value:

"testl     "reg","reg"            \n\t" \
    "jz        "to"                   \n\t"

Definition at line 150 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define MOV_32_ONLY   "movdqa "

Definition at line 141 of file idct_sse2_xvid.c.

#define PUT_EVEN ( dst   ) 

Value:

"pshufhw  $0x1B, %%xmm2, %%xmm2   \n\t" \
    "movdqa          %%xmm2, "dst"    \n\t"

Definition at line 137 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define PUT_ODD ( dst   )     "pshufhw $0x1B, %%xmm2, "dst" \n\t"

Definition at line 106 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define REG0   "%%xmm4"

Definition at line 129 of file idct_sse2_xvid.c.

#define REG2   "%%xmm4"

Definition at line 131 of file idct_sse2_xvid.c.

#define REG4   "%%xmm6"

Definition at line 133 of file idct_sse2_xvid.c.

#define REG6   "%%xmm6"

Definition at line 135 of file idct_sse2_xvid.c.

#define ROUND (  )     "paddd "MANGLE(x)

Definition at line 148 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW0   "(%0)"

Definition at line 128 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW1   "%%xmm6"

Definition at line 100 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW2   "2*16(%0)"

Definition at line 130 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW3   "%%xmm4"

Definition at line 101 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW4   "4*16(%0)"

Definition at line 132 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW5   "%%xmm5"

Definition at line 102 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW6   "6*16(%0)"

Definition at line 134 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW7   "%%xmm7"

Definition at line 103 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define ROW_SHIFT   11

Definition at line 53 of file idct_sse2_xvid.c.

#define SREG2   "%%xmm7"

Definition at line 142 of file idct_sse2_xvid.c.

#define TAN1   "%%xmm2"

Definition at line 144 of file idct_sse2_xvid.c.

#define TAN3   "%%xmm0"

Definition at line 143 of file idct_sse2_xvid.c.

#define TEST_ONE_ROW ( src,
reg,
clear   ) 

Value:

clear                                   \
    "movq     "src", %%mm1            \n\t" \
    "por    8+"src", %%mm1            \n\t" \
    "paddusb  %%mm0, %%mm1            \n\t" \
    "pmovmskb %%mm1, "reg"            \n\t"

Definition at line 158 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define TEST_TWO_ROWS ( row1,
row2,
reg1,
reg2,
clear1,
clear2   ) 

Value:

clear1                                  \
    clear2                                  \
    "movq     "row1", %%mm1           \n\t" \
    "por    8+"row1", %%mm1           \n\t" \
    "movq     "row2", %%mm2           \n\t" \
    "por    8+"row2", %%mm2           \n\t" \
    "paddusb   %%mm0, %%mm1           \n\t" \
    "paddusb   %%mm0, %%mm2           \n\t" \
    "pmovmskb  %%mm1, "reg1"          \n\t" \
    "pmovmskb  %%mm2, "reg2"          \n\t"

Definition at line 165 of file idct_sse2_xvid.c.

Referenced by ff_idct_xvid_sse2().

#define X8 (  )     x,x,x,x,x,x,x,x

Definition at line 51 of file idct_sse2_xvid.c.

#define XMMS   "%%xmm2"

Definition at line 140 of file idct_sse2_xvid.c.


Function Documentation

DECLARE_ASM_CONST ( 16  ,
int32_t  ,
walkenIdctRounders   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
iTab4   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
iTab3   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
iTab2   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
iTab1   
)

DECLARE_ASM_CONST ( ,
uint8_t  ,
m127   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
sqrt2   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
tan3   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
tan2   
)

DECLARE_ASM_CONST ( 16  ,
int16_t  ,
tan1   
)

void ff_idct_xvid_sse2 ( short *  block  )  [inline]

void ff_idct_xvid_sse2_add ( uint8_t *  dest,
int  line_size,
short *  block 
)

Definition at line 399 of file idct_sse2_xvid.c.

Referenced by dsputil_init_mmx().

void ff_idct_xvid_sse2_put ( uint8_t *  dest,
int  line_size,
short *  block 
)

Definition at line 393 of file idct_sse2_xvid.c.

Referenced by dsputil_init_mmx().


Generated on Fri Oct 26 02:38:19 2012 for FFmpeg by  doxygen 1.5.8