<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>>+ PROCESS_SAD_8x4<BR>>+ PROCESS_SAD_8x4<BR>>+<BR>>+ movq m1, [r2]<BR>>+ movq m2, [r2 + r3]<BR>>+ lea r2, [r2 + 2 * r3]<BR>>+ movq m3, [r0]<BR>>+ movq m4, [r0 + r1]<BR>>+ lea r0, [r0 + 2 * r1]<BR>>+ punpcklqdq m1, m2<BR>>+ punpcklqdq m3,
m4<BR>>+ psadbw m1, m3<BR>>+ paddd m0, m1<BR>>+ movq m1, [r2]<BR>>+ movq m2, [r2 + r3]<BR>>+ movq m3, [r0]<BR>>+ movq m4, [r0 + r1]<BR>>+ punpcklqdq m1, m2<BR>>+ punpcklqdq m3, m4<BR>>+ psadbw m1, m3<BR>>+ paddd m0, m1<BR></DIV>
<DIV>You only want to reduce two of LEA instruction, don't extend code, you can pass a param to PROCESS_SAD_8x4 and control by %if, like below:</DIV>
<DIV>PROCESS_SAD_8x4 1<BR>PROCESS_SAD_8x4 1<BR>PROCESS_SAD_8x4 0<BR></DIV></div>