changeset 198:d714168fb6dc

libgsmefr/pitch_f6.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Jan 2023 04:10:35 +0000
parents bcd337afa0f1
children b4531e7227ca
files libgsmefr/pitch_f6.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/pitch_f6.c	Wed Jan 04 04:02:19 2023 +0000
+++ b/libgsmefr/pitch_f6.c	Wed Jan 04 04:10:35 2023 +0000
@@ -70,7 +70,7 @@
     for (i = t0_min + 1; i <= t0_max; i++)
     {
         test (); 
-        if (sub (corr[i], max) >= 0)
+        if (corr[i] >= max)
         {
             max = corr[i];                     move16 (); 
             lag = i;                           move16 (); 
@@ -80,7 +80,7 @@
     /* If first subframe and lag > 94 do not search fractional pitch */
 
     test (); test (); 
-    if ((i_subfr == 0) && (sub (lag, 94) > 0))
+    if ((i_subfr == 0) && (lag > 94))
     {
         *pit_frac = 0;                         move16 (); 
         return (lag);
@@ -95,7 +95,7 @@
     {
         corr_int = Interpol_6 (&corr[lag], i); move16 (); 
         test (); 
-        if (sub (corr_int, max) > 0)
+        if (corr_int > max)
         {
             max = corr_int;                    move16 (); 
             frac = i;                          move16 (); 
@@ -105,7 +105,7 @@
     /* Limit the fraction value in the interval [-2,-1,0,1,2,3] */
 
     test (); 
-    if (sub (frac, -3) == 0)
+    if (frac == -3)
     {
         frac = 3;                              move16 (); 
         lag = sub (lag, 1);
@@ -165,7 +165,7 @@
         s = L_mac (s, excf[j], excf[j]);
     }
     test (); 
-    if (L_sub (s, 67108864L) <= 0)             /* if (s <= 2^26) */
+    if (s <= 67108864L)                        /* if (s <= 2^26) */
     {
         s_excf = excf;                         move16 (); 
         h_fac = 15 - 12;                       move16 (); 
@@ -213,7 +213,7 @@
         /* modify the filtered excitation excf[] for the next iteration */
 
         test (); 
-        if (sub (i, t_max) != 0)
+        if (i != t_max)
         {
             k--;
             for (j = L_subfr - 1; j > 0; j--)