shithub: opus

Download patch

ref: 828da91d66f155c31bc1753e9f6ae158d0e2671c
parent: f412a99e2a8d5715545d5ab2165faa68f4855263
author: Timothy B. Terriberry <[email protected]>
date: Fri Aug 6 13:05:53 EDT 2010

Minor simplification to exp_rotation().

--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -50,12 +50,10 @@
    return 1664525 * seed + 1013904223;
 }
 
-static void exp_rotation1(celt_norm *X, int len, int dir, int stride, celt_word16 c, celt_word16 s)
+static void exp_rotation1(celt_norm *X, int len, int stride, celt_word16 c, celt_word16 s)
 {
    int i;
    celt_norm *Xptr;
-   if (dir>0)
-      s = -s;
    Xptr = X;
    for (i=0;i<len-stride;i++)
    {
@@ -114,12 +112,12 @@
       if (dir < 0)
       {
          if (stride2)
-            exp_rotation1(X+i*len, len, dir, stride2, s, c);
-         exp_rotation1(X+i*len, len, dir, 1, c, s);
+            exp_rotation1(X+i*len, len, stride2, s, c);
+         exp_rotation1(X+i*len, len, 1, c, s);
       } else {
-         exp_rotation1(X+i*len, len, dir, 1, c, s);
+         exp_rotation1(X+i*len, len, 1, c, -s);
          if (stride2)
-            exp_rotation1(X+i*len, len, dir, stride2, s, c);
+            exp_rotation1(X+i*len, len, stride2, s, -c);
       }
    }
    /*if (len>=30)