[x264-devel] commit: Faster avg_weight assembly (Jason Garrett-Glaser )

git version control git at videolan.org
Fri Sep 5 22:13:24 CEST 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Sep  3 21:43:06 2008 -0700| [954117a7127fbf50540891f9c97ebe7c607be736] | committer: Jason Garrett-Glaser 

Faster avg_weight assembly
Unrolling the loop a bit improves performance

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=954117a7127fbf50540891f9c97ebe7c607be736
---

 common/x86/mc-a.asm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/common/x86/mc-a.asm b/common/x86/mc-a.asm
index edbbe61..aae5a99 100644
--- a/common/x86/mc-a.asm
+++ b/common/x86/mc-a.asm
@@ -537,11 +537,12 @@ cglobal x264_pixel_avg_weight_w%2_%1, 4,5
 %assign x 0
 %rep %2*2/mmsize
     BIWEIGHT  [r0+x], [r2+x]
+    BIWEIGHT  [r0+x+r1], [r2+x+r3]
 %assign x x+mmsize/2
 %endrep
-    add  r0, r1
-    add  r2, r3
-    dec  t0
+    lea  r0, [r0+r1*2]
+    lea  r2, [r2+r3*2]
+    sub  t0, 2
     jg   .height_loop
     REP_RET
 %endmacro



More information about the x264-devel mailing list