changeset 190:f387ee919f2c

libgsmefr/dec_lag6.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 04:04:59 +0000
parents 7dd6336e15b2
children 7bc011aceb7f
files libgsmefr/dec_lag6.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/dec_lag6.c	Tue Jan 03 03:58:56 2023 +0000
+++ b/libgsmefr/dec_lag6.c	Tue Jan 03 04:04:59 2023 +0000
@@ -43,7 +43,7 @@
 
     pit_flag = i_subfr;         move16 (); /* flag for 1st or 3rd subframe */
     test (); 
-    if (sub (i_subfr, L_frame_by2) == 0)
+    if (i_subfr == L_frame_by2)
     {
         pit_flag = 0;           move16 (); 
     }
@@ -54,7 +54,7 @@
         if (bfi == 0)
         {                       /* if bfi == 0 decode pitch */
             test (); 
-            if (sub (index, 463) < 0)
+            if (index < 463)
             {
                 /* T0 = (index+5)/6 + 17 */
                 T0 = add (mult (add (index, 5), 5462), 17);
@@ -65,7 +65,7 @@
             }
             else
             {
-                T0 = sub (index, 368);
+                T0 = index - 368;
                 *T0_frac = 0;   move16 (); 
             }
         }
@@ -79,12 +79,12 @@
         /* find T0_min and T0_max for 2nd (or 4th) subframe */
 
         *T0_min = sub (T0, 5);
-        if (sub (*T0_min, pit_min) < 0)
+        if (*T0_min < pit_min)
         {
             *T0_min = pit_min;
         }
         *T0_max = add (*T0_min, 9);
-        if (sub (*T0_max, pit_max) > 0)
+        if (*T0_max > pit_max)
         {
             *T0_max = pit_max;
             *T0_min = sub (*T0_max, 9);
@@ -95,7 +95,7 @@
     {
         test (); test (); 
         /* if bfi == 0 decode pitch */
-        if ((bfi == 0) && (sub (index, 61) < 0))
+        if ((bfi == 0) && (index < 61))
         {
             /* i = (index+5)/6 - 1 */
             i = sub (mult (add (index, 5), 5462), 1);