# HG changeset patch # User Mychaela Falconia # Date 1672718699 0 # Node ID f387ee919f2c8d0fe44b72a9aefe346e497c4930 # Parent 7dd6336e15b215e331e4e1bfedf7d0fb0d92e457 libgsmefr/dec_lag6.c: perf opt diff -r 7dd6336e15b2 -r f387ee919f2c libgsmefr/dec_lag6.c --- 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);