Lines Matching refs:value

88 Often in case of an error a value is assigned to a variable and then it breaks
161 /*resize and give all new elements the value*/
162 static unsigned uivector_resizev(uivector* p, size_t size, unsigned value)
166 for(i = oldsize; i < size; i++) p->data[i] = value;
241 /*resize and give all new elements the value*/
242 static unsigned ucvector_resizev(ucvector* p, size_t size, unsigned char value)
246 for(i = oldsize; i < size; i++) p->data[i] = value;
326 static void lodepng_set32bitInt(unsigned char* buffer, unsigned value)
328 buffer[0] = (unsigned char)((value >> 24) & 0xff);
329 buffer[1] = (unsigned char)((value >> 16) & 0xff);
330 buffer[2] = (unsigned char)((value >> 8) & 0xff);
331 buffer[3] = (unsigned char)((value ) & 0xff);
336 static void lodepng_add32bitInt(ucvector* buffer, unsigned value)
339 lodepng_set32bitInt(&buffer->data[buffer->size - 4], value);
407 static void addBitsToStream(size_t* bitpointer, ucvector* bitstream, unsigned value, size_t nbits)
410 for(i = 0; i < nbits; i++) addBitToStream(bitpointer, bitstream, (unsigned char)((value >> i) & 1));
413 static void addBitsToStreamReversed(size_t* bitpointer, ucvector* bitstream, unsigned value, size_t nbits)
416 for(i = 0; i < nbits; i++) addBitToStream(bitpointer, bitstream, (unsigned char)((value >> (nbits - 1 - i)) & 1));
522 /*the tree representation used by the decoder. return value is error*/
533 convert tree1d[] to tree2d[][]. In the 2D array, a value of 32767 means
534 uninited, a value >= numcodes is an address to another bit, a value < numcodes
585 value is error.
629 return value is error.
955 /*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already*/
957 /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/
959 /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/
1001 unsigned value; /*set value to the previous code*/
1008 if(i < HLIT + 1) value = bitlen_ll[i - 1];
1009 else value = bitlen_d[i - HLIT - 1];
1010 /*repeat this value in the next lengths*/
1014 if(i < HLIT) bitlen_ll[i] = value;
1015 else bitlen_d[i - HLIT] = value;
1026 /*repeat this value in the next lengths*/
1043 /*repeat this value in the next lengths*/
1123 /*part 2: get extra bits and add the value of that to length*/
1293 /*search the index in the array, that has the largest value smaller than or equal to the given value,
1294 given array must be sorted (if no value is smaller, it returns the size of the given array)*/
1295 static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value)
1298 /*for(size_t i = 1; i < array_size; i++) if(array[i] > value) return i - 1;
1307 if(array[mid] <= value) left = mid + 1; /*the value to find is more to the right*/
1308 else if(array[mid - 1] > value) right = mid - 1; /*the value to find is more to the left*/
1338 The HASH_NUM_CHARACTERS value is used to make encoding faster by using longer
1339 sequences to generate a hash value from the stream bytes. Setting it to 3
1343 encoding to miss any length between 3 and this value, so that the compression
1353 int* head; /*hash value to head circular pos*/
1354 int* val; /*circular pos to hash value*/
1373 for(i = 0; i < windowsize; i++) hash->chain[i] = i; /*same value as index indicates uninitialized*/
1410 /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/
1423 LZ77-encode the data. Return value is error code. The input are raw bytes, the output
1561 /*encode it as length/distance pair or literal value*/
1795 else if(j >= 3) /*repeat code for value other than zero*/
2081 /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/
2896 /*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/
2902 in &= (1 << bits) - 1; /*filter out any other bits of the input value*/
2919 int index; /*the payload. Only has a meaningful value if this is in the last level*/
3122 unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/
3124 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth);
3125 *r = *g = *b = (value * 255) / highest;
3126 if(mode->key_defined && value == mode->key_r) *a = 0;
3240 unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/
3244 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth);
3245 buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest;
3246 if(has_alpha) buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255;
3389 converts from any color type to 24-bit or 32-bit (later maybe more supported). return value = LodePNG error code
3542 /*Returns how many bits needed to represent given value (max 8 bit)*/
3543 unsigned getValueRequiredBits(unsigned short value)
3545 if(value == 0 || value == 255) return 1;
3547 if(value % 17 == 0) return value % 85 == 0 ? 2 : 4;
3950 /*read the information from the header and store it in the LodePNGInfo. return value is error*/
4184 only useful if (ilinebits - olinebits) is a value in the range 1..7
4203 return value is error*/
5467 /*obp += diff; --> no, fill in some value in the padding bits too, to avoid
5468 "Use of uninitialised value of size ###" warning from valgrind*/
5534 return value is error**/
5631 unsigned r = 0, g = 0, b = 0; /*the value of the color with alpha 0, so long as color keying is possible*/
5638 i = (size_t)(-1); /*restart from beginning, to detect earlier opaque colors with key's value*/
5973 case 46: return "a value in indexed image is larger than the palette size (bitdepth = 8)";
5975 case 47: return "a value in indexed image is larger than the palette size (bitdepth < 8)";
5983 case 54: return "repeat symbol in tree while there was no value symbol yet";