Build info string for ARM64 build shows 32bit not 64bit

Issue #597 new
Former user created an issue

Thebuild information output current only displays 64 bit for IA64 architecture and still displays 32bit for ARM64 architectures e.g

x265 [info]: HEVC encoder version 3.4+28-419182243 x265 [info]: build info [Mac OS X][clang 12.0.5][32 bit] 8bit x265 [info]: using cpu capabilities: NEON

Comments (4)

  1. Adrian Ho

    It may not just be a cosmetic issue. I just tried running an x265 FFMPEG encoding job on an M1 Mac and a 10th gen Intel box, both using Homebrew-built binaries and encoding to/from internal SSDs, and the latter clocks 1.3x encoding speed, while the M1 Mac only manages 0.3x. Had me scratching my head until I noticed the “32 bit” diagnostic message.

  2. vargolsoft

    I’m surprised Homebrew is actually picking up any NEON asm at all, the current release code’s asm is not readable by clang’s assembler and 3.5 was tagged 5 months before the assembler was ‘fixed’ or Apple’s intrinsics were added.

    So assuming they managed to compile with the asm, that version is ~ half speed compared to the version with Apple’s intrinsics. In my testing I get ~ 21.6 frames per second with intrinsics and 11.9 fps with the included asm, that's on a video thats 2538x1080 with parameters -crf 23 -a:c copy (oh…I’m testing via a home built ffmpeg not the x265 encoder using an 8Gb M1 mac mini).

    If you’re interested the noasm version from macports was 7.23 fps and x86 under Rosetta was 13.18 fps for the same video.

  3. Adrian Ho

    Now that you mention it, the config info dumped by Homebrew x265 reads:

    x265 [info]: HEVC encoder version 3.4+31-6722fce1f
    x265 [info]: build info [Mac OS X][clang 13.0.0][32 bit][noasm] 8bit+10bit+12bit
    x265 [info]: using cpu capabilities: none!
    

    so I guess noasm + no cpu capabilities = ridiculously poor performance.

    3.5 was tagged 5 months before the assembler was ‘fixed’ or Apple’s intrinsics were added.

    So does this mean we have to wait for 3.6 for x265 on Apple Silicon to be “rocket-boosted”?

  4. vargolsoft

    Yes, it probably does, you could build your own from this git repo’s HEAD, but it needs a patch if you need a multi-lib (8, 10 and 12 bit encoding) binary.

    See….

    https://bitbucket.org/multicoreware/x265_git/issues/608/compile-issue-for-high-bit-rate-on-apple

    My ffmpeg build script is on GitHub, its not an all encompassing version, but builds includes the most commonly used stuff and will build a 3.4 version with the Apple intrinsic patch or there’s a branch to build from HEAD , with a patch to fix the asm where its still used along side the intrinsics.

    https://github.com/Vargol/ffmpeg-apple-arm64-build

    The only assumption it makes its that the Xcode command line stuff is installed.

  5. Log in to comment