Changeset 438 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/NALread.cpp
- Timestamp:
- 23 May 2013, 15:40:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/NALread.cpp
r368 r438 50 50 //! \ingroup TLibDecoder 51 51 //! \{ 52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, TComInputBitstream *bitstream,Bool isVclNalUnit)52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, Bool isVclNalUnit) 53 53 { 54 54 UInt zeroCount = 0; 55 55 vector<uint8_t>::iterator it_read, it_write; 56 56 57 UInt pos = 0; 58 bitstream->clearEmulationPreventionByteLocation(); 59 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++, pos++) 57 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++) 60 58 { 61 59 assert(zeroCount < 2 || *it_read >= 0x03); 62 60 if (zeroCount == 2 && *it_read == 0x03) 63 61 { 64 bitstream->pushEmulationPreventionByteLocation( pos );65 pos++;66 62 it_read++; 67 63 zeroCount = 0; … … 113 109 if ( nalu.m_temporalId ) 114 110 { 115 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA _W_LP116 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA _W_RADL111 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA 112 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLANT 117 113 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP 118 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR _W_RADL114 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR 119 115 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP 120 116 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA … … 126 122 else 127 123 { 128 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA _R124 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA 129 125 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 130 126 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R … … 140 136 /* perform anti-emulation prevention */ 141 137 TComInputBitstream *pcBitstream = new TComInputBitstream(NULL); 142 convertPayloadToRBSP(nalUnitBuf, pcBitstream,(nalUnitBuf[0] & 64) == 0);138 convertPayloadToRBSP(nalUnitBuf, (nalUnitBuf[0] & 64) == 0); 143 139 144 140 nalu.m_Bitstream = new TComInputBitstream(&nalUnitBuf); 145 nalu.m_Bitstream->setEmulationPreventionByteLocation(pcBitstream->getEmulationPreventionByteLocation());146 141 delete pcBitstream; 147 142 readNalUnitHeader(nalu);
Note: See TracChangeset for help on using the changeset viewer.