Skip to content

Commit

Permalink
Fix bug in CHECK_ORDER_IS_VALID macro in functions with intrinsics (#696
Browse files Browse the repository at this point in the history
)

This fixes a few things I missed with #694
  • Loading branch information
ktmf01 authored May 1, 2024
1 parent 653b118 commit de80349
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libFLAC/fixed_intrin_avx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libFLAC/fixed_intrin_sse42.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit de80349

Please sign in to comment.