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

[Buildstream SDK] x265 encoder support #15864

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

philn
Copy link
Member

@philn philn commented Jul 15, 2023

ca2221a

[Buildstream SDK] x265 encoder support
https://bugs.webkit.org/show_bug.cgi?id=259242

Reviewed by Carlos Alberto Lopez Perez.

For WPT WebCodec tests we need an HEVC software encoder, since the bots don't have GPU capabilities
for hardware encoding.

* Tools/buildstream/elements/freedesktop-sdk.bst:
* Tools/buildstream/elements/sdk-platform.bst:
* Tools/buildstream/patches/fdo-0009-gst-plugins-bad-Enable-x265-encoder.patch: Added.

Canonical link: https://commits.webkit.org/266098@main

a42b305

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@philn philn self-assigned this Jul 15, 2023
@philn philn added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Jul 15, 2023
@philn philn requested a review from clopez July 15, 2023 14:32
Comment on lines +254 to +273
+- if(ARM AND CROSS_COMPILE_ARM)
+- if(ARM64)
+- set(ARM_ARGS -fPIC)
+- else()
+- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+- endif()
+- message(STATUS "cross compile arm")
+- elseif(ARM)
+- if(ARM64)
+- set(ARM_ARGS -fPIC)
+- add_definitions(-DHAVE_NEON)
+- else()
+- find_package(Neon)
+- if(CPU_HAS_NEON)
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
+- add_definitions(-DHAVE_NEON)
+- else()
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
+- endif()
+- endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic doesn't make much sense to me.

  1. Why making a difference between the flags passed to the compiler when cross-compiling and when not?. We do care about redistributable binaries on the SDK. So we should always build with compatible flags to the minimum baseline supported at run-time and not use as baseline whatever the CPU that builds the SDK happens to have. So I suggest to avoid using flags like -mcpu=native
  2. Why use march=armv6 -mfloat-abi=soft for ARMv7 when cross-compiling but end using -mcpu=native -mfloat-abi=hard when building natively for ARMv7?

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied those patches from https://github.com/rpmfusion/x265/
I can remove the ones related with armv6/7 if needed, we don't support those legacy arches anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, is fine I guess. If in the end we end supporting armv7 this needs an update but right now we don't support it.

Comment on lines +295 to +304
+- if(ARM AND CROSS_COMPILE_ARM)
+- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+- elseif(ARM)
+- find_package(Neon)
+- if(CPU_HAS_NEON)
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
+- add_definitions(-DHAVE_NEON)
+- else()
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
+- endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

same here than commented above.

@philn philn added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jul 17, 2023
https://bugs.webkit.org/show_bug.cgi?id=259242

Reviewed by Carlos Alberto Lopez Perez.

For WPT WebCodec tests we need an HEVC software encoder, since the bots don't have GPU capabilities
for hardware encoding.

* Tools/buildstream/elements/freedesktop-sdk.bst:
* Tools/buildstream/elements/sdk-platform.bst:
* Tools/buildstream/patches/fdo-0009-gst-plugins-bad-Enable-x265-encoder.patch: Added.

Canonical link: https://commits.webkit.org/266098@main
@webkit-commit-queue
Copy link
Collaborator

Committed 266098@main (ca2221a): https://commits.webkit.org/266098@main

Reviewed commits have been landed. Closing PR #15864 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ca2221a into WebKit:main Jul 17, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jul 17, 2023
@philn philn deleted the eng/259242 branch July 17, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
4 participants