Lines Matching full:codes
191 // Iterate over all histograms and get the aggregate number of codes used. in GetHuffBitLengthsAndCodes()
194 HuffmanTreeCode* const codes = &huffman_codes[5 * i]; in GetHuffBitLengthsAndCodes() local
199 codes[k].num_symbols = num_symbols; in GetHuffBitLengthsAndCodes()
204 // Allocate and Set Huffman codes. in GetHuffBitLengthsAndCodes()
206 uint16_t* codes; in GetHuffBitLengthsAndCodes() local
209 sizeof(*lengths) + sizeof(*codes)); in GetHuffBitLengthsAndCodes()
214 codes = (uint16_t*)mem_buf; in GetHuffBitLengthsAndCodes()
215 lengths = (uint8_t*)&codes[total_length_size]; in GetHuffBitLengthsAndCodes()
218 huffman_codes[i].codes = codes; in GetHuffBitLengthsAndCodes()
220 codes += bit_length; in GetHuffBitLengthsAndCodes()
227 HuffmanTreeCode* const codes = &huffman_codes[5 * i]; in GetHuffBitLengthsAndCodes() local
229 ok = ok && VP8LCreateHuffmanTree(histo->literal_, 15, codes + 0); in GetHuffBitLengthsAndCodes()
230 ok = ok && VP8LCreateHuffmanTree(histo->red_, 15, codes + 1); in GetHuffBitLengthsAndCodes()
231 ok = ok && VP8LCreateHuffmanTree(histo->blue_, 15, codes + 2); in GetHuffBitLengthsAndCodes()
232 ok = ok && VP8LCreateHuffmanTree(histo->alpha_, 15, codes + 3); in GetHuffBitLengthsAndCodes()
233 ok = ok && VP8LCreateHuffmanTree(histo->distance_, 15, codes + 4); in GetHuffBitLengthsAndCodes()
279 huffman_code->codes[k] = 0; in ClearHuffmanTreeIfOnlyOneSymbol()
291 VP8LWriteBits(bw, huffman_code->code_lengths[ix], huffman_code->codes[ix]); in StoreHuffmanTreeToBitMask()
320 huffman_code.codes = code_length_bitdepth_symbols; in StoreFullHuffmanCode()
419 const int symbol = code->codes[code_index]; in WriteHuffmanCode()
438 const HuffmanTreeCode* const codes = huffman_codes + 5 * histogram_ix; in StoreImageToBitMask() local
442 WriteHuffmanCode(bw, codes, literal_ix); in StoreImageToBitMask()
448 WriteHuffmanCode(bw, codes + k, code); in StoreImageToBitMask()
455 WriteHuffmanCode(bw, codes, 256 + code); in StoreImageToBitMask()
460 WriteHuffmanCode(bw, codes + 4, code); in StoreImageToBitMask()
490 // Create Huffman bit lengths and codes for each histogram image. in EncodeImageNoHuffman()
499 // Store Huffman codes. in EncodeImageNoHuffman()
501 HuffmanTreeCode* const codes = &huffman_codes[i]; in EncodeImageNoHuffman() local
502 if (!StoreHuffmanCode(bw, codes)) { in EncodeImageNoHuffman()
505 ClearHuffmanTreeIfOnlyOneSymbol(codes); in EncodeImageNoHuffman()
515 free(huffman_codes[0].codes); in EncodeImageNoHuffman()
559 // Create Huffman bit lengths and codes for each histogram image. in EncodeImageInternal()
608 // Store Huffman codes. in EncodeImageInternal()
612 HuffmanTreeCode* const codes = &huffman_codes[i]; in EncodeImageInternal() local
613 if (!StoreHuffmanCode(bw, codes)) goto Error; in EncodeImageInternal()
614 ClearHuffmanTreeIfOnlyOneSymbol(codes); in EncodeImageInternal()
628 free(huffman_codes->codes); in EncodeImageInternal()