From: Henrik Gramner Date: Sun, 15 Jan 2017 13:52:29 +0000 (+0100) Subject: x86util: Reduce code size of high bit-depth AVX LOAD_DIFF X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c7bf52c5b0a849458a45b5628ed1cc4b898da5f;p=libx264 x86util: Reduce code size of high bit-depth AVX LOAD_DIFF AVX supports unaligned memory operands which makes the SATD code a bit denser. --- diff --git a/common/x86/x86util.asm b/common/x86/x86util.asm index c285f137..ea40bc87 100644 --- a/common/x86/x86util.asm +++ b/common/x86/x86util.asm @@ -741,25 +741,25 @@ %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