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

Function updateHashChain

dependency/densecrf/examples/lodepng.cpp:1454–1463  ·  view source on GitHub ↗

wpos = pos & (windowsize - 1)*/

Source from the content-addressed store, hash-verified

1452
1453/*wpos = pos & (windowsize - 1)*/
1454static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros)
1455{
1456 hash->val[wpos] = (int)hashval;
1457 if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval];
1458 hash->head[hashval] = wpos;
1459
1460 hash->zeros[wpos] = numzeros;
1461 if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros];
1462 hash->headz[numzeros] = wpos;
1463}
1464
1465/*
1466 LZ77-encode the data. Return value is error code. The input are raw bytes, the output

Callers 1

encodeLZ77Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected