Lines Matching defs:code

7     * Redistributions of source code must retain the above copyright
28 // TinyEXR contains some OpenEXR code, which is licensed under ------------
40 // * Redistributions of source code must retain the above copyright
305 // @param[out] err Error string(wll be filled when the function returns error code). Free it using FreeEXRErrorMessage after using this value.
695 - Refactored the compression code for better readability and
728 CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly
1187 // Returns a string description of the specified error code, or NULL if the
1188 // error code is invalid.
2495 // the next Huffman code (and absolutely no more). It works by trying to fully
2497 // Huffman code by using whatever bits are currently present in the bit buffer.
2500 // bit buffer contains >=15 bits (deflate's max. Huffman code size).
2525 // decode the next Huffman code.) Handling this properly is particularly
3266 // Limits canonical Huffman code table's max code size.
3330 mz_uint rev_code = 0, code, code_size;
3332 code = next_code[code_size]++;
3333 for (l = code_size; l > 0; l--, code >>= 1)
3334 rev_code = (rev_code << 1) | (code & 1);
3472 mz_uint code = packed_code_sizes[packed_code_sizes_index++];
3473 MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2);
3474 TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]);
3475 if (code >= 16)
3477 "\02\03\07"[code - 16]);
4500 // This is actually a modification of Alex's original code so PNG files
5283 // Bugfix: This code was also checking if the internal attribute was non-zero,
6967 distribute this software, either in source code form or as a compiled
7218 // Based on ISPC reference code (with minor modifications)
7252 // NOTE: From OpenEXR code
7665 // RLE code from OpenEXR --------------------------------------
7783 // End of RLE code from OpenEXR -----------------------------------
7962 // The source code in this file is derived from the encoding
8269 // The source code in this file is derived from the 8-bit
8284 struct HufDec { // short code long code
8286 int len : 8; // code length 0
8291 inline long long hufLength(long long code) { return code & 63; }
8293 inline long long hufCode(long long code) { return code >> 6; }
8320 // Build a "canonical" Huffman code table:
8322 // of the corresponding code (in the compressed data)
8329 // - because the canonical code table can be constructed from
8330 // symbol lengths alone, the code table can be transmitted
8331 // without sending the actual code values
8350 // numerically lowest code with length i, and
8351 // store that code in n[i].
8364 // code for symbol i. Assign the next available
8365 // code of length l to the symbol and store both
8366 // l and the code in hcode[i].
8378 // - code structure is : [63:lsb - 6:msb] | [5-0: bit length];
8379 // - max code length is 58 bits;
8463 // of the code for the corresponding symbol.
8468 // into a single linear list that starts at the new node, and the code
8502 // corresponding code by one bit. (If we visit scode[j]
8503 // during the traversal, then the code for symbol j becomes
8543 // Build a canonical Huffman code table, replacing the code
8544 // lengths in scode with (code, code length) pairs. Copy the
8545 // code table from scode into frq.
8554 // - only code lengths, not actual codes, are stored
8635 long long l = hcode[im] = getBits(6, c, lc, p); // code length
8693 // - long code entry allocations are not optimized, because long codes are
8715 // Error: c is supposed to be an l-bit code,
8726 // Long code: add a secondary entry
8733 // Error: a short code has already
8757 // Short code: init all primary entries
8765 // Error: a short code or a long code has
8783 // Free the long code entries of a decoding table built by hufBuildDecTable()
8800 inline void outputCode(long long code, long long &c, int &lc, char *&out) {
8801 outputBits(hufLength(code), hufCode(code), c, lc, out);
8830 int rlc, // i : rl code
8845 // Count same values or send code
8859 // Send remaining code
8951 int rlc, // i : run-length code
8977 // Get short code
8995 // invalidCode(); // wrong code
8998 // Search long code
9013 // Found : get long code
9051 // invalidCode(); // wrong (long) code
11486 ss << "Failed to open EXR file or read version info from EXR file. code(" << ret << ")";
11765 ss << "Failed to parse EXR version. code(" << ret << ")";
11805 // TODO(syoyo): Refactor removing same code as used in LoadEXR().