dec_context_map.h (883B)
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 <jxl/memory_manager.h> 10 11 #include <cstddef> 12 #include <cstdint> 13 #include <vector> 14 15 #include "lib/jxl/base/status.h" 16 #include "lib/jxl/dec_bit_reader.h" 17 18 namespace jxl { 19 20 // Reads the context map from the bit stream. On calling this function, 21 // context_map->size() must be the number of possible context ids. 22 // Sets *num_htrees to the number of different histogram ids in 23 // *context_map. 24 Status DecodeContextMap(JxlMemoryManager* memory_manager, 25 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_