libosmocoding 1.10.0.27-aec32
Osmocom GSM/GPRS/EGPRS L1 channel coding library
|
GSM TS 05.03 coding. More...
Files | |
file | gsm0503_amr_dtx.h |
GSM TS 05.03 coding. | |
file | gsm0503_coding.h |
GSM TS 05.03 coding. | |
file | gsm0503_coding.c |
Data Structures | |
union | gprs_rlc_ul_hdr_egprs |
union across the three different EGPRS Uplink header types More... | |
union | gprs_rlc_dl_hdr_egprs |
union across the three different EGPRS Downlink header types More... | |
struct | gsm0503_mcs_code |
Structure describing a Modulation and Coding Scheme. More... | |
Macros | |
#define | GSM0503_GPRS_BURSTS_NBITS (116 * 4) |
#define | GSM0503_EGPRS_BURSTS_NBITS (348 * 4) |
#define | EGPRS_HDR_UPP_MAX 54 |
#define | EGPRS_HDR_C_MAX 162 |
#define | EGPRS_HDR_HC_MAX 160 |
#define | EGPRS_DATA_U_MAX 612 |
#define | EGPRS_DATA_C_MAX 1836 |
#define | EGPRS_DATA_DC_MAX 1248 |
#define | EGPRS_DATA_C1 612 |
#define | EGPRS_DATA_C2 EGPRS_DATA_C1 |
Enumerations | |
enum | gsm0503_amr_dtx_frames { AMR_OTHER , AFS_SID_FIRST , AFS_SID_UPDATE , AFS_SID_UPDATE_CN , AFS_ONSET , AHS_SID_UPDATE , AHS_SID_UPDATE_CN , AHS_SID_FIRST_P1 , AHS_SID_FIRST_P2 , AHS_ONSET , AHS_SID_FIRST_INH , AHS_SID_UPDATE_INH } |
enum | gsm0503_egprs_mcs { EGPRS_MCS0 , EGPRS_MCS1 , EGPRS_MCS2 , EGPRS_MCS3 , EGPRS_MCS4 , EGPRS_MCS5 , EGPRS_MCS6 , EGPRS_MCS7 , EGPRS_MCS8 , EGPRS_MCS9 , EGPRS_NUM_MCS } |
Functions | |
static const char * | gsm0503_amr_dtx_frame_name (enum gsm0503_amr_dtx_frames frame) |
enum gsm0503_amr_dtx_frames | gsm0503_detect_afs_dtx_frame (int *n_errors, int *n_bits_total, const ubit_t *ubits) OSMO_DEPRECATED("Use gsm0503_detect_afs_dtx_frame2() instead") |
Detect FR AMR DTX frame in unmapped, deinterleaved frame bits. More... | |
enum gsm0503_amr_dtx_frames | gsm0503_detect_ahs_dtx_frame (int *n_errors, int *n_bits_total, const ubit_t *ubits) OSMO_DEPRECATED("Use gsm0503_detect_ahs_dtx_frame2() instead") |
Detect HR AMR DTX frame in unmapped, deinterleaved frame bits. More... | |
enum gsm0503_amr_dtx_frames | gsm0503_detect_afs_dtx_frame2 (int *n_errors, int *n_bits_total, int *mode_id, const sbit_t *sbits) |
Detect FR AMR DTX frame in unmapped, deinterleaved frame bits. More... | |
enum gsm0503_amr_dtx_frames | gsm0503_detect_ahs_dtx_frame2 (int *n_errors, int *n_bits_total, int *mode_id, const sbit_t *sbits) |
Detect HR AMR DTX frame in unmapped, deinterleaved frame bits. More... | |
int | gsm0503_xcch_encode (ubit_t *bursts, const uint8_t *l2_data) |
Encoding of xCCH data from L2 frame to bursts. More... | |
int | gsm0503_xcch_decode (uint8_t *l2_data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Decoding of xCCH data from bursts to L2 frame. More... | |
int | gsm0503_pdtch_encode (ubit_t *bursts, const uint8_t *l2_data, uint8_t l2_len) |
GPRS DL message encoding. More... | |
int | gsm0503_pdtch_decode (uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p, int *n_errors, int *n_bits_total) |
Decode GPRS PDTCH. More... | |
int | gsm0503_pdtch_egprs_encode (ubit_t *bursts, const uint8_t *l2_data, uint8_t l2_len) |
EGPRS DL message encoding. More... | |
int | gsm0503_pdtch_egprs_decode (uint8_t *l2_data, const sbit_t *bursts, uint16_t nbits, uint8_t *usf_p, int *n_errors, int *n_bits_total) |
Decode EGPRS UL message. More... | |
int | gsm0503_tch_fr_encode (ubit_t *bursts, const uint8_t *tch_data, int len, int net_order) |
Perform channel encoding on a TCH/FS channel according to TS 05.03. More... | |
int | gsm0503_tch_fr_decode (uint8_t *tch_data, const sbit_t *bursts, int net_order, int efr, int *n_errors, int *n_bits_total) |
Perform channel decoding of a FR/EFR channel according TS 05.03. More... | |
int | gsm0503_tch_hr_encode (ubit_t *bursts, const uint8_t *tch_data, int len) |
Perform channel encoding on a TCH/HS channel according to TS 05.03. More... | |
int | gsm0503_tch_hr_decode (uint8_t *tch_data, const sbit_t *bursts, int odd, int *n_errors, int *n_bits_total) |
Perform channel decoding of a HR(v1) channel according TS 05.03, deprecated legacy API. More... | |
int | gsm0503_tch_hr_decode2 (uint8_t *tch_data, const sbit_t *bursts, int odd, int *n_errors, int *n_bits_total) |
Perform channel decoding of a HR(v1) channel according TS 05.03. More... | |
int | gsm0503_tch_afs_encode (ubit_t *bursts, const uint8_t *tch_data, int len, int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft, uint8_t cmr) |
Perform channel encoding on a TCH/AFS channel according to TS 05.03. More... | |
int | gsm0503_tch_afs_decode (uint8_t *tch_data, const sbit_t *bursts, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/AFS channel according TS 05.03. More... | |
int | gsm0503_tch_afs_decode_dtx (uint8_t *tch_data, const sbit_t *bursts, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx) |
Perform channel decoding of a TCH/AFS channel according TS 05.03. More... | |
int | gsm0503_tch_ahs_encode (ubit_t *bursts, const uint8_t *tch_data, int len, int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft, uint8_t cmr) |
Perform channel encoding on a TCH/AHS channel according to TS 05.03. More... | |
int | gsm0503_tch_ahs_decode (uint8_t *tch_data, const sbit_t *bursts, int odd, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/AHS channel according TS 05.03. More... | |
int | gsm0503_tch_ahs_decode_dtx (uint8_t *tch_data, const sbit_t *bursts, int odd, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx) |
Perform channel decoding of a TCH/AHS channel according TS 05.03. More... | |
int | gsm0503_rach_ext_encode (ubit_t *burst, uint16_t ra11, uint8_t bsic, bool is_11bit) |
Encode the Extended (11-bit) or regular (8-bit) RACH according to 3GPP TS 45.003. More... | |
int | gsm0503_rach_encode (ubit_t *burst, const uint8_t *ra, uint8_t bsic) |
Encode the (8-bit) RACH according to TS 05.03. More... | |
int | gsm0503_rach_decode (uint8_t *ra, const sbit_t *burst, uint8_t bsic) |
Decode the (8-bit) RACH according to TS 05.03. More... | |
int | gsm0503_rach_decode_ber (uint8_t *ra, const sbit_t *burst, uint8_t bsic, int *n_errors, int *n_bits_total) |
Decode the (8-bit) RACH according to TS 05.03. More... | |
int | gsm0503_rach_ext_decode (uint16_t *ra, const sbit_t *burst, uint8_t bsic) |
Decode the Extended (11-bit) RACH according to 3GPP TS 45.003. More... | |
int | gsm0503_rach_ext_decode_ber (uint16_t *ra, const sbit_t *burst, uint8_t bsic, int *n_errors, int *n_bits_total) |
Decode the Extended (11-bit) RACH according to 3GPP TS 45.003. More... | |
int | gsm0503_sch_encode (ubit_t *burst, const uint8_t *sb_info) |
Encode the SCH according to TS 05.03. More... | |
int | gsm0503_sch_decode (uint8_t *sb_info, const sbit_t *burst) |
Decode the SCH according to TS 05.03. More... | |
int | gsm0503_tch_fr96_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/F9.6 channel as per section 3.3. More... | |
int | gsm0503_tch_fr96_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/F9.6 channel as per section 3.3. More... | |
int | gsm0503_tch_fr48_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/F4.8 channel as per section 3.4. More... | |
int | gsm0503_tch_fr48_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/F4.8 channel as per section 3.4. More... | |
int | gsm0503_tch_hr48_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/H4.8 channel as per section 3.5. More... | |
int | gsm0503_tch_hr48_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/H4.8 channel as per section 3.5. More... | |
int | gsm0503_tch_fr24_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/F2.4 channel as per section 3.6. More... | |
int | gsm0503_tch_fr24_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/F2.4 channel as per section 3.6. More... | |
int | gsm0503_tch_hr24_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/H2.4 channel as per section 3.7. More... | |
int | gsm0503_tch_hr24_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/H2.4 channel as per section 3.7. More... | |
int | gsm0503_tch_fr144_encode (ubit_t *bursts, const ubit_t *data) |
Perform channel encoding of a TCH/F14.4 channel as per section 3.8. More... | |
int | gsm0503_tch_fr144_decode (ubit_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a TCH/14.4 channel as per section 3.8. More... | |
int | gsm0503_tch_fr_facch_encode (ubit_t *bursts, const uint8_t *data) |
Perform channel encoding of a FACCH/F data as per section 4.2. More... | |
int | gsm0503_tch_fr_facch_decode (uint8_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a FACCH/F data as per section 4.2. More... | |
int | gsm0503_tch_hr_facch_encode (ubit_t *bursts, const uint8_t *data) |
Perform channel encoding of a FACCH/H data as per section 4.3. More... | |
int | gsm0503_tch_hr_facch_decode (uint8_t *data, const sbit_t *bursts, int *n_errors, int *n_bits_total) |
Perform channel decoding of a FACCH/H data as per section 4.3. More... | |
static int | osmo_conv_decode_ber_punctured (const struct osmo_conv_code *code, const sbit_t *input, ubit_t *output, int *n_errors, int *n_bits_total, const uint8_t *data_punc) |
Convolutional Decode + compute BER for punctured codes. More... | |
static int | osmo_conv_decode_ber (const struct osmo_conv_code *code, const sbit_t *input, ubit_t *output, int *n_errors, int *n_bits_total) |
Convolutional Decode + compute BER for non-punctured codes. More... | |
static int | _xcch_decode_cB (uint8_t *l2_data, const sbit_t *cB, int *n_errors, int *n_bits_total) |
convenience wrapper for decoding coded bits More... | |
static int | _xcch_encode_cB (ubit_t *cB, const uint8_t *l2_data) |
convenience wrapper for encoding to coded bits More... | |
static int | egprs_type3_unmap (const sbit_t *bursts, sbit_t *hc, sbit_t *dc) |
static int | egprs_type2_unmap (const sbit_t *bursts, sbit_t *hc, sbit_t *dc) |
static int | egprs_type1_unmap (const sbit_t *bursts, sbit_t *hc, sbit_t *c1, sbit_t *c2, int msc) |
static int | _egprs_decode_hdr (const sbit_t *hc, int mcs, union gprs_rlc_ul_hdr_egprs *hdr) |
static int | egprs_decode_hdr (union gprs_rlc_ul_hdr_egprs *hdr, const sbit_t *bursts, uint16_t nbits) |
static int | egprs_parse_ul_cps (struct egprs_cps *cps, union gprs_rlc_ul_hdr_egprs *hdr, int type) |
static int | egprs_decode_data (uint8_t *l2_data, const sbit_t *c, int mcs, int p, int blk, int *n_errors, int *n_bits_total) |
static int | egprs_type3_map (ubit_t *bursts, const ubit_t *hc, const ubit_t *dc, int usf) |
static int | egprs_type2_map (ubit_t *bursts, const ubit_t *hc, const ubit_t *dc, int usf) |
static int | egprs_type1_map (ubit_t *bursts, const ubit_t *hc, const ubit_t *c1, const ubit_t *c2, int usf, int mcs) |
static int | egprs_encode_hdr (ubit_t *hc, const uint8_t *l2_data, int mcs) |
static int | egprs_encode_data (ubit_t *c, const uint8_t *l2_data, int mcs, int p, int blk) |
static int | egprs_parse_dl_cps (struct egprs_cps *cps, const union gprs_rlc_dl_hdr_egprs *hdr, int type) |
static void | tch_fr_reassemble (uint8_t *tch_data, const ubit_t *b_bits, int net_order) |
assemble a FR codec frame in format as used inside RTP More... | |
static void | tch_fr_disassemble (ubit_t *b_bits, const uint8_t *tch_data, int net_order) |
static void | tch_hr_reassemble (uint8_t *tch_data, const ubit_t *b_bits) |
static void | tch_hr_disassemble (ubit_t *b_bits, const uint8_t *tch_data) |
static void | tch_efr_reassemble (uint8_t *tch_data, const ubit_t *b_bits) |
static void | tch_efr_disassemble (ubit_t *b_bits, const uint8_t *tch_data) |
static void | tch_amr_reassemble (uint8_t *tch_data, const ubit_t *d_bits, int len) |
static void | tch_amr_disassemble (ubit_t *d_bits, const uint8_t *tch_data, int len) |
static void | tch_amr_sid_update_append (ubit_t *sid_update, uint8_t sti, uint8_t mi) |
static void | extract_afs_sid_update (sbit_t *sid_update, const sbit_t *sbits) |
static void | tch_fr_d_to_b (ubit_t *b_bits, const ubit_t *d_bits) |
static void | tch_fr_b_to_d (ubit_t *d_bits, const ubit_t *b_bits) |
static void | tch_hr_d_to_b (ubit_t *b_bits, const ubit_t *d_bits) |
static void | tch_hr_b_to_d (ubit_t *d_bits, const ubit_t *b_bits) |
static void | tch_efr_d_to_w (ubit_t *b_bits, const ubit_t *d_bits) |
static void | tch_efr_w_to_d (ubit_t *d_bits, const ubit_t *b_bits) |
static void | tch_efr_protected (const ubit_t *s_bits, ubit_t *b_bits) |
static void | tch_fr_unreorder (ubit_t *d, ubit_t *p, const ubit_t *u) |
static void | tch_fr_reorder (ubit_t *u, const ubit_t *d, const ubit_t *p) |
static void | tch_hr_unreorder (ubit_t *d, ubit_t *p, const ubit_t *u) |
static void | tch_hr_reorder (ubit_t *u, const ubit_t *d, const ubit_t *p) |
static void | tch_efr_reorder (ubit_t *w, const ubit_t *s, const ubit_t *p) |
static void | tch_efr_unreorder (ubit_t *s, ubit_t *p, const ubit_t *w) |
static void | tch_amr_merge (ubit_t *u, const ubit_t *d, const ubit_t *p, int len, int prot) |
static void | tch_amr_unmerge (ubit_t *d, ubit_t *p, const ubit_t *u, int len, int prot) |
static uint8_t | gsm0503_tch_afs_decode_inband (const sbit_t *cB) |
static uint8_t | gsm0503_tch_ahs_decode_inband (const sbit_t *cB) |
static void | rach_apply_bsic (ubit_t *d, uint8_t bsic, uint8_t start) |
static int16_t | rach_decode_ber (const sbit_t *burst, uint8_t bsic, bool is_11bit, int *n_errors, int *n_bits_total) |
static void | _tch_csd_burst_map (ubit_t *burst, const ubit_t *iB) |
Variables | |
const struct value_string | gsm0503_amr_dtx_frame_names [] |
const struct gsm0503_mcs_code | gsm0503_mcs_ul_codes [EGPRS_NUM_MCS] |
const struct gsm0503_mcs_code | gsm0503_mcs_dl_codes [EGPRS_NUM_MCS] |
GSM TS 05.03 coding.
This module is the "master module" of libosmocoding. It uses the various other modules (mapping, parity, interleaving) in order to implement the complete channel coding (and decoding) chain for the various channel types as defined in TS 05.03 / 45.003.
#define EGPRS_DATA_C1 612 |
#define EGPRS_DATA_C2 EGPRS_DATA_C1 |
#define EGPRS_DATA_C_MAX 1836 |
#define EGPRS_DATA_DC_MAX 1248 |
#define EGPRS_DATA_U_MAX 612 |
#define EGPRS_HDR_C_MAX 162 |
#define EGPRS_HDR_HC_MAX 160 |
#define EGPRS_HDR_UPP_MAX 54 |
#define GSM0503_EGPRS_BURSTS_NBITS (348 * 4) |
#define GSM0503_GPRS_BURSTS_NBITS (116 * 4) |
enum gsm0503_egprs_mcs |
|
static |
References EGPRS_HDR_C_MAX, EGPRS_HDR_UPP_MAX, EGPRS_MCS5, EGPRS_MCS6, gsm0503_mcs_crc8_hdr, gsm0503_mcs_ul_codes, hdr, gsm0503_mcs_code::hdr_code_len, gsm0503_mcs_code::hdr_conv, gsm0503_mcs_code::hdr_len, gsm0503_mcs_code::hdr_punc, gsm0503_mcs_code::hdr_punc_len, gsm0503_mcs_code::mcs, osmo_conv_decode_ber(), osmo_crc8gen_check_bits(), and osmo_ubit2pbit_ext().
Referenced by egprs_decode_hdr().
|
static |
convenience wrapper for decoding coded bits
[out] | l2_data | caller-allocated buffer for L2 Frame |
[in] | cB | 456 coded (soft) bits as per TS 05.03 4.1.3 |
[out] | n_errors | Number of detected errors |
[out] | n_bits_total | Number of total coded bits |
References gsm0503_fire_crc40, gsm0503_xcch, osmo_conv_decode_ber(), osmo_crc64gen_check_bits(), and osmo_ubit2pbit_ext().
Referenced by gsm0503_tch_afs_decode_dtx(), gsm0503_tch_ahs_decode_dtx(), gsm0503_tch_fr_decode(), gsm0503_tch_fr_facch_decode(), gsm0503_tch_hr_decode2(), gsm0503_tch_hr_facch_decode(), and gsm0503_xcch_decode().
|
static |
convenience wrapper for encoding to coded bits
[out] | cB | caller-allocated buffer for 456 coded bits as per TS 05.03 4.1.3 |
[in] | l2_data | to-be-encoded L2 Frame |
References gsm0503_fire_crc40, gsm0503_xcch, osmo_conv_encode(), osmo_crc64gen_set_bits(), and osmo_pbit2ubit_ext().
Referenced by gsm0503_tch_afs_encode(), gsm0503_tch_ahs_encode(), gsm0503_tch_fr_encode(), gsm0503_tch_fr_facch_encode(), gsm0503_tch_hr_encode(), gsm0503_tch_hr_facch_encode(), and gsm0503_xcch_encode().
|
static |
References blk, c, gsm0503_mcs_code::data_code_len, gsm0503_mcs_code::data_conv, gsm0503_mcs_code::data_len, gsm0503_mcs_code::data_punc, gsm0503_mcs_code::data_punc_len, EGPRS_DATA_C_MAX, EGPRS_DATA_U_MAX, EGPRS_MCS7, gsm0503_mcs_crc12, gsm0503_mcs_ul_codes, gsm0503_mcs_code::hdr_len, gsm0503_mcs_code::mcs, OSMO_BYTES_FOR_BITS, osmo_conv_decode_ber_punctured(), osmo_crc16gen_check_bits(), osmo_ubit2pbit_ext(), and u.
Referenced by gsm0503_pdtch_egprs_decode().
|
static |
References _egprs_decode_hdr(), EGPRS_HDR_HC_MAX, EGPRS_HDR_TYPE1, EGPRS_HDR_TYPE2, EGPRS_HDR_TYPE3, EGPRS_MCS1, EGPRS_MCS5, EGPRS_MCS7, egprs_type1_unmap(), egprs_type2_unmap(), egprs_type3_unmap(), GSM0503_EGPRS_BURSTS_NBITS, GSM0503_GPRS_BURSTS_NBITS, and hdr.
Referenced by gsm0503_pdtch_egprs_decode().
|
static |
References blk, c, gsm0503_mcs_code::data_code_len, gsm0503_mcs_code::data_conv, gsm0503_mcs_code::data_len, gsm0503_mcs_code::data_punc, EGPRS_DATA_C_MAX, EGPRS_DATA_U_MAX, EGPRS_MCS7, gsm0503_mcs_crc12, gsm0503_mcs_dl_codes, gsm0503_mcs_code::hdr_len, gsm0503_mcs_code::mcs, osmo_conv_encode(), osmo_crc16gen_set_bits(), osmo_pbit2ubit_ext(), u, and gsm0503_mcs_code::usf_len.
Referenced by gsm0503_pdtch_egprs_encode().
|
static |
References EGPRS_HDR_C_MAX, EGPRS_HDR_UPP_MAX, EGPRS_MCS5, EGPRS_MCS6, gsm0503_mcs_crc8_hdr, gsm0503_mcs_dl_codes, gsm0503_mcs_code::hdr_code_len, gsm0503_mcs_code::hdr_conv, gsm0503_mcs_code::hdr_len, gsm0503_mcs_code::hdr_punc, gsm0503_mcs_code::mcs, osmo_conv_encode(), osmo_crc8gen_set_bits(), osmo_pbit2ubit_ext(), and gsm0503_mcs_code::usf_len.
Referenced by gsm0503_pdtch_egprs_encode().
|
static |
References egprs_get_cps(), EGPRS_HDR_TYPE1, EGPRS_HDR_TYPE2, EGPRS_HDR_TYPE3, hdr, and type.
Referenced by gsm0503_pdtch_egprs_encode().
|
static |
References egprs_get_cps(), EGPRS_HDR_TYPE1, EGPRS_HDR_TYPE2, EGPRS_HDR_TYPE3, hdr, and type.
Referenced by gsm0503_pdtch_egprs_decode().
|
static |
References EGPRS_DATA_C1, EGPRS_HDR_HC_MAX, EGPRS_MCS7, gsm0503_mcs5_burst_swap(), gsm0503_mcs7_ul_burst_unmap(), gsm0503_mcs7_ul_deinterleave(), and gsm0503_mcs8_ul_deinterleave().
Referenced by egprs_decode_hdr(), and gsm0503_pdtch_egprs_decode().
References EGPRS_DATA_DC_MAX, EGPRS_HDR_HC_MAX, gsm0503_mcs5_burst_swap(), gsm0503_mcs5_ul_burst_unmap(), and gsm0503_mcs5_ul_deinterleave().
Referenced by egprs_decode_hdr(), and gsm0503_pdtch_egprs_decode().
|
static |
References gsm0503_mcs1_dl_interleave(), gsm0503_pdtch_hl_hn_ubit, gsm0503_usf2twelve_ubit, and gsm0503_xcch_burst_map().
Referenced by gsm0503_pdtch_egprs_encode().
References gsm0503_mcs1_ul_deinterleave(), and gsm0503_xcch_burst_unmap().
Referenced by egprs_decode_hdr(), and gsm0503_pdtch_egprs_decode().
Referenced by gsm0503_tch_afs_decode_dtx().
|
inlinestatic |
References get_value_string(), and gsm0503_amr_dtx_frame_names.
enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame | ( | int * | n_errors, |
int * | n_bits_total, | ||
const ubit_t * | ubits | ||
) |
Detect FR AMR DTX frame in unmapped, deinterleaved frame bits.
DEPRECATED: use gsm0503_detect_afs_dtx_frame2() instead.
[out] | n_errors | number of errornous bits. |
[out] | n_bits_total | number of checked bits. |
[in] | ubits | input bits (456 bit). |
References gsm0503_detect_afs_dtx_frame2(), and osmo_ubit2sbit().
enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame2 | ( | int * | n_errors, |
int * | n_bits_total, | ||
int * | mode_id, | ||
const sbit_t * | sbits | ||
) |
Detect FR AMR DTX frame in unmapped, deinterleaved frame bits.
[out] | n_errors | number of errornous bits. |
[out] | n_bits_total | number of checked bits. |
[out] | mode_id | codec mode ID (0..3 or -1). |
[in] | sbits | input soft-bits (456 bit). |
References AFS_ONSET, AFS_SID_FIRST, AFS_SID_UPDATE, AMR_OTHER, detect_afs_onset(), detect_afs_sid_first(), and detect_afs_sid_update().
Referenced by gsm0503_detect_afs_dtx_frame(), and gsm0503_tch_afs_decode_dtx().
enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame | ( | int * | n_errors, |
int * | n_bits_total, | ||
const ubit_t * | ubits | ||
) |
Detect HR AMR DTX frame in unmapped, deinterleaved frame bits.
DEPRECATED: use gsm0503_detect_ahs_dtx_frame2() instead.
[out] | n_errors | number of errornous bits. |
[out] | n_bits_total | number of checked bits. |
[in] | ubits | input bits (456 bit). |
References gsm0503_detect_ahs_dtx_frame2(), and osmo_ubit2sbit().
enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame2 | ( | int * | n_errors, |
int * | n_bits_total, | ||
int * | mode_id, | ||
const sbit_t * | sbits | ||
) |
Detect HR AMR DTX frame in unmapped, deinterleaved frame bits.
[out] | n_errors | number of errornous bits. |
[out] | n_bits_total | number of checked bits. |
[out] | mode_id | codec ID (CMI or CMC/CMR). |
[out] | mode_id | codec mode ID (0..3 or -1). |
[in] | sbits | input soft-bits (456 bit). |
References AHS_ONSET, AHS_SID_FIRST_INH, AHS_SID_FIRST_P1, AHS_SID_FIRST_P2, AHS_SID_UPDATE, AHS_SID_UPDATE_INH, AMR_OTHER, detect_ahs_onset(), detect_ahs_sid_first_inh(), detect_ahs_sid_first_p1(), detect_ahs_sid_first_p2(), detect_ahs_sid_update(), and detect_ahs_sid_update_inh().
Referenced by gsm0503_detect_ahs_dtx_frame(), and gsm0503_tch_ahs_decode_dtx().
int gsm0503_pdtch_decode | ( | uint8_t * | l2_data, |
const sbit_t * | bursts, | ||
uint8_t * | usf_p, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Decode GPRS PDTCH.
[out] | l2_data | caller-allocated buffer for L2 Frame |
[in] | bursts | burst input data as soft unpacked bits |
[out] | usf_p | Uplink State Flag, only relevant for DL blocks |
[out] | n_errors | number of detected bit-errors |
[out] | n_bits_total | total number of decoded bits |
References gsm0503_cs234_crc16, gsm0503_cs2_np, gsm0503_cs3_np, gsm0503_fire_crc40, gsm0503_pdtch_hl_hn_sbit, gsm0503_puncture_cs2, gsm0503_puncture_cs3, gsm0503_usf2six, gsm0503_usf2twelve_sbit, gsm0503_xcch, gsm0503_xcch_burst_unmap(), gsm0503_xcch_deinterleave(), k, osmo_conv_decode_ber(), osmo_conv_decode_ber_punctured(), osmo_crc16gen_check_bits(), osmo_crc64gen_check_bits(), and osmo_ubit2pbit_ext().
int gsm0503_pdtch_egprs_decode | ( | uint8_t * | l2_data, |
const sbit_t * | bursts, | ||
uint16_t | nbits, | ||
uint8_t * | usf_p, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Decode EGPRS UL message.
[out] | l2_data | caller-allocated buffer for L2 Frame |
[in] | bursts | burst input data as soft unpacked bits |
[in] | nbits | number of bits in bursts |
usf_p | Uplink State Flag, FIXME: not implemented | |
[out] | n_errors | number of detected bit-errors |
[out] | n_bits_total | total number of decoded bits |
References EGPRS_DATA_C1, EGPRS_DATA_C2, EGPRS_DATA_DC_MAX, egprs_decode_data(), egprs_decode_hdr(), EGPRS_MCS0, EGPRS_MCS1, EGPRS_MCS2, EGPRS_MCS3, EGPRS_MCS4, EGPRS_MCS5, EGPRS_MCS6, EGPRS_MCS7, EGPRS_MCS8, EGPRS_MCS9, egprs_parse_ul_cps(), egprs_type1_unmap(), egprs_type2_unmap(), egprs_type3_unmap(), ENOTSUP, GSM0503_EGPRS_BURSTS_NBITS, GSM0503_GPRS_BURSTS_NBITS, hdr, egprs_cps::mcs, egprs_cps::p, and type.
int gsm0503_pdtch_egprs_encode | ( | ubit_t * | bursts, |
const uint8_t * | l2_data, | ||
uint8_t | l2_len | ||
) |
EGPRS DL message encoding.
[out] | bursts | caller-allocated buffer for unpacked burst bits |
[in] | l2_data | L2 (MAC) block to be encoded |
[in] | l2_len | length of l2_data in bytes, used to determine MCS |
References EGPRS_DATA_C1, EGPRS_DATA_C2, EGPRS_DATA_C_MAX, EGPRS_DATA_DC_MAX, egprs_encode_data(), egprs_encode_hdr(), EGPRS_HDR_TYPE1, EGPRS_HDR_TYPE2, EGPRS_HDR_TYPE3, EGPRS_MCS1, EGPRS_MCS2, EGPRS_MCS3, EGPRS_MCS4, EGPRS_MCS5, EGPRS_MCS6, EGPRS_MCS7, EGPRS_MCS8, EGPRS_MCS9, egprs_parse_dl_cps(), egprs_type1_map(), egprs_type2_map(), egprs_type3_map(), GSM0503_EGPRS_BURSTS_NBITS, GSM0503_GPRS_BURSTS_NBITS, hdr, egprs_cps::mcs, gsm0503_mcs_code::mcs, and egprs_cps::p.
int gsm0503_pdtch_encode | ( | ubit_t * | bursts, |
const uint8_t * | l2_data, | ||
uint8_t | l2_len | ||
) |
GPRS DL message encoding.
[out] | bursts | caller-allocated buffer for unpacked burst bits |
[in] | l2_data | L2 (MAC) block to be encoded |
[in] | l2_len | length of l2_data in bytes, used to determine CS |
References gsm0503_cs234_crc16, gsm0503_cs2_np, gsm0503_cs3_np, gsm0503_fire_crc40, GSM0503_GPRS_BURSTS_NBITS, gsm0503_pdtch_hl_hn_ubit, gsm0503_puncture_cs2, gsm0503_puncture_cs3, gsm0503_usf2six, gsm0503_usf2twelve_ubit, gsm0503_xcch, gsm0503_xcch_burst_map(), gsm0503_xcch_interleave(), osmo_conv_encode(), osmo_crc16gen_set_bits(), osmo_crc64gen_set_bits(), and osmo_pbit2ubit_ext().
int gsm0503_rach_decode | ( | uint8_t * | ra, |
const sbit_t * | burst, | ||
uint8_t | bsic | ||
) |
Decode the (8-bit) RACH according to TS 05.03.
[out] | ra | output buffer for RACH data |
[in] | burst | Input burst data |
[in] | bsic | BSIC used in this cell |
References rach_decode_ber().
int gsm0503_rach_decode_ber | ( | uint8_t * | ra, |
const sbit_t * | burst, | ||
uint8_t | bsic, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Decode the (8-bit) RACH according to TS 05.03.
[out] | ra | output buffer for RACH data |
[in] | burst | Input burst data |
[in] | bsic | BSIC used in this cell |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References rach_decode_ber().
int gsm0503_rach_encode | ( | ubit_t * | burst, |
const uint8_t * | ra, | ||
uint8_t | bsic | ||
) |
Encode the (8-bit) RACH according to TS 05.03.
[out] | burst | Caller-allocated output burst buffer |
[in] | ra | Input RACH data |
[in] | bsic | BSIC used in this cell |
References gsm0503_rach_ext_encode().
int gsm0503_rach_ext_decode | ( | uint16_t * | ra, |
const sbit_t * | burst, | ||
uint8_t | bsic | ||
) |
Decode the Extended (11-bit) RACH according to 3GPP TS 45.003.
[out] | ra | output buffer for RACH data |
[in] | burst | Input burst data |
[in] | bsic | BSIC used in this cell |
References rach_decode_ber().
int gsm0503_rach_ext_decode_ber | ( | uint16_t * | ra, |
const sbit_t * | burst, | ||
uint8_t | bsic, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Decode the Extended (11-bit) RACH according to 3GPP TS 45.003.
[out] | ra | output buffer for RACH data |
[in] | burst | Input burst data |
[in] | bsic | BSIC used in this cell |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References rach_decode_ber().
int gsm0503_rach_ext_encode | ( | ubit_t * | burst, |
uint16_t | ra11, | ||
uint8_t | bsic, | ||
bool | is_11bit | ||
) |
Encode the Extended (11-bit) or regular (8-bit) RACH according to 3GPP TS 45.003.
[out] | burst | Caller-allocated output burst buffer |
[in] | ra11 | Input RACH data |
[in] | bsic | BSIC used in this cell |
[in] | is_11bit | whether given RA is 11 bit or not |
References gsm0503_rach, gsm0503_rach_crc6, gsm0503_rach_ext, osmo_conv_encode(), osmo_crc8gen_set_bits(), osmo_pbit2ubit_ext(), and rach_apply_bsic().
Referenced by gsm0503_rach_encode().
int gsm0503_sch_decode | ( | uint8_t * | sb_info, |
const sbit_t * | burst | ||
) |
Decode the SCH according to TS 05.03.
[out] | sb_info | output buffer for SCH data |
[in] | burst | Input burst data |
References gsm0503_sch, gsm0503_sch_crc10, osmo_conv_decode(), osmo_crc16gen_check_bits(), and osmo_ubit2pbit_ext().
int gsm0503_sch_encode | ( | ubit_t * | burst, |
const uint8_t * | sb_info | ||
) |
Encode the SCH according to TS 05.03.
[out] | burst | Caller-allocated output burst buffer |
[in] | sb_info | Input SCH data |
References gsm0503_sch, gsm0503_sch_crc10, osmo_conv_encode(), osmo_crc16gen_set_bits(), and osmo_pbit2ubit_ext().
int gsm0503_tch_afs_decode | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | codec_mode_req, | ||
uint8_t * | codec, | ||
int | codecs, | ||
uint8_t * | ft, | ||
uint8_t * | cmr, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/AFS channel according TS 05.03.
[out] | tch_data | Codec frame in RTP payload format |
[in] | bursts | buffer containing the symbols of 8 bursts |
[in] | codec_mode_req | is this CMR (1) or CMC (0) |
[in] | codec | array of active codecs (active codec set) |
[in] | codecs | number of codecs in codec |
ft | Frame Type; Input if codec_mode_req = 1, Output * otherwise | |
[out] | cmr | Output in codec_mode_req = 1 |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References gsm0503_tch_afs_decode_dtx().
int gsm0503_tch_afs_decode_dtx | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | codec_mode_req, | ||
uint8_t * | codec, | ||
int | codecs, | ||
uint8_t * | ft, | ||
uint8_t * | cmr, | ||
int * | n_errors, | ||
int * | n_bits_total, | ||
uint8_t * | dtx | ||
) |
Perform channel decoding of a TCH/AFS channel according TS 05.03.
[out] | tch_data | Codec frame in RTP payload format |
[in] | bursts | buffer containing the symbols of 8 bursts |
[in] | codec_mode_req | is this CMR (1) or CMC (0) |
[in] | codec | array of active codecs (active codec set) |
[in] | codecs | number of codecs in codec |
ft | Frame Type; Input if codec_mode_req = 1, Output * otherwise | |
[out] | cmr | Output in codec_mode_req = 1 |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
[in,out] | dtx | DTX frame type output, previous DTX frame type input |
References _xcch_decode_cB(), AFS_ONSET, AFS_SID_FIRST, AFS_SID_UPDATE, AFS_SID_UPDATE_CN, AMR_OTHER, extract_afs_sid_update(), gsm0503_amr_crc14, gsm0503_amr_crc6, gsm0503_detect_afs_dtx_frame2(), gsm0503_tch_afs_10_2, gsm0503_tch_afs_12_2, gsm0503_tch_afs_4_75, gsm0503_tch_afs_5_15, gsm0503_tch_afs_5_9, gsm0503_tch_afs_6_7, gsm0503_tch_afs_7_4, gsm0503_tch_afs_7_95, gsm0503_tch_afs_decode_inband(), gsm0503_tch_axs_sid_update, gsm0503_tch_burst_unmap(), gsm0503_tch_fr_deinterleave(), GSM_MACBLOCK_LEN, h, len(), osmo_conv_decode_ber(), osmo_crc16gen_check_bits(), osmo_crc8gen_check_bits(), tch_amr_reassemble(), tch_amr_sid_update_append(), and tch_amr_unmerge().
Referenced by gsm0503_tch_afs_decode().
|
static |
References gsm0503_afs_ic_sbit, and k.
Referenced by gsm0503_tch_afs_decode_dtx().
int gsm0503_tch_afs_encode | ( | ubit_t * | bursts, |
const uint8_t * | tch_data, | ||
int | len, | ||
int | codec_mode_req, | ||
const uint8_t * | codec, | ||
int | codecs, | ||
uint8_t | ft, | ||
uint8_t | cmr | ||
) |
Perform channel encoding on a TCH/AFS channel according to TS 05.03.
[out] | bursts | caller-allocated output buffer for bursts bits |
[in] | tch_data | Codec input data in RTP payload format |
[in] | len | Length of tch_data in bytes or 0 to generate a bad frame |
[in] | codec_mode_req | Use CMR (1) or FT (0) |
[in] | codec | Array of codecs (active codec set) |
[in] | codecs | Number of entries in codec |
[in] | ft | Frame Type to be used for encoding (index to codec) |
[in] | cmr | Codec Mode Request (used in codec_mode_req = 1 only) |
References _xcch_encode_cB(), ARRAY_SIZE, gsm0503_afs_ic_ubit, gsm0503_amr_crc6, gsm0503_tch_afs_10_2, gsm0503_tch_afs_12_2, gsm0503_tch_afs_4_75, gsm0503_tch_afs_5_15, gsm0503_tch_afs_5_9, gsm0503_tch_afs_6_7, gsm0503_tch_afs_7_4, gsm0503_tch_afs_7_95, gsm0503_tch_burst_map(), gsm0503_tch_fr_interleave(), GSM_MACBLOCK_LEN, h, len(), osmo_conv_encode(), osmo_crc8gen_set_bits(), OSMO_UNLIKELY, tch_amr_disassemble(), and tch_amr_merge().
int gsm0503_tch_ahs_decode | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | odd, | ||
int | codec_mode_req, | ||
uint8_t * | codec, | ||
int | codecs, | ||
uint8_t * | ft, | ||
uint8_t * | cmr, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/AHS channel according TS 05.03.
[out] | tch_data | Codec frame in RTP payload format |
[in] | bursts | buffer containing the symbols of 6 bursts |
[in] | odd | Is this an odd (1) or even (0) frame number? |
[in] | codec_mode_req | is this CMR (1) or CMC (0) |
[in] | codec | array of active codecs (active codec set) |
[in] | codecs | number of codecs in codec |
ft | Frame Type; Input if codec_mode_req = 1, Output * otherwise | |
[out] | cmr | Output in codec_mode_req = 1 |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References gsm0503_tch_ahs_decode_dtx().
int gsm0503_tch_ahs_decode_dtx | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | odd, | ||
int | codec_mode_req, | ||
uint8_t * | codec, | ||
int | codecs, | ||
uint8_t * | ft, | ||
uint8_t * | cmr, | ||
int * | n_errors, | ||
int * | n_bits_total, | ||
uint8_t * | dtx | ||
) |
Perform channel decoding of a TCH/AHS channel according TS 05.03.
[out] | tch_data | Codec frame in RTP payload format |
[in] | bursts | buffer containing the symbols of 6 bursts |
[in] | odd | Is this an odd (1) or even (0) frame number? |
[in] | codec_mode_req | is this CMR (1) or CMC (0) |
[in] | codec | array of active codecs (active codec set) |
[in] | codecs | number of codecs in codec |
ft | Frame Type; Input if codec_mode_req = 1, Output * otherwise | |
[out] | cmr | Output in codec_mode_req = 1 |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
[in,out] | dtx | DTX frame type output, previous DTX frame type input |
References _xcch_decode_cB(), AHS_ONSET, AHS_SID_FIRST_INH, AHS_SID_FIRST_P1, AHS_SID_FIRST_P2, AHS_SID_UPDATE, AHS_SID_UPDATE_CN, AHS_SID_UPDATE_INH, AMR_OTHER, gsm0503_amr_crc14, gsm0503_amr_crc6, gsm0503_detect_ahs_dtx_frame2(), gsm0503_tch_ahs_4_75, gsm0503_tch_ahs_5_15, gsm0503_tch_ahs_5_9, gsm0503_tch_ahs_6_7, gsm0503_tch_ahs_7_4, gsm0503_tch_ahs_7_95, gsm0503_tch_ahs_decode_inband(), gsm0503_tch_axs_sid_update, gsm0503_tch_burst_unmap(), gsm0503_tch_fr_deinterleave(), gsm0503_tch_hr_deinterleave(), GSM_MACBLOCK_LEN, h, len(), osmo_conv_decode_ber(), osmo_crc16gen_check_bits(), osmo_crc8gen_check_bits(), tch_amr_reassemble(), tch_amr_sid_update_append(), and tch_amr_unmerge().
Referenced by gsm0503_tch_ahs_decode().
|
static |
References gsm0503_ahs_ic_sbit, and k.
Referenced by gsm0503_tch_ahs_decode_dtx().
int gsm0503_tch_ahs_encode | ( | ubit_t * | bursts, |
const uint8_t * | tch_data, | ||
int | len, | ||
int | codec_mode_req, | ||
const uint8_t * | codec, | ||
int | codecs, | ||
uint8_t | ft, | ||
uint8_t | cmr | ||
) |
Perform channel encoding on a TCH/AHS channel according to TS 05.03.
[out] | bursts | caller-allocated output buffer for bursts bits |
[in] | tch_data | Codec input data in RTP payload format |
[in] | len | Length of tch_data in bytes or 0 to generate a bad frame |
[in] | codec_mode_req | Use CMR (1) or FT (0) |
[in] | codec | Array of codecs (active codec set) |
[in] | codecs | Number of entries in codec |
[in] | ft | Frame Type to be used for encoding (index to codec) |
[in] | cmr | Codec Mode Request (used in codec_mode_req = 1 only) |
References _xcch_encode_cB(), ARRAY_SIZE, gsm0503_ahs_ic_ubit, gsm0503_amr_crc6, gsm0503_tch_ahs_4_75, gsm0503_tch_ahs_5_15, gsm0503_tch_ahs_5_9, gsm0503_tch_ahs_6_7, gsm0503_tch_ahs_7_4, gsm0503_tch_ahs_7_95, gsm0503_tch_burst_map(), gsm0503_tch_fr_interleave(), gsm0503_tch_hr_interleave(), GSM_MACBLOCK_LEN, h, len(), osmo_conv_encode(), osmo_crc8gen_set_bits(), OSMO_UNLIKELY, tch_amr_disassemble(), and tch_amr_merge().
int gsm0503_tch_fr144_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/14.4 channel as per section 3.8.
[out] | data | Caller-allocated buffer for decoded data (290 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, gsm0503_tch_f144, gsm0503_tch_f96_deinterleave(), and osmo_conv_decode_ber().
Perform channel encoding of a TCH/F14.4 channel as per section 3.8.
[out] | bursts | Caller-allocated buffer for symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[in] | data | Data to be encoded (290 unpacked bits). |
References _tch_csd_burst_map(), data, gsm0503_tch_f144, gsm0503_tch_f96_interleave(), and osmo_conv_encode().
int gsm0503_tch_fr24_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/F2.4 channel as per section 3.6.
[out] | data | Caller-allocated buffer for decoded data (72 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 8 bursts, 8 * 2 * 58 == 928 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, gsm0503_tch_burst_unmap(), gsm0503_tch_f24, gsm0503_tch_fr_deinterleave(), and osmo_conv_decode_ber().
Perform channel encoding of a TCH/F2.4 channel as per section 3.6.
[out] | bursts | Caller-allocated buffer for symbols of 8 bursts, 8 * 2 * 58 == 928 bits total. |
[in] | data | Data to be encoded (72 unpacked bits). |
References data, gsm0503_tch_burst_map(), gsm0503_tch_f24, gsm0503_tch_fr_interleave(), h, and osmo_conv_encode().
int gsm0503_tch_fr48_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/F4.8 channel as per section 3.4.
[out] | data | Caller-allocated buffer for decoded data (120 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, gsm0503_tch_f48, gsm0503_tch_f96_deinterleave(), k, and osmo_conv_decode_ber().
Perform channel encoding of a TCH/F4.8 channel as per section 3.4.
[out] | bursts | Caller-allocated buffer for symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[in] | data | Data to be encoded (120 unpacked bits). |
References _tch_csd_burst_map(), data, gsm0503_tch_f48, gsm0503_tch_f96_interleave(), k, and osmo_conv_encode().
int gsm0503_tch_fr96_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/F9.6 channel as per section 3.3.
[out] | data | Caller-allocated buffer for decoded data (240 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, gsm0503_tch_f96, gsm0503_tch_f96_deinterleave(), and osmo_conv_decode_ber().
Referenced by gsm0503_tch_hr48_decode().
Perform channel encoding of a TCH/F9.6 channel as per section 3.3.
[out] | bursts | Caller-allocated buffer for symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[in] | data | Data to be encoded (240 unpacked bits). |
References _tch_csd_burst_map(), data, gsm0503_tch_f96, gsm0503_tch_f96_interleave(), and osmo_conv_encode().
Referenced by gsm0503_tch_hr48_encode().
int gsm0503_tch_fr_decode | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | net_order, | ||
int | efr, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a FR/EFR channel according TS 05.03.
[out] | tch_data | Codec frame in RTP payload format |
[in] | bursts | buffer containing the symbols of 8 bursts |
[in] | net_order | FIXME |
[in] | efr | Is this channel using EFR (1) or FR (0) |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References _xcch_decode_cB(), gsm0503_tch_burst_unmap(), gsm0503_tch_efr_crc8, gsm0503_tch_fr, gsm0503_tch_fr_crc3, gsm0503_tch_fr_deinterleave(), GSM_EFR_BYTES, GSM_FR_BYTES, GSM_MACBLOCK_LEN, h, len(), osmo_conv_decode_ber(), osmo_crc8gen_check_bits(), tch_efr_d_to_w(), tch_efr_protected(), tch_efr_reassemble(), tch_efr_unreorder(), tch_fr_d_to_b(), tch_fr_reassemble(), and tch_fr_unreorder().
int gsm0503_tch_fr_encode | ( | ubit_t * | bursts, |
const uint8_t * | tch_data, | ||
int | len, | ||
int | net_order | ||
) |
Perform channel encoding on a TCH/FS channel according to TS 05.03.
[out] | bursts | caller-allocated output buffer for bursts bits |
[in] | tch_data | Codec input data in RTP payload format |
[in] | len | Length of tch_data in bytes |
[in] | net_order | FIXME |
References _xcch_encode_cB(), gsm0503_tch_burst_map(), gsm0503_tch_efr_crc8, gsm0503_tch_fr, gsm0503_tch_fr_crc3, gsm0503_tch_fr_interleave(), GSM_EFR_BYTES, GSM_FR_BYTES, GSM_MACBLOCK_LEN, h, len(), osmo_conv_encode(), osmo_crc8gen_set_bits(), tch_efr_disassemble(), tch_efr_protected(), tch_efr_reorder(), tch_efr_w_to_d(), tch_fr_b_to_d(), tch_fr_disassemble(), and tch_fr_reorder().
int gsm0503_tch_fr_facch_decode | ( | uint8_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a FACCH/F data as per section 4.2.
[out] | data | Caller-allocated buffer for decoded FACCH (GSM_MACBLOCK_LEN). |
[in] | bursts | Buffer containing the symbols of 8 bursts, 8 * 2 * 58 == 928 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References _xcch_decode_cB(), data, gsm0503_tch_burst_unmap(), gsm0503_tch_fr_deinterleave(), and GSM_MACBLOCK_LEN.
int gsm0503_tch_fr_facch_encode | ( | ubit_t * | bursts, |
const uint8_t * | data | ||
) |
Perform channel encoding of a FACCH/F data as per section 4.2.
[out] | bursts | Caller-allocated buffer for symbols of 8 bursts, 8 * 2 * 58 == 928 bits total. |
[in] | data | FACCH MAC block to be encoded (GSM_MACBLOCK_LEN). |
References _xcch_encode_cB(), data, gsm0503_tch_burst_map(), gsm0503_tch_fr_interleave(), and h.
int gsm0503_tch_hr24_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/H2.4 channel as per section 3.7.
[out] | data | Caller-allocated buffer for decoded data (144 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, gsm0503_tch_f96_deinterleave(), gsm0503_tch_h24, and osmo_conv_decode_ber().
Perform channel encoding of a TCH/H2.4 channel as per section 3.7.
[out] | bursts | Caller-allocated buffer for symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[in] | data | Data to be encoded (144 unpacked bits). |
References _tch_csd_burst_map(), data, gsm0503_tch_f96_interleave(), gsm0503_tch_h24, and osmo_conv_encode().
int gsm0503_tch_hr48_decode | ( | ubit_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a TCH/H4.8 channel as per section 3.5.
The algorithm is identical to TCH/F9.6, so it's just a wrapper.
[out] | data | Caller-allocated buffer for decoded data (240 unpacked bits). |
[in] | bursts | Buffer containing the symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References data, and gsm0503_tch_fr96_decode().
Perform channel encoding of a TCH/H4.8 channel as per section 3.5.
The algorithm is identical to TCH/F9.6, so it's just a wrapper.
[out] | bursts | Caller-allocated buffer for symbols of 22 bursts, 22 * 2 * 58 == 2552 bits total. |
[in] | data | Data to be encoded (240 unpacked bits). |
References data, and gsm0503_tch_fr96_encode().
int gsm0503_tch_hr_decode | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | odd, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a HR(v1) channel according TS 05.03, deprecated legacy API.
[out] | tch_data | Codec frame in pseudo-RFC5993 format |
[in] | bursts | buffer containing the symbols of 6 bursts |
[in] | odd | Odd (1) or even (0) frame number |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
The HR1 codec frame format returned by this function is pseudo-RFC5993, not true RFC 5993, as there is no SID classification being done and the FT bits in the ToC octet are always set to 0 - but this arguably-bogus format is the legacy public API.
References gsm0503_tch_hr_decode2(), GSM_HR_BYTES, and GSM_HR_BYTES_RTP_RFC5993.
int gsm0503_tch_hr_decode2 | ( | uint8_t * | tch_data, |
const sbit_t * | bursts, | ||
int | odd, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a HR(v1) channel according TS 05.03.
[out] | tch_data | Codec frame in TS 101 318 canonical format |
[in] | bursts | buffer containing the symbols of 6 bursts |
[in] | odd | Odd (1) or even (0) frame number |
[out] | n_errors | Number of detected bit errors |
[out] | n_bits_total | Total number of bits |
References _xcch_decode_cB(), gsm0503_tch_burst_unmap(), gsm0503_tch_fr_crc3, gsm0503_tch_fr_deinterleave(), gsm0503_tch_hr, gsm0503_tch_hr_deinterleave(), GSM_HR_BYTES, GSM_MACBLOCK_LEN, h, osmo_conv_decode_ber(), osmo_crc8gen_check_bits(), tch_hr_d_to_b(), tch_hr_reassemble(), and tch_hr_unreorder().
Referenced by gsm0503_tch_hr_decode().
int gsm0503_tch_hr_encode | ( | ubit_t * | bursts, |
const uint8_t * | tch_data, | ||
int | len | ||
) |
Perform channel encoding on a TCH/HS channel according to TS 05.03.
[out] | bursts | caller-allocated output buffer for bursts bits |
[in] | tch_data | Codec input data in RTP payload format |
[in] | len | Length of tch_data in bytes |
References _xcch_encode_cB(), gsm0503_tch_burst_map(), gsm0503_tch_fr_crc3, gsm0503_tch_fr_interleave(), gsm0503_tch_hr, gsm0503_tch_hr_interleave(), GSM_HR_BYTES, GSM_HR_BYTES_RTP_RFC5993, GSM_MACBLOCK_LEN, h, len(), osmo_conv_encode(), osmo_crc8gen_set_bits(), tch_hr_b_to_d(), tch_hr_disassemble(), and tch_hr_reorder().
int gsm0503_tch_hr_facch_decode | ( | uint8_t * | data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Perform channel decoding of a FACCH/H data as per section 4.3.
[out] | data | Caller-allocated buffer for decoded FACCH (GSM_MACBLOCK_LEN). |
[in] | bursts | Buffer containing the symbols of 6 bursts, 6 * 2 * 58 == 696 bits total. |
[out] | n_errors | Number of detected bit errors. |
[out] | n_bits_total | Total number of bits. |
References _xcch_decode_cB(), data, gsm0503_tch_burst_unmap(), gsm0503_tch_fr_deinterleave(), and GSM_MACBLOCK_LEN.
int gsm0503_tch_hr_facch_encode | ( | ubit_t * | bursts, |
const uint8_t * | data | ||
) |
Perform channel encoding of a FACCH/H data as per section 4.3.
[out] | bursts | Caller-allocated buffer for symbols of 6 bursts, 6 * 2 * 58 == 696 bits total. |
[in] | data | FACCH MAC block to be encoded (GSM_MACBLOCK_LEN). |
References _xcch_encode_cB(), data, gsm0503_tch_burst_map(), gsm0503_tch_fr_interleave(), and h.
int gsm0503_xcch_decode | ( | uint8_t * | l2_data, |
const sbit_t * | bursts, | ||
int * | n_errors, | ||
int * | n_bits_total | ||
) |
Decoding of xCCH data from bursts to L2 frame.
[out] | l2_data | caller-allocated output data buffer |
[in] | bursts | four GSM bursts in soft-bits |
[out] | n_errors | Number of detected errors |
[out] | n_bits_total | Number of total coded bits |
References _xcch_decode_cB(), gsm0503_xcch_burst_unmap(), and gsm0503_xcch_deinterleave().
int gsm0503_xcch_encode | ( | ubit_t * | bursts, |
const uint8_t * | l2_data | ||
) |
Encoding of xCCH data from L2 frame to bursts.
[out] | bursts | caller-allocated burst data (unpacked bits) |
[in] | l2_data | L2 input data (MAC block) |
References _xcch_encode_cB(), gsm0503_xcch_burst_map(), and gsm0503_xcch_interleave().
|
static |
Convolutional Decode + compute BER for non-punctured codes.
[in] | code | Description of Convolutional Code |
[in] | input | Input soft-bits (-127...127) |
[out] | output | bits |
[out] | n_errors | Number of bit-errors |
[out] | n_bits_total | Number of bits |
References osmo_conv_decode_ber_punctured().
Referenced by _egprs_decode_hdr(), _xcch_decode_cB(), gsm0503_pdtch_decode(), gsm0503_tch_afs_decode_dtx(), gsm0503_tch_ahs_decode_dtx(), gsm0503_tch_fr144_decode(), gsm0503_tch_fr24_decode(), gsm0503_tch_fr48_decode(), gsm0503_tch_fr96_decode(), gsm0503_tch_fr_decode(), gsm0503_tch_hr24_decode(), gsm0503_tch_hr_decode2(), and rach_decode_ber().
|
static |
Convolutional Decode + compute BER for punctured codes.
[in] | code | Description of Convolutional Code |
[in] | input | Input soft-bits (-127...127) |
[out] | output | bits |
[out] | n_errors | Number of bit-errors |
[out] | n_bits_total | Number of bits |
[in] | data_punc | Puncturing mask array. Can be NULL. |
References ARRAY_SIZE, gsm0503_mcs_code::data_punc, EGPRS_DATA_C_MAX, OSMO_ASSERT, osmo_conv_decode(), osmo_conv_encode(), and res.
Referenced by egprs_decode_data(), gsm0503_pdtch_decode(), and osmo_conv_decode_ber().
|
inlinestatic |
References start.
Referenced by gsm0503_rach_ext_encode(), and rach_decode_ber().
|
inlinestatic |
|
static |
References len().
Referenced by gsm0503_tch_afs_encode(), and gsm0503_tch_ahs_encode().
|
static |
Referenced by gsm0503_tch_afs_encode(), and gsm0503_tch_ahs_encode().
|
static |
References len().
Referenced by gsm0503_tch_afs_decode_dtx(), and gsm0503_tch_ahs_decode_dtx().
|
static |
References mi.
Referenced by gsm0503_tch_afs_decode_dtx(), and gsm0503_tch_ahs_decode_dtx().
Referenced by gsm0503_tch_afs_decode_dtx(), and gsm0503_tch_ahs_decode_dtx().
References gsm660_bitorder.
Referenced by gsm0503_tch_fr_decode().
|
static |
Referenced by gsm0503_tch_fr_encode().
References gsm0503_gsm_efr_protected_bits.
Referenced by gsm0503_tch_fr_decode(), and gsm0503_tch_fr_encode().
|
static |
Referenced by gsm0503_tch_fr_decode().
Referenced by gsm0503_tch_fr_encode().
Referenced by gsm0503_tch_fr_decode().
References gsm660_bitorder.
Referenced by gsm0503_tch_fr_encode().
References gsm610_bitorder.
Referenced by gsm0503_tch_fr_encode().
References gsm610_bitorder.
Referenced by gsm0503_tch_fr_decode().
|
static |
References gsm0503_gsm_fr_map, k, and l.
Referenced by gsm0503_tch_fr_encode().
|
static |
assemble a FR codec frame in format as used inside RTP
[out] | tch_data | Codec frame in RTP format |
[in] | b_bits | Codec frame in 'native' format |
[in] | net_order | FIXME |
References gsm0503_gsm_fr_map, k, and l.
Referenced by gsm0503_tch_fr_decode().
References u.
Referenced by gsm0503_tch_fr_encode().
References u.
Referenced by gsm0503_tch_fr_decode().
References gsm620_unvoiced_bitorder, and gsm620_voiced_bitorder.
Referenced by gsm0503_tch_hr_encode().
References gsm620_unvoiced_bitorder, and gsm620_voiced_bitorder.
Referenced by gsm0503_tch_hr_decode2().
|
static |
Referenced by gsm0503_tch_hr_encode().
|
static |
References GSM_HR_BYTES.
Referenced by gsm0503_tch_hr_decode2().
References u.
Referenced by gsm0503_tch_hr_encode().
References u.
Referenced by gsm0503_tch_hr_decode2().
|
extern |
Referenced by gsm0503_amr_dtx_frame_name().
const struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] |
Referenced by egprs_encode_data(), and egprs_encode_hdr().
const struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] |
Referenced by _egprs_decode_hdr(), and egprs_decode_data().