// 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.
struct ImageOutput { // Pixel format of the output pixels, used for buffer and callback output.
JxlPixelFormat format; // Output bit depth for unsigned data types, used for float to int conversion.
size_t bits_per_sample; // Callback for line-by-line output.
PixelCallback callback; // Pixel buffer for image output. void* buffer;
size_t buffer_size; // Length of a row of image_buffer in bytes (based on oriented width).
size_t stride;
};
// Per-frame decoder state. All the images here should be accessed through a // group rect (either with block units or pixel units). struct PassesDecoderState { explicit PassesDecoderState(JxlMemoryManager* memory_manager)
: shared_storage(memory_manager),
frame_storage_for_referencing(memory_manager) {}
// Initialize the decoder state after all of DC is decoded.
Status InitForAC(size_t num_passes, ThreadPool* pool);
};
// Temp images required for decoding a single group. Reduces memory allocations // for large images because we only initialize min(#threads, #groups) instances. struct HWY_ALIGN_MAX GroupDecCache {
Status InitOnce(JxlMemoryManager* memory_manager, size_t num_passes,
size_t used_acs);
// Scratch space used by DecGroupImpl(). float* dec_group_block;
int32_t* dec_group_qblock;
int16_t* dec_group_qblock16;
// For TransformToPixels. float* scratch_space; // Note that scratch_space is never used at the same time as dec_group_qblock. // Moreover, only one of dec_group_qblock16 is ever used. // TODO(veluca): figure out if we can save allocations.
// AC decoding
Image3I num_nzeroes[kMaxNumPasses];
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.