ROHC compression/decompression library
Functions
interval.c File Reference

Compute the interpretation interval for LSB and W-LSB encoding. More...

#include "interval.h"
#include <assert.h>
Include dependency graph for interval.c:

Functions

void f (const uint32_t v_ref, const size_t k, const int32_t p, uint32_t *const min, uint32_t *const max)
 The f function as defined in the LSB calculation algorithm.

Detailed Description

Compute the interpretation interval for LSB and W-LSB encoding.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
Didier Barvaux <didier@barvaux.org>
David Moreau from TAS
The hackers from ROHC for Linux

Function Documentation

void f ( const uint32_t  v_ref,
const size_t  k,
const int32_t  p,
uint32_t *const  min,
uint32_t *const  max 
)

The f function as defined in the LSB calculation algorithm.

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.

Parameters:
v_refThe reference value
kThe number of least significant bits of the value that are transmitted
pThe shift parameter (may be negative)
minOUT: The lower limit of the interval
maxOUT: The upper limit of the interval

Referenced by d_ip_id_decode(), and d_lsb_decode32().