changeset 199:b4531e7227ca

libgsmefr/pitch_ol.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Jan 2023 04:23:07 +0000
parents d714168fb6dc
children 33487966077e
files libgsmefr/pitch_ol.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/pitch_ol.c	Wed Jan 04 04:10:35 2023 +0000
+++ b/libgsmefr/pitch_ol.c	Wed Jan 04 04:23:07 2023 +0000
@@ -76,7 +76,7 @@
      *--------------------------------------------------------*/
 
     test (); test (); 
-    if (L_sub (t0, MAX_32) == 0L)               /* Test for overflow */
+    if (t0 == MAX_32)                           /* Test for overflow */
     {
         for (i = -pit_max; i < L_frame; i++)
         {
@@ -84,7 +84,7 @@
         }
         scal_fac = 3;                           move16 (); 
     }
-    else if (L_sub (t0, (Word32) 1048576L) < (Word32) 0)
+    else if (t0 < (Word32) 1048576L)
         /* if (t0 < 2^20) */
     {
         for (i = -pit_max; i < L_frame; i++)
@@ -128,13 +128,13 @@
      *-------------------------------------------------------------------*/
     
     test (); 
-    if (sub (mult (max1, THRESHOLD), max2) < 0)
+    if (mult (max1, THRESHOLD) < max2)
     {
         max1 = max2;                       move16 (); 
         p_max1 = p_max2;                   move16 (); 
     }
     test (); 
-    if (sub (mult (max1, THRESHOLD), max3) < 0)
+    if (mult (max1, THRESHOLD) < max3)
     {
         p_max1 = p_max3;                   move16 (); 
     }
@@ -183,7 +183,7 @@
             t0 = L_mac (t0, *p, *p1);
         }
         test (); 
-        if (L_sub (t0, max) >= 0)
+        if (t0 >= max)
         {
             max = t0;           move32 (); 
             p_max = i;          move16 ();