libavcodec/x86/snowdsp_mmx.c File Reference

#include "libavutil/x86_cpu.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/snow.h"

Go to the source code of this file.

Defines

#define snow_inner_add_yblock_sse2_header
#define snow_inner_add_yblock_sse2_start_8(out_reg1, out_reg2, ptr_offset, s_offset)
#define snow_inner_add_yblock_sse2_start_16(out_reg1, out_reg2, ptr_offset, s_offset)
#define snow_inner_add_yblock_sse2_accum_8(ptr_offset, s_offset)
#define snow_inner_add_yblock_sse2_accum_16(ptr_offset, s_offset)
#define snow_inner_add_yblock_sse2_end_common1
#define snow_inner_add_yblock_sse2_end_common2
#define snow_inner_add_yblock_sse2_end_8
#define snow_inner_add_yblock_sse2_end_16
#define snow_inner_add_yblock_mmx_header
#define snow_inner_add_yblock_mmx_start(out_reg1, out_reg2, ptr_offset, s_offset, d_offset)
#define snow_inner_add_yblock_mmx_accum(ptr_offset, s_offset, d_offset)
#define snow_inner_add_yblock_mmx_mix(read_offset, write_offset)
#define snow_inner_add_yblock_mmx_end(s_step)

Functions

void ff_snow_horizontal_compose97i_sse2 (IDWTELEM *b, int width)
void ff_snow_horizontal_compose97i_mmx (IDWTELEM *b, int width)
static void inner_add_yblock_bw_8_obmc_16_bh_even_sse2 (const uint8_t *obmc, const x86_reg obmc_stride, uint8_t **block, int b_w, x86_reg b_h, int src_x, int src_y, x86_reg src_stride, slice_buffer *sb, int add, uint8_t *dst8)
static void inner_add_yblock_bw_16_obmc_32_sse2 (const uint8_t *obmc, const x86_reg obmc_stride, uint8_t **block, int b_w, x86_reg b_h, int src_x, int src_y, x86_reg src_stride, slice_buffer *sb, int add, uint8_t *dst8)
static void inner_add_yblock_bw_8_obmc_16_mmx (const uint8_t *obmc, const x86_reg obmc_stride, uint8_t **block, int b_w, x86_reg b_h, int src_x, int src_y, x86_reg src_stride, slice_buffer *sb, int add, uint8_t *dst8)
static void inner_add_yblock_bw_16_obmc_32_mmx (const uint8_t *obmc, const x86_reg obmc_stride, uint8_t **block, int b_w, x86_reg b_h, int src_x, int src_y, x86_reg src_stride, slice_buffer *sb, int add, uint8_t *dst8)
void ff_snow_inner_add_yblock_sse2 (const uint8_t *obmc, const int obmc_stride, uint8_t **block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer *sb, int add, uint8_t *dst8)
void ff_snow_inner_add_yblock_mmx (const uint8_t *obmc, const int obmc_stride, uint8_t **block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer *sb, int add, uint8_t *dst8)


Define Documentation

#define snow_inner_add_yblock_mmx_accum ( ptr_offset,
s_offset,
d_offset   ) 

Value:

snow_inner_add_yblock_mmx_start("mm2", "mm6", ptr_offset, s_offset, d_offset)\
             "paddusw %%mm2, %%mm1         \n\t"\
             "paddusw %%mm6, %%mm5         \n\t"

Definition at line 788 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_mmx(), and inner_add_yblock_bw_8_obmc_16_mmx().

#define snow_inner_add_yblock_mmx_end ( s_step   ) 

Value:

"add $"s_step", %%"REG_S"             \n\t"\
             "add %%"REG_c", "PTR_SIZE"*3(%%"REG_a");\n\t"\
             "add %%"REG_c", "PTR_SIZE"*2(%%"REG_a");\n\t"\
             "add %%"REG_c", "PTR_SIZE"*1(%%"REG_a");\n\t"\
             "add %%"REG_c", (%%"REG_a")     \n\t"\
             "add $"PTR_SIZE"*1, %1          \n\t"\
             "add %%"REG_c", %0              \n\t"\
             "dec %2                         \n\t"\
             "jnz 1b                         \n\t"\
             :"+m"(dst8),"+m"(dst_array),"=&r"(tmp)\
             :\
             "rm"((x86_reg)(src_x<<1)),"m"(obmc),"a"(block),"m"((x86_reg)b_h),"m"((x86_reg)src_stride):\
             "%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");

Definition at line 806 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_mmx(), and inner_add_yblock_bw_8_obmc_16_mmx().

#define snow_inner_add_yblock_mmx_header

Value:

IDWTELEM * * dst_array = sb->line + src_y;\
    x86_reg tmp;\
    __asm__ volatile(\
             "mov  %7, %%"REG_c"             \n\t"\
             "mov  %6, %2                    \n\t"\
             "mov  %4, %%"REG_S"             \n\t"\
             "pxor %%mm7, %%mm7              \n\t" /* 0 */\
             "pcmpeqd %%mm3, %%mm3           \n\t"\
             "psllw $15, %%mm3               \n\t"\
             "psrlw $12, %%mm3               \n\t" /* FRAC_BITS >> 1 */\
             "1:                             \n\t"\
             "mov %1, %%"REG_D"              \n\t"\
             "mov (%%"REG_D"), %%"REG_D"     \n\t"\
             "add %3, %%"REG_D"              \n\t"

Definition at line 759 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_mmx(), and inner_add_yblock_bw_8_obmc_16_mmx().

#define snow_inner_add_yblock_mmx_mix ( read_offset,
write_offset   ) 

Value:

"mov %0, %%"REG_d"              \n\t"\
             "psrlw $4, %%mm1                \n\t"\
             "psrlw $4, %%mm5                \n\t"\
             "paddw "read_offset"(%%"REG_D"), %%mm1 \n\t"\
             "paddw "read_offset"+8(%%"REG_D"), %%mm5 \n\t"\
             "paddw %%mm3, %%mm1             \n\t"\
             "paddw %%mm3, %%mm5             \n\t"\
             "psraw $4, %%mm1                \n\t"\
             "psraw $4, %%mm5                \n\t"\
             "packuswb %%mm5, %%mm1          \n\t"\
             "movq %%mm1, "write_offset"(%%"REG_d") \n\t"

Definition at line 793 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_mmx(), and inner_add_yblock_bw_8_obmc_16_mmx().

#define snow_inner_add_yblock_mmx_start ( out_reg1,
out_reg2,
ptr_offset,
s_offset,
d_offset   ) 

Value:

"mov "PTR_SIZE"*"ptr_offset"(%%"REG_a"), %%"REG_d"; \n\t"\
             "movd "d_offset"(%%"REG_d"), %%"out_reg1" \n\t"\
             "movd "d_offset"+4(%%"REG_d"), %%"out_reg2" \n\t"\
             "punpcklbw %%mm7, %%"out_reg1" \n\t"\
             "punpcklbw %%mm7, %%"out_reg2" \n\t"\
             "movd "s_offset"(%%"REG_S"), %%mm0 \n\t"\
             "movd "s_offset"+4(%%"REG_S"), %%mm4 \n\t"\
             "punpcklbw %%mm7, %%mm0       \n\t"\
             "punpcklbw %%mm7, %%mm4       \n\t"\
             "pmullw %%mm0, %%"out_reg1"    \n\t"\
             "pmullw %%mm4, %%"out_reg2"    \n\t"

Definition at line 775 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_mmx(), and inner_add_yblock_bw_8_obmc_16_mmx().

#define snow_inner_add_yblock_sse2_accum_16 ( ptr_offset,
s_offset   ) 

Value:

snow_inner_add_yblock_sse2_start_16("xmm2", "xmm6", ptr_offset, s_offset)\
             "paddusw %%xmm2, %%xmm1         \n\t"\
             "paddusw %%xmm6, %%xmm5         \n\t"

Definition at line 653 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_sse2().

#define snow_inner_add_yblock_sse2_accum_8 ( ptr_offset,
s_offset   ) 

Value:

snow_inner_add_yblock_sse2_start_8("xmm2", "xmm6", ptr_offset, s_offset)\
             "paddusw %%xmm2, %%xmm1         \n\t"\
             "paddusw %%xmm6, %%xmm5         \n\t"

Definition at line 648 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_8_obmc_16_bh_even_sse2().

#define snow_inner_add_yblock_sse2_end_16

Value:

Definition at line 681 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_sse2().

#define snow_inner_add_yblock_sse2_end_8

Value:

"sal $1, %%"REG_c"              \n\t"\
             "add $"PTR_SIZE"*2, %1          \n\t"\
             snow_inner_add_yblock_sse2_end_common1\
             "sar $1, %%"REG_c"              \n\t"\
             "sub $2, %2                     \n\t"\
             snow_inner_add_yblock_sse2_end_common2

Definition at line 673 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_8_obmc_16_bh_even_sse2().

#define snow_inner_add_yblock_sse2_end_common1

Value:

"add $32, %%"REG_S"             \n\t"\
             "add %%"REG_c", %0              \n\t"\
             "add %%"REG_c", "PTR_SIZE"*3(%%"REG_a");\n\t"\
             "add %%"REG_c", "PTR_SIZE"*2(%%"REG_a");\n\t"\
             "add %%"REG_c", "PTR_SIZE"*1(%%"REG_a");\n\t"\
             "add %%"REG_c", (%%"REG_a")     \n\t"

Definition at line 658 of file snowdsp_mmx.c.

#define snow_inner_add_yblock_sse2_end_common2

Value:

"jnz 1b                         \n\t"\
             :"+m"(dst8),"+m"(dst_array),"=&r"(tmp)\
             :\
             "rm"((x86_reg)(src_x<<1)),"m"(obmc),"a"(block),"m"((x86_reg)b_h),"m"((x86_reg)src_stride):\
             "%"REG_c"","%"REG_S"","%"REG_D"","%"REG_d"");

Definition at line 666 of file snowdsp_mmx.c.

#define snow_inner_add_yblock_sse2_header

Value:

IDWTELEM * * dst_array = sb->line + src_y;\
    x86_reg tmp;\
    __asm__ volatile(\
             "mov  %7, %%"REG_c"             \n\t"\
             "mov  %6, %2                    \n\t"\
             "mov  %4, %%"REG_S"             \n\t"\
             "pxor %%xmm7, %%xmm7            \n\t" /* 0 */\
             "pcmpeqd %%xmm3, %%xmm3         \n\t"\
             "psllw $15, %%xmm3              \n\t"\
             "psrlw $12, %%xmm3              \n\t" /* FRAC_BITS >> 1 */\
             "1:                             \n\t"\
             "mov %1, %%"REG_D"              \n\t"\
             "mov (%%"REG_D"), %%"REG_D"     \n\t"\
             "add %3, %%"REG_D"              \n\t"

Definition at line 606 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_sse2(), and inner_add_yblock_bw_8_obmc_16_bh_even_sse2().

#define snow_inner_add_yblock_sse2_start_16 ( out_reg1,
out_reg2,
ptr_offset,
s_offset   ) 

Value:

"mov "PTR_SIZE"*"ptr_offset"(%%"REG_a"), %%"REG_d"; \n\t"\
             "movq (%%"REG_d"), %%"out_reg1" \n\t"\
             "movq 8(%%"REG_d"), %%"out_reg2" \n\t"\
             "punpcklbw %%xmm7, %%"out_reg1" \n\t"\
             "punpcklbw %%xmm7, %%"out_reg2" \n\t"\
             "movq "s_offset"(%%"REG_S"), %%xmm0 \n\t"\
             "movq "s_offset"+8(%%"REG_S"), %%xmm4 \n\t"\
             "punpcklbw %%xmm7, %%xmm0       \n\t"\
             "punpcklbw %%xmm7, %%xmm4       \n\t"\
             "pmullw %%xmm0, %%"out_reg1"    \n\t"\
             "pmullw %%xmm4, %%"out_reg2"    \n\t"

Definition at line 635 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_16_obmc_32_sse2().

#define snow_inner_add_yblock_sse2_start_8 ( out_reg1,
out_reg2,
ptr_offset,
s_offset   ) 

Value:

"mov "PTR_SIZE"*"ptr_offset"(%%"REG_a"), %%"REG_d"; \n\t"\
             "movq (%%"REG_d"), %%"out_reg1" \n\t"\
             "movq (%%"REG_d", %%"REG_c"), %%"out_reg2" \n\t"\
             "punpcklbw %%xmm7, %%"out_reg1" \n\t"\
             "punpcklbw %%xmm7, %%"out_reg2" \n\t"\
             "movq "s_offset"(%%"REG_S"), %%xmm0 \n\t"\
             "movq "s_offset"+16(%%"REG_S"), %%xmm4 \n\t"\
             "punpcklbw %%xmm7, %%xmm0       \n\t"\
             "punpcklbw %%xmm7, %%xmm4       \n\t"\
             "pmullw %%xmm0, %%"out_reg1"    \n\t"\
             "pmullw %%xmm4, %%"out_reg2"    \n\t"

Definition at line 622 of file snowdsp_mmx.c.

Referenced by inner_add_yblock_bw_8_obmc_16_bh_even_sse2().


Function Documentation

void ff_snow_horizontal_compose97i_mmx ( IDWTELEM b,
int  width 
)

Definition at line 215 of file snowdsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_snow_horizontal_compose97i_sse2 ( IDWTELEM b,
int  width 
)

Definition at line 26 of file snowdsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_snow_inner_add_yblock_mmx ( const uint8_t *  obmc,
const int  obmc_stride,
uint8_t **  block,
int  b_w,
int  b_h,
int  src_x,
int  src_y,
int  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
)

Definition at line 863 of file snowdsp_mmx.c.

Referenced by dsputil_init_mmx().

void ff_snow_inner_add_yblock_sse2 ( const uint8_t *  obmc,
const int  obmc_stride,
uint8_t **  block,
int  b_w,
int  b_h,
int  src_x,
int  src_y,
int  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
)

Definition at line 849 of file snowdsp_mmx.c.

Referenced by dsputil_init_mmx().

static void inner_add_yblock_bw_16_obmc_32_mmx ( const uint8_t *  obmc,
const x86_reg  obmc_stride,
uint8_t **  block,
int  b_w,
x86_reg  b_h,
int  src_x,
int  src_y,
x86_reg  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
) [static]

Definition at line 832 of file snowdsp_mmx.c.

Referenced by ff_snow_inner_add_yblock_mmx().

static void inner_add_yblock_bw_16_obmc_32_sse2 ( const uint8_t *  obmc,
const x86_reg  obmc_stride,
uint8_t **  block,
int  b_w,
x86_reg  b_h,
int  src_x,
int  src_y,
x86_reg  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
) [static]

Definition at line 735 of file snowdsp_mmx.c.

Referenced by ff_snow_inner_add_yblock_sse2().

static void inner_add_yblock_bw_8_obmc_16_bh_even_sse2 ( const uint8_t *  obmc,
const x86_reg  obmc_stride,
uint8_t **  block,
int  b_w,
x86_reg  b_h,
int  src_x,
int  src_y,
x86_reg  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
) [static]

Definition at line 687 of file snowdsp_mmx.c.

Referenced by ff_snow_inner_add_yblock_sse2().

static void inner_add_yblock_bw_8_obmc_16_mmx ( const uint8_t *  obmc,
const x86_reg  obmc_stride,
uint8_t **  block,
int  b_w,
x86_reg  b_h,
int  src_x,
int  src_y,
x86_reg  src_stride,
slice_buffer sb,
int  add,
uint8_t *  dst8 
) [static]

Definition at line 821 of file snowdsp_mmx.c.

Referenced by ff_snow_inner_add_yblock_mmx(), and ff_snow_inner_add_yblock_sse2().


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