libbpg-0.9.6

This commit is contained in:
King_DuckZ 2015-10-27 11:46:00 +01:00
parent 3035b41edf
commit 35a8402710
248 changed files with 232891 additions and 100 deletions

71
x265/build/README.txt Normal file
View file

@ -0,0 +1,71 @@
= Mandatory Prerequisites =
* GCC, MSVC (9, 10, 11, 12), Xcode or Intel C/C++
* CMake 2.8.8 or later http://www.cmake.org
* On linux, ccmake is helpful, usually a package named cmake-curses-gui
Note: MSVC12 requires cmake 2.8.11 or later
= Optional Prerequisites =
1. Yasm 1.2.0 or later, to compile assembly primitives (performance)
For Windows, download the latest yasm executable
http://yasm.tortall.net/Download.html and copy the EXE into
C:\Windows or somewhere else in your %PATH% that a 32-bit app (cmake)
can find it. If it is not in the path, you must manually tell cmake
where to find it. Note: you do not need the vsyasm packages, x265
does not use them. You only need the yasm executable itself.
On Linux, the packaged yasm may be older than 1.2, in which case
so you will need get the latest source and build it yourself.
Once YASM is properly installed, run cmake to regenerate projects. If you
do not see the below line in the cmake output, YASM is not in the PATH.
-- Found Yasm 1.3.0 to build assembly primitives
Now build the encoder and run x265 -V:
x265 [info]: using cpu capabilities: MMX, SSE2, ...
If cpu capabilities line says 'none!', then the encoder was built
without yasm.
2. VisualLeakDetector (Windows Only)
Download from https://vld.codeplex.com/releases and install. May need
to re-login in order for it to be in your %PATH%. Cmake will find it
and enable leak detection in debug builds without any additional work.
If VisualLeakDetector is not installed, cmake will complain a bit, but
it is completely harmless.
= Build Instructions Linux =
1. Use cmake to generate Makefiles: cmake ../source
2. Build x265: make
Or use our shell script which runs cmake then opens the curses GUI to
configure build options
1. cd build/linux ; ./make-Makefiles.bash
2. make
= Build Instructions Windows =
We recommend you use one of the make-solutions.bat files in the appropriate
build/ sub-folder for your preferred compiler. They will open the cmake-gui
to configure build options, click configure until no more red options remain,
then click generate and exit. There should now be an x265.sln file in the
same folder, open this in Visual Studio and build it.
= Version number considerations =
Note that cmake will update X265_VERSION each time cmake runs, if you are
building out of a Mercurial source repository. If you are building out of
a release source package, the version will not change. If Mercurial is not
found, the version will be "unknown".

View file

@ -0,0 +1,3 @@
#!/bin/bash
# Run this from within a bash shell
cmake -G "Unix Makefiles" ../../source && ccmake ../../source

41
x265/build/linux/multilib.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/sh
mkdir -p 8bit 10bit 12bit
cd 12bit
cmake ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
make ${MAKEFLAGS}
cd ../10bit
cmake ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
make ${MAKEFLAGS}
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
make ${MAKEFLAGS}
# rename the 8bit library, then combine all three into libx265.a
mv libx265.a libx265_main.a
uname=`uname`
if [ "$uname" = "Linux" ]
then
# 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
SAVE
END
EOF
else
# Mac/BSD libtool
libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null
fi

View file

@ -0,0 +1,3 @@
#!/bin/sh
# Run this from within an MSYS bash shell
cmake -G "MSYS Makefiles" ../../source && cmake-gui ../../source

View file

@ -0,0 +1,8 @@
#!/bin/sh
# This will generate a cross-compile environment, compiling an x86_64
# Win64 target from a 32bit MinGW32 host environment. If your MinGW
# install is 64bit, you can use the native compiler batch file:
# make-Makefiles.sh
cmake -G "MSYS Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-x86_64-w64-mingw32.cmake ../../source && cmake-gui ../../source

29
x265/build/msys/multilib.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/sh
mkdir -p 8bit 10bit 12bit
cd 12bit
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
make ${MAKEFLAGS}
cp libx265.a ../8bit/libx265_main12.a
cd ../10bit
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
make ${MAKEFLAGS}
cp libx265.a ../8bit/libx265_main10.a
cd ../8bit
cmake -G "MSYS Makefiles" ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
make ${MAKEFLAGS}
# rename the 8bit library, then combine all three into libx265.a using GNU ar
mv libx265.a libx265_main.a
ar -M <<EOF
CREATE libx265.a
ADDLIB libx265_main.a
ADDLIB libx265_main10.a
ADDLIB libx265_main12.a
SAVE
END
EOF

View file

@ -0,0 +1,9 @@
# cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
# specify the cross compiler
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
SET(CMAKE_ASM_YASM_COMPILER yasm)

View file

@ -0,0 +1,6 @@
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
SET(CMAKE_RANLIB x86_64-w64-mingw32-ranlib)
SET(CMAKE_ASM_YASM_COMPILER yasm)

View file

@ -0,0 +1,14 @@
@echo off
if "%VS100COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 10 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 10" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,14 @@
@echo off
if "%VS100COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 10 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 10 Win64" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,44 @@
@echo off
if "%VS100COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 10 not detected"
exit 1
)
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
@mkdir 12bit
@mkdir 10bit
@mkdir 8bit
@cd 12bit
cmake -G "Visual Studio 10 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main12.lib
)
@cd ..\10bit
cmake -G "Visual Studio 10 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
)
@cd ..\8bit
if not exist x265-static-main10.lib (
msg "%username%" "10bit build failed"
exit 1
)
if not exist x265-static-main12.lib (
msg "%username%" "12bit build failed"
exit 1
)
cmake -G "Visual Studio 10 Win64" ../../../source -DEXTRA_LIB="x265-static-main10.lib;x265-static-main12.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
:: combine static libraries (ignore warnings caused by winxp.cpp hacks)
move Release\x265-static.lib x265-static-main.lib
LIB.EXE /ignore:4006 /ignore:4221 /OUT:Release\x265-static.lib x265-static-main.lib x265-static-main10.lib x265-static-main12.lib
)
pause

View file

@ -0,0 +1,14 @@
@echo off
if "%VS110COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 11 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 11" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,14 @@
@echo off
if "%VS110COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 11 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 11 Win64" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,44 @@
@echo off
if "%VS110COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 11 not detected"
exit 1
)
call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
@mkdir 12bit
@mkdir 10bit
@mkdir 8bit
@cd 12bit
cmake -G "Visual Studio 11 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main12.lib
)
@cd ..\10bit
cmake -G "Visual Studio 11 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
)
@cd ..\8bit
if not exist x265-static-main10.lib (
msg "%username%" "10bit build failed"
exit 1
)
if not exist x265-static-main12.lib (
msg "%username%" "12bit build failed"
exit 1
)
cmake -G "Visual Studio 11 Win64" ../../../source -DEXTRA_LIB="x265-static-main10.lib;x265-static-main12.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
:: combine static libraries (ignore warnings caused by winxp.cpp hacks)
move Release\x265-static.lib x265-static-main.lib
LIB.EXE /ignore:4006 /ignore:4221 /OUT:Release\x265-static.lib x265-static-main.lib x265-static-main10.lib x265-static-main12.lib
)
pause

View file

@ -0,0 +1,14 @@
@echo off
if "%VS120COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 12 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 12" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,14 @@
@echo off
if "%VS120COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 12 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 12 Win64" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,44 @@
@echo off
if "%VS120COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 12 not detected"
exit 1
)
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
@mkdir 12bit
@mkdir 10bit
@mkdir 8bit
@cd 12bit
cmake -G "Visual Studio 12 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main12.lib
)
@cd ..\10bit
cmake -G "Visual Studio 12 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
)
@cd ..\8bit
if not exist x265-static-main10.lib (
msg "%username%" "10bit build failed"
exit 1
)
if not exist x265-static-main12.lib (
msg "%username%" "12bit build failed"
exit 1
)
cmake -G "Visual Studio 12 Win64" ../../../source -DEXTRA_LIB="x265-static-main10.lib;x265-static-main12.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
:: combine static libraries (ignore warnings caused by winxp.cpp hacks)
move Release\x265-static.lib x265-static-main.lib
LIB.EXE /ignore:4006 /ignore:4221 /OUT:Release\x265-static.lib x265-static-main.lib x265-static-main10.lib x265-static-main12.lib
)
pause

View file

@ -0,0 +1,14 @@
@echo off
if "%VS90COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 9 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 9 2008" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,14 @@
@echo off
if "%VS90COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 9 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)

View file

@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 9 2008 Win64" ..\..\source && cmake-gui ..\..\source

View file

@ -0,0 +1,44 @@
@echo off
if "%VS90COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 9 not detected"
exit 1
)
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
@mkdir 12bit
@mkdir 10bit
@mkdir 8bit
@cd 12bit
cmake -G "Visual Studio 9 2008 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main12.lib
)
@cd ..\10bit
cmake -G "Visual Studio 9 2008 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
)
@cd ..\8bit
if not exist x265-static-main10.lib (
msg "%username%" "10bit build failed"
exit 1
)
if not exist x265-static-main12.lib (
msg "%username%" "12bit build failed"
exit 1
)
cmake -G "Visual Studio 9 2008 Win64" ../../../source -DEXTRA_LIB="x265-static-main10.lib;x265-static-main12.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
:: combine static libraries (ignore warnings caused by winxp.cpp hacks)
move Release\x265-static.lib x265-static-main.lib
LIB.EXE /ignore:4006 /ignore:4221 /OUT:Release\x265-static.lib x265-static-main.lib x265-static-main10.lib x265-static-main12.lib
)
pause

View file

@ -0,0 +1,2 @@
#!/bin/sh
cmake -G "Xcode" ../../source && ccmake ../../source