27 #ifndef ROHC_DECOMP_SCHEMES_WLSB_H 28 #define ROHC_DECOMP_SCHEMES_WLSB_H 70 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 71 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 72 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 74 "v_ref_d in rohc_lsb_decode should be aligned on 8 bytes");
76 "rohc_lsb_decode length should be multiple of 8 bytes");
90 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 91 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 92 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 94 "rohc_lsb_field32 length should be multiple of 8 bytes");
108 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 109 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 110 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 112 "rohc_lsb_field16 length should be multiple of 8 bytes");
126 #if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 127 (defined(__GNUC__) && defined(__GNUC_MINOR__) && \ 128 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))) 130 "rohc_lsb_field8 length should be multiple of 8 bytes");
142 __attribute__((warn_unused_result,
nonnull(1), pure));
146 const uint32_t v_ref_d_offset,
150 uint32_t *
const decoded)
151 __attribute__((warn_unused_result,
nonnull(1, 7)));
154 const uint32_t v_ref_d,
155 const bool keep_ref_minus_1)
160 __attribute__((
nonnull(1), warn_unused_result));
rohc_lsb_shift_t
the different values of the shift parameter of the LSB algorithm
Definition: interval.h:47
void rohc_lsb_init(struct rohc_lsb_decode *const lsb, const size_t max_len)
Initialize a given Least Significant Bits (LSB) decoding context.
Definition: decomp_wlsb.c:78
Definition: decomp_wlsb.h:47
bool is_init
Definition: decomp_wlsb.h:64
Definition: decomp_wlsb.h:99
uint32_t v_ref_d[ROHC_LSB_REF_MAX]
Definition: decomp_wlsb.h:62
Definition: decomp_wlsb.h:48
uint16_t bits
Definition: decomp_wlsb.h:102
uint8_t bits
Definition: decomp_wlsb.h:120
The Least Significant Bits (LSB) decoding object.
Definition: decomp_wlsb.h:59
Definition: decomp_wlsb.h:49
Definition: decomp_wlsb.h:117
uint8_t max_len
Definition: decomp_wlsb.h:65
uint32_t rohc_lsb_get_ref(const struct rohc_lsb_decode *const lsb, const rohc_lsb_ref_t ref_type)
Get the current LSB reference value (ref 0)
Definition: decomp_wlsb.c:385
uint8_t unused[6]
Definition: decomp_wlsb.h:66
uint32_t bits
Definition: decomp_wlsb.h:84
uint8_t unused[2]
Definition: decomp_wlsb.h:122
bits_nr_t bits_nr
Definition: decomp_wlsb.h:103
uint8_t unused[7]
Definition: decomp_wlsb.h:86
bits_nr_t bits_nr
Definition: decomp_wlsb.h:85
Definition: decomp_wlsb.h:81
rohc_lsb_shift_t p
Definition: decomp_wlsb.h:83
uint8_t bits_nr_t
A number of bits required or retrieved.
Definition: rohc_internal.h:205
rohc_lsb_ref_t
Definition: decomp_wlsb.h:45
ROHC private common definitions and routines.
rohc_lsb_shift_t p
Definition: decomp_wlsb.h:101
bool rohc_lsb_decode(const struct rohc_lsb_decode *const lsb, const rohc_lsb_ref_t ref_type, const uint32_t v_ref_d_offset, const uint32_t m, const size_t k, const rohc_lsb_shift_t p, uint32_t *const decoded)
Decode a LSB-encoded value.
Definition: decomp_wlsb.c:116
bits_nr_t bits_nr
Definition: decomp_wlsb.h:121
rohc_lsb_shift_t p
Definition: decomp_wlsb.h:119
bool rohc_lsb_is_ready(const struct rohc_lsb_decode *const lsb)
Is the LSB decoding context ready to decode a compressed value.
Definition: decomp_wlsb.c:93
uint8_t unused[1]
Definition: decomp_wlsb.h:104
void rohc_lsb_set_ref(struct rohc_lsb_decode *const lsb, const uint32_t v_ref_d, const bool keep_ref_minus_1)
Update the LSB reference value.
Definition: decomp_wlsb.c:361
Compute the interpretation interval for LSB and W-LSB encoding.