mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 02:35:22 +03:00
Merge pull request #10 from podarok/add_mpp_ffmpeg_arm64
feat: add arm64 optimisations
This commit is contained in:
commit
4ea972c649
@ -56,7 +56,7 @@ ARCH=$(uname -m)
|
|||||||
CC_OPT="-O3 -Wno-error=implicit-fallthrough"
|
CC_OPT="-O3 -Wno-error=implicit-fallthrough"
|
||||||
|
|
||||||
if [ "$ARCH" = "aarch64" ]; then
|
if [ "$ARCH" = "aarch64" ]; then
|
||||||
CC_OPT="${CC_OPT} -march=armv8-a+crc"
|
CC_OPT="${CC_OPT} -march=armv8-a+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./configure --prefix=/usr/local/nginx \
|
./configure --prefix=/usr/local/nginx \
|
||||||
|
|||||||
@ -29,7 +29,17 @@ cd /tmp
|
|||||||
git clone https://github.com/rockchip-linux/mpp.git
|
git clone https://github.com/rockchip-linux/mpp.git
|
||||||
cd mpp
|
cd mpp
|
||||||
mkdir build || true && cd build
|
mkdir build || true && cd build
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
|
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
EXTRA_CFLAGS=""
|
||||||
|
EXTRA_CXXFLAGS=""
|
||||||
|
|
||||||
|
if [ "$ARCH" = "aarch64" ]; then
|
||||||
|
EXTRA_CFLAGS="-march=armv8-a+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||||
|
EXTRA_CXXFLAGS="-march=armv8-a+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_C_FLAGS="${EXTRA_CFLAGS}" -DCMAKE_CXX_FLAGS="${EXTRA_CXXFLAGS}" ../
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
ldconfig
|
ldconfig
|
||||||
@ -53,10 +63,18 @@ cd /tmp
|
|||||||
git clone https://github.com/FFmpeg/FFmpeg.git
|
git clone https://github.com/FFmpeg/FFmpeg.git
|
||||||
cd FFmpeg
|
cd FFmpeg
|
||||||
|
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
EXTRA_CFLAGS="-I/usr/local/include"
|
||||||
|
EXTRA_LDFLAGS="-L/usr/local/lib"
|
||||||
|
|
||||||
|
if [ "$ARCH" = "aarch64" ]; then
|
||||||
|
EXTRA_CFLAGS="${EXTRA_CFLAGS} -march=armv8-a+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||||
|
fi
|
||||||
|
|
||||||
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \
|
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \
|
||||||
--enable-rkmpp \
|
--enable-rkmpp \
|
||||||
--extra-cflags="-I/usr/local/include" \
|
--extra-cflags="${EXTRA_CFLAGS}" \
|
||||||
--extra-ldflags="-L/usr/local/lib" \
|
--extra-ldflags="${EXTRA_LDFLAGS}" \
|
||||||
--extra-libs="-lpthread -lm -latomic" \
|
--extra-libs="-lpthread -lm -latomic" \
|
||||||
--arch=arm64 \
|
--arch=arm64 \
|
||||||
--enable-gmp \
|
--enable-gmp \
|
||||||
@ -75,7 +93,6 @@ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \
|
|||||||
--enable-libsoxr \
|
--enable-libsoxr \
|
||||||
--enable-libssh \
|
--enable-libssh \
|
||||||
--enable-libvorbis \
|
--enable-libvorbis \
|
||||||
--enable-libvpx \
|
|
||||||
--enable-libzimg \
|
--enable-libzimg \
|
||||||
--enable-libwebp \
|
--enable-libwebp \
|
||||||
--enable-libx264 \
|
--enable-libx264 \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user