]> git.videolan.org Git - x264.git/commitdiff
Faster avg_weight assembly
authorJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 4 Sep 2008 04:43:06 +0000 (21:43 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Fri, 5 Sep 2008 18:34:37 +0000 (11:34 -0700)
Unrolling the loop a bit improves performance

common/x86/mc-a.asm

index edbbe610bd3a7a6e0dcf673d6955d2bd3e213241..aae5a991fb70c41eeb6be1d2650ea245626d2e90 100644 (file)
@@ -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