Changeset 438 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComBitStream.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/TLibCommon/TComBitStream.cpp
r362 r438 177 177 } 178 178 } 179 180 179 Void TComOutputBitstream::writeByteAlignment() 181 180 { … … 183 182 writeAlignZero(); 184 183 } 185 186 Int TComOutputBitstream::countStartCodeEmulations()187 {188 UInt cnt = 0;189 vector<uint8_t>& rbsp = getFIFO();190 for (vector<uint8_t>::iterator it = rbsp.begin(); it != rbsp.end();)191 {192 vector<uint8_t>::iterator found = it;193 do194 {195 // find the next emulated 00 00 {00,01,02,03}196 // NB, end()-1, prevents finding a trailing two byte sequence197 found = search_n(found, rbsp.end()-1, 2, 0);198 found++;199 // if not found, found == end, otherwise found = second zero byte200 if (found == rbsp.end())201 {202 break;203 }204 if (*(++found) <= 3)205 {206 break;207 }208 } while (true);209 it = found;210 if (found != rbsp.end())211 {212 cnt++;213 }214 }215 return cnt;216 }217 218 184 /** 219 185 * read #uiNumberOfBits# from bitstream without updating the bitstream
Note: See TracChangeset for help on using the changeset viewer.