vcpkg/ports/libjxl/disambiguate-pow-calls.patch

21 lines
872 B
Diff

--- a/lib/jxl/enc_ac_strategy.cc.orig Tue Nov 26 13:02:35 2024
+++ b/lib/jxl/enc_ac_strategy.cc Tue May 20 08:17:46 2025
@@ -486,7 +486,7 @@
}
float loss_scalar =
pow(GetLane(SumOfLanes(df8, loss)) / (num_blocks * kDCTBlockSize),
- 1.0 / 8.0) *
+ 1.0f / 8.0f) *
(num_blocks * kDCTBlockSize) / quant_norm16;
entropy *= entropy_mul;
entropy += config.info_loss_multiplier * loss_scalar;
@@ -569,7 +569,7 @@
tx.type == AcStrategyType::IDENTITY) &&
butteraugli_target < 5.0) {
static const float kFavor2X2AtHighQuality = 0.4;
- float weight = pow((5.0f - butteraugli_target) / 5.0f, 2.0);
+ float weight = pow((5.0f - butteraugli_target) / 5.0f, 2.0f);
entropy_mul -= kFavor2X2AtHighQuality * weight;
}
if ((tx.type != AcStrategyType::DCT && tx.type != AcStrategyType::DCT2X2 &&