diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-01-27 23:23:05 +0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-01-29 18:52:17 -0800 |
commit | f91c4b7824a558b472bb0acd610c772cd9904003 (patch) | |
tree | 865393e2bb6dc458424797f0c52e45171c93e6f5 /libavcodec/x86/pngdsp-init.c | |
parent | 59f474b49dce5032d2d446d687eef3228e941192 (diff) | |
download | ffmpeg-f91c4b7824a558b472bb0acd610c772cd9904003.tar.gz |
png: add SSE2 version for add_bytes_l2.
Diffstat (limited to 'libavcodec/x86/pngdsp-init.c')
-rw-r--r-- | libavcodec/x86/pngdsp-init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/x86/pngdsp-init.c b/libavcodec/x86/pngdsp-init.c index 9c7d696aa0..136e92eed0 100644 --- a/libavcodec/x86/pngdsp-init.c +++ b/libavcodec/x86/pngdsp-init.c @@ -29,16 +29,22 @@ void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp); void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w); +void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1, + uint8_t *src2, int w); void ff_pngdsp_init_x86(PNGDSPContext *dsp) { #if HAVE_YASM int flags = av_get_cpu_flags(); +#if ARCH_X86_32 if (flags & AV_CPU_FLAG_MMX) dsp->add_bytes_l2 = ff_add_bytes_l2_mmx; +#endif if (flags & AV_CPU_FLAG_MMX2) dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmx2; + if (flags & AV_CPU_FLAG_SSE2) + dsp->add_bytes_l2 = ff_add_bytes_l2_sse2; if (flags & AV_CPU_FLAG_SSSE3) dsp->add_paeth_prediction = ff_add_png_paeth_prediction_ssse3; #endif |