MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / countZeros

Function countZeros

dependency/densecrf/examples/lodepng.cpp:1442–1451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1440}
1441
1442static unsigned countZeros(const unsigned char* data, size_t size, size_t pos)
1443{
1444 const unsigned char* start = data + pos;
1445 const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH;
1446 if(end > data + size) end = data + size;
1447 data = start;
1448 while(data != end && *data == 0) ++data;
1449 /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/
1450 return (unsigned)(data - start);
1451}
1452
1453/*wpos = pos & (windowsize - 1)*/
1454static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros)

Callers 1

encodeLZ77Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected