diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-15 04:07:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-15 04:09:03 +0100 |
commit | 05e4b25e9b0a3586033dc21548b03c8e5071efe3 (patch) | |
tree | 009b6761167dfeac3b3e881ef74c6020ea2534e7 /libavfilter | |
parent | fb3eb573699e3eec76393ca6d5bdf86b7ac5e349 (diff) | |
download | ffmpeg-05e4b25e9b0a3586033dc21548b03c8e5071efe3.tar.gz |
avfilter/x86/vf_interlace: rewrite asm
4775 decicycles -> 3688 decicycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/x86/vf_interlace.asm | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/libavfilter/x86/vf_interlace.asm b/libavfilter/x86/vf_interlace.asm index 55b430d702..2d61d7b80a 100644 --- a/libavfilter/x86/vf_interlace.asm +++ b/libavfilter/x86/vf_interlace.asm @@ -2,6 +2,7 @@ ;* x86-optimized functions for interlace filter ;* ;* Copyright (C) 2014 Kieran Kunhya <kierank@obe.tv> +;* Copyright (c) 2014 Michael Niedermayer <michaelni@gmx.at> ;* ;* This file is part of FFmpeg. ;* @@ -34,36 +35,27 @@ cglobal lowpass_line, 5, 5, 7 add r4, r1 neg r1 - pxor m6, m6 + pcmpeqb m6, m6 .loop - mova m0, [r2+r1] - punpcklbw m1, m0, m6 - punpckhbw m0, m6 - paddw m0, m0 - paddw m1, m1 + mova m0, [r3+r1] + mova m1, [r3+r1+mmsize] + pavgb m0, [r4+r1] + pavgb m1, [r4+r1+mmsize] + mova m2, [r2+r1] + mova m3, [r2+r1+mmsize] + pxor m0, m6 + pxor m1, m6 + pxor m2, m6 + pxor m3, m6 + pavgb m0, m2 + pavgb m1, m3 + pxor m0, m6 + pxor m1, m6 + mova [r0+r1], m0 + mova [r0+r1+mmsize], m1 - mova m2, [r3+r1] - punpcklbw m3, m2, m6 - punpckhbw m2, m6 - - mova m4, [r4+r1] - punpcklbw m5, m4, m6 - punpckhbw m4, m6 - - paddw m1, m3 - pavgw m1, m5 - - paddw m0, m2 - pavgw m0, m4 - - psrlw m0, 1 - psrlw m1, 1 - - packuswb m1, m0 - mova [r0+r1], m1 - - add r1, mmsize + add r1, 2*mmsize jl .loop REP_RET %endmacro |