Lines Matching refs:frequencies
698 static unsigned append_symbol_coins(Coin* coins, const unsigned* frequencies, unsigned numcodes, si… in append_symbol_coins() argument
704 if(frequencies[i] != 0) /*only include symbols that are present*/ in append_symbol_coins()
706 coins[j].weight = frequencies[i] / (float)sum; in append_symbol_coins()
714 unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, in lodepng_huffman_code_lengths() argument
729 if(frequencies[i] > 0) in lodepng_huffman_code_lengths()
732 sum += frequencies[i]; in lodepng_huffman_code_lengths()
751 if(frequencies[i]) in lodepng_huffman_code_lengths()
777 error = append_symbol_coins(coins, frequencies, numcodes, sum); in lodepng_huffman_code_lengths()
807 error = append_symbol_coins(coins + numcoins, frequencies, numcodes, sum); in lodepng_huffman_code_lengths()
834 static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies, in HuffmanTree_makeFromFrequencies() argument
838 while(!frequencies[numcodes - 1] && numcodes > mincodes) numcodes--; /*trim zeroes*/ in HuffmanTree_makeFromFrequencies()
846 error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen); in HuffmanTree_makeFromFrequencies()