compressed_dc.h (1231B)
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_COMPRESSED_DC_H_ 7 #define LIB_JXL_COMPRESSED_DC_H_ 8 9 #include <jxl/memory_manager.h> 10 11 #include "lib/jxl/ac_context.h" 12 #include "lib/jxl/base/data_parallel.h" 13 #include "lib/jxl/base/rect.h" 14 #include "lib/jxl/base/status.h" 15 #include "lib/jxl/frame_header.h" 16 #include "lib/jxl/image.h" 17 #include "lib/jxl/modular/modular_image.h" 18 19 // DC handling functions: encoding and decoding of DC to and from bitstream, and 20 // related function to initialize the per-group decoder cache. 21 22 namespace jxl { 23 24 // Smooth DC in already-smooth areas, to counteract banding. 25 Status AdaptiveDCSmoothing(JxlMemoryManager* memory_manager, 26 const float* dc_factors, Image3F* dc, 27 ThreadPool* pool); 28 29 void DequantDC(const Rect& r, Image3F* dc, ImageB* quant_dc, const Image& in, 30 const float* dc_factors, float mul, const float* cfl_factors, 31 const YCbCrChromaSubsampling& chroma_subsampling, 32 const BlockCtxMap& bctx); 33 34 } // namespace jxl 35 36 #endif // LIB_JXL_COMPRESSED_DC_H_