libavcodec/x86/vp3dsp_mmx.c File Reference

MMX-optimized functions cribbed from the original VP3 source code. More...

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

Go to the source code of this file.

Defines

#define VP3_LOOP_FILTER(flim)
#define STORE_4_WORDS(dst0, dst1, dst2, dst3, mm)
#define BeginIDCT()
#define RowIDCT()
#define ColumnIDCT()
#define Transpose()
#define C(x)   AV_STRINGIFY(16*(x-1))"(%1)"
#define OC_8   "%2"
#define I(x)   AV_STRINGIFY(16* x )"(%0)"
#define J(x)   AV_STRINGIFY(16*(x-4) + 8)"(%0)"
#define I(x)   AV_STRINGIFY(16* x + 64)"(%0)"
#define J(x)   AV_STRINGIFY(16*(x-4) + 72)"(%0)"
#define I(x)   AV_STRINGIFY(16*x)"(%0)"
#define J(x)   AV_STRINGIFY(16*x)"(%0)"
#define I(x)   AV_STRINGIFY(16*x + 8)"(%0)"
#define J(x)   AV_STRINGIFY(16*x + 8)"(%0)"
#define DC_ADD

Functions

void ff_vp3_v_loop_filter_mmx2 (uint8_t *src, int stride, int *bounding_values)
void ff_vp3_h_loop_filter_mmx2 (uint8_t *src, int stride, int *bounding_values)
void ff_vp3_idct_mmx (int16_t *output_data)
void ff_vp3_idct_put_mmx (uint8_t *dest, int line_size, DCTELEM *block)
void ff_vp3_idct_add_mmx (uint8_t *dest, int line_size, DCTELEM *block)
void ff_vp3_idct_dc_add_mmx2 (uint8_t *dest, int linesize, const DCTELEM *block)

Variables

const uint16_t ff_vp3_idct_data []


Detailed Description

MMX-optimized functions cribbed from the original VP3 source code.

Definition in file vp3dsp_mmx.c.


Define Documentation

 
#define BeginIDCT (  ) 

Definition at line 134 of file vp3dsp_mmx.c.

#define C (  )     AV_STRINGIFY(16*(x-1))"(%1)"

 
#define ColumnIDCT (  ) 

Definition at line 231 of file vp3dsp_mmx.c.

Referenced by ff_vp3_idct_mmx().

#define DC_ADD

Value:

"movq        (%0), %%mm2 \n\t" \
        "movq     (%0,%1), %%mm3 \n\t" \
        "paddusb    %%mm0, %%mm2 \n\t" \
        "movq   (%0,%1,2), %%mm4 \n\t" \
        "paddusb    %%mm0, %%mm3 \n\t" \
        "movq     (%0,%2), %%mm5 \n\t" \
        "paddusb    %%mm0, %%mm4 \n\t" \
        "paddusb    %%mm0, %%mm5 \n\t" \
        "psubusb    %%mm1, %%mm2 \n\t" \
        "psubusb    %%mm1, %%mm3 \n\t" \
        "movq       %%mm2, (%0)  \n\t" \
        "psubusb    %%mm1, %%mm4 \n\t" \
        "movq       %%mm3, (%0,%1) \n\t" \
        "psubusb    %%mm1, %%mm5 \n\t" \
        "movq       %%mm4, (%0,%1,2) \n\t" \
        "movq       %%mm5, (%0,%2) \n\t"

Referenced by ff_vp3_idct_dc_add_mmx2().

#define I (  )     AV_STRINGIFY(16*x + 8)"(%0)"

#define I (  )     AV_STRINGIFY(16*x)"(%0)"

#define I (  )     AV_STRINGIFY(16* x + 64)"(%0)"

#define I (  )     AV_STRINGIFY(16* x )"(%0)"

#define J (  )     AV_STRINGIFY(16*x + 8)"(%0)"

#define J (  )     AV_STRINGIFY(16*x)"(%0)"

#define J (  )     AV_STRINGIFY(16*(x-4) + 72)"(%0)"

#define J (  )     AV_STRINGIFY(16*(x-4) + 8)"(%0)"

#define OC_8   "%2"

 
#define RowIDCT (  ) 

Value:

BeginIDCT() \
    "movq   "I(2)", %%mm3 \n\t"    /* r3 = D. */ \
    "psubsw  %%mm7, %%mm4 \n\t"    /* r4 = E. = E - G */ \
    "paddsw  %%mm1, %%mm1 \n\t"    /* r1 = H. + H. */ \
    "paddsw  %%mm7, %%mm7 \n\t"    /* r7 = G + G */ \
    "paddsw  %%mm2, %%mm1 \n\t"    /* r1 = R1 = A.. + H. */ \
    "paddsw  %%mm4, %%mm7 \n\t"    /* r1 = R1 = A.. + H. */ \
    "psubsw  %%mm3, %%mm4 \n\t"    /* r4 = R4 = E. - D. */ \
    "paddsw  %%mm3, %%mm3 \n\t" \
    "psubsw  %%mm5, %%mm6 \n\t"    /* r6 = R6 = F. - B.. */ \
    "paddsw  %%mm5, %%mm5 \n\t" \
    "paddsw  %%mm4, %%mm3 \n\t"    /* r3 = R3 = E. + D. */ \
    "paddsw  %%mm6, %%mm5 \n\t"    /* r5 = R5 = F. + B.. */ \
    "psubsw  %%mm0, %%mm7 \n\t"    /* r7 = R7 = G. - C. */ \
    "paddsw  %%mm0, %%mm0 \n\t" \
    "movq    %%mm1, "I(1)"\n\t"    /* save R1 */ \
    "paddsw  %%mm7, %%mm0 \n\t"

Definition at line 211 of file vp3dsp_mmx.c.

Referenced by ff_vp3_idct_mmx().

#define STORE_4_WORDS ( dst0,
dst1,
dst2,
dst3,
mm   ) 

Value:

"movd "#mm", %0        \n\t" \
    "movw   %w0, -1"#dst0" \n\t" \
    "psrlq  $32, "#mm"     \n\t" \
    "shr    $16, %0        \n\t" \
    "movw   %w0, -1"#dst1" \n\t" \
    "movd "#mm", %0        \n\t" \
    "movw   %w0, -1"#dst2" \n\t" \
    "shr    $16, %0        \n\t" \
    "movw   %w0, -1"#dst3" \n\t"

Definition at line 77 of file vp3dsp_mmx.c.

Referenced by ff_vp3_h_loop_filter_mmx2().

 
#define Transpose (  ) 

Definition at line 299 of file vp3dsp_mmx.c.

Referenced by ff_vp3_idct_mmx().

#define VP3_LOOP_FILTER ( flim   ) 

Definition at line 36 of file vp3dsp_mmx.c.

Referenced by ff_vp3_h_loop_filter_mmx2(), and ff_vp3_v_loop_filter_mmx2().


Function Documentation

void ff_vp3_h_loop_filter_mmx2 ( uint8_t *  src,
int  stride,
int *  bounding_values 
)

Definition at line 109 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_vp3_idct_add_mmx ( uint8_t *  dest,
int  line_size,
DCTELEM block 
)

Definition at line 393 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_vp3_idct_dc_add_mmx2 ( uint8_t *  dest,
int  linesize,
const DCTELEM block 
)

Definition at line 399 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_vp3_idct_mmx ( int16_t *  output_data  ) 

Definition at line 336 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx(), ff_vp3_idct_add_mmx(), and ff_vp3_idct_put_mmx().

void ff_vp3_idct_put_mmx ( uint8_t *  dest,
int  line_size,
DCTELEM block 
)

Definition at line 387 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_vp3_v_loop_filter_mmx2 ( uint8_t *  src,
int  stride,
int *  bounding_values 
)

Definition at line 88 of file vp3dsp_mmx.c.

Referenced by dsputil_init_mmx().


Variable Documentation

const uint16_t ff_vp3_idct_data[]

Definition at line 30 of file vp3dsp_sse2.c.

Referenced by ff_vp3_idct_mmx(), and ff_vp3_idct_sse2().


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