// 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.
Status ColorCorrelation::DecodeDC(BitReader* br) { if (br->ReadFixedBits<1>() == 1) { // All default. returntrue;
}
SetColorFactor(U32Coder::Read(kColorFactorDist, br));
JXL_RETURN_IF_ERROR(F16Coder::Read(br, &base_correlation_x_)); if (std::abs(base_correlation_x_) > 4.0f) { return JXL_FAILURE("Base X correlation is out of range");
}
JXL_RETURN_IF_ERROR(F16Coder::Read(br, &base_correlation_b_)); if (std::abs(base_correlation_b_) > 4.0f) { return JXL_FAILURE("Base B correlation is out of range");
}
ytox_dc_ = static_cast<int>(br->ReadFixedBits<kBitsPerByte>()) +
std::numeric_limits<int8_t>::min();
ytob_dc_ = static_cast<int>(br->ReadFixedBits<kBitsPerByte>()) +
std::numeric_limits<int8_t>::min();
RecomputeDCFactors(); returntrue;
}
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.