Lines Matching refs:bpp

2796   size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth);  in lodepng_get_raw_size_lct()  local
2798 return ((n / 8u) * bpp) + ((n & 7u) * bpp + 7u) / 8u; in lodepng_get_raw_size_lct()
2811 static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, unsigned bpp) { in lodepng_get_raw_size_idat() argument
2814 size_t line = ((size_t)(w / 8u) * bpp) + 1u + ((w & 7u) * bpp + 7u) / 8u; in lodepng_get_raw_size_idat()
2829 size_t bpp = LODEPNG_MAX(lodepng_get_bpp(pngcolor), lodepng_get_bpp(rawcolor)); in lodepng_pixel_overflow() local
2837 if(lodepng_mulofl((size_t)(w / 8u), bpp, &line)) return 1; in lodepng_pixel_overflow()
2838 if(lodepng_addofl(line, ((w & 7u) * bpp + 7u) / 8u, &line)) return 1; in lodepng_pixel_overflow()
3707 unsigned bpp = lodepng_get_bpp(mode_in); in lodepng_compute_color_stats() local
3708 unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0; in lodepng_compute_color_stats()
3711 if(bpp <= 8) maxnumcolors = LODEPNG_MIN(257, stats->numcolors + (1u << bpp)); in lodepng_compute_color_stats()
3725 if(stats->bits >= bpp) bits_done = 1; in lodepng_compute_color_stats()
3805 bits_done = (stats->bits >= bpp); in lodepng_compute_color_stats()
4009 … size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) { in Adam7_getpassvalues() argument
4025 … + ((passw[i] && passh[i]) ? passh[i] * (1u + (passw[i] * bpp + 7u) / 8u) : 0); in Adam7_getpassvalues()
4027 padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7u) / 8u); in Adam7_getpassvalues()
4029 passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7u) / 8u; in Adam7_getpassvalues()
4201 …igned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { in unfilter() argument
4214 size_t bytewidth = (bpp + 7u) / 8u; in unfilter()
4216 size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; in unfilter()
4242 …m7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { in Adam7_deinterlace() argument
4247 Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); in Adam7_deinterlace()
4249 if(bpp >= 8) { in Adam7_deinterlace()
4252 size_t bytewidth = bpp / 8u; in Adam7_deinterlace()
4266 unsigned ilinebits = bpp * passw[i]; in Adam7_deinterlace()
4267 unsigned olinebits = bpp * w; in Adam7_deinterlace()
4271 ibp = (8 * passstart[i]) + (y * ilinebits + x * bpp); in Adam7_deinterlace()
4272 …ADAM7_IY[i] + (size_t)y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + (size_t)x * ADAM7_DX[i]) * bpp; in Adam7_deinterlace()
4273 for(b = 0; b < bpp; ++b) { in Adam7_deinterlace()
4318 unsigned bpp = lodepng_get_bpp(&info_png->color); in postProcessScanlines() local
4319 if(bpp == 0) return 31; /*error: invalid colortype*/ in postProcessScanlines()
4322 if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { in postProcessScanlines()
4323 CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); in postProcessScanlines()
4324 removePaddingBits(out, in, w * bpp, ((w * bpp + 7u) / 8u) * 8u, h); in postProcessScanlines()
4327 else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); in postProcessScanlines()
4332 Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); in postProcessScanlines()
4335 …_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); in postProcessScanlines()
4338 if(bpp < 8) { in postProcessScanlines()
4341 removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, in postProcessScanlines()
4342 ((passw[i] * bpp + 7u) / 8u) * 8u, passh[i]); in postProcessScanlines()
4346 Adam7_deinterlace(out, in, w, h, bpp); in postProcessScanlines()
4922 size_t bpp = lodepng_get_bpp(&state->info_png.color); in decodeGeneric() local
4923 expected_size = lodepng_get_raw_size_idat(*w, *h, bpp); in decodeGeneric()
4925 size_t bpp = lodepng_get_bpp(&state->info_png.color); in decodeGeneric() local
4928 expected_size += lodepng_get_raw_size_idat((*w + 7) >> 3, (*h + 7) >> 3, bpp); in decodeGeneric()
4929 if(*w > 4) expected_size += lodepng_get_raw_size_idat((*w + 3) >> 3, (*h + 7) >> 3, bpp); in decodeGeneric()
4930 expected_size += lodepng_get_raw_size_idat((*w + 3) >> 2, (*h + 3) >> 3, bpp); in decodeGeneric()
4931 if(*w > 2) expected_size += lodepng_get_raw_size_idat((*w + 1) >> 2, (*h + 3) >> 2, bpp); in decodeGeneric()
4932 expected_size += lodepng_get_raw_size_idat((*w + 1) >> 1, (*h + 1) >> 2, bpp); in decodeGeneric()
4933 if(*w > 1) expected_size += lodepng_get_raw_size_idat((*w + 0) >> 1, (*h + 1) >> 1, bpp); in decodeGeneric()
4934 expected_size += lodepng_get_raw_size_idat((*w + 0), (*h + 0) >> 1, bpp); in decodeGeneric()
5455 unsigned bpp = lodepng_get_bpp(color); in filter() local
5457 size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; in filter()
5460 size_t bytewidth = (bpp + 7u) / 8u; in filter()
5482 if(bpp == 0) return 31; /*error: invalid color type*/ in filter()
5671 …dam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { in Adam7_interlace() argument
5676 Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); in Adam7_interlace()
5678 if(bpp >= 8) { in Adam7_interlace()
5681 size_t bytewidth = bpp / 8u; in Adam7_interlace()
5694 unsigned ilinebits = bpp * passw[i]; in Adam7_interlace()
5695 unsigned olinebits = bpp * w; in Adam7_interlace()
5699 ibp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; in Adam7_interlace()
5700 obp = (8 * passstart[i]) + (y * ilinebits + x * bpp); in Adam7_interlace()
5701 for(b = 0; b < bpp; ++b) { in Adam7_interlace()
5720 unsigned bpp = lodepng_get_bpp(&info_png->color); in preProcessScanlines() local
5724 …*outsize = h + (h * ((w * bpp + 7u) / 8u)); /*image size plus an extra byte per scanline + possibl… in preProcessScanlines()
5730 if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { in preProcessScanlines()
5731 unsigned char* padded = (unsigned char*)lodepng_malloc(h * ((w * bpp + 7u) / 8u)); in preProcessScanlines()
5734 addPaddingBits(padded, in, ((w * bpp + 7u) / 8u) * 8u, w * bpp, h); in preProcessScanlines()
5748 Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); in preProcessScanlines()
5760 Adam7_interlace(adam7, in, w, h, bpp); in preProcessScanlines()
5762 if(bpp < 8) { in preProcessScanlines()
5766 ((passw[i] * bpp + 7u) / 8u) * 8u, passw[i] * bpp, passh[i]); in preProcessScanlines()