diff --git a/build-win.sh b/build-win.sh old mode 100644 new mode 100755 index 7f9a3f0..ddfffdf --- a/build-win.sh +++ b/build-win.sh @@ -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 diff --git a/build-win32.sh b/build-win32.sh old mode 100644 new mode 100755 index ae362b4..1339329 --- a/build-win32.sh +++ b/build-win32.sh @@ -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 diff --git a/build.sh b/build.sh index 48983fc..7cbd35b 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/scripts/build-ffmpeg.sh b/scripts/build-ffmpeg.sh index 36b6159..bece33d 100644 --- a/scripts/build-ffmpeg.sh +++ b/scripts/build-ffmpeg.sh @@ -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 diff --git a/scripts/build-libmfx.sh b/scripts/build-libmfx.sh index f9f1b7f..92ede3e 100644 --- a/scripts/build-libmfx.sh +++ b/scripts/build-libmfx.sh @@ -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