MCPcopy Create free account
hub / github.com/IENT/YUView / canReadBits

Method canReadBits

YUViewLib/src/parser/common/SubByteReader.cpp:330–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330bool SubByteReader::canReadBits(unsigned nrBits) const
331{
332 if (this->posInBufferBytes == this->byteVector.size())
333 return false;
334
335 assert(this->posInBufferBits <= 8);
336 const auto curBitsLeft = 8 - this->posInBufferBits;
337 assert(this->byteVector.size() > this->posInBufferBytes);
338 const auto entireBytesLeft = this->byteVector.size() - this->posInBufferBytes - 1;
339 const auto nrBitsLeftToRead = curBitsLeft + entireBytesLeft * 8;
340
341 return nrBits <= nrBitsLeftToRead;
342}
343
344size_t SubByteReader::nrBitsRead() const
345{

Callers 10

parse_ATSC1_dataFunction · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80
parseMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected