[FFmpeg-cvslog] x86/synth_filter: remove the main loop when it's not needed

Christophe Gisquet git at videolan.org
Fri Apr 4 22:43:58 CEST 2014


ffmpeg | branch: master | Christophe Gisquet <christophe.gisquet at gmail.com> | Fri Apr  4 14:21:40 2014 -0300| [dfd865e51b890d9be394804bccddf55198f4a251] | committer: Michael Niedermayer

x86/synth_filter: remove the main loop when it's not needed

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dfd865e51b890d9be394804bccddf55198f4a251
---

 libavcodec/x86/dcadsp.asm |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavcodec/x86/dcadsp.asm b/libavcodec/x86/dcadsp.asm
index c5a1e77..10cb298 100644
--- a/libavcodec/x86/dcadsp.asm
+++ b/libavcodec/x86/dcadsp.asm
@@ -311,9 +311,14 @@ cglobal synth_filter_inner, 0, 6 + 4 * ARCH_X86_64, 7 + 6 * ARCH_X86_64, \
     sub          r5q, offmp
     and          r5q, -64
     shl          r5q, 2
+%if ARCH_X86_32 || mmsize < 32
     mov         OFFQ, r5q
 %define i        r5q
     mov            i, 16 * 4 - (ARCH_X86_64 + 1) * mmsize  ; main loop counter
+%else
+%define i 0
+%define OFFQ  r5q
+%endif
 
 %define buf2     synth_buf2q
 %if ARCH_X86_32
@@ -332,8 +337,10 @@ cglobal synth_filter_inner, 0, 6 + 4 * ARCH_X86_64, 7 + 6 * ARCH_X86_64, \
 %define j        r3q
     mov          win, windowm
     mov         ptr1, synth_bufm
+%if ARCH_X86_32 || mmsize < 32
     add          win, i
     add         ptr1, i
+%endif
 %else ; ARCH_X86_64
 %define ptr1     r6q
 %define ptr2     r7q ; must be loaded
@@ -349,7 +356,9 @@ cglobal synth_filter_inner, 0, 6 + 4 * ARCH_X86_64, 7 + 6 * ARCH_X86_64, \
     mov         ptr2, synth_bufmp
     ; prepare the inner loop counter
     mov            j, OFFQ
+%if ARCH_X86_32 || mmsize < 32
     sub         ptr2, i
+%endif
 .loop1:
     INNER_LOOP  0
     jge       .loop1
@@ -394,8 +403,10 @@ cglobal synth_filter_inner, 0, 6 + 4 * ARCH_X86_64, 7 + 6 * ARCH_X86_64, \
     mova   [outq + i +  0 * 4 + mmsize], m7
     mova   [outq + i + 16 * 4 + mmsize], m8
 %endif
+%if ARCH_X86_32 || mmsize < 32
     sub            i, (ARCH_X86_64 + 1) * mmsize
     jge    .mainloop
+%endif
     RET
 %endmacro
 



More information about the ffmpeg-cvslog mailing list