dec_context_map.h (829B)
1 // Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 #ifndef LIB_JXL_DEC_CONTEXT_MAP_H_ 7 #define LIB_JXL_DEC_CONTEXT_MAP_H_ 8 9 #include <stddef.h> 10 #include <stdint.h> 11 12 #include <vector> 13 14 #include "lib/jxl/dec_bit_reader.h" 15 16 namespace jxl { 17 18 // Context map uses uint8_t. 19 constexpr size_t kMaxClusters = 256; 20 21 // Reads the context map from the bit stream. On calling this function, 22 // context_map->size() must be the number of possible context ids. 23 // Sets *num_htrees to the number of different histogram ids in 24 // *context_map. 25 Status DecodeContextMap(std::vector<uint8_t>* context_map, size_t* num_htrees, 26 BitReader* input); 27 28 } // namespace jxl 29 30 #endif // LIB_JXL_DEC_CONTEXT_MAP_H_