mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
libjxl: exclude terse static assert from building
This commit is contained in:
parent
687c0437ff
commit
f428ae64da
6 changed files with 12 additions and 0 deletions
|
|
@ -200,8 +200,10 @@ static std::vector<uint16_t> CreateTableCurve(bool tone_map) {
|
||||||
// TODO(sboukortt): make this variable?
|
// TODO(sboukortt): make this variable?
|
||||||
static constexpr float kPQIntensityTarget = 10000;
|
static constexpr float kPQIntensityTarget = 10000;
|
||||||
|
|
||||||
|
#if 0
|
||||||
static_assert(N <= 4096); // ICC MFT2 only allows 4K entries
|
static_assert(N <= 4096); // ICC MFT2 only allows 4K entries
|
||||||
static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG);
|
static_assert(tf == ExtraTF::kPQ || tf == ExtraTF::kHLG);
|
||||||
|
#endif
|
||||||
|
|
||||||
static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
|
static constexpr Vector3 kLuminances{1.f / 3, 1.f / 3, 1.f / 3};
|
||||||
Rec2408ToneMapperBase tone_mapper(
|
Rec2408ToneMapperBase tone_mapper(
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ void SingleFromSingleAccurate(const size_t xsize,
|
||||||
Status int_to_float(const pixel_type* const JXL_RESTRICT row_in,
|
Status int_to_float(const pixel_type* const JXL_RESTRICT row_in,
|
||||||
float* const JXL_RESTRICT row_out, const size_t xsize,
|
float* const JXL_RESTRICT row_out, const size_t xsize,
|
||||||
const int bits, const int exp_bits) {
|
const int bits, const int exp_bits) {
|
||||||
|
#if 0
|
||||||
static_assert(sizeof(pixel_type) == sizeof(float));
|
static_assert(sizeof(pixel_type) == sizeof(float));
|
||||||
|
#endif
|
||||||
if (bits == 32) {
|
if (bits == 32) {
|
||||||
JXL_ENSURE(exp_bits == 8);
|
JXL_ENSURE(exp_bits == 8);
|
||||||
memcpy(row_out, row_in, xsize * sizeof(float));
|
memcpy(row_out, row_in, xsize * sizeof(float));
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,9 @@ void EncodeKeyword(const Tag& keyword, uint8_t* data, size_t size, size_t pos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Status AppendKeyword(const Tag& keyword, PaddedBytes* data) {
|
Status AppendKeyword(const Tag& keyword, PaddedBytes* data) {
|
||||||
|
#if 0
|
||||||
static_assert(std::tuple_size<Tag>{} == 4);
|
static_assert(std::tuple_size<Tag>{} == 4);
|
||||||
|
#endif
|
||||||
return data->append(keyword);
|
return data->append(keyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,8 +147,10 @@ class Plane : public detail::PlaneBase {
|
||||||
static StatusOr<Plane> Create(JxlMemoryManager* memory_manager,
|
static StatusOr<Plane> Create(JxlMemoryManager* memory_manager,
|
||||||
const size_t xsize, const size_t ysize,
|
const size_t xsize, const size_t ysize,
|
||||||
const size_t pre_padding = 0) {
|
const size_t pre_padding = 0) {
|
||||||
|
#if 0
|
||||||
static_assert(sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 ||
|
static_assert(sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 ||
|
||||||
sizeof(T) == 8);
|
sizeof(T) == 8);
|
||||||
|
#endif
|
||||||
uint32_t xsize32 = static_cast<uint32_t>(xsize);
|
uint32_t xsize32 = static_cast<uint32_t>(xsize);
|
||||||
uint32_t ysize32 = static_cast<uint32_t>(ysize);
|
uint32_t ysize32 = static_cast<uint32_t>(ysize);
|
||||||
JXL_ENSURE(xsize32 == xsize);
|
JXL_ENSURE(xsize32 == xsize);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,9 @@ static inline pixel_type Scale(uint64_t value, uint64_t bit_depth) {
|
||||||
// return (value * ((static_cast<pixel_type_w>(1) << bit_depth) - 1)) / denom;
|
// return (value * ((static_cast<pixel_type_w>(1) << bit_depth) - 1)) / denom;
|
||||||
// We only call this function with kSmallCube or kLargeCube - 1 as denom,
|
// We only call this function with kSmallCube or kLargeCube - 1 as denom,
|
||||||
// allowing us to avoid a division here.
|
// allowing us to avoid a division here.
|
||||||
|
#if 0
|
||||||
static_assert(denom == 4);
|
static_assert(denom == 4);
|
||||||
|
#endif
|
||||||
return (value * ((static_cast<uint64_t>(1) << bit_depth) - 1)) >> 2;
|
return (value * ((static_cast<uint64_t>(1) << bit_depth) - 1)) >> 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,9 @@ struct QuantEncodingInternal {
|
||||||
|
|
||||||
template <size_t A>
|
template <size_t A>
|
||||||
static constexpr QuantEncodingInternal Library() {
|
static constexpr QuantEncodingInternal Library() {
|
||||||
|
#if 0
|
||||||
static_assert(A < kNumPredefinedTables);
|
static_assert(A < kNumPredefinedTables);
|
||||||
|
#endif
|
||||||
return QuantEncodingInternal(Tag<kQuantModeLibrary>(), A);
|
return QuantEncodingInternal(Tag<kQuantModeLibrary>(), A);
|
||||||
}
|
}
|
||||||
constexpr QuantEncodingInternal(Tag<kQuantModeLibrary> /* tag */,
|
constexpr QuantEncodingInternal(Tag<kQuantModeLibrary> /* tag */,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue