FreeRDP
rfx_bitstream.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  RFX_BITSTREAM
 

Macros

#define rfx_bitstream_attach(bs, _buffer, _nbytes)
 
#define rfx_bitstream_get_bits(bs, _nbits, _r)
 
#define rfx_bitstream_put_bits(bs, _bits, _nbits)
 
#define rfx_bitstream_flush(bs)
 
#define rfx_bitstream_eos(_bs)   ((_bs)->byte_pos >= (_bs)->nbytes)
 
#define rfx_bitstream_left(_bs)   ((_bs)->byte_pos >= (_bs)->nbytes ? 0 : ((_bs)->nbytes - (_bs)->byte_pos - 1) * 8 + (_bs)->bits_left)
 
#define rfx_bitstream_get_processed_bytes(_bs)   ((_bs)->bits_left < 8 ? (_bs)->byte_pos + 1 : (_bs)->byte_pos)
 

Macro Definition Documentation

#define rfx_bitstream_attach (   bs,
  _buffer,
  _nbytes 
)
Value:
do { \
bs->buffer = (BYTE*) (_buffer); \
bs->nbytes = (_nbytes); \
bs->byte_pos = 0; \
bs->bits_left = 8; } while (0)
unsigned char BYTE
Definition: LOMHash.c:3
#define rfx_bitstream_eos (   _bs)    ((_bs)->byte_pos >= (_bs)->nbytes)
#define rfx_bitstream_flush (   bs)
Value:
do { \
if (bs->bits_left != 8) \
{ \
int _nbits = 8 - bs->bits_left; \
rfx_bitstream_put_bits(bs, 0, _nbits); \
} \
} while(0)
winpr freerdp if(WITH_DEBUG_SYMBOLS AND MSVC AND NOT BUILTIN_CHANNELS AND BUILD_SHARED_LIBS) install(FILES $
Definition: channels/drive/client/CMakeLists.txt:32
#define rfx_bitstream_put_bits(bs, _bits, _nbits)
Definition: rfx_bitstream.h:62
#define rfx_bitstream_get_bits (   bs,
  _nbits,
  _r 
)
Value:
do { \
int nbits = _nbits; \
int b; \
UINT16 n = 0; \
while (bs->byte_pos < bs->nbytes && nbits > 0) \
{ \
b = nbits; \
if (b > bs->bits_left) \
b = bs->bits_left; \
if (n) \
n <<= b; \
n |= (bs->buffer[bs->byte_pos] >> (bs->bits_left - b)) & ((1 << b) - 1); \
bs->bits_left -= b; \
nbits -= b; \
if (bs->bits_left == 0) \
{ \
bs->bits_left = 8; \
bs->byte_pos++; \
} \
} \
_r = n; } while (0)
unsigned short UINT16
Definition: LECHash.c:2
winpr freerdp if(WITH_DEBUG_SYMBOLS AND MSVC AND NOT BUILTIN_CHANNELS AND BUILD_SHARED_LIBS) install(FILES $
Definition: channels/drive/client/CMakeLists.txt:32
#define rfx_bitstream_get_processed_bytes (   _bs)    ((_bs)->bits_left < 8 ? (_bs)->byte_pos + 1 : (_bs)->byte_pos)
#define rfx_bitstream_left (   _bs)    ((_bs)->byte_pos >= (_bs)->nbytes ? 0 : ((_bs)->nbytes - (_bs)->byte_pos - 1) * 8 + (_bs)->bits_left)
#define rfx_bitstream_put_bits (   bs,
  _bits,
  _nbits 
)
Value:
do { \
UINT16 bits = (_bits); \
int nbits = (_nbits); \
int b; \
while (bs->byte_pos < bs->nbytes && nbits > 0) \
{ \
b = nbits; \
if (b > bs->bits_left) \
b = bs->bits_left; \
bs->buffer[bs->byte_pos] |= ((bits >> (nbits - b)) & ((1 << b) - 1)) << (bs->bits_left - b); \
bs->bits_left -= b; \
nbits -= b; \
if (bs->bits_left == 0) \
{ \
bs->bits_left = 8; \
bs->byte_pos++; \
} \
} } while (0)
unsigned short UINT16
Definition: LECHash.c:2
winpr freerdp if(WITH_DEBUG_SYMBOLS AND MSVC AND NOT BUILTIN_CHANNELS AND BUILD_SHARED_LIBS) install(FILES $
Definition: channels/drive/client/CMakeLists.txt:32