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.asm | |
parent | 59f474b49dce5032d2d446d687eef3228e941192 (diff) | |
download | ffmpeg-f91c4b7824a558b472bb0acd610c772cd9904003.tar.gz |
png: add SSE2 version for add_bytes_l2.
Diffstat (limited to 'libavcodec/x86/pngdsp.asm')
-rw-r--r-- | libavcodec/x86/pngdsp.asm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm index 92425ad099..bff76e0c0d 100644 --- a/libavcodec/x86/pngdsp.asm +++ b/libavcodec/x86/pngdsp.asm @@ -53,6 +53,21 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i cmp iq, waq jl .loop_v +%if mmsize == 16 + ; vector loop + mov wq, waq + and waq, ~7 + jmp .end_l +.loop_l: + movq mm0, [src1q+iq] + paddb mm0, [src2q+iq] + movq [dstq+iq ], mm0 + add iq, 8 +.end_l: + cmp iq, waq + jl .loop_l +%endif + ; scalar loop for leftover jmp .end_s .loop_s: @@ -66,8 +81,13 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i REP_RET %endmacro +%if ARCH_X86_32 INIT_MMX mmx ADD_BYTES_FN 0 +%endif + +INIT_XMM sse2 +ADD_BYTES_FN 2 %macro ADD_PAETH_PRED_FN 1 cglobal add_png_paeth_prediction, 5, 7, %1, dst, src, top, w, bpp, end, cntr |