From: Jason Garrett-Glaser Date: Thu, 4 Sep 2008 04:43:06 +0000 (-0700) Subject: Faster avg_weight assembly X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=954117a7127fbf50540891f9c97ebe7c607be736;p=x264.git Faster avg_weight assembly Unrolling the loop a bit improves performance --- 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