|
ROHC compression/decompression library
|
Least Significant Bits (LSB) encoding. More...

Functions | |
| void | d_lsb_init (struct d_lsb_decode *const lsb, const uint32_t v_ref_d, const short p) |
| Initialize a Least Significant Bits (LSB) encoding object. | |
| int | d_lsb_decode32 (const struct d_lsb_decode *const lsb, const uint32_t m, const size_t k, uint32_t *const decoded) |
| Decode a 32-bit LSB-encoded value. | |
| int | d_lsb_decode16 (const struct d_lsb_decode *const lsb, const uint16_t m, const size_t k, uint16_t *const decoded) |
| Decode a 16-bit LSB-encoded value. | |
| void | d_lsb_update (struct d_lsb_decode *const lsb, const uint32_t v_ref_d) |
| Update the LSB reference value. | |
| void | d_lsb_sync_ref (struct d_lsb_decode *const lsb) |
| Replace the previous LSB reference value with the current one. | |
| uint32_t | d_get_lsb_ref (struct d_lsb_decode *const lsb) |
| Get the current LSB reference value. | |
| uint32_t | d_get_lsb_old_ref (struct d_lsb_decode *const lsb) |
| Get the previous LSB reference value. | |
Least Significant Bits (LSB) encoding.
| uint32_t d_get_lsb_old_ref | ( | struct d_lsb_decode *const | lsb | ) |
Get the previous LSB reference value.
| lsb | The LSB object |
References d_lsb_decode::old_v_ref_d.
| uint32_t d_get_lsb_ref | ( | struct d_lsb_decode *const | lsb | ) |
Get the current LSB reference value.
| lsb | The LSB object |
References d_lsb_decode::v_ref_d.
Referenced by d_generic_get_sn(), and ts_decode_scaled().
| int d_lsb_decode16 | ( | const struct d_lsb_decode *const | lsb, |
| const uint16_t | m, | ||
| const size_t | k, | ||
| uint16_t *const | decoded | ||
| ) |
Decode a 16-bit LSB-encoded value.
See d_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 d_lsb_decode32().
Referenced by decode_uo0(), decode_uo1(), decode_uor2(), and main().
| int d_lsb_decode32 | ( | const struct d_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 f(), d_lsb_decode::p, and d_lsb_decode::v_ref_d.
Referenced by d_lsb_decode16(), and ts_decode_scaled().
| void d_lsb_init | ( | struct d_lsb_decode *const | lsb, |
| const uint32_t | v_ref_d, | ||
| const short | p | ||
| ) |
Initialize a Least Significant Bits (LSB) encoding object.
See 4.5.1 in the RFC 3095 for details about LSB encoding.
| lsb | The LSB object to initialize |
| v_ref_d | The reference value |
| p | The p value used to efficiently encode the values |
References d_lsb_decode::old_v_ref_d, d_lsb_decode::p, and d_lsb_decode::v_ref_d.
Referenced by d_create_sc(), ip_decode_dynamic_ip(), main(), and rtp_decode_dynamic_rtp().
| void d_lsb_sync_ref | ( | struct d_lsb_decode *const | lsb | ) |
Replace the previous LSB reference value with the current one.
| lsb | The LSB object |
References d_lsb_decode::old_v_ref_d, and d_lsb_decode::v_ref_d.
Referenced by decode_uo0(), decode_uo1(), decode_uor2(), and ts_update_context().
| void d_lsb_update | ( | struct d_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 d_lsb_decode::v_ref_d.
Referenced by decode_uo0(), decode_uo1(), decode_uor2(), main(), and ts_update_context().
1.7.6.1