ROHC compression/decompression library
|
Least Significant Bits (LSB) encoding. More...
#include "interval.h"
#include "dllexport.h"
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
struct rohc_lsb_decode *ROHC_EXPORT | rohc_lsb_new (const rohc_lsb_shift_t p) |
Create a new Least Significant Bits (LSB) decoding context. | |
void ROHC_EXPORT | rohc_lsb_free (struct rohc_lsb_decode *const lsb) __attribute__((nonnull(1))) |
Destroy a given Least Significant Bits (LSB) decoding context. | |
bool ROHC_EXPORT | rohc_lsb_decode32 (const struct rohc_lsb_decode *const lsb, const uint32_t m, const size_t k, uint32_t *const decoded) __attribute__((nonnull(1 |
bool ROHC_EXPORT bool ROHC_EXPORT | rohc_lsb_decode16 (const struct rohc_lsb_decode *const lsb, const uint16_t m, const size_t k, uint16_t *const decoded) __attribute__((nonnull(1 |
void ROHC_EXPORT | rohc_lsb_set_ref (struct rohc_lsb_decode *const lsb, const uint32_t v_ref_d) __attribute__((nonnull(1))) |
Update the LSB reference value. | |
uint32_t ROHC_EXPORT | rohc_lsb_get_ref (struct rohc_lsb_decode *const lsb) __attribute__((nonnull(1))) |
Get the current LSB reference value. | |
Variables | |
bool ROHC_EXPORT bool ROHC_EXPORT | warn_unused_result |
Least Significant Bits (LSB) encoding.
bool ROHC_EXPORT bool ROHC_EXPORT rohc_lsb_decode16 | ( | const struct rohc_lsb_decode *const | lsb, |
const uint16_t | m, | ||
const size_t | k, | ||
uint16_t *const | decoded | ||
) |
bool ROHC_EXPORT rohc_lsb_decode32 | ( | const struct rohc_lsb_decode *const | lsb, |
const uint32_t | m, | ||
const size_t | k, | ||
uint32_t *const | decoded | ||
) |
void ROHC_EXPORT 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_EXPORT 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_EXPORT 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_EXPORT 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().
bool ROHC_EXPORT bool ROHC_EXPORT warn_unused_result |