[xiph-commits] r9369 - trunk/speex/libspeex

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Sun Jun 5 23:52:20 PDT 2005


Author: jm
Date: 2005-06-05 23:52:18 -0700 (Sun, 05 Jun 2005)
New Revision: 9369

Modified:
   trunk/speex/libspeex/filters_bfin.h
   trunk/speex/libspeex/vq_bfin.h
Log:
saved two instructions in vq_nbest


Modified: trunk/speex/libspeex/filters_bfin.h
===================================================================
--- trunk/speex/libspeex/filters_bfin.h	2005-06-06 06:21:10 UTC (rev 9368)
+++ trunk/speex/libspeex/filters_bfin.h	2005-06-06 06:52:18 UTC (rev 9369)
@@ -50,7 +50,7 @@
       "R1 = ABS R1;\n\t"
       "%0 = MAX(%0, R1);\n\t"
    "LOOP_END norm_max%=;\n\t"
-   : "=d" (max_val)
+   : "=&d" (max_val)
    : "a" (x), "a" (len)
    : "R1"
    );

Modified: trunk/speex/libspeex/vq_bfin.h
===================================================================
--- trunk/speex/libspeex/vq_bfin.h	2005-06-06 06:21:10 UTC (rev 9368)
+++ trunk/speex/libspeex/vq_bfin.h	2005-06-06 06:52:18 UTC (rev 9369)
@@ -36,7 +36,6 @@
 {
    if (N==1)
    {
-      int i;
       best_dist[0] = 2147483647;
       {
          spx_word32_t dist;
@@ -44,13 +43,14 @@
                (
             "LC0 = %8;\n\t"
             "R2 = 0;\n\t"
+            "I0 = %6;\n\t"
+            "B0 = %6;\n\t"
+            "L0 = %9;\n\t"
             "LOOP entries_loop%= LC0;\n\t"
             "LOOP_BEGIN entries_loop%=;\n\t"
                "%0 = [%4++];\n\t"
                "%0 >>= 1;\n\t"
                "A0 = %0;\n\t"
-               "I0 = %6;\n\t"
-               "L0 = 0;\n\t"
                "R0.L = W[%1++%7] || R1.L = W[I0++];\n\t"
                "LOOP vq_loop%= LC1 = %5;\n\t"
                "LOOP_BEGIN vq_loop%=;\n\t"
@@ -63,8 +63,8 @@
                "R2 += 1;\n\t"
             "LOOP_END entries_loop%=;\n\t"
             : "=&D" (dist), "=&a" (codebook), "=&d" (best_dist[0]), "=&d" (nbest[0]), "=&a" (E)
-            : "a" (len-1), "a" (in), "a" (2), "d" (entries), "1" (codebook), "4" (E), "2" (best_dist[0]), "3" (nbest[0])
-            : "R0", "R1", "R2", "I0", "L0", "A0", "cc", "memory"
+            : "a" (len-1), "a" (in), "a" (2), "d" (entries), "d" (len<<1), "1" (codebook), "4" (E), "2" (best_dist[0]), "3" (nbest[0])
+            : "R0", "R1", "R2", "I0", "L0", "B0", "A0", "cc", "memory"
                );
       }
    } else {



More information about the commits mailing list