// Copyright (c) the JPEG XL Project Authors. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.
class ModularFrameDecoder { public: explicit ModularFrameDecoder(JxlMemoryManager* memory_manager)
: memory_manager_(memory_manager), full_image(memory_manager) {} void Init(const FrameDimensions& frame_dim) { this->frame_dim = frame_dim; }
Status DecodeGlobalInfo(BitReader* reader, const FrameHeader& frame_header, bool allow_truncated_group);
Status DecodeGroup(const FrameHeader& frame_header, const Rect& rect,
BitReader* reader, int minShift, int maxShift, const ModularStreamId& stream, bool zerofill,
PassesDecoderState* dec_state,
RenderPipelineInput* render_pipeline_input, bool allow_truncated, bool* should_run_pipeline = nullptr); // Decodes a VarDCT DC group (`group_id`) from the given `reader`.
Status DecodeVarDCTDC(const FrameHeader& frame_header, size_t group_id,
BitReader* reader, PassesDecoderState* dec_state); // Decodes a VarDCT AC Metadata group (`group_id`) from the given `reader`.
Status DecodeAcMetadata(const FrameHeader& frame_header, size_t group_id,
BitReader* reader, PassesDecoderState* dec_state); // Decodes a RAW quant table from `br` into the given `encoding`, of size // `required_size_x x required_size_y`. If `modular_frame_decoder` is passed, // its global tree is used, otherwise no global tree is used. static Status DecodeQuantTable(JxlMemoryManager* memory_manager,
size_t required_size_x, size_t required_size_y,
BitReader* br, QuantEncoding* encoding,
size_t idx,
ModularFrameDecoder* modular_frame_decoder); // if inplace is true, this can only be called once // if it is false, it can be called multiple times (e.g. for progressive // steps)
Status FinalizeDecoding(const FrameHeader& frame_header,
PassesDecoderState* dec_state, jxl::ThreadPool* pool, bool inplace); bool have_dc() const { return have_something; } void MaybeDropFullImage(); bool UsesFullImage() const { return use_full_image; }
JxlMemoryManager* memory_manager() const { return memory_manager_; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.