ROHC compression/decompression library
|
Self-Describing Variable-Length (SDVL) encoding. More...
Enumerations | |
enum | rohc_sdvl_max_value_t { ROHC_SDVL_MAX_VALUE_IN_1_BYTE = ((1 << ROHC_SDVL_MAX_BITS_IN_1_BYTE) - 1), ROHC_SDVL_MAX_VALUE_IN_2_BYTES = ((1 << ROHC_SDVL_MAX_BITS_IN_2_BYTES) - 1), ROHC_SDVL_MAX_VALUE_IN_3_BYTES = ((1 << ROHC_SDVL_MAX_BITS_IN_3_BYTES) - 1), ROHC_SDVL_MAX_VALUE_IN_4_BYTES = ((1 << ROHC_SDVL_MAX_BITS_IN_4_BYTES) - 1) } |
Functions | |
bool | sdvl_can_value_be_encoded (uint32_t value) |
Can the given value be encoded with SDVL? | |
size_t | c_bytesSdvl (uint32_t value, size_t length) |
Find out how many bytes are needed to represent the value using Self-Describing Variable-Length (SDVL) encoding. | |
int | c_encodeSdvl (unsigned char *dest, uint32_t value, size_t length) |
Encode a value using Self-Describing Variable-Length (SDVL) encoding. | |
int | d_sdvalue_size (const unsigned char *data) |
Find out a size of the Self-Describing Variable-Length (SDVL) value. | |
int | d_sdvalue_decode (const unsigned char *data) |
Decode a Self-Describing Variable-Length (SDVL) value. | |
Variables | |
typedef | __attribute__ |
Self-Describing Variable-Length (SDVL) encoding.
The maximum values that can be SDVL-encoded in 1, 2, 3 and 4 bytes
size_t c_bytesSdvl | ( | uint32_t | value, |
size_t | length | ||
) |
Find out how many bytes are needed to represent the value using Self-Describing Variable-Length (SDVL) encoding.
See 4.5.6 in the RFC 3095 for details about SDVL encoding.
value | The value to encode |
length | The length of the value to encode (0 to let the SDVL encoding find the length itself) |
References rohc_debugf, ROHC_SDVL_MAX_BITS_IN_1_BYTE, ROHC_SDVL_MAX_BITS_IN_2_BYTES, ROHC_SDVL_MAX_BITS_IN_3_BYTES, ROHC_SDVL_MAX_BITS_IN_4_BYTES, ROHC_SDVL_MAX_VALUE_IN_1_BYTE, ROHC_SDVL_MAX_VALUE_IN_2_BYTES, ROHC_SDVL_MAX_VALUE_IN_3_BYTES, and ROHC_SDVL_MAX_VALUE_IN_4_BYTES.
Referenced by c_encodeSdvl(), code_cid_values(), code_EXT3_packet(), f_append_cid(), rtp_code_dynamic_rtp_part(), and rtp_header_flags_and_fields().
int c_encodeSdvl | ( | unsigned char * | dest, |
uint32_t | value, | ||
size_t | length | ||
) |
Encode a value using Self-Describing Variable-Length (SDVL) encoding.
See 4.5.6 in the RFC 3095 for details about SDVL encoding.
dest | The destination to write the SDVL-encoded to |
value | The value to encode |
length | The length of the value to encode (0 to let the SDVL encoding find the length itself) |
References c_bytesSdvl(), and rohc_debugf.
Referenced by code_cid_values(), code_EXT3_packet(), f_append_cid(), rtp_code_dynamic_rtp_part(), and rtp_header_flags_and_fields().
int d_sdvalue_decode | ( | const unsigned char * | data | ) |
Decode a Self-Describing Variable-Length (SDVL) value.
See 4.5.6 in the RFC 3095 for details about SDVL encoding.
data | The SDVL data to decode |
References GET_BIT_0_4, GET_BIT_0_5, GET_BIT_0_6, GET_BIT_0_7, GET_BIT_5_7, GET_BIT_6_7, and GET_BIT_7.
Referenced by c_deliver_feedback(), decode_extension3(), and rtp_decode_dynamic_rtp().
int d_sdvalue_size | ( | const unsigned char * | data | ) |
Find out a size of the Self-Describing Variable-Length (SDVL) value.
See 4.5.6 in the RFC 3095 for details about SDVL encoding.
data | The SDVL data to analyze |
References GET_BIT_5_7, GET_BIT_6_7, GET_BIT_7, and rohc_debugf.
Referenced by c_deliver_feedback(), decode_extension3(), rtp_decode_dynamic_rtp(), rtp_detect_ir_dyn_size(), and rtp_detect_ir_size().
bool sdvl_can_value_be_encoded | ( | uint32_t | value | ) |
Can the given value be encoded with SDVL?
See 4.5.6 in the RFC 3095 for details about SDVL encoding.
value | The value to encode |
References ROHC_SDVL_MAX_VALUE_IN_4_BYTES.
Referenced by c_add_ts().
typedef __attribute__ |