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

Function setBitOfReversedStream

dependency/densecrf/examples/lodepng.cpp:2409–2415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2407#endif /*LODEPNG_COMPILE_DECODER*/
2408
2409static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit)
2410{
2411 /*the current bit in bitstream may be 0 or 1 for this to work*/
2412 if(bit == 0) bitstream[(*bitpointer) >> 3] &= (unsigned char)(~(1 << (7 - ((*bitpointer) & 0x7))));
2413 else bitstream[(*bitpointer) >> 3] |= (1 << (7 - ((*bitpointer) & 0x7)));
2414 ++(*bitpointer);
2415}
2416
2417/* ////////////////////////////////////////////////////////////////////////// */
2418/* / PNG chunks / */

Callers 3

removePaddingBitsFunction · 0.85
addPaddingBitsFunction · 0.85
Adam7_interlaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected