[Cin] x265 multidepth info

Andrew Randrianasulu randrianasulu at gmail.com
Sun Mar 3 20:46:02 CET 2019

Hello, all!

While watching slow Cinelerra-GG build in my emulated PowerPC machine I come to interesting 
observation: it seems x265 build itself just once, while 'multidepth' script provided in build/linux 
directory does three-times build (like it already done for x264 for Cinelerra's use, i think)


Multilib build instructions
Applications like ffmpeg and the x265 CLI which use our bit-depth introspection API (x265_api_get) instead of the globally exported C interface can select between 8 and 10bit libx265 libraries at runtime. To support this both libraries must be available either as shared libraries or as a pair of static libraries.
For shared libraries, just rename your 10bit libx265 as libx265_main10.[so|dll|dylib] and place it into your library load path.

For static libraries, you must disable the exported C APIs, since they would conflict with each other. For linux/Mac, you can use or adapt the build/linux/multilib.sh script. For Windows, there are similar vc*-x86_64/multilib.bat files that demonstrate how combined static libraries can be built.
See also multilib docs.



mkdir -p 8bit 10bit 12bit

cd 12bit

cd ../10bit

cd ../8bit
ln -sf ../10bit/libx265.a libx265_main10.a
ln -sf ../12bit/libx265.a libx265_main12.a
cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON

# rename the 8bit library, then combine all three into libx265.a
mv libx265.a libx265_main.a

if [ "$uname" = "Linux" ]

# On Linux, we use GNU ar to combine the static libraries together
ar -M <<EOF
CREATE libx265.a
ADDLIB libx265_main.a
ADDLIB libx265_main10.a
ADDLIB libx265_main12.a


# Mac/BSD libtool
libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null


strangely, I can't see script in current x265 github web interface, while it definitely is there in x265-3.0 directory 
as used by Cinelerra-GG!

Anyway, my emulated machine (or more accurately e5500 CPU, as used in this X5000 machine [1]) can't 
execute altivec instructions, so I force-disabled altivec for ffmpeg, x264, and x265. Waiting for results ...

[1] - https://www.amigaos.net/hardware/133/amigaone-x5000

More information about the Cin mailing list