/** * unmarshal a single SEI message from bitstream bs */ void SEIReader::parseSEImessage(TComInputBitstream* bs, SEImessages& seis) { setBitstream(bs); assert(!m_pcBitstream->getNumBitsUntilByteAligned()); do { xReadSEImessage(seis); /* SEI messages are an integer number of bytes, something has failed * in the parsing if bitstream not byte-aligned */ assert(!m_pcBitstream->getNumBitsUntilByteAligned()); } while (0x80 != m_pcBitstream->peekBits(8)); // assert(m_pcBitstream->getNumBitsLeft() == 8); /* rsbp_trailing_bits */ }
/** * unmarshal a single SEI message from bitstream bs */ void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps) { setBitstream(bs); assert(!m_pcBitstream->getNumBitsUntilByteAligned()); do { xReadSEImessage(seis, nalUnitType, sps); /* SEI messages are an integer number of bytes, something has failed * in the parsing if bitstream not byte-aligned */ assert(!m_pcBitstream->getNumBitsUntilByteAligned()); } while (m_pcBitstream->getNumBitsLeft() > 8); UInt rbspTrailingBits; READ_CODE(8, rbspTrailingBits, "rbsp_trailing_bits"); assert(rbspTrailingBits == 0x80); }