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

Method readSU

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

Source from the content-addressed store, hash-verified

252}
253
254std::tuple<int64_t, std::string> SubByteReader::readSU(unsigned nrBits)
255{
256 auto [value, coding] = readBits(nrBits);
257 int signMask = 1 << (nrBits - 1);
258 if (value & signMask)
259 {
260 auto subValue = int64_t(value) - 2 * signMask;
261 return {subValue, coding};
262 }
263 return {int64_t(value), coding};
264}
265
266/* Is there more data? There is no more data if the next bit is the terminating
267 * bit and all following bits are 0. */

Callers 3

read_delta_qFunction · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected