Go to the source code of this file.
Classes | |
class | IZ::ImageEncoder< bpp, Predictor, Code > |
Namespaces | |
namespace | IZ |
Defines | |
#define | encodePixel(predictor) |
#define encodePixel | ( | predictor | ) |
{ \ Pixel<> pix, pp; \ \ pix.readFrom(p); \ pp.predict(p, bpp, bpr, predictor::predict); \ pix -= pp; \ pix.forwardTransform(); \ p += bpp; \ pix.toUnsigned(); \ \ int nl = pix.numBits(); \ cx = (cx << CONTEXT_BITS) + nl; \ this->writeBits(dBits[cx & bitMask(2 * CONTEXT_BITS)], dCount[cx & bitMask(2 * CONTEXT_BITS)]); \ pix.writeBits(*this, nl); \ }