From c0622592162bc964b70a0615111dcea8ef86e52a Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 21 Jul 2009 03:40:53 +0000 Subject: Rearrange loop to avoid one branch per iteration. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21988 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libcook/cook_fixpoint.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/codecs/libcook/cook_fixpoint.h b/apps/codecs/libcook/cook_fixpoint.h index 7e3db85..35c3f57 100644 --- a/apps/codecs/libcook/cook_fixpoint.h +++ b/apps/codecs/libcook/cook_fixpoint.h @@ -174,14 +174,20 @@ static void scalar_dequant_math(COOKContext *q, int index, FIXP f; int i; - for(i=0 ; i= 64) ? 0 : fixp_pow2(f, -(s/2)); + + if(s >= 64) + mlt_p[i]=0; + else + { + for(i=0 ; i