Lines Matching full:scanline
3913 "padded" is only relevant if bpp is less than 8 and a scanline or image does not
3937 /*bits padded if needed to fill full byte at end of each scanline*/
4008 static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon,
4013 unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte,
4015 precon is the previous unfiltered scanline, recon the result, scanline the current one
4017 recon and scanline MAY be the same memory address! precon must be disjoint.
4024 for(i = 0; i < length; i++) recon[i] = scanline[i];
4027 for(i = 0; i < bytewidth; i++) recon[i] = scanline[i];
4028 for(i = bytewidth; i < length; i++) recon[i] = scanline[i] + recon[i - bytewidth];
4033 for(i = 0; i < length; i++) recon[i] = scanline[i] + precon[i];
4037 for(i = 0; i < length; i++) recon[i] = scanline[i];
4043 for(i = 0; i < bytewidth; i++) recon[i] = scanline[i] + precon[i] / 2;
4044 for(i = bytewidth; i < length; i++) recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) / 2);
4048 for(i = 0; i < bytewidth; i++) recon[i] = scanline[i];
4049 for(i = bytewidth; i < length; i++) recon[i] = scanline[i] + recon[i - bytewidth] / 2;
4057 recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/
4061 recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth]));
4068 recon[i] = scanline[i];
4073 recon[i] = (scanline[i] + recon[i - bytewidth]);
4087 out must have enough bytes allocated already, in must have the scanlines + 1 filtertype byte per scanline
4179 to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers
4210 *) if no Adam7: 1) unfilter 2) remove padding bits (= posible extra bits per scanline if bpp < 8)
4237 /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline,
5158 static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline,
5165 for(i = 0; i < length; i++) out[i] = scanline[i];
5170 for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
5171 for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth];
5175 for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
5176 for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth];
5182 for(i = 0; i < length; i++) out[i] = scanline[i] - prevline[i];
5186 for(i = 0; i < length; i++) out[i] = scanline[i];
5192 for(i = 0; i < bytewidth; i++) out[i] = scanline[i] - prevline[i] / 2;
5193 for(i = bytewidth; i < length; i++) out[i] = scanline[i] - ((scanline[i - bytewidth] + prevline[i]) / 2);
5197 for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
5198 for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth] / 2;
5205 for(i = 0; i < bytewidth; i++) out[i] = (scanline[i] - prevline[i]);
5208 out[i] = (scanline[i] - paethPredictor(scanline[i - bytewidth], prevline[i], prevline[i - bytewidth]));
5213 for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
5214 /*paethPredictor(scanline[i - bytewidth], 0, 0) is always scanline[i - bytewidth]*/
5215 for(i = bytewidth; i < length; i++) out[i] = (scanline[i] - scanline[i - bytewidth]);
5237 the scanlines with 1 extra byte per scanline
5241 /*the width of a scanline in bytes, not including the filter type*/
5331 out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
5360 count[type]++; /*the filter type itself is part of the scanline*/
5378 out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
5399 deflate the scanline after every filter attempt to see which one deflates best.
5441 out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/
5541 *) if no Adam7: 1) add padding bits (= posible extra bits per scanline if bpp < 8) 2) filter
5549 *outsize = h + (h * ((w * bpp + 7) / 8)); /*image size plus an extra byte per scanline + possible padding bits*/
5555 /*non multiple of 8 bits per scanline, padding bits needed per scanline*/
5582 *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/