Lines Matching defs:size
176 int size;
226 EXRAttribute *custom_attributes; // array of EXRAttribute. size =
353 const unsigned char *memory, size_t size);
366 const unsigned char *memory, size_t size,
387 size_t size, const char **err);
409 const size_t size, const char **err);
437 const size_t size, const char **err);
490 const unsigned char *memory, size_t size,
628 pUser_read_buf is not NULL and compressed size is > uncompressed size
631 contain zero-size compressed data on dir entries.
728 CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly
985 // items/size is size_t, not unsigned long.
986 typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
989 size_t size);
1144 // controls the window size and whether or not the stream has been wrapped with
1370 mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size,
1373 size_t size, mz_uint32 flags);
1571 // at least the size of the dictionary (typically 32KB).
1585 // pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data
1589 // *pOut_len will be set to the decompressed data's size, which could be larger
1617 // Max size of LZ dictionary.
1737 // pSrc_buf, src_buf_len: Pointer and size of source block to compress.
1742 // *pOut_len will be set to the compressed data's size, which could be larger
1767 // *pLen_out will be set to the size of the PNG image file.
2019 static void *def_alloc_func(void *opaque, size_t items, size_t size) {
2020 (void)opaque, (void)items, (void)size;
2021 return MZ_MALLOC(items * size);
2028 // size_t size) {
2029 // (void)opaque, (void)address, (void)items, (void)size;
2030 // return MZ_REALLOC(address, items * size);
2500 // bit buffer contains >=15 bits (deflate's max. Huffman code size).
2593 // Ensure the output buffer's size is a power of 2, unless the output buffer
3266 // Limits canonical Huffman code table's max code size.
4110 // Update dictionary and hash chains. Keeps the lookahead size equal to
4604 // compute final size of file, grab compressed data buffer and return
4999 const int size = pZip->m_total_files;
5000 int start = (size - 2) >> 1, end;
5004 if ((child = (root << 1) + 1) >= size) break;
5006 (((child + 1) < size) &&
5018 end = size - 1;
5167 mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size,
5171 pZip->m_archive_size = size;
5190 size_t size, mz_uint32 flags) {
5192 pZip->m_archive_size = size;
5200 pZip->m_pState->m_mem_size = size;
5396 const int size = pZip->m_total_files;
5398 int l = 0, h = size - 1;
6069 // size
7295 const char *marker, size_t size) {
7296 size_t name_len = strnlen(marker, size);
7297 if (name_len == size) {
7304 size -= name_len + 1;
7306 size_t type_len = strnlen(marker, size);
7307 if (type_len == size) {
7313 size -= type_len + 1;
7315 if (size < sizeof(uint32_t)) {
7328 size -= sizeof(uint32_t);
7342 size -= sizeof(uint32_t);
7344 if (size < data_len) {
7441 tinyexr_int64 data_len = static_cast<tinyexr_int64>(data.size()) -
7455 if (data_end >= (data.data() + data.size())) {
7482 // Calculate total size.
7483 for (size_t c = 0; c < channels.size(); c++) {
7491 for (size_t c = 0; c < channels.size(); c++) {
7955 int size;
8043 int nx, // i : x size
8045 int ny, // i : y size
8152 int nx, // i : x size
8154 int ny, // i : y size
8278 const int HUF_DECBITS = 14; // decoding bit size (>= 8)
8280 const int HUF_ENCSIZE = (1 << HUF_ENCBITS) + 1; // encoding table size
8281 const int HUF_DECSIZE = 1 << HUF_DECBITS; // decoding table size
8287 int lit : 24; // lit p size
8619 int ni, // i : input size (in bytes)
8826 static int hufEncode // return: output size (in bits)
8829 const int ni, // i : input buffer size (in bytes)
8950 int ni, // i : input size (in bits)
8952 int no, // i : expected output size (in bytes)
8959 const char *ie = in + (ni + 7) / 8; // input byte size
9123 if (raw->size() != 0) return false;
9164 hufDecode(&freq.at(0), &hdec.at(0), ptr, nBits, iM, raw->size(),
9267 std::vector<PIZChannelData> channelData(channelInfo.size());
9270 for (size_t c = 0; c < channelData.size(); c++) {
9285 cd.size = static_cast<int>(pixelSize / sizeof(short));
9287 tmpBufferEnd += cd.nx * cd.ny * cd.size;
9292 for (size_t i = 0; i < channelData.size(); ++i) {
9298 size_t n = static_cast<size_t>(cd.nx * cd.size);
9305 bitmapFromData(&tmpBuffer.at(0), static_cast<int>(tmpBuffer.size()),
9310 applyLut(lut.data(), &tmpBuffer.at(0), static_cast<int>(tmpBuffer.size()));
9333 for (size_t i = 0; i < channelData.size(); ++i) {
9336 for (int j = 0; j < cd.size; ++j) {
9337 wav2Encode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size,
9354 hufCompress(&tmpBuffer.at(0), static_cast<int>(tmpBuffer.size()), buf);
9451 channelData[i].size = static_cast<int>(pixelSize / sizeof(short));
9453 tmpBufferEnd += channelData[i].nx * channelData[i].ny * channelData[i].size;
9456 for (size_t i = 0; i < channelData.size(); ++i) {
9459 for (int j = 0; j < cd.size; ++j) {
9460 wav2Decode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size,
9472 for (size_t i = 0; i < channelData.size(); ++i) {
9478 size_t n = static_cast<size_t>(cd.nx * cd.size);
9511 (attributes[i].size == 1)) {
9525 (attributes[i].size == 8)) {
9533 (attributes[i].size == 4)) {
9541 (attributes[i].size == 8)) {
9712 // Allocate original data size.
9715 size_t tmpBufLen = outBuf.size();
9851 // Allocate original data size.
9856 unsigned long dstLen = static_cast<unsigned long>(outBuf.size());
9985 // Allocate original data size.
9990 unsigned long dstLen = static_cast<unsigned long>(outBuf.size());
10127 // Allocate original data size.
10132 unsigned long dstLen = outBuf.size();
10229 // Insufficient data size
10265 // Insufficient data size
10325 // Compute actual image size in a tile.
10338 // Image size = tile size.
10419 const unsigned char *buf, size_t size) {
10427 if (size > 0 && marker[0] == '\0') {
10478 size_t orig_size = size;
10480 if (0 == size) {
10482 (*err) += "Insufficient data size for attributes.\n";
10486 size--;
10495 marker, size)) {
10502 size -= marker_size;
10507 TEXR_ASSERT(data.size() == 9);
10574 if (info->channels.size() < 1) {
10584 if (data.size() >= 16) {
10596 if (data.size() >= 16) {
10613 if (data.size() >= 1) {
10618 if (data.size() >= sizeof(float)) {
10625 if (data.size() >= 8) {
10635 if (data.size() >= sizeof(float)) {
10643 if (data.size() >= sizeof(int)) {
10649 if (info->attributes.size() < TINYEXR_MAX_CUSTOM_ATTRIBUTES) {
10660 attrib.size = static_cast<int>(data.size());
10661 attrib.value = static_cast<unsigned char *>(malloc(data.size()));
10663 data.size());
10719 info->header_len = static_cast<unsigned int>(orig_size - size);
10747 exr_header->num_channels = static_cast<int>(info.channels.size());
10779 exr_header->num_custom_attributes = static_cast<int>(info.attributes.size());
10791 for (size_t i = 0; i < info.attributes.size(); i++) {
10796 exr_header->custom_attributes[i].size = info.attributes[i].size;
10810 const unsigned char *head, const size_t size,
10851 size_t num_blocks = offsets.size();
10872 ss << "Invalid tile size x : " << exr_header->tile_size_x << "\n";
10881 ss << "Invalid tile size y : " << exr_header->tile_size_y << "\n";
10887 size_t num_tiles = offsets.size(); // = # of blocks
10919 // 4 byte : data size
10921 if (offsets[tile_idx] + sizeof(int) * 5 > size) {
10924 (*err) += "Insufficient data size.\n";
10931 size_t(size - (offsets[tile_idx] + sizeof(int) * 5));
11029 ss << "Image data size is zero or too large: width = " << data_width
11065 if (offsets[y_idx] + sizeof(int) * 2 > size) {
11069 // 4 byte: data size
11072 size_t(size - (offsets[y_idx] + sizeof(int) * 2));
11182 const unsigned char *head, const unsigned char *marker, const size_t size) {
11184 TEXR_ASSERT(offsets->size() == n);
11188 // Offset should not exceed whole EXR file/data size.
11189 if ((offset + sizeof(tinyexr::tinyexr_uint64)) >= size) {
11199 if (data_len >= size) {
11216 const unsigned char *marker, const size_t size,
11219 marker == NULL || (size <= tinyexr::kEXRVersionSize)) {
11302 if ((marker + sizeof(tinyexr_uint64)) >= (head + size)) {
11303 tinyexr::SetErrorMessage("Insufficient data size in offset table.", err);
11309 if (offset >= size) {
11328 ReconstructLineOffsets(&offsets, num_blocks, head, marker, size);
11342 int ret = DecodeChunk(exr_image, exr_header, offsets, head, size, &e);
11379 if (pos != std::string::npos && pos != 0 && pos + 1 < full_name.size()) {
11402 if (pos != std::string::npos && pos < ch_name.size()) {
11410 ch_name = ch_name.substr(layer_name.size() + 1);
11449 (*num_layers) = int(layer_vec.size());
11451 malloc(sizeof(const char *) * static_cast<size_t>(layer_vec.size())));
11452 for (size_t c = 0; c < static_cast<size_t>(layer_vec.size()); c++) {
11535 if (channels.size() < 1) {
11542 size_t ch_count = channels.size() < 4 ? channels.size() : 4;
11560 if (channels.size() == 1) {
11708 const unsigned char *memory, size_t size,
11720 if (size < tinyexr::kEXRVersionSize) {
11721 tinyexr::SetErrorMessage("Insufficient header/data size.\n", err);
11726 size_t marker_size = size - tinyexr::kEXRVersionSize;
11749 const unsigned char *memory, size_t size,
11762 int ret = ParseEXRVersionFromMemory(&exr_version, memory, size);
11770 ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, memory, size, err);
11783 ret = LoadEXRImageFromMemory(&exr_image, &exr_header, memory, size, err);
11958 // Compute size
11965 tinyexr::SetErrorMessage("File size too short " + std::string(filename),
11984 const unsigned char *memory, const size_t size,
11987 (size < tinyexr::kEXRVersionSize)) {
12002 return tinyexr::DecodeEXRImage(exr_image, exr_header, head, marker, size,
12096 static_cast<int>(data.size()));
12160 exr_header->custom_attributes[i].size);
12176 size_t headerSize = memory.size();
12351 // 4 byte: data size
12354 unsigned int data_len = static_cast<unsigned int>(buf.size());
12369 static_cast<unsigned long>(buf.size())));
12372 compressBound(static_cast<uLong>(buf.size())));
12374 tinyexr::tinyexr_uint64 outSize = block.size();
12378 static_cast<unsigned long>(buf.size()));
12381 // 4 byte: data size
12396 // (buf.size() * 3) / 2 would be enough.
12397 std::vector<unsigned char> block((buf.size() * 3) / 2);
12399 tinyexr::tinyexr_uint64 outSize = block.size();
12403 static_cast<unsigned long>(buf.size()));
12406 // 4 byte: data size
12425 buf.size())); // @fixme { compute good bound. }
12427 unsigned int outSize = static_cast<unsigned int>(block.size());
12431 buf.size(), channels, exr_image->width, h);
12434 // 4 byte: data size
12461 // 4 byte: data size
12486 offset += data_list[i].size();
12497 if (memory.size() == 0) {
12498 tinyexr::SetErrorMessage("Output memory size is zero", err);
12503 memcpy((*memory_out), &memory.at(0), memory.size());
12504 unsigned char *memory_ptr = *memory_out + memory.size();
12507 memcpy(memory_ptr, &data_list[i].at(0), data_list[i].size());
12508 memory_ptr += data_list[i].size();
12596 // Compute size
12603 tinyexr::SetErrorMessage("File size is zero : " + std::string(filename),
12653 size_t size = filesize - tinyexr::kEXRVersionSize;
12655 if (0 == size) {
12659 size--;
12668 marker, size)) {
12675 size -= marker_size;
12703 num_channels = static_cast<int>(channels.size());
12803 // int64: packed size of pixel offset table
12804 // int64: packed size of sample data
12805 // int64: unpacked size of sample data
12833 static_cast<unsigned long>(pixelOffsetTable.size() * sizeof(int));
12841 TEXR_ASSERT(dstLen == pixelOffsetTable.size() * sizeof(int));
12888 sampleSize) == sample_data.size());
12889 int samples_per_line = static_cast<int>(sample_data.size()) / sampleSize;
13067 // Compute size
13093 const unsigned char *memory, size_t size,
13103 if (size < tinyexr::kEXRVersionSize) {
13104 tinyexr::SetErrorMessage("Data size too short", err);
13109 size_t marker_size = size - tinyexr::kEXRVersionSize;
13143 size -= info.header_len;
13148 static_cast<EXRHeader **>(malloc(sizeof(EXRHeader *) * infos.size()));
13149 for (size_t i = 0; i < infos.size(); i++) {
13160 (*num_headers) = static_cast<int>(infos.size());
13187 // Compute size
13210 size_t size) {
13215 if (size < tinyexr::kEXRVersionSize) {
13278 // Compute size
13303 const size_t size, const char **err) {
13305 memory == NULL || (size <= tinyexr::kEXRVersionSize)) {
13311 // compute total header size.
13344 for (size_t c = 0; c < offset_table.size(); c++) {
13349 if (offset >= size) {
13350 tinyexr::SetErrorMessage("Invalid offset size in EXR header chunks.",
13368 for (size_t c = 0; c < offset_table.size(); c++) {
13384 memory, size, &e);
13418 // Compute size