MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setBitOfReversedStream

Function setBitOfReversedStream

src/lodepng.cpp:2350–2356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2348#endif /*LODEPNG_COMPILE_DECODER*/
2349
2350static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit)
2351{
2352 /*the current bit in bitstream may be 0 or 1 for this to work*/
2353 if(bit == 0) bitstream[(*bitpointer) >> 3] &= (unsigned char)(~(1 << (7 - ((*bitpointer) & 0x7))));
2354 else bitstream[(*bitpointer) >> 3] |= (1 << (7 - ((*bitpointer) & 0x7)));
2355 (*bitpointer)++;
2356}
2357
2358/* ////////////////////////////////////////////////////////////////////////// */
2359/* / PNG chunks / */

Callers 3

removePaddingBitsFunction · 0.85
addPaddingBitsFunction · 0.85
Adam7_interlaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected