Skip to content

x265: enable multibitdepth on aarch64-linux#493861

Closed
JamieMagee wants to merge 0 commit intoNixOS:stagingfrom
JamieMagee:x265-aarch64-multibitdepth
Closed

x265: enable multibitdepth on aarch64-linux#493861
JamieMagee wants to merge 0 commit intoNixOS:stagingfrom
JamieMagee:x265-aarch64-multibitdepth

Conversation

@JamieMagee
Copy link
Member

@JamieMagee JamieMagee commented Feb 25, 2026

The multibitdepthSupport parameter currently excludes aarch64-linux:

multibitdepthSupport ? (
  stdenv.hostPlatform.is64bit && !(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux)
),

This exclusion was added with the original multibitdepth support in #92052 (2020), back when x265 3.x didn't have 10-bit or 12-bit aarch64 assembly primitives. The PFX macro would expand to symbols like x265_12bit_pixel_satd_4x4_neon that didn't exist, causing link failures (see #154347 for details).

x265 has had working aarch64 HBD support since 4.0 (release notes).

Without multibitdepth, the only supported pixel format on aarch64 is yuv420p (8-bit). Any 10-bit input, which is common from modern cameras, causes ffmpeg's libx265 encoder to fail with:

[libx265] Invalid video pixel format: -1

I hit this running Home Assistant's stream component on a Raspberry Pi 5. Camera streams using HEVC would crash in PyAV's avcodec_open2(libx265) call.

This PR removes the aarch64-linux exclusion so multibitdepthSupport is just stdenv.hostPlatform.is64bit.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The PR's base branch is set to master, but this PR causes 13832 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Feb 25, 2026
@JamieMagee JamieMagee changed the base branch from master to staging February 25, 2026 00:54
@nixpkgs-ci nixpkgs-ci bot closed this Feb 25, 2026
@nixpkgs-ci nixpkgs-ci bot reopened this Feb 25, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The PR's base branch is set to staging, but 8 commits from the master branch are included. Make sure you know the right base branch for your changes, then:

  • If the changes should go to the master branch, change the base branch.
  • If the changes should go to the staging branch, rebase your PR onto the correct merge-base:
    # git rebase --onto $(git merge-base upstream/staging HEAD) $(git merge-base upstream/master HEAD)
    git rebase --onto 46ca68c26436e0678e396ce7acd756d482401942 22874fc8a1c78712f082120ae9555eb57cd57dd1
    git push --force-with-lease

@JamieMagee JamieMagee closed this Feb 25, 2026
@JamieMagee JamieMagee force-pushed the x265-aarch64-multibitdepth branch from 250086a to f4b1044 Compare February 25, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant