@ -117,17 +117,17 @@ static emu_edge_hfix_func *hfixtbl_mmx[11] = {
} ;
# endif
extern emu_edge_hvar_func ff_emu_edge_hvar_mmx ;
extern emu_edge_hfix_func ff_emu_edge_hfix16_sse ;
extern emu_edge_hfix_func ff_emu_edge_hfix18_sse ;
extern emu_edge_hfix_func ff_emu_edge_hfix20_sse ;
extern emu_edge_hfix_func ff_emu_edge_hfix22_sse ;
static emu_edge_hfix_func * hfixtbl_sse [ 11 ] = {
extern emu_edge_hfix_func ff_emu_edge_hfix16_sse2 ;
extern emu_edge_hfix_func ff_emu_edge_hfix18_sse2 ;
extern emu_edge_hfix_func ff_emu_edge_hfix20_sse2 ;
extern emu_edge_hfix_func ff_emu_edge_hfix22_sse2 ;
static emu_edge_hfix_func * hfixtbl_sse2 [ 11 ] = {
ff_emu_edge_hfix2_mmx , ff_emu_edge_hfix4_mmx , ff_emu_edge_hfix6_mmx ,
ff_emu_edge_hfix8_mmx , ff_emu_edge_hfix10_mmx , ff_emu_edge_hfix12_mmx ,
ff_emu_edge_hfix14_mmx , ff_emu_edge_hfix16_sse , ff_emu_edge_hfix18_sse ,
ff_emu_edge_hfix20_sse , ff_emu_edge_hfix22_sse
ff_emu_edge_hfix14_mmx , ff_emu_edge_hfix16_sse2 , ff_emu_edge_hfix18_sse2 ,
ff_emu_edge_hfix20_sse2 , ff_emu_edge_hfix22_sse2
} ;
extern emu_edge_hvar_func ff_emu_edge_hvar_sse ;
extern emu_edge_hvar_func ff_emu_edge_hvar_sse2 ;
static av_always_inline void emulated_edge_mc ( uint8_t * dst , ptrdiff_t dst_stride ,
const uint8_t * src , ptrdiff_t src_stride ,
@ -212,21 +212,26 @@ static av_noinline void emulated_edge_mc_mmx(uint8_t *buf, ptrdiff_t buf_stride,
src_x , src_y , w , h , vfixtbl_mmx , & ff_emu_edge_vvar_mmx ,
hfixtbl_mmx , & ff_emu_edge_hvar_mmx ) ;
}
# endif
static av_noinline void emulated_edge_mc_sse ( uint8_t * buf , ptrdiff_t buf_stride ,
const uint8_t * src , ptrdiff_t src_stride ,
int block_w , int block_h ,
int src_x , int src_y , int w , int h )
{
emulated_edge_mc ( buf , buf_stride , src , src_stride , block_w , block_h , src_x ,
src_y , w , h , vfixtbl_sse , & ff_emu_edge_vvar_sse , hfixtbl_sse ,
# if ARCH_X86_64
& ff_emu_edge_hvar_sse
# else
& ff_emu_edge_hvar_mmx
emulated_edge_mc ( buf , buf_stride , src , src_stride , block_w , block_h ,
src_x , src_y , w , h , vfixtbl_sse , & ff_emu_edge_vvar_sse ,
hfixtbl_mmx , & ff_emu_edge_hvar_mmx ) ;
}
# endif
) ;
static av_noinline void emulated_edge_mc_sse2 ( uint8_t * buf , ptrdiff_t buf_stride ,
const uint8_t * src , ptrdiff_t src_stride ,
int block_w , int block_h ,
int src_x , int src_y , int w , int h )
{
emulated_edge_mc ( buf , buf_stride , src , src_stride , block_w , block_h , src_x ,
src_y , w , h , vfixtbl_sse , & ff_emu_edge_vvar_sse ,
hfixtbl_sse2 , & ff_emu_edge_hvar_sse2 ) ;
}
# endif /* HAVE_YASM */
@ -249,8 +254,13 @@ av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
if ( EXTERNAL_MMXEXT ( cpu_flags ) ) {
ctx - > prefetch = ff_prefetch_mmxext ;
}
# if ARCH_X86_32
if ( EXTERNAL_SSE ( cpu_flags ) & & bpc < = 8 ) {
ctx - > emulated_edge_mc = emulated_edge_mc_sse ;
}
# endif /* ARCH_X86_32 */
if ( EXTERNAL_SSE2 ( cpu_flags ) & & bpc < = 8 ) {
ctx - > emulated_edge_mc = emulated_edge_mc_sse2 ;
}
# endif /* HAVE_YASM */
}