diff libgsmefr/q_gains.c @ 200:33487966077e

libgsmefr/q_gains.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 04 Jan 2023 04:42:28 +0000
parents 03599300d2db
children
line wrap: on
line diff
--- a/libgsmefr/q_gains.c	Wed Jan 04 04:23:07 2023 +0000
+++ b/libgsmefr/q_gains.c	Wed Jan 04 04:42:28 2023 +0000
@@ -38,7 +38,7 @@
         err = abs_s (sub (gain_q14, qua_gain_pitch[i]));
 
         test (); 
-        if (sub (err, err_min) < 0)
+        if (err < err_min)
         {
             err_min = err;                      move16 (); 
             index = i;                          move16 (); 
@@ -128,7 +128,7 @@
             err = abs_s (sub (*gain, mult (gcode0, qua_gain_code[i])));
 
             test (); 
-            if (sub (err, err_min) < 0)
+            if (err < err_min)
             {
                 err_min = err;                  move16 (); 
                 index = i;                      move16 (); 
@@ -184,7 +184,7 @@
                 err = abs_s (sub (aver_gain, 
                                   mult (st->gcode0_CN, qua_gain_code[i])));
 
-                if (sub (err, err_min) < 0)
+                if (err < err_min)
                 {
                     err_min = err;              move16 (); 
                     index = i;                  move16 ();