diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-05-26 23:59:14 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 23:47:40 +0400 |
commit | 226700398105075d27d07b652a0b67705aa06a1e (patch) | |
tree | 629a09643833896aaad236ffea83e96a4a42698a /libavutil/x86/x86util.asm | |
parent | bf7e9cc82a8482ae2811bfb86408026967acecdb (diff) |
x86: hpeldsp: better factorization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86/x86util.asm')
-rw-r--r-- | libavutil/x86/x86util.asm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 807e87e60e..1064e9a25c 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -340,11 +340,19 @@ %endif %endmacro -%macro PAVGB 2 +%macro PAVGB 2-4 %if cpuflag(mmxext) pavgb %1, %2 %elif cpuflag(3dnow) pavgusb %1, %2 +%elif cpuflag(mmx) + movu %3, %2 + por %3, %1 + pxor %1, %2 + pand %1, %4 + psrlq %1, 1 + psubb %3, %1 + SWAP %1, %3 %endif %endmacro |