12#define GSM_FR_BYTES 33
14#define GSM_HR_BYTES 14
16#define GSM_EFR_BYTES 31
19#define GSM_HR_BYTES_RTP_RFC5993 (GSM_HR_BYTES + 1)
20#define GSM_HR_BYTES_RTP_TS101318 (GSM_HR_BYTES)
static bool osmo_fr_is_any_sid(const uint8_t *rtp_payload)
Check if given FR codec frame is any kind of SID, valid or invalid.
Definition: codec.h:112
enum osmo_gsm631_sid_class osmo_hr_sid_classify(const uint8_t *rtp_payload, bool bci_flag, bool *bfi_from_bci)
Definition: hr_sid_class.c:115
const uint16_t gsm690_10_2_bitorder[]
Definition: gsm690.c:73
bool osmo_fr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
Check whether RTP frame contains FR SID code word according to TS 101 318 §5.1.2.
Definition: gsm610.c:334
bool osmo_fr_sid_preen(uint8_t *rtp_payload)
Preen potentially-SID FR codec frame in RTP format, ensuring that it is either a speech frame or a va...
Definition: gsm610.c:442
void osmo_efr_sid_reset(uint8_t *rtp_payload)
Reset the SID field of a potentially corrupted, but still valid GSM-EFR SID frame in RTP encoding to ...
Definition: gsm660.c:371
const uint8_t gsm690_bitlength[AMR_NO_DATA+1]
These constants refer to the length of one "AMR core frame" as per TS 26.101 Section 4....
Definition: gsm690.c:219
enum osmo_gsm631_sid_class osmo_efr_sid_classify(const uint8_t *rtp_payload)
Classify potentially-SID EFR codec frame in RTP format according to the rules of GSM 06....
Definition: gsm660.c:333
const uint16_t gsm690_7_4_bitorder[]
Definition: gsm690.c:124
const uint8_t osmo_gsm611_silence_frame[GSM_FR_BYTES]
Definition: gsm610.c:305
bool osmo_efr_sid_preen(uint8_t *rtp_payload)
Preen potentially-SID EFR codec frame in RTP format, ensuring that it is either a speech frame or a v...
Definition: gsm660.c:397
const uint16_t gsm690_5_9_bitorder[]
Definition: gsm690.c:167
const uint16_t gsm690_4_75_bitorder[]
Definition: gsm690.c:204
enum osmo_gsm631_sid_class osmo_fr_sid_classify(const uint8_t *rtp_payload)
Classify potentially-SID FR codec frame in RTP format according to the rules of GSM 06....
Definition: gsm610.c:385
#define GSM_FR_BYTES
Definition: codec.h:12
const uint16_t gsm690_5_15_bitorder[]
Definition: gsm690.c:186
static const char * osmo_amr_type_name(enum osmo_amr_type type)
Definition: codec.h:56
int osmo_amr_d_to_s(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode)
Convert from d-bits to s-bits (codec input).
Definition: gsm690.c:304
void osmo_fr_sid_reset(uint8_t *rtp_payload)
Reset the SID field and the unused bits of a potentially corrupted, but still valid GSM-FR SID frame ...
Definition: gsm610.c:420
int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, enum osmo_amr_quality bfi)
Encode various AMR parameters from RTP payload (RFC 4867)
Definition: gsm690.c:408
osmo_amr_type
Definition: codec.h:40
@ AMR_NO_DATA
Definition: codec.h:53
@ AMR_4_75
Definition: codec.h:41
@ AMR_12_2
Definition: codec.h:48
@ AMR_7_40
Definition: codec.h:45
@ AMR_10_2
Definition: codec.h:47
@ AMR_6_70
Definition: codec.h:44
@ AMR_GSM_EFR_SID
Definition: codec.h:50
@ AMR_PDC_EFR_SID
Definition: codec.h:52
@ AMR_SID
Definition: codec.h:49
@ AMR_5_90
Definition: codec.h:43
@ AMR_5_15
Definition: codec.h:42
@ AMR_7_95
Definition: codec.h:46
@ AMR_TDMA_EFR_SID
Definition: codec.h:51
void osmo_hr_sid_reset(uint8_t *rtp_payload)
Reset the SID field of a potentially corrupted, but still valid GSM-HR SID frame in TS 101 318 format...
Definition: gsm620.c:320
static bool osmo_amr_is_speech(enum osmo_amr_type ft)
Check if given AMR Frame Type is a speech frame.
Definition: codec.h:73
int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, int8_t *cmi, enum osmo_amr_type *ft, enum osmo_amr_quality *bfi, int8_t *sti)
Decode various AMR parameters from RTP payload (RFC 4867) acording to 3GPP TS 26.101.
Definition: gsm690.c:360
osmo_gsm631_sid_class
Definition: codec.h:91
@ OSMO_GSM631_SID_CLASS_SPEECH
Definition: codec.h:92
@ OSMO_GSM631_SID_CLASS_VALID
Definition: codec.h:94
@ OSMO_GSM631_SID_CLASS_INVALID
Definition: codec.h:93
const struct value_string osmo_amr_type_names[]
Definition: gsm690.c:330
const uint16_t gsm690_7_95_bitorder[]
Definition: gsm690.c:101
int osmo_amr_s_to_d(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode)
Convert from S-bits (codec output) to d-bits.
Definition: gsm690.c:278
const uint16_t gsm620_unvoiced_bitorder[]
Definition: gsm620.c:32
const uint16_t gsm610_bitorder[]
Definition: gsm610.c:36
static bool osmo_efr_is_any_sid(const uint8_t *rtp_payload)
Check if given EFR codec frame is any kind of SID, valid or invalid.
Definition: codec.h:125
const uint16_t gsm690_12_2_bitorder[]
Definition: gsm690.c:41
const uint16_t gsm690_6_7_bitorder[]
Definition: gsm690.c:146
osmo_amr_quality
Definition: codec.h:59
@ AMR_BAD
Definition: codec.h:60
@ AMR_GOOD
Definition: codec.h:61
bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
Check whether RTP frame contains HR SID code word according to TS 101 318 §5.2.2.
Definition: gsm620.c:278
bool osmo_efr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
Check whether RTP frame contains EFR SID code word according to TS 101 318 §5.3.2.
Definition: gsm660.c:282
const uint16_t gsm620_voiced_bitorder[]
Definition: gsm620.c:151
const uint16_t gsm660_bitorder[]
Definition: gsm660.c:38
enum osmo_sub_auth_type type
const char * get_value_string(const struct value_string *vs, uint32_t val)