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

Disable NEON acceleration on ARM since it's broken apparently #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BlueCyro
Copy link

After doing some research, it appears that ARM NEON acceleration for PNGs is just broken(?) apparently. In any case, trying to build this repository on ARM systems with NEON acceleration results in a missing symbol when trying to run the headless. (Tested on Ampere A1 ARM)

Simply disabling the neon acceleration fixes this and appears inconsequential to the usage of the library. Especially since everything gets converted to WebP and the NEON acceleration is particular to the PNG code.

@BlueCyro
Copy link
Author

As an addendum, this was used extensively on very active (15-20+ player) sessions and there have been no reports of noticeable performance degradation.

@Frooxius
Copy link
Member

Are you sure it's broken? Could it just be a compilation/tooling issue.

I'd rather not disable this, as that can have significant performance impacts. It's not something you'd notice with number of players, but rather specifically encoding/decoding PNG's, having it take longer than usual, so I don't think you'd catch it through reports like that.

It might be better idea to instead update libPNG to a newer version first if you're experiencing issues and see if that helps.

@BlueCyro
Copy link
Author

BlueCyro commented Oct 12, 2023

https://sourceforge.net/p/freeimage/bugs/325/

There's a comment here that outlines including the arm folder from upstream, but doing so appears to just... not do anything. The symbols for neon are still missing even with including that folder in the LibPNG folder. I've also tried to replace the LibPNG sources in FreeImage with brand new ones but I don't think the version of LibPNG that you can download yourself is made for FreeImage (it makes FreeImage fail to compile)

@Frooxius
Copy link
Member

None of the libraries FreeImage uses are made for FreeImage. If there are API changes or the new versions include new sources, you'll need to adjust FreeImage make files to include those new files and/or made adjustments to the FreeImage code itself to accommodate for the changes.

I had to do that when updating libWebP for example, just dropping the files in wouldn't work out of the box.

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.

2 participants