// 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.
// Tile is the rectangular grid of blocks that share color correlation // parameters ("factor_x/b" such that residual_b = blue - Y * factor_b). static constexpr size_t kColorTileDim = 64;
static_assert(kColorTileDim % kBlockDim == 0, "Color tile dim should be divisible by block dim"); static constexpr size_t kColorTileDimInBlocks = kColorTileDim / kBlockDim;
static_assert(kGroupDimInBlocks % kColorTileDimInBlocks == 0, "Group dim should be divisible by color tile dim");
// JPEG DCT coefficients are at most 1024. CfL constants are at most 127, and // the ratio of two entries in a JPEG quantization table is at most 255. Thus, // since the CfL denominator is 84, this leaves 12 bits of mantissa to be used. // For extra caution, we use 11. static constexpr uint8_t kCFLFixedPointPrecision = 11;
// We consider a CfL map to be JPEG-reconstruction-compatible if base // correlation is 0, no DC correlation is used, and we use the default color // factor. bool IsJPEGCompatible() const { return base_correlation_x_ == 0 && base_correlation_b_ == 0 &&
ytob_dc_ == 0 && ytox_dc_ == 0 &&
color_factor_ == kDefaultColorFactor;
}
// xsize/ysize are in pixels // set XYB=false to do something close to no-op cmap (needed for now since // cmap is mandatory) static StatusOr<ColorCorrelationMap> Create(JxlMemoryManager* memory_manager,
size_t xsize, size_t ysize, bool XYB = true);
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.