On Mon, 22 Sep 2025, harish.rajaselvan--- via ffmpeg-devel wrote:
I have been working on enabling ARM64EC compilation and have
successfully built FFmpeg binaries for this target. To achieve this it
required modifications to the build configuration files and to the
gas-preprocessor.pl script (maintained in
https://github.com/FFmpeg/gas-preprocessor). Should changes to
gas-preprocessor.pl be submitted as a pull request to its repository, or
also sent to this mailing list for review?
I'm not sure if we have a policy for this; reviewing it on the mailing
list probably gives it more visibility than as a PR in a repo that very
few follows.
I would like to submit these patches upstream for review and feedback
from the community in the near future in this thread. Please let us know
if we can proceed with submitting them, or if there are any challenges
we should anticipate for enabling for this target.
Feel free to send patches for review - although I cannot guarantee that we
are willing to integrate the changes.
As far as I can see, for building for ARM64EC with MSVC, the changes
required mainly are for passing "-machine:arm64ec" to lib.exe, and for
filtering out the -arm64EC option from the compiler command in
gas-preprocessor.pl.
Such changes probably are straightforward and probably can be accepted.
If building with https://github.com/mstorsjo/llvm-mingw/releases (with the
latest 2 releases), no such changes are needed, and it's possible to
configure a build with just "--cross-prefix=arm64ec-w64-mingw32-
--target-os=mingw32 --arch=aarch64".
The other, much more major issue, is that all aarch64 assembly may need to
be tweaked to work in ARM64EC mode. This may need rewrites (or ugly
conditionals) to avoid using registers that are forbidden in ARM64EC mode.
(Building with Clang makes this aspect much more straightforward, as Clang
gives warnings about the use of forbidden registers, like "warning:
register Q25 is disallowed on ARM64EC.".)
We would have to see the proposed patches to see if these changes are
palatable or if they are too outrageous for us to want to take them
upstream.
Additionally, I would like to know the point of contact for hosting
ARM64EC binaries (for example, via btbn or gyan.dev), so that people
targeting this platform can have access to FFmpeg builds for this
target.
Upstream ffmpeg can't make any promises about this; you'd have to convince
the developers providing those builds to do it. Personally, I'm
unconvinced.
For users of the plain ffmpeg.exe binaries, I don't see any reason why
anyone would want to run an ARM64EC version rather than a plain regular
ARM64 build. (The main theoretical reason is if intending to load a binary
x86_64 plugin, but I don't know what plugins that would be?)
The main reason for wanting an ARM64EC build of ffmpeg is for integrating
into an app that still runs in emulated x86_64 mode - then you'd want
linking against the libraries and not just using the commandline
executable. I'm not familiar with those binary distributions, whether they
include such libraries as well, or only the end executables. If they do
provide libraries as well, I could see some value in it, but it's of
course totally up to them whether they feel it's worth the effort (I doubt
it).
// Martin
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]