From 954117a7127fbf50540891f9c97ebe7c607be736 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Wed, 3 Sep 2008 21:43:06 -0700 Subject: [PATCH] Faster avg_weight assembly Unrolling the loop a bit improves performance --- common/x86/mc-a.asm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/x86/mc-a.asm b/common/x86/mc-a.asm index edbbe610..aae5a991 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 -- 2.47.3