/****************************************************************************** * bit_fifo_t : bit fifo descriptor
****************************************************************************** * This type describes a bit fifo used to store bits while working with the
/* This unsigned integer allows us to work at the bit level. This buffer
* can contain 32 bits, and the used space can be found on the MSb's side
* and the available space on the LSb's side. */
u32buffer;
/* Number of bits available in the bit buffer */
inti_available;
}bit_fifo_t;
/****************************************************************************** * bit_stream_t : bit stream descriptor
****************************************************************************** * This type, based on a PES stream, includes all the structures needed to
/****************************************************************************** * NeedBits : reads i_bits new bits in the bit stream and stores them in the
* bit buffer
****************************************************************************** * - i_bits must be less or equal 32 !
* - There is something important to notice with that function : if the number
* of bits available in the bit buffer when calling NeedBits() is greater than
* 24 (i_available > 24) but less than the number of needed bits
* (i_available < i_bits), the byte returned by GetByte() will be shifted with
* a negative value and the number of bits available in the bit buffer will be