Fix bug in CHECK_ORDER_IS_VALID macro in functions with intrinsics (#696)

This fixes a few things I missed with https://github.com/xiph/flac/pull/694
This commit is contained in:
Martijn van Beurden 2024-05-01 17:03:19 +02:00 committed by GitHub
parent 653b1187a1
commit de80349297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ if(shadow_error_##macro_order <= INT32_MAX) { \
order = macro_order; \
smallest_error = total_error_##macro_order ; \
} \
residual_bits_per_sample[ macro_order ] = (float)((total_error_0 > 0) ? log(M_LN2 * (double)total_error_0 / (double)data_len) / M_LN2 : 0.0); \
residual_bits_per_sample[ macro_order ] = (float)((total_error_##macro_order > 0) ? log(M_LN2 * (double)total_error_##macro_order / (double)data_len) / M_LN2 : 0.0); \
} \
else \
residual_bits_per_sample[ macro_order ] = 34.0f;

View File

@ -59,7 +59,7 @@ if(shadow_error_##macro_order <= INT32_MAX) { \
order = macro_order; \
smallest_error = total_error_##macro_order ; \
} \
residual_bits_per_sample[ macro_order ] = (float)((total_error_0 > 0) ? log(M_LN2 * (double)total_error_0 / (double)data_len) / M_LN2 : 0.0); \
residual_bits_per_sample[ macro_order ] = (float)((total_error_##macro_order > 0) ? log(M_LN2 * (double)total_error_##macro_order / (double)data_len) / M_LN2 : 0.0); \
} \
else \
residual_bits_per_sample[ macro_order ] = 34.0f;