Compute the interpretation interval for LSB and W-LSB encoding. More...
#include "interval.h"#include <assert.h>
Functions | |
| struct rohc_interval8 | rohc_f_8bits (const uint8_t v_ref, const size_t k, const rohc_lsb_shift_t p) |
| The f function as defined in LSB encoding for 8-bit fields. | |
| struct rohc_interval16 | rohc_f_16bits (const uint16_t v_ref, const size_t k, const rohc_lsb_shift_t p) |
| The f function as defined in LSB encoding for 16-bit fields. | |
| struct rohc_interval32 | rohc_f_32bits (const uint32_t v_ref, const size_t k, const rohc_lsb_shift_t p) |
| The f function as defined in LSB encoding for 32-bit fields. | |
Compute the interpretation interval for LSB and W-LSB encoding.
| struct rohc_interval16 rohc_f_16bits | ( | const uint16_t | v_ref, | |
| const size_t | k, | |||
| const rohc_lsb_shift_t | p | |||
| ) | [read] |
The f function as defined in LSB encoding for 16-bit fields.
Find out the interval [v_ref - p, v_ref + (2^k - 1) - p] for a given k. See 4.5.1 in the RFC 3095 for details.
As stated RFC, the values to be encoded have a finite range and the interpretation interval can straddle the wraparound boundary. So, the min value may be greater than the max value!
| v_ref | The reference value | |
| k | The number of least significant bits of the value that are transmitted | |
| p | The shift parameter (may be negative) |
| struct rohc_interval32 rohc_f_32bits | ( | const uint32_t | v_ref, | |
| const size_t | k, | |||
| const rohc_lsb_shift_t | p | |||
| ) | [read] |
The f function as defined in LSB encoding for 32-bit fields.
Find out the interval [v_ref - p, v_ref + (2^k - 1) - p] for a given k. See 4.5.1 in the RFC 3095 for details.
As stated RFC, the values to be encoded have a finite range and the interpretation interval can straddle the wraparound boundary. So, the min value may be greater than the max value!
| v_ref | The reference value | |
| k | The number of least significant bits of the value that are transmitted | |
| p | The shift parameter (may be negative) |
| struct rohc_interval8 rohc_f_8bits | ( | const uint8_t | v_ref, | |
| const size_t | k, | |||
| const rohc_lsb_shift_t | p | |||
| ) | [read] |
The f function as defined in LSB encoding for 8-bit fields.
Find out the interval [v_ref - p, v_ref + (2^k - 1) - p] for a given k. See 4.5.1 in the RFC 3095 for details.
As stated RFC, the values to be encoded have a finite range and the interpretation interval can straddle the wraparound boundary. So, the min value may be greater than the max value!
| v_ref | The reference value | |
| k | The number of least significant bits of the value that are transmitted | |
| p | The shift parameter (may be negative) |
1.6.1