feat: enable libmfx

win-gcc
paring 2023-05-23 14:49:58 +09:00
parent dcb59ed774
commit d3a482effe
Signed by: pikokr
GPG Key ID: 1B9649C4DAEA1E7A
5 changed files with 10 additions and 13 deletions

3
build-win.sh Normal file → Executable file
View File

@ -1,4 +1,5 @@
export FFBUILD_FLAGS="--enable-ffnvcodec --enable-dxva2 --enable-amf"
export FFBUILD_FLAGS="--enable-ffnvcodec --enable-dxva2 --enable-amf --enable-libmfx"
export FFBUILD_PLATFORM="win"
export MFX_HOST=x86_64-w64-mingw32
FFMPEG_OS=mingw32 OPENH264_ARCH=x86_64 OPENH264_OS=mingw_nt CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ AR=x86_64-w64-mingw32-gcc-ar bash build.sh --arch x86_64

2
build-win32.sh Normal file → Executable file
View File

@ -1,4 +1,4 @@
export FFBUILD_FLAGS="--enable-ffnvcodec --enable-dxva2 --enable-amf"
export FFBUILD_FLAGS="--enable-ffnvcodec --enable-dxva2 --enable-amf --enable-libmfx"
export FFBUILD_PLATFORM="win"
FFMPEG_OS=mingw32 OPENH264_ARCH=i686 OPENH264_OS=mingw_nt CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ AR=i686-w64-mingw32-gcc-ar bash build.sh --arch i686

View File

@ -33,7 +33,7 @@ bash scripts/build-iconv.sh
case $FFBUILD_PLATFORM in
win)
bash scripts/build-ffnvcodec.sh
# bash scripts/build-libmfx.sh
bash scripts/build-libmfx.sh
;;
esac

View File

@ -9,7 +9,7 @@ git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF -b v1.4.29 $amfPath --
cd $ffmpegPath
# git am ../../patches/ffmpeg/*
git am ../../patches/ffmpeg/*
cp -r $amfPath/amf/public/include $PREFIX/include/AMF

View File

@ -9,22 +9,18 @@ cd $projectDir
git init
git remote add origin https://github.com/lu-zero/mfx_dispatch
git fetch --depth 1 origin "1.35.1"
git fetch --depth 1 origin "5a3f178be7f406cec920b9f52f46c1ae29f29bb2"
git checkout FETCH_HEAD
git am ../../patches/mfx/*
rm -rf build
mkdir build
cd build
export CFLAGS="$CFLAGS -static-libgcc -static-libstdc++ -static"
export CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++ -static"
export LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release ..
autoreconf -i
cmake --build . --config Release
./configure --prefix=$PREFIX --disable-shared --enable-static --with-pic --host=$MFX_HOST
cmake --install .
make -j$JOBS
make install