[libjxl] Specify types for arguments to disambiguate calls to pow() (#47660)

This commit is contained in:
Albert Lee
2025-10-06 13:03:27 -04:00
committed by GitHub
parent 0fcfa0973a
commit 820a7fd9b5
5 changed files with 28 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
--- 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 &&

View File

@@ -8,6 +8,7 @@ vcpkg_from_github(
fix-dependencies.patch
avoid-exe-linker-flags.patch # https://github.com/libjxl/libjxl/pull/4229
msvc-remove-libm.patch
disambiguate-pow-calls.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@@ -1,7 +1,7 @@
{
"name": "libjxl",
"version-semver": "0.11.1",
"port-version": 3,
"port-version": 4,
"description": "JPEG XL image format reference implementation",
"homepage": "https://github.com/libjxl/libjxl",
"license": "BSD-3-Clause",

View File

@@ -4986,7 +4986,7 @@
},
"libjxl": {
"baseline": "0.11.1",
"port-version": 3
"port-version": 4
},
"libkeyfinder": {
"baseline": "2.2.8",

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ac044181841dbaf63e6403aa3931b944574b2bdf",
"version-semver": "0.11.1",
"port-version": 4
},
{
"git-tree": "ec154d710200dced15443c1c292fbfa623a18439",
"version-semver": "0.11.1",