Initial integration of libx264

pull/53/head
Javernaut 4 years ago
parent 1ea2b982da
commit 7b237b4d5b
  1. 2
      .travis.yml
  2. 4
      scripts/ffmpeg/build.sh
  3. 40
      scripts/libx264/build.sh
  4. 12
      scripts/libx264/download.sh
  5. 21
      scripts/parse-arguments.sh

@ -17,4 +17,4 @@ install:
- curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb - curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb
- sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb - sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb
script: script:
- ./ffmpeg-android-maker.sh -all -android=18 - ./ffmpeg-android-maker.sh -all-free -all-gpl -android=18

@ -10,6 +10,10 @@ case $ANDROID_ABI in
;; ;;
esac esac
if [ "$FFMPEG_GPL_ENABLED" = true ] ; then
EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --enable-gpl"
fi
# Preparing flags for enabling requested libraries # Preparing flags for enabling requested libraries
ADDITIONAL_COMPONENTS= ADDITIONAL_COMPONENTS=
for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]} for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]}

@ -0,0 +1,40 @@
#!/usr/bin/env bash
X264_AS=${FAM_CC}
X264_ADDITIONAL_FLAGS=
case $ANDROID_ABI in
x86)
# Disabling assembler optimizations due to text relocations
X264_ADDITIONAL_FLAGS=--disable-asm
;;
x86_64)
X264_AS=${NASM_EXECUTABLE}
;;
esac
CC=${FAM_CC} \
AR=${FAM_AR} \
AS=${X264_AS} \
RANLIB=${FAM_RANLIB} \
STRIP=${FAM_STRIP} \
./configure \
--prefix=${INSTALL_DIR} \
--host=${TARGET} \
--sysroot=${SYSROOT_PATH} \
--enable-pic \
--enable-static \
--disable-cli \
--disable-avs \
--disable-lavf \
--disable-cli \
--disable-ffms \
--disable-opencl \
--chroma-format=all \
--bit-depth=all \
${X264_ADDITIONAL_FLAGS} || exit 1
${MAKE_EXECUTABLE} clean
${MAKE_EXECUTABLE} -j${HOST_NPROC}
${MAKE_EXECUTABLE} install

@ -0,0 +1,12 @@
#!/usr/bin/env bash
source ${SCRIPTS_DIR}/common-functions.sh
# Libx264 doesn't have any versioning system. Currently it has 2 branches: master and stable.
# Latest commit in stable branch
# Tue Jun 30 22:28:05 2020 +0300
LIBX264_VERSION=cde9a93319bea766a92e306d69059c76de970190
downloadTarArchive \
"libx264" \
"https://code.videolan.org/videolan/x264/-/archive/${LIBX264_VERSION}/x264-${LIBX264_VERSION}.tar.gz"

@ -12,8 +12,10 @@ SOURCE_TYPE=TAR
SOURCE_VALUE=4.3.1 SOURCE_VALUE=4.3.1
BINUTILS=gnu BINUTILS=gnu
EXTERNAL_LIBRARIES=() EXTERNAL_LIBRARIES=()
FFMPEG_GPL_ENABLED=false
ALL_SUPPORTED_LIBRARIES=( # All FREE libraries that are supported
SUPPORTED_LIBRARIES_FREE=(
"libaom" "libaom"
"libdav1d" "libdav1d"
"libmp3lame" "libmp3lame"
@ -26,6 +28,11 @@ ALL_SUPPORTED_LIBRARIES=(
"libfribidi" "libfribidi"
) )
# All GPL libraries that are supported
SUPPORTED_LIBRARIES_GPL=(
"libx264"
)
for argument in "$@"; do for argument in "$@"; do
case $argument in case $argument in
# Build for only specified ABIs (separated by comma) # Build for only specified ABIs (separated by comma)
@ -110,8 +117,16 @@ for argument in "$@"; do
--enable-libfribidi | -fribidi) --enable-libfribidi | -fribidi)
EXTERNAL_LIBRARIES+=("libfribidi") EXTERNAL_LIBRARIES+=("libfribidi")
;; ;;
--enable-all-external|-all) --enable-libx264 | -x264)
EXTERNAL_LIBRARIES=${ALL_SUPPORTED_LIBRARIES[@]} EXTERNAL_LIBRARIES+=("libx264")
FFMPEG_GPL_ENABLED=true
;;
--enable-all-free | -all-free)
EXTERNAL_LIBRARIES+=" ${SUPPORTED_LIBRARIES_FREE[@]}"
;;
--enable-all-gpl | -all-gpl)
EXTERNAL_LIBRARIES+=" ${SUPPORTED_LIBRARIES_GPL[@]}"
FFMPEG_GPL_ENABLED=true
;; ;;
*) *)
echo "Unknown argument $argument" echo "Unknown argument $argument"

Loading…
Cancel
Save