diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-05-15 15:58:10 +0300 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-05-16 00:51:30 +0300 |
commit | bf2d5e9b6f0ad8c5614457fcb0335e779e8465f7 (patch) | |
tree | 0bd9254be1402fd7c65a81f36c756c2309f6e3ba /src/coding | |
parent | 6c58d155eb74775480f33b5411338c38e24991a2 (diff) |
coding: cosmetic: move 'dtx_prev' to the scope where it's used
Change-Id: I147f44f1c071e53febeff425a0a7837a0ff10436
Related: SYS#5853
Diffstat (limited to 'src/coding')
-rw-r--r-- | src/coding/gsm0503_coding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 3ad2861e..329a0764 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -2162,7 +2162,6 @@ int gsm0503_tch_afs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, *n_errors = 0; *n_bits_total = 0; static ubit_t sid_first_dummy[64] = { 0 }; sbit_t sid_update_enc[256]; - uint8_t dtx_prev; for (i=0; i<8; i++) { gsm0503_tch_burst_unmap(&iB[i * 114], &bursts[i * 116], &h, i >> 2); @@ -2183,8 +2182,9 @@ int gsm0503_tch_afs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; + osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; *dtx = gsm0503_detect_afs_dtx_frame(n_errors, n_bits_total, cBd); if (dtx_prev == AFS_SID_UPDATE && *dtx == AMR_OTHER) { @@ -2612,7 +2612,6 @@ int gsm0503_tch_ahs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, int odd, int i, j, k, best = 0, rv, len, steal = 0, id = 0; ubit_t cBd[456]; static ubit_t sid_first_dummy[64] = { 0 }; - uint8_t dtx_prev; /* only unmap the stealing bits */ if (!odd) { @@ -2658,8 +2657,9 @@ int gsm0503_tch_ahs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, int odd, /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; + osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; *dtx = gsm0503_detect_ahs_dtx_frame(n_errors, n_bits_total, cBd); if (dtx_prev == AHS_SID_UPDATE && *dtx == AMR_OTHER) { |