// 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.
static constexpr int kNeedMoreInput = 100; static constexpr int kHandleRestart = 101; static constexpr int kHandleMarkerProcessor = 102; static constexpr int kProcessNextMarker = 103; static constexpr size_t kAllHuffLutSize = NUM_HUFF_TBLS * kJpegHuffmanLutSize;
typedef int16_t coeff_t;
// State of the decoder that has to be saved before decoding one MCU in case // we run out of the bitstream. struct MCUCodingState {
coeff_t last_dc_coeff[kMaxComponents]; int eobrun;
coeff_t coeffs[D_MAX_BLOCKS_IN_MCU * DCTSIZE2];
};
} // namespace jpegli
// Use this forward-declared libjpeg struct to hold all our private variables. // TODO(szabadka) Remove variables that have a corresponding version in cinfo. struct jpeg_decomp_master { // // Input handling state. //
std::vector<uint8_t> input_buffer_;
size_t input_buffer_pos_; // Number of bits after codestream_pos_ that were already processed.
size_t codestream_bits_ahead_;
// Fields defined by SOF marker.
size_t iMCU_cols_; int h_factor[jpegli::kMaxComponents]; int v_factor[jpegli::kMaxComponents];
// Initialized at start of frame.
uint16_t scan_progression_[jpegli::kMaxComponents][DCTSIZE2];
// // Per scan state. //
size_t scan_mcu_row_;
size_t scan_mcu_col_;
size_t mcu_rows_per_iMCU_row_;
jpegli::coeff_t last_dc_coeff_[jpegli::kMaxComponents]; int eobrun_; int restarts_to_go_; int next_restart_marker_;
// Per channel and per frequency statistics about the number of nonzeros and // the sum of coefficient absolute values, used in dequantization bias // computation. int* nonzeros_; int* sumabs_;
size_t num_processed_blocks_[jpegli::kMaxComponents]; float* biases_; #define SAVED_COEFS 10 // This holds the coef_bits of the scan before the current scan, // i.e. the bottom half when rendering incomplete scans. int (*coef_bits_latch)[SAVED_COEFS]; int (*prev_coef_bits_latch)[SAVED_COEFS];
};
#endif// LIB_JPEGLI_DECODE_INTERNAL_H_
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
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.