Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MinGW32 CI. #1887

Merged
merged 1 commit into from
Dec 18, 2023
Merged

Add MinGW32 CI. #1887

merged 1 commit into from
Dec 18, 2023

Conversation

vrabaud
Copy link
Collaborator

@vrabaud vrabaud commented Dec 18, 2023

It is good to have this CI as this is the only one we have on 32 bit.

@vrabaud vrabaud merged commit 29b0d2e into AOMediaCodec:main Dec 18, 2023
21 checks passed
@vrabaud vrabaud deleted the mingw branch December 18, 2023 15:09
@kmilos
Copy link
Contributor

kmilos commented Dec 18, 2023

FYI: https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages

Will still be around and useful for CI for while longer I guess...

@vrabaud
Copy link
Collaborator Author

vrabaud commented Dec 18, 2023

Thx @kmilos for the info! Please open up bugs or PRs if there is anything else required on the MinGW front.

@@ -52,7 +53,7 @@ TEST(TransferCharacteristicsTest, RoundTrip) {
}

if (tc == AVIF_TRANSFER_CHARACTERISTICS_LOG100) {
EXPECT_EQ(min_linear, kTransferLog100Threshold / 2.0f);
EXPECT_NEAR(min_linear, kTransferLog100Threshold / 2.0f, 1e-7);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The constants in line 56 and line 109 can have the f suffix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That matters because it is all about having bad float computations here... Done in #1888

@@ -13,7 +13,8 @@ namespace {
constexpr int kMaxTransferCharacteristic = 18;

// Thresholds in the transfer curve formulas.
constexpr float kTransferLog100Threshold = 0.01f;
// Add a little tolerance for test to pass on MinGW32.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to understand why we get different results on MinGW32. It seems that this test only does some float arithmetic and calls the powf() function. So it should get the same results on all platforms. Does this mean the powf() function on MinGW32 may return slightly different values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. So I copied the code over in the test and the values pass ... So is there a difference between the C and the C++ implementation ?? The main problem seems to also come from the constexpr because doing a dynamic comparison works ... I spent too much time on this already so just a little tolerance is fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants