-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from jingjingxyk/experiment-webui
添加libavif
- Loading branch information
Showing
20 changed files
with
429 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 快速启动容器环境 | ||
# 快速准备基于容器的构建环境 | ||
|
||
> 提供了 debian 11 构建 和 alpine 构建环境 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
use SwooleCli\Library; | ||
use SwooleCli\Preprocessor; | ||
|
||
return function (Preprocessor $p) { | ||
$aom_prefix = AOM_PREFIX; | ||
$lib = new Library('aom'); | ||
$lib->withHomePage('https://aomedia.googlesource.com/aom') | ||
->withLicense('https://aomedia.googlesource.com/aom/+/refs/heads/main/LICENSE', Library::LICENSE_SPEC) | ||
->withManual('https://aomedia.googlesource.com/aom') | ||
->withUrl('https://aomedia.googlesource.com/aom') | ||
->withFile('aom-v3.6.1.tar.gz') | ||
->withDownloadScript( | ||
'aom', | ||
<<<EOF | ||
git clone -b v3.6.1 --depth=1 https://aomedia.googlesource.com/aom | ||
EOF | ||
) | ||
->withPrefix($aom_prefix) | ||
->withBuildLibraryCached(true) | ||
->withCleanBuildDirectory() | ||
->withCleanPreInstallDirectory($aom_prefix) | ||
->withConfigure( | ||
<<<EOF | ||
mkdir -p build_dir | ||
cd build_dir | ||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX={$aom_prefix} \ | ||
-DCMAKE_C_STANDARD=11 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_C_STANDARD=11 \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DBUILD_STATIC_LIBS=ON \ | ||
-DENABLE_DOCS=OFF \ | ||
-DENABLE_EXAMPLES=OFF \ | ||
-DENABLE_TESTS=OFF \ | ||
-DENABLE_TOOLS=ON | ||
EOF | ||
) | ||
->withBinPath($aom_prefix . '/bin/') | ||
->withPkgName('aom'); | ||
|
||
$p->addLibrary($lib); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
|
||
use SwooleCli\Library; | ||
use SwooleCli\Preprocessor; | ||
|
||
return function (Preprocessor $p) { | ||
$dav1d_prefix = DAV1D_PREFIX; | ||
$linux_pre_install=<<<EOF | ||
# library dav1d : | ||
apk add ninja python3 py3-pip nasm yasm | ||
pip3 install meson | ||
EOF; | ||
$macos_pre_install=<<<EOF | ||
export HOMEBREW_INSTALL_FROM_API=1 | ||
export HOMEBREW_NO_ANALYTICS=1 | ||
export HOMEBREW_NO_AUTO_UPDATE=1 | ||
brew install ninja python3 nasm | ||
# python3 -m pip install --upgrade pip | ||
pip3 install meson | ||
# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
EOF; | ||
$pre_install = $p->getOsType()=='macos' ? $macos_pre_install : $linux_pre_install; | ||
$p->addLibrary( | ||
(new Library('dav1d')) | ||
->withHomePage('https://code.videolan.org/videolan/dav1d/') | ||
->withLicense('https://code.videolan.org/videolan/dav1d/-/blob/master/COPYING', Library::LICENSE_BSD) | ||
->withManual('https://code.videolan.org/videolan/dav1d') | ||
//->withUrl('https://code.videolan.org/videolan/dav1d/-/archive/1.2.1/dav1d-1.2.1.tar.gz') | ||
//->withFile('dav1d-1.2.1.tar.gz') | ||
->withFile('dav1d-git-1.2.1.tar.gz') | ||
->withDownloadScript( | ||
'dav1d', | ||
<<<EOF | ||
git clone -b 1.2.1 --depth=1 --progress https://code.videolan.org/videolan/dav1d.git | ||
EOF | ||
) | ||
->withPrefix($dav1d_prefix) | ||
->withBuildLibraryCached(true) | ||
->withCleanBuildDirectory() | ||
->withCleanPreInstallDirectory($dav1d_prefix) | ||
->withPreInstallCommand($pre_install) | ||
->withBuildScript( | ||
<<<EOF | ||
meson setup build \ | ||
-Dprefix={$dav1d_prefix} \ | ||
-Dbackend=ninja \ | ||
-Dbuildtype=release \ | ||
-Ddefault_library=static \ | ||
-Db_staticpic=true \ | ||
-Db_pie=true \ | ||
-Dprefer_static=true \ | ||
-Denable_asm=true \ | ||
-Denable_tools=true \ | ||
-Denable_examples=false \ | ||
-Denable_tests=false \ | ||
-Denable_docs=false \ | ||
-Dlogging=false \ | ||
-Dfuzzing_engine=none | ||
meson compile -C build | ||
ninja -C build | ||
ninja -C build install | ||
EOF | ||
) | ||
->withPkgName('dav1d') | ||
->withBinPath($dav1d_prefix . '/bin/') | ||
->withDependentLibraries('sdl2') | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
use SwooleCli\Library; | ||
use SwooleCli\Preprocessor; | ||
|
||
return function (Preprocessor $p) { | ||
$libavif_prefix = LIBAVIF_PREFIX; | ||
$libyuv_prefix = LIBYUV_PREFIX; | ||
$dav1d_prefix = DAV1D_PREFIX; | ||
$libgav1_prefix = LIBGAV1_PREFIX; | ||
$aom_prefix = AOM_PREFIX; | ||
$libwebp_prefix = WEBP_PREFIX; | ||
$svt_av1_prefix = SVT_AV1_PREFIX; | ||
$p->addLibrary( | ||
(new Library('libavif')) | ||
->withHomePage('https://aomediacodec.github.io/av1-avif/') | ||
->withLicense('https://github.com/AOMediaCodec/libavif/', Library::LICENSE_BSD) | ||
->withManual('https://github.com/AOMediaCodec/libavif/ext/') | ||
->withUrl('https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.11.1.tar.gz') | ||
->withFile('libavif-v0.11.1.tar.gz') | ||
->withPrefix($libavif_prefix) | ||
->withBuildLibraryCached(true) | ||
->withCleanBuildDirectory() | ||
->withCleanPreInstallDirectory($libavif_prefix) | ||
->withConfigure( | ||
<<<EOF | ||
mkdir -p build | ||
cd build | ||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX={$libavif_prefix} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DBUILD_STATIC_LIBS=ON \ | ||
-DAVIF_BUILD_EXAMPLES=OFF \ | ||
-DCMAKE_DISABLE_FIND_PACKAGE_libyuv=ON \ | ||
-DCMAKE_DISABLE_FIND_PACKAGE_libsharpyuv=ON \ | ||
-Dsvt_ROOT={$svt_av1_prefix} \ | ||
-Daom_ROOT={$aom_prefix} \ | ||
-Dlibgav1_ROOT={$libgav1_prefix} \ | ||
-Ddav1d_ROOT={$dav1d_prefix} \ | ||
-DAVIF_CODEC_AOM=ON \ | ||
-DAVIF_CODEC_DAV1D=ON \ | ||
-DAVIF_CODEC_LIBGAV1=ON \ | ||
-DAVIF_CODEC_RAV1E=OFF \ | ||
-DAVIF_CODEC_SVT=ON | ||
# -Dlibyuv_ROOT={$libyuv_prefix} \ | ||
# -DLIBYUV_INCLUDE_DIR={$libyuv_prefix}/include \ | ||
# -DLIBYUV_LIBRARY={$libyuv_prefix}/lib | ||
# -DLIBSHARPYUV_INCLUDE_DIR={$libwebp_prefix}/include \ | ||
# -DLIBSHARPYUV_LIBRARY={$libwebp_prefix}/include | ||
EOF | ||
) | ||
->withPkgName('libavif') | ||
->withDependentLibraries( | ||
'aom', | ||
'svt_av1', | ||
'libgav1', | ||
'dav1d', | ||
) | ||
# 'libyuv', 'libsharpyuv','rav1e' | ||
# 'libgav1' 依赖 absl | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.