Home | History | Annotate | Download | only in dec

Lines Matching refs:hdr

362   VP8LMetadata* const hdr = &dec->hdr_;
382 hdr->huffman_subsample_bits_ = huffman_precision;
471 hdr->huffman_image_ = huffman_image;
472 hdr->num_htree_groups_ = num_htree_groups;
473 hdr->htree_groups_ = htree_groups;
474 hdr->huffman_tables_ = huffman_tables;
692 static WEBP_INLINE HTreeGroup* GetHtreeGroupForPos(VP8LMetadata* const hdr,
694 const int meta_index = GetMetaIndex(hdr->huffman_image_, hdr->huffman_xsize_,
695 hdr->huffman_subsample_bits_, x, y);
696 assert(meta_index < hdr->num_htree_groups_);
697 return hdr->htree_groups_ + meta_index;
772 static int Is8bOptimizable(const VP8LMetadata* const hdr) {
774 if (hdr->color_cache_size_ > 0) return 0;
777 for (i = 0; i < hdr->num_htree_groups_; ++i) {
778 HuffmanCode** const htrees = hdr->htree_groups_[i].htrees;
953 VP8LMetadata* const hdr = &dec->hdr_;
958 const int mask = hdr->huffman_mask_;
960 (pos < last) ? GetHtreeGroupForPos(hdr, col, row) : NULL;
963 assert(Is8bOptimizable(hdr));
969 htree_group = GetHtreeGroupForPos(hdr, col, row);
1009 htree_group = GetHtreeGroupForPos(hdr, col, row);
1057 VP8LMetadata* const hdr = &dec->hdr_;
1063 const int color_cache_limit = len_code_limit + hdr->color_cache_size_;
1066 (hdr->color_cache_size_ > 0) ? &hdr->color_cache_ : NULL;
1067 const int mask = hdr->huffman_mask_;
1069 (src < src_last) ? GetHtreeGroupForPos(hdr, col, row) : NULL;
1083 htree_group = GetHtreeGroupForPos(hdr, col, row);
1155 if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row);
1287 static void InitMetadata(VP8LMetadata* const hdr) {
1288 assert(hdr != NULL);
1289 memset(hdr, 0, sizeof(*hdr));
1292 static void ClearMetadata(VP8LMetadata* const hdr) {
1293 assert(hdr != NULL);
1295 WebPSafeFree(hdr->huffman_image_);
1296 WebPSafeFree(hdr->huffman_tables_);
1297 VP8LHtreeGroupsFree(hdr->htree_groups_);
1298 VP8LColorCacheClear(&hdr->color_cache_);
1299 VP8LColorCacheClear(&hdr->saved_color_cache_);
1300 InitMetadata(hdr);
1344 VP8LMetadata* const hdr = &dec->hdr_;
1345 const int num_bits = hdr->huffman_subsample_bits_;
1349 hdr->huffman_xsize_ = VP8LSubSampleSize(width, num_bits);
1350 hdr->huffman_mask_ = (num_bits == 0) ? ~0 : (1 << num_bits) - 1;
1361 VP8LMetadata* const hdr = &dec->hdr_;
1392 hdr->color_cache_size_ = 1 << color_cache_bits;
1393 if (!VP8LColorCacheInit(&hdr->color_cache_, color_cache_bits)) {
1399 hdr->color_cache_size_ = 0;
1426 ClearMetadata(hdr);
1437 if (!is_level0) ClearMetadata(hdr); // Clean up temporary data behind.