changeset 195:827661987b41

libgsmefr/g_pitch.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Jan 2023 03:50:34 +0000
parents f151d6c18b31
children 1cdbaeec7bcc
files libgsmefr/g_pitch.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/g_pitch.c	Wed Jan 04 03:36:39 2023 +0000
+++ b/libgsmefr/g_pitch.c	Wed Jan 04 03:50:34 2023 +0000
@@ -51,9 +51,9 @@
         s = L_mac (s, y1[i], y1[i]);
     }
     test (); 
-    if (L_sub (s, MAX_32) != 0L)       /* Test for overflow */
+    if (s != MAX_32)                   /* Test for overflow */
     {
-        s = L_add (s, 1L);             /* Avoid case of all zeros */
+        s++;                           /* Avoid case of all zeros */
         exp_yy = norm_l (s);
         yy = round (L_shl (s, exp_yy));
     }
@@ -123,7 +123,7 @@
     /* if(gain >1.2) gain = 1.2 */
 
     test (); 
-    if (sub (gain, 4915) > 0)
+    if (gain > 4915)
     {
         gain = 4915;                   move16 (); 
     }