diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-08-05 00:13:38 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-08-05 00:13:38 +0000 |
commit | c12d6955e2bf5cfb8b43f62197d546a7f71e04eb (patch) | |
tree | 59e2f0f9a692cedf38d0aa26c3fb2df26509803f | |
parent | 905ef0d064d8fb6a349b071c686c4a7fa5a99e07 (diff) | |
download | ffmpeg-c12d6955e2bf5cfb8b43f62197d546a7f71e04eb.tar.gz |
H.264: SSE2/SSSE3 weighted prediction asm
Patch by Eli Friedman <eli.friedman at gmail dot com>
Originally committed as revision 24702 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/x86/Makefile | 1 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 6 | ||||
-rw-r--r-- | libavcodec/x86/h264dsp_mmx.c | 16 |
3 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index ea53e33580..4ca7c01600 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -10,6 +10,7 @@ YASM-OBJS-$(CONFIG_GPL) += x86/h264_idct_sse2.o \ YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock_sse2.o \ x86/h264_intrapred.o \ + x86/h264_weight_sse2.o \ YASM-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_yasm.o diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index f06d4e5a5a..2b96be3a33 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -3000,6 +3000,8 @@ void ff_h264dsp_init_x86(H264DSPContext *c) c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext; #endif if( mm_flags&FF_MM_SSE2 ){ + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_sse2; + c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_sse2; #if ARCH_X86_64 || !defined(__ICC) || __ICC > 1110 c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2; c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2; @@ -3012,6 +3014,10 @@ void ff_h264dsp_init_x86(H264DSPContext *c) c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2; #endif } + if ( mm_flags&FF_MM_SSSE3 ){ + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; + c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3; + } } #endif } diff --git a/libavcodec/x86/h264dsp_mmx.c b/libavcodec/x86/h264dsp_mmx.c index b9d2c32346..992e0dd4c8 100644 --- a/libavcodec/x86/h264dsp_mmx.c +++ b/libavcodec/x86/h264dsp_mmx.c @@ -2323,6 +2323,22 @@ H264_WEIGHT( 4, 8) H264_WEIGHT( 4, 4) H264_WEIGHT( 4, 2) +void ff_h264_biweight_8x8_sse2(uint8_t *dst, uint8_t *src, int stride, + int log2_denom, int weightd, int weights, + int offset); + +void ff_h264_biweight_16x16_sse2(uint8_t *dst, uint8_t *src, int stride, + int log2_denom, int weightd, int weights, + int offset); + +void ff_h264_biweight_8x8_ssse3(uint8_t *dst, uint8_t *src, int stride, + int log2_denom, int weightd, int weights, + int offset); + +void ff_h264_biweight_16x16_ssse3(uint8_t *dst, uint8_t *src, int stride, + int log2_denom, int weightd, int weights, + int offset); + void ff_pred16x16_vertical_mmx (uint8_t *src, int stride); void ff_pred16x16_vertical_sse (uint8_t *src, int stride); void ff_pred16x16_horizontal_mmx (uint8_t *src, int stride); |