aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Massimino <pascal.massimino@gmail.com>2014-09-09 22:49:52 +0200
committerJames Almer <jamrial@gmail.com>2014-09-09 19:02:49 -0300
commit649b7a99463d5a43e47cbf8be9a788e20b21b3a8 (patch)
tree65b39433d46f9fa31f7064d281c8bdc0db167999
parentc7d8dbad14ed5fa3c217a4fc1790021d6c0b6416 (diff)
downloadffmpeg-649b7a99463d5a43e47cbf8be9a788e20b21b3a8.tar.gz
av_filter/x86/idet: use HADDD where appropriate
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavfilter/x86/vf_idet.asm19
1 files changed, 3 insertions, 16 deletions
diff --git a/libavfilter/x86/vf_idet.asm b/libavfilter/x86/vf_idet.asm
index 4649cae030..007e63deb9 100644
--- a/libavfilter/x86/vf_idet.asm
+++ b/libavfilter/x86/vf_idet.asm
@@ -69,10 +69,8 @@ cglobal idet_filter_line, 4, 5, 0, a, b, c, width, index
CMP widthd, indexd
jg .loop
- mova m0, m_sum
- psrlq m_sum, 0x20
- paddd m0, m_sum
- movd eax, m0
+ HADDD m_sum, m0
+ movd eax, m_sum
RET
%endmacro
@@ -123,18 +121,7 @@ cglobal idet_filter_line_16bit, 4, 5, 8, a, b, c, width, index
paddd m_sum, m5
jl .loop_16bit
- mova m2, m_sum
-%if mmsize == 16
- psrldq m2, 4
- paddd m_sum, m2
- psrldq m2, 4
- paddd m_sum, m2
- psrldq m2, 4
- paddd m_sum, m2
-%else
- psrlq m2, 32
- paddd m_sum, m2
-%endif
+ HADDD m_sum, m2
movd eax, m_sum
RET
%endmacro