www.pudn.com > jm74.zip > nal.c
/*! ************************************************************************ * \file nal.c * * \brief * Converts Encapsulated Byte Sequence Packets (EBSP) to Raw Byte * Sequence Packets (RBSP), and then onto String Of Data Bits (SODB) * * \author * Main contributors (see contributors.h for copyright, address and affiliation details) * - Shankar L. Regunathan************************************************************************ */ #include "contributors.h" #include #include #include #include #include #include "defines.h" #include "global.h" /*! ************************************************************************ * \brief * Converts RBSP to string of data bits * \param streamBuffer * pointer to buffer containing data * \param last_byte_pos * position of the last byte containing data. * \return last_byte_pos * position of the last byte pos. If the last-byte was entirely a stuffing byte, * it is removed, and the last_byte_pos is updated. * ************************************************************************/ int RBSPtoSODB(byte *streamBuffer, int last_byte_pos) { int ctr_bit, bitoffset; bitoffset = 0; //find trailing 1 ctr_bit = (streamBuffer[last_byte_pos-1] & (0x01<