Lines Matching defs:info
732 int info[4];
733 __cpuid(info,1);
734 return info[3];
3310 // compute interleaved mcu info
5421 static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress)
5428 if (info->bpp == 16) {
5429 info->mr = 31u << 10;
5430 info->mg = 31u << 5;
5431 info->mb = 31u << 0;
5432 } else if (info->bpp == 32) {
5433 info->mr = 0xffu << 16;
5434 info->mg = 0xffu << 8;
5435 info->mb = 0xffu << 0;
5436 info->ma = 0xffu << 24;
5437 info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0
5440 info->mr = info->mg = info->mb = info->ma = 0;
5447 static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info)
5454 info->offset = stbi__get32le(s);
5455 info->hsz = hsz = stbi__get32le(s);
5456 info->mr = info->mg = info->mb = info->ma = 0;
5457 info->extra_read = 14;
5459 if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
5470 info->bpp = stbi__get16le(s);
5475 if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
5488 if (info->bpp == 16 || info->bpp == 32) {
5490 stbi__bmp_set_mask_defaults(info, compress);
5492 info->mr = stbi__get32le(s);
5493 info->mg = stbi__get32le(s);
5494 info->mb = stbi__get32le(s);
5495 info->extra_read += 12;
5497 if (info->mr == info->mg && info->mg == info->mb) {
5509 info->mr = stbi__get32le(s);
5510 info->mg = stbi__get32le(s);
5511 info->mb = stbi__get32le(s);
5512 info->ma = stbi__get32le(s);
5514 stbi__bmp_set_mask_defaults(info, compress);
5537 stbi__bmp_data info;
5540 info.all_a = 255;
5541 if (stbi__bmp_parse_header(s, &info) == NULL)
5550 mr = info.mr;
5551 mg = info.mg;
5552 mb = info.mb;
5553 ma = info.ma;
5554 all_a = info.all_a;
5556 if (info.hsz == 12) {
5557 if (info.bpp < 24)
5558 psize = (info.offset - info.extra_read - 24) / 3;
5560 if (info.bpp < 16)
5561 psize = (info.offset - info.extra_read - info.hsz) >> 2;
5574 // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn
5576 if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) {
5579 stbi__skip(s, info.offset - bytes_read_so_far);
5583 if (info.bpp == 24 && ma == 0xff000000)
5598 if (info.bpp < 16) {
5605 if (info.hsz != 12) stbi__get8(s);
5608 stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4));
5609 if (info.bpp == 1) width = (s->img_x + 7) >> 3;
5610 else if (info.bpp == 4) width = (s->img_x + 1) >> 1;
5611 else if (info.bpp == 8) width = s->img_x;
5614 if (info.bpp == 1) {
5635 if (info.bpp == 4) {
5644 v = (info.bpp == 8) ? stbi__get8(s) : v2;
5657 stbi__skip(s, info.offset - info.extra_read - info.hsz);
5658 if (info.bpp == 24) width = 3 * s->img_x;
5659 else if (info.bpp == 16) width = 2*s->img_x;
5662 if (info.bpp == 24) {
5664 } else if (info.bpp == 32) {
5690 int bpp = info.bpp;
5918 // tga info
6176 // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.)
7343 stbi__bmp_data info;
7345 info.all_a = 255;
7346 p = stbi__bmp_parse_header(s, &info);
7354 if (info.bpp == 24 && info.ma == 0xff000000)
7357 *comp = info.ma ? 4 : 3;
7801 info() for TGA could break due to .hdr handling
7802 info() for BMP to shares code instead of sloppy parse
7869 support for "info" function for all supported filetypes (SpartanJ)