[x265] [PATCH 2 of 3] asm: reduce 1 register in quant_avx2

Min Chen chenm003 at 163.com
Fri Apr 3 13:10:45 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1428059412 -28800
# Node ID 7882a5f07b75fc4691de46067e4a7b8fd0ab11eb
# Parent  abf20efa2234fb7cd6a474d4dac6e3051a94b30c
asm: reduce 1 register in quant_avx2
---
 source/common/x86/pixel-util8.asm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r abf20efa2234 -r 7882a5f07b75 source/common/x86/pixel-util8.asm
--- a/source/common/x86/pixel-util8.asm	Fri Apr 03 19:10:07 2015 +0800
+++ b/source/common/x86/pixel-util8.asm	Fri Apr 03 19:10:12 2015 +0800
@@ -617,7 +617,7 @@
 
 %if ARCH_X86_64 == 1
 INIT_YMM avx2
-cglobal quant, 5,5,10
+cglobal quant, 5,6,9
     ; fill qbits
     movd            xm4, r4d            ; m4 = qbits
 
@@ -628,7 +628,7 @@
     ; fill offset
     vpbroadcastd    m5, r5m             ; m5 = add
 
-    vpbroadcastw    m9, [pw_1]          ; m9 = word [1]
+    lea             r5, [pw_1]
 
     mov             r4d, r6m
     shr             r4d, 4
@@ -666,7 +666,7 @@
 
     ; count non-zero coeff
     ; TODO: popcnt is faster, but some CPU can't support
-    pminuw          m2, m9
+    pminuw          m2, [r5]
     paddw           m7, m2
 
     add             r0, mmsize



More information about the x265-devel mailing list