ROHC compression/decompression library
|
Least Significant Bits (LSB) decoding. More...
Data Structures | |
struct | rohc_lsb_decode |
The Least Significant Bits (LSB) decoding object. More... | |
Functions | |
struct rohc_lsb_decode * | rohc_lsb_new (const rohc_lsb_shift_t p) |
Create a new Least Significant Bits (LSB) decoding context. | |
void | rohc_lsb_free (struct rohc_lsb_decode *const lsb) |
Destroy a given Least Significant Bits (LSB) decoding context. | |
bool | rohc_lsb_decode32 (const struct rohc_lsb_decode *const lsb, const uint32_t m, const size_t k, uint32_t *const decoded) |
Decode a 32-bit LSB-encoded value. | |
bool | rohc_lsb_decode16 (const struct rohc_lsb_decode *const lsb, const uint16_t m, const size_t k, uint16_t *const decoded) |
Decode a 16-bit LSB-encoded value. | |
void | rohc_lsb_set_ref (struct rohc_lsb_decode *const lsb, const uint32_t v_ref_d) |
Update the LSB reference value. | |
uint32_t | rohc_lsb_get_ref (struct rohc_lsb_decode *const lsb) |
Get the current LSB reference value. |
Least Significant Bits (LSB) decoding.
bool rohc_lsb_decode16 | ( | const struct rohc_lsb_decode *const | lsb, |
const uint16_t | m, | ||
const size_t | k, | ||
uint16_t *const | decoded | ||
) |
Decode a 16-bit LSB-encoded value.
See rohc_lsb_decode32 for details.
lsb | The LSB object used to decode |
m | The LSB value to decode |
k | The length of the LSB value to decode |
decoded | OUT: The decoded value |
References rohc_lsb_decode::is_init, and rohc_lsb_decode32().
Referenced by ip_id_offset_decode().
bool rohc_lsb_decode32 | ( | const struct rohc_lsb_decode *const | lsb, |
const uint32_t | m, | ||
const size_t | k, | ||
uint32_t *const | decoded | ||
) |
Decode a 32-bit LSB-encoded value.
See 4.5.1 in the RFC 3095 for details about LSB encoding.
lsb | The LSB object used to decode |
m | The LSB value to decode |
k | The length of the LSB value to decode |
decoded | OUT: The decoded value |
References rohc_lsb_decode::is_init, rohc_lsb_decode::p, rohc_f_32bits(), and rohc_lsb_decode::v_ref_d.
Referenced by rohc_lsb_decode16(), and ts_decode_scaled().
void rohc_lsb_free | ( | struct rohc_lsb_decode *const | lsb | ) |
Destroy a given Least Significant Bits (LSB) decoding context.
See 4.5.1 in the RFC 3095 for details about LSB encoding.
lsb | The LSB decoding context to destroy |
Referenced by d_rtp_create(), d_udp_create(), d_udp_lite_create(), ip_id_offset_free(), and rohc_ts_scaled_free().
uint32_t rohc_lsb_get_ref | ( | struct rohc_lsb_decode *const | lsb | ) |
Get the current LSB reference value.
lsb | The LSB object |
References rohc_lsb_decode::is_init, and rohc_lsb_decode::v_ref_d.
Referenced by d_generic_get_sn(), and ts_decode_scaled().
struct rohc_lsb_decode* rohc_lsb_new | ( | const rohc_lsb_shift_t | p | ) | [read] |
Create a new Least Significant Bits (LSB) decoding context.
See 4.5.1 in the RFC 3095 for details about LSB encoding.
p | The p value used to efficiently encode/decode the values |
References rohc_lsb_decode::is_init, and rohc_lsb_decode::p.
Referenced by d_create_sc(), d_ip_create(), d_rtp_create(), d_udp_create(), d_udp_lite_create(), and ip_id_offset_new().
void rohc_lsb_set_ref | ( | struct rohc_lsb_decode *const | lsb, |
const uint32_t | v_ref_d | ||
) |
Update the LSB reference value.
This function is called after a CRC success to update the last decoded value (for example, the SN value). See 4.5.1 in the RFC 3095 for details about LSB encoding.
lsb | The LSB object |
v_ref_d | The new reference value |
References rohc_lsb_decode::is_init, and rohc_lsb_decode::v_ref_d.
Referenced by ip_id_offset_set_ref(), and ts_update_context().