Lines Matching refs:comp

430 …ory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp);
491 STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
492 … stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
497 STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp);
498 STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
907 static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__re…
908 static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp);
913 static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
914 static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp);
920 static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
921 static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp);
926 static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
927 static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp);
932 static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
933 static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp);
939 static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
940 static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp);
945 static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
946 static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp);
951 static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
952 …bi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp);
953 static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp);
958 static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__res…
959 static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp);
1087 static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp);
1091 static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp);
1117 static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__resul… in stbi__load_main() argument
1127 if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1130 if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1133 if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1136 if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); in stbi__load_main()
1141 if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1148 if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1151 if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1156 float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); in stbi__load_main()
1157 return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); in stbi__load_main()
1164 return stbi__tga_load(s,x,y,comp,req_comp, ri); in stbi__load_main()
1240 static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, … in stbi__load_and_postprocess_8bit() argument
1243 void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); in stbi__load_and_postprocess_8bit()
1252 … result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); in stbi__load_and_postprocess_8bit()
1259 int channels = req_comp ? req_comp : *comp; in stbi__load_and_postprocess_8bit()
1266 static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, … in stbi__load_and_postprocess_16bit() argument
1269 void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); in stbi__load_and_postprocess_16bit()
1278 result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); in stbi__load_and_postprocess_16bit()
1286 int channels = req_comp ? req_comp : *comp; in stbi__load_and_postprocess_16bit()
1294 static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) in stbi__float_postprocess() argument
1297 int channels = req_comp ? req_comp : *comp; in stbi__float_postprocess()
1346 STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) in stbi_load() argument
1351 result = stbi_load_from_file(f,x,y,comp,req_comp); in stbi_load()
1356 STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) in stbi_load_from_file() argument
1361 result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); in stbi_load_from_file()
1369 STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) in stbi_load_from_file_16() argument
1374 result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); in stbi_load_from_file_16()
1382 STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) in stbi_load_16() argument
1387 result = stbi_load_from_file_16(f,x,y,comp,req_comp); in stbi_load_16()
1409 STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, i… in stbi_load_from_memory() argument
1413 return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); in stbi_load_from_memory()
1416 …_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) in stbi_load_from_callbacks() argument
1420 return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); in stbi_load_from_callbacks()
1424 …mory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) in stbi_load_gif_from_memory() argument
1430 result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); in stbi_load_gif_from_memory()
1432 stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); in stbi_load_gif_from_memory()
1440 static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) in stbi__loadf_main() argument
1446 float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); in stbi__loadf_main()
1448 stbi__float_postprocess(hdr_data,x,y,comp,req_comp); in stbi__loadf_main()
1452 data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); in stbi__loadf_main()
1454 return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); in stbi__loadf_main()
1458 STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, in… in stbi_loadf_from_memory() argument
1462 return stbi__loadf_main(&s,x,y,comp,req_comp); in stbi_loadf_from_memory()
1465 …_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) in stbi_loadf_from_callbacks() argument
1469 return stbi__loadf_main(&s,x,y,comp,req_comp); in stbi_loadf_from_callbacks()
1473 STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) in stbi_loadf() argument
1478 result = stbi_loadf_from_file(f,x,y,comp,req_comp); in stbi_loadf()
1483 STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) in stbi_loadf_from_file() argument
1487 return stbi__loadf_main(&s,x,y,comp,req_comp); in stbi_loadf_from_file()
1838 static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) in stbi__ldr_to_hdr() argument
1843 output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); in stbi__ldr_to_hdr()
1846 if (comp & 1) n = comp; else n = comp-1; in stbi__ldr_to_hdr()
1849 … output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); in stbi__ldr_to_hdr()
1852 if (n < comp) { in stbi__ldr_to_hdr()
1854 output[i*comp + n] = data[i*comp + n]/255.0f; in stbi__ldr_to_hdr()
1864 static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) in stbi__hdr_to_ldr() argument
1869 output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); in stbi__hdr_to_ldr()
1872 if (comp & 1) n = comp; else n = comp-1; in stbi__hdr_to_ldr()
1875 float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; in stbi__hdr_to_ldr()
1878 output[i*comp + k] = (stbi_uc) stbi__float2int(z); in stbi__hdr_to_ldr()
1880 if (k < comp) { in stbi__hdr_to_ldr()
1881 float z = data[i*comp+k] * 255 + 0.5f; in stbi__hdr_to_ldr()
1884 output[i*comp + k] = (stbi_uc) stbi__float2int(z); in stbi__hdr_to_ldr()
3804 static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) in load_jpeg_image() argument
3962 if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output in load_jpeg_image()
3967 static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__resul… in stbi__jpeg_load() argument
3975 result = load_jpeg_image(j, x,y,comp,req_comp); in stbi__jpeg_load()
3993 static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) in stbi__jpeg_info_raw() argument
4001 if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; in stbi__jpeg_info_raw()
4005 static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) in stbi__jpeg_info() argument
4011 result = stbi__jpeg_info_raw(j, x, y, comp); in stbi__jpeg_info()
5041 int comp,filter; in stbi__parse_png_file() local
5053 comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); in stbi__parse_png_file()
5224 static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__png_load() argument
5228 return stbi__do_png(&p, x,y,comp,req_comp, ri); in stbi__png_load()
5239 static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) in stbi__png_info_raw() argument
5247 if (comp) *comp = p->s->img_n; in stbi__png_info_raw()
5251 static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) in stbi__png_info() argument
5255 return stbi__png_info_raw(&p, x, y, comp); in stbi__png_info()
5460 static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__bmp_load() argument
5645 if (comp) *comp = s->img_n; in stbi__bmp_load()
5670 static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) in stbi__tga_info() argument
5731 if (comp) *comp = tga_comp; in stbi__tga_info()
5786 static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__tga_load() argument
5837 if (comp) *comp = tga_comp; in stbi__tga_load()
6041 static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__psd_load() argument
6235 if (comp) *comp = 4; in stbi__psd_load()
6305 static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *resul… in stbi__pic_load_core() argument
6331 *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? in stbi__pic_load_core()
6415 static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_i… in stbi__pic_load() argument
6421 if (!comp) comp = &internal_comp; in stbi__pic_load()
6444 if (!stbi__pic_load_core(s,x,y,comp, result)) { in stbi__pic_load()
6450 if (req_comp == 0) req_comp = *comp; in stbi__pic_load()
6523 static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) in stbi__gif_header() argument
6544 if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments in stbi__gif_header()
6554 static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) in stbi__gif_info_raw() argument
6558 if (!stbi__gif_header(s, g, comp, 1)) { in stbi__gif_info_raw()
6693 static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_u… in stbi__gif_load_next() argument
6704 … if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header in stbi__gif_load_next()
6878 static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp,… in stbi__load_gif_main() argument
6899 u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); in stbi__load_gif_main()
6963 static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__gif_load() argument
6970 u = stbi__gif_load_next(s, &g, comp, req_comp, 0); in stbi__gif_load()
6992 static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) in stbi__gif_info() argument
6994 return stbi__gif_info_raw(s,x,y,comp); in stbi__gif_info()
7073 static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__resul… in stbi__hdr_load() argument
7118 if (comp) *comp = 3; in stbi__hdr_load()
7204 static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) in stbi__hdr_info() argument
7213 if (!comp) comp = &dummy; in stbi__hdr_info()
7244 *comp = 3; in stbi__hdr_info()
7250 static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) in stbi__bmp_info() argument
7263 if (comp) { in stbi__bmp_info()
7265 *comp = 3; in stbi__bmp_info()
7267 *comp = info.ma ? 4 : 3; in stbi__bmp_info()
7274 static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) in stbi__psd_info() argument
7279 if (!comp) comp = &dummy; in stbi__psd_info()
7305 *comp = 4; in stbi__psd_info()
7338 static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) in stbi__pic_info() argument
7345 if (!comp) comp = &dummy; in stbi__pic_info()
7390 *comp = (act_comp & 0x10 ? 4 : 3); in stbi__pic_info()
7421 static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result… in stbi__pnm_load() argument
7435 if (comp) *comp = s->img_n; in stbi__pnm_load()
7487 static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) in stbi__pnm_info() argument
7494 if (!comp) comp = &dummy; in stbi__pnm_info()
7506 *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm in stbi__pnm_info()
7534 static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) in stbi__info_main() argument
7537 if (stbi__jpeg_info(s, x, y, comp)) return 1; in stbi__info_main()
7541 if (stbi__png_info(s, x, y, comp)) return 1; in stbi__info_main()
7545 if (stbi__gif_info(s, x, y, comp)) return 1; in stbi__info_main()
7549 if (stbi__bmp_info(s, x, y, comp)) return 1; in stbi__info_main()
7553 if (stbi__psd_info(s, x, y, comp)) return 1; in stbi__info_main()
7557 if (stbi__pic_info(s, x, y, comp)) return 1; in stbi__info_main()
7561 if (stbi__pnm_info(s, x, y, comp)) return 1; in stbi__info_main()
7565 if (stbi__hdr_info(s, x, y, comp)) return 1; in stbi__info_main()
7570 if (stbi__tga_info(s, x, y, comp)) in stbi__info_main()
7593 STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) in stbi_info() argument
7598 result = stbi_info_from_file(f, x, y, comp); in stbi_info()
7603 STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) in stbi_info_from_file() argument
7609 r = stbi__info_main(&s,x,y,comp); in stbi_info_from_file()
7636 STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) in stbi_info_from_memory() argument
7640 return stbi__info_main(&s,x,y,comp); in stbi_info_from_memory()
7643 …DEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) in stbi_info_from_callbacks() argument
7647 return stbi__info_main(&s,x,y,comp); in stbi_info_from_callbacks()