Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-08-07 19:11:02 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-08-07 19:11:02 +0300
commit0c88112e10fc978e570abb42732b257907bd332e (patch)
tree5f95326277182e0c9985658adfb89da80530c572
parent2c639686ea72e07866ac85c5d2f845cf1222f1e8 (diff)
remove loop, still sucks
-rw-r--r--celt/vq.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/celt/vq.c b/celt/vq.c
index 9929c48b..dc1d8135 100644
--- a/celt/vq.c
+++ b/celt/vq.c
@@ -195,19 +195,25 @@ static int compute_search_vec(const float *X, const float *y, int N, float xy, f
#endif
}
{
- int i;
float tmp[8];
_mm_storeu_ps(&tmp[0], max);
_mm_storeu_ps(&tmp[4], pos);
maxval = tmp[0];
maxpos = 4*tmp[4];
- for (i=1;i<4;i++)
+ if (tmp[1] > maxval)
{
- if (tmp[i] > maxval)
- {
- maxval = tmp[i];
- maxpos = 4*tmp[i+4] + i;
- }
+ maxval = tmp[1];
+ maxpos = 4*tmp[5]+1;
+ }
+ if (tmp[2] > maxval)
+ {
+ maxval = tmp[2];
+ maxpos = 4*tmp[6]+2;
+ }
+ if (tmp[3] > maxval)
+ {
+ maxval = tmp[3];
+ maxpos = 4*tmp[7]+3;
}
//printf("n = %d\n", N);
//for (i=0;i<8;i++) printf("%f ", tmp[i]);