changeset 188:9b07190a6d08

libgsmefr/d_gains.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 03:30:09 +0000
parents 6ad363f7ea30
children 7dd6336e15b2
files libgsmefr/d_gains.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/d_gains.c	Tue Jan 03 03:22:04 2023 +0000
+++ b/libgsmefr/d_gains.c	Tue Jan 03 03:30:09 2023 +0000
@@ -133,7 +133,7 @@
 
     st->past_gain_pit = gain;
 
-    if (sub (st->past_gain_pit, 4096) > 0)  /* if (past_gain_pit > 1.0) */
+    if (st->past_gain_pit > 4096)  /* if (past_gain_pit > 1.0) */
     {
         st->past_gain_pit = 4096;
     }
@@ -263,7 +263,7 @@
     if (bfi != 0)
     {
         tmp = gmed5 (st->gbuf);
-        if (sub (tmp, st->past_gain_code) < 0)
+        if (tmp < st->past_gain_code)
         {
             st->past_gain_code = tmp;
         }
@@ -280,7 +280,7 @@
         av_pred_en = mult (av_pred_en, 8192);   /*  *= 0.25  */
 
         /* if (av_pred_en < -14/(20Log10(2))) av_pred_en = .. */
-        if (sub (av_pred_en, -2381) < 0)
+        if (av_pred_en < -2381)
         {
             av_pred_en = -2381;
         }
@@ -392,7 +392,7 @@
 
         update_gain_code_history_rx (st, *gain_code);
 
-        if (sub (i_subfr, (3 * L_SUBFR)) == 0)
+        if (i_subfr == (3 * L_SUBFR))
         {
             st->gain_code_old_CN = *gain_code;
         }