FreeCalypso > hg > gsm-codec-lib
diff libgsmefr/dtx_common.c @ 191:7bc011aceb7f
libgsmefr/dtx_common.c: perf opt
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 03 Jan 2023 04:31:11 +0000 |
parents | c1d53064b410 |
children |
line wrap: on
line diff
--- a/libgsmefr/dtx_common.c Tue Jan 03 04:04:59 2023 +0000 +++ b/libgsmefr/dtx_common.c Tue Jan 03 04:31:11 2023 +0000 @@ -173,8 +173,8 @@ for (k = 0; k < NB_PULSE; k++) { i = pseudonoise (seed, 2); /* generate pulse position */ - i = shr (extract_l (L_mult (i, 10)), 1); - i = add (i, k); + i *= 10; + i += k; j = pseudonoise (seed, 1); /* generate sign */ @@ -241,12 +241,10 @@ Sn = Sn ^ 0; logic16 (); } - noise_bits = shl (noise_bits, 1); - noise_bits = noise_bits | (extract_l (*shift_reg) & 1); - logic16 (); logic16 (); + noise_bits <<= 1; + noise_bits |= *shift_reg & 1; *shift_reg = L_shr (*shift_reg, 1); move32 (); - test (); logic16 (); if (Sn & 1) { *shift_reg = *shift_reg | 0x40000000L; move32 (); logic32 ();