]> granicus.if.org Git - libx264/commitdiff
x86util: Reduce code size of high bit-depth AVX LOAD_DIFF
authorHenrik Gramner <henrik@gramner.com>
Sun, 15 Jan 2017 13:52:29 +0000 (14:52 +0100)
committerHenrik Gramner <henrik@gramner.com>
Sat, 21 Jan 2017 13:10:37 +0000 (14:10 +0100)
AVX supports unaligned memory operands which makes the SATD code a bit denser.

common/x86/x86util.asm

index c285f137951fb1537762944d6fab489afe864c55..ea40bc87948624e0e75ef5cfff49efd4f38e74b8 100644 (file)
 %if %6 ; %5 aligned?
     mova       %1, %4
     psubw      %1, %5
+%elif cpuflag(avx)
+    movu       %1, %4
+    psubw      %1, %5
 %else
     movu       %1, %4
     movu       %2, %5
     psubw      %1, %2
 %endif
 %else ; !HIGH_BIT_DEPTH
-%ifidn %3, none
     movh       %1, %4
     movh       %2, %5
+%ifidn %3, none
     punpcklbw  %1, %2
     punpcklbw  %2, %2
-    psubw      %1, %2
 %else
-    movh       %1, %4
     punpcklbw  %1, %3
-    movh       %2, %5
     punpcklbw  %2, %3
-    psubw      %1, %2
 %endif
+    psubw      %1, %2
 %endif ; HIGH_BIT_DEPTH
 %endmacro