Deps: add x265 support #120079

Closed
Ray molenkamp wants to merge 2 commits from LazyDodo/blender:tmp_x265 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This adds x265 support to our ffmpeg in 8/10/12 bit flavors, tested only on windows currently, linux/mac may need small tweaks.

This adds x265 support to our ffmpeg in 8/10/12 bit flavors, tested only on windows currently, linux/mac may need small tweaks.
Ray molenkamp changed title from WIP: Deps: add x265 support to Deps: add x265 support 2024-05-21 21:53:26 +02:00
Ray molenkamp requested review from Campbell Barton 2024-05-30 15:07:18 +02:00
Ray molenkamp requested review from Raul Fernandez Hernandez 2024-05-30 15:07:19 +02:00
Ray molenkamp requested review from Anthony Roberts 2024-05-30 15:07:19 +02:00

In macos it fails to compile deps with error:

[ 81%] Built target external_x264
[ 82%] Built target external_x265_12
[ 84%] Built target external_x265_10
[ 84%] Performing build step for 'external_x265'
[ 46%] Built target common
[ 67%] Built target encoder
[ 86%] Built target x265-static
make[5]: *** No rule to make target /Users/raulito/blender-git/build_darwin/deps/Release/x265_12/lib/x265-static.a', needed by x265'. Stop.
make[4]: *** [CMakeFiles/cli.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [build/x265/src/external_x265-stamp/external_x265-build] Error 2
make[1]: *** [CMakeFiles/external_x265.dir/all] Error 2
make: *** [all] Error 2

In macos it fails to compile deps with error: > [ 81%] Built target external_x264 > [ 82%] Built target external_x265_12 > [ 84%] Built target external_x265_10 > [ 84%] Performing build step for 'external_x265' > [ 46%] Built target common > [ 67%] Built target encoder > [ 86%] Built target x265-static > make[5]: *** No rule to make target `/Users/raulito/blender-git/build_darwin/deps/Release/x265_12/lib/x265-static.a', needed by `x265'. Stop. > make[4]: *** [CMakeFiles/cli.dir/all] Error 2 > make[3]: *** [all] Error 2 > make[2]: *** [build/x265/src/external_x265-stamp/external_x265-build] Error 2 > make[1]: *** [CMakeFiles/external_x265.dir/all] Error 2 > make: *** [all] Error 2 >
Author
Member

You're gonna have to dive in and figure it out and update the PR, sofar you have gotten lucky and everything build out of the box, but it appears that luck has run out.

You're gonna have to dive in and figure it out and update the PR, sofar you have gotten lucky and everything build out of the box, but it appears that luck has run out.

This patch is an update which adds support for Linux.

  • Resolve library mis-match (reported by @farsthary).
  • Use GNU-AR to merge 8/10/12 bit libraries into a single static library.
  • Add -lpthread (needed for FFMPEG to link x265 test program).

I've left in logic for macOS that uses libtool to merge the library based on 419182243f/build/linux/multilib.sh (L38) but this is untested.

This patch is an update which adds support for Linux. - Resolve library mis-match (reported by @farsthary). - Use GNU-AR to merge 8/10/12 bit libraries into a single static library. - Add `-lpthread` (needed for FFMPEG to link x265 test program). I've left in logic for macOS that uses libtool to merge the library based on https://github.com/videolan/x265/blob/419182243fb2e2dfbe91dfc45a51778cf704f849/build/linux/multilib.sh#L38 but this is untested.

This is on my to-do list, but I only have one machine that has enough capacity for a lib build - currently it's working on #122242. I hope to get to this tomorrow, hopefully in time for bcon3.

This is on my to-do list, but I only have one machine that has enough capacity for a lib build - currently it's working on #122242. I hope to get to this tomorrow, hopefully in time for bcon3.
Ray molenkamp force-pushed tmp_x265 from ae36365f9b to 02fb8595a8 2024-06-04 15:00:59 +02:00 Compare
Author
Member

It's not as much the PR getting in it's also the platform devs having enough time to build / commit all these changes to git, and i gotta admit i think i was too late in prodding you guys, also having a whole bunch of different PR's annoyed me to no end, oh you just tested the dpcpp one, and now you're doing oiio, guess what's rebuilding? the old version of dpcpp! enjoy the 1 hour coffee break! ......

think for 4.3 i'm going back to a single branch with all lib updates in it, juggling this many PR's is just a massive pain in the rear.

It's not as much the PR getting in it's also the platform devs having enough time to build / commit all these changes to git, and i gotta admit i think i was too late in prodding you guys, also having a whole bunch of different PR's annoyed me to no end, oh you just tested the dpcpp one, and now you're doing oiio, guess what's rebuilding? the old version of dpcpp! enjoy the 1 hour coffee break! ...... think for 4.3 i'm going back to a single branch with all lib updates in it, juggling this many PR's is just a massive pain in the rear.

This patch is an update which adds support for Linux.

  • Resolve library mis-match (reported by @farsthary).
  • Use GNU-AR to merge 8/10/12 bit libraries into a single static library.
  • Add -lpthread (needed for FFMPEG to link x265 test program).

I've left in logic for macOS that uses libtool to merge the library based on 419182243f/build/linux/multilib.sh (L38) but this is untested.

Can confirm with this patch it also works on MacOS
Dependencies successfully built and installed

> This patch is an update which adds support for Linux. > > - Resolve library mis-match (reported by @farsthary). > - Use GNU-AR to merge 8/10/12 bit libraries into a single static library. > - Add `-lpthread` (needed for FFMPEG to link x265 test program). > > I've left in logic for macOS that uses libtool to merge the library based on https://github.com/videolan/x265/blob/419182243fb2e2dfbe91dfc45a51778cf704f849/build/linux/multilib.sh#L38 but this is untested. Can confirm with this patch it also works on MacOS Dependencies successfully built and installed
Anthony Roberts requested changes 2024-06-04 19:36:56 +02:00
Anthony Roberts left a comment
Member

Breaks Windows ARM64 as-is - figuring out how to make it work, should have something by tomorrow

Breaks Windows ARM64 as-is - figuring out how to make it work, should have something by tomorrow

Here is a commit that fixes it on Windows ARM64: e97d413bd8

Here is a commit that fixes it on Windows ARM64: https://projects.blender.org/Anthony-Roberts/blender/commit/e97d413bd8e582646ba6e4ba1886cd9963b6e963
Author
Member

You can just push directly to a PR using

git push git@projects.blender.org:their_username_here/blender.git your_local_branch_here:their_remote_branch

you can get most of this information from the top of any PR

image

so filling in the blanks you'd get:

git push git@projects.blender.org:LazyDodo/blender.git x265-fix-arm64:tmp_x265

You can just push directly to a PR using `git push git@projects.blender.org:their_username_here/blender.git your_local_branch_here:their_remote_branch` you can get most of this information from the top of any PR ![image](/attachments/9f05fac8-f539-442f-a67e-ec23e1ff22cb) so filling in the blanks you'd get: `git push git@projects.blender.org:LazyDodo/blender.git x265-fix-arm64:tmp_x265`
Anthony Roberts added 1 commit 2024-06-05 16:11:51 +02:00

Done!

Done!
Author
Member

landed in 880193d689

landed in 880193d689984eb3d80c8a4535c30e280ceb0a69
Ray molenkamp closed this pull request 2024-06-05 17:32:11 +02:00

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#120079
No description provided.