diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/ffmpeg/Makefile | 117 | ||||
-rw-r--r-- | package/ffmpeg/patches/patch-ffbuild_pkgconfig_generate_sh | 13 | ||||
-rw-r--r-- | package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S | 93 |
3 files changed, 178 insertions, 45 deletions
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile index 5c435f960..31b6414cf 100644 --- a/package/ffmpeg/Makefile +++ b/package/ffmpeg/Makefile @@ -1,12 +1,12 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. -include ${ADK_TOPDIR}/rules.mk +include $(ADK_TOPDIR)/rules.mk PKG_NAME:= ffmpeg -PKG_VERSION:= 3.3.5 +PKG_VERSION:= 3.4.1 PKG_RELEASE:= 1 -PKG_HASH:= 1b434cff8a327e54fd0f611420996e3419c58b795d51a5b588ace2a674f1060a +PKG_HASH:= f3443e20154a590ab8a9eef7bc951e8731425efc75b44ff4bee31d8a7a574a2c PKG_DESCR:= record, convert and stream audio & video PKG_SECTION:= libs/video PKG_NEEDS:= threads @@ -32,57 +32,66 @@ PKGSC_LIBFFMPEG:= libs/video PKG_FLAVOURS_LIBFFMPEG:= WITH_MP3 WITH_VP8 WITH_THEORA PKG_FLAVOURS_LIBFFMPEG+= WITH_XVID WITH_VORBIS WITH_X264 +PKG_FLAVOURS_LIBFFMPEG+= WITH_ZLIB WITH_BZIP2 -PKGFD_WITH_X264:= with X264 decoding support +PKGFD_WITH_BZIP2:= with bzip2 compression support +PKGFS_WITH_BZIP2:= bzip2 +PKGFB_WITH_BZIP2:= bzip2 + +PKGFD_WITH_ZLIB:= with zlib compression support +PKGFS_WITH_ZLIB:= zlib +PKGFB_WITH_ZLIB:= zlib + +PKGFD_WITH_X264:= with x264 decoding support PKGFS_WITH_X264:= libx264 PKGFB_WITH_X264:= libx264 ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_X264),y) PKG_FDEPENDS+= libx264 endif -PKGFD_WITH_MP3:= with MP3 encoding support +PKGFD_WITH_MP3:= with mp3 encoding support PKGFS_WITH_MP3:= libmp3lame PKGFB_WITH_MP3:= lame ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_MP3),y) PKG_FDEPENDS+= libmp3lame endif -PKGFD_WITH_VP8:= with VP8 encoding support +PKGFD_WITH_VP8:= with vp8 encoding support PKGFS_WITH_VP8:= libvpx PKGFB_WITH_VP8:= libvpx ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_VP8),y) PKG_FDEPENDS+= libvpx endif -PKGFD_WITH_THEORA:= with Theora encoding support +PKGFD_WITH_THEORA:= with theora encoding support PKGFS_WITH_THEORA:= libtheora PKGFB_WITH_THEORA:= libtheora ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_THEORA),y) PKG_FDEPENDS+= libtheora endif -PKGFD_WITH_XVID:= with Xvid encoding support +PKGFD_WITH_XVID:= with xvid encoding support PKGFS_WITH_XVID:= libxvid PKGFB_WITH_XVID:= xvidcore ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_XVID),y) PKG_FDEPENDS+= libxvid endif -PKGFD_WITH_VORBIS:= with Vorbis encoding support +PKGFD_WITH_VORBIS:= with vorbis encoding support PKGFS_WITH_VORBIS:= libvorbisenc PKGFB_WITH_VORBIS:= libvorbis ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_VORBIS),y) PKG_FDEPENDS+= libvorbisenc endif -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 -include ${ADK_TOPDIR}/mk/package.mk +include $(ADK_TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LIBFFMPEG,libffmpeg,${PKG_VERSION}-${PKG_RELEASE},${PKG_FDEPENDS},${PKGSD_LIBFFMPEG},${PKGSC_LIBFFMPEG},${PKG_OPTS})) -$(eval $(call PKG_template,FFMPEG,ffmpeg,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FFMPEG},${PKGSC_FFMPEG})) -$(eval $(call PKG_template,FFSERVER,ffserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FFSERVER},${PKGSC_FFSERVER})) -$(eval $(call PKG_template,FFPROBE,ffprobe,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FFPROBE},${PKGSC_FFPROBE})) +$(eval $(call PKG_template,LIBFFMPEG,libffmpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_FDEPENDS),$(PKGSD_LIBFFMPEG),$(PKGSC_LIBFFMPEG),$(PKG_OPTS))) +$(eval $(call PKG_template,FFMPEG,ffmpeg,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFMPEG),$(PKGSC_FFMPEG))) +$(eval $(call PKG_template,FFSERVER,ffserver,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFSERVER),$(PKGSC_FFSERVER))) +$(eval $(call PKG_template,FFPROBE,ffprobe,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FFPROBE),$(PKGSC_FFPROBE))) ifeq ($(ADK_DEBUG),y) TARGET_CFLAGS:= $(subst O0,O2,$(TARGET_CFLAGS)) @@ -101,7 +110,7 @@ CONFIGURE_CPU_OPTS+= --enable-mmxext else CONFIGURE_CPU_OPTS+= --disable-mmxext endif -ifeq (${ADK_TARGET_CPU_WITH_SSE4_2},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSE4_2),y) CONFIGURE_CPU_OPTS+= --enable-sse42 \ --disable-sse4 \ --disable-ssse3 \ @@ -110,7 +119,7 @@ CONFIGURE_CPU_OPTS+= --enable-sse42 \ --disable-sse else CONFIGURE_CPU_OPTS+= --disable-sse42 -ifeq (${ADK_TARGET_CPU_WITH_SSE4_1},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSE4_1),y) CONFIGURE_CPU_OPTS+= --enable-sse4 \ --disable-ssse3 \ --disable-sse3 \ @@ -118,25 +127,25 @@ CONFIGURE_CPU_OPTS+= --enable-sse4 \ --disable-sse else CONFIGURE_CPU_OPTS+= --disable-sse4 -ifeq (${ADK_TARGET_CPU_WITH_SSSE3},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSSE3),y) CONFIGURE_CPU_OPTS+= --enable-ssse3 \ --disable-sse3 \ --disable-sse2 \ --disable-sse else CONFIGURE_CPU_OPTS+= --disable-ssse3 -ifeq (${ADK_TARGET_CPU_WITH_SSE3},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSE3),y) CONFIGURE_CPU_OPTS+= --enable-sse3 \ --disable-sse2 \ --disable-sse else CONFIGURE_CPU_OPTS+= --disable-sse3 -ifeq (${ADK_TARGET_CPU_WITH_SSE2},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSE2),y) CONFIGURE_CPU_OPTS+= --enable-sse2 \ --disable-sse else CONFIGURE_CPU_OPTS+= --disable-sse2 -ifeq (${ADK_TARGET_CPU_WITH_SSE},y) +ifeq ($(ADK_TARGET_CPU_WITH_SSE),y) CONFIGURE_CPU_OPTS+= --enable-sse else CONFIGURE_CPU_OPTS+= --disable-sse @@ -156,13 +165,13 @@ endif CONFIG_STYLE:= minimal CONFIGURE_ARGS:= --prefix=/usr \ --target-os=linux \ - --arch=${ADK_TARGET_CPU_ARCH} \ + --arch=$(ADK_TARGET_CPU_ARCH) \ --enable-cross-compile \ - --sysroot=${STAGING_TARGET_DIR} \ - --cross-prefix=${TARGET_CROSS} \ + --sysroot=$(STAGING_TARGET_DIR) \ + --cross-prefix=$(TARGET_CROSS) \ --cc='$(TARGET_CC)' \ --host-cc='$(HOST_CC)' \ - --disable-bzlib \ + --pkg-config='$(STAGING_HOST_DIR)/usr/bin/pkg-config' \ --disable-doc \ --disable-debug \ --disable-iconv \ @@ -175,7 +184,19 @@ CONFIGURE_ARGS:= --prefix=/usr \ --enable-nonfree \ --enable-swscale \ --enable-postproc \ - ${CONFIGURE_CPU_OPTS} + $(CONFIGURE_CPU_OPTS) + +ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_BZIP2),y) +CONFIGURE_ARGS+= --enable-bzlib +else +CONFIGURE_ARGS+= --disable-bzlib +endif + +ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_ZLIB),y) +CONFIGURE_ARGS+= --enable-zlib +else +CONFIGURE_ARGS+= --disable-zlib +endif ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_X264),y) CONFIGURE_ARGS+= --enable-libx264 @@ -193,32 +214,38 @@ ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_XVID),y) CONFIGURE_ARGS+= --enable-libxvid endif ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_VORBIS),y) -CONFIGURE_ARGS+= --enable-libvorbis +CONFIGURE_ARGS+= --enable-libvorbis \ + --enable-muxer=ogg \ + --enable-encoder=libvorbis endif libffmpeg-install: - ${INSTALL_DIR} ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libavdevice.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libavformat.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libavfilter.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libavcodec.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libavutil.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpostproc.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libswscale.so* ${IDIR_LIBFFMPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libswresample.so* ${IDIR_LIBFFMPEG}/usr/lib + $(INSTALL_DIR) $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libavdevice.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libavformat.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libavfilter.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libavcodec.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libavutil.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libpostproc.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libswscale.so* $(IDIR_LIBFFMPEG)/usr/lib + $(CP) $(WRKINST)/usr/lib/libswresample.so* $(IDIR_LIBFFMPEG)/usr/lib ffmpeg-install: - ${INSTALL_DIR} ${IDIR_FFMPEG}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/ffmpeg ${IDIR_FFMPEG}/usr/bin + $(INSTALL_DIR) $(IDIR_FFMPEG)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/ffmpeg \ + $(IDIR_FFMPEG)/usr/bin ffserver-install: - ${INSTALL_DIR} ${IDIR_FFSERVER}/etc - $(INSTALL_DATA) $(WRKBUILD)/doc/ffserver.conf ${IDIR_FFSERVER}/etc - ${INSTALL_DIR} ${IDIR_FFSERVER}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/ffserver ${IDIR_FFSERVER}/usr/bin + $(INSTALL_DIR) $(IDIR_FFSERVER)/etc + $(INSTALL_DATA) $(WRKBUILD)/doc/ffserver.conf \ + $(IDIR_FFSERVER)/etc + $(INSTALL_DIR) $(IDIR_FFSERVER)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/ffserver \ + $(IDIR_FFSERVER)/usr/bin ffprobe-install: - ${INSTALL_DIR} ${IDIR_FFPROBE}/usr/bin - ${INSTALL_BIN} ${WRKINST}/usr/bin/ffprobe ${IDIR_FFPROBE}/usr/bin + $(INSTALL_DIR) $(IDIR_FFPROBE)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/ffprobe \ + $(IDIR_FFPROBE)/usr/bin -include ${ADK_TOPDIR}/mk/pkg-bottom.mk +include $(ADK_TOPDIR)/mk/pkg-bottom.mk diff --git a/package/ffmpeg/patches/patch-ffbuild_pkgconfig_generate_sh b/package/ffmpeg/patches/patch-ffbuild_pkgconfig_generate_sh new file mode 100644 index 000000000..f35c5fd3d --- /dev/null +++ b/package/ffmpeg/patches/patch-ffbuild_pkgconfig_generate_sh @@ -0,0 +1,13 @@ +--- ffmpeg-3.4.1.orig/ffbuild/pkgconfig_generate.sh 2017-12-10 22:35:06.000000000 +0100 ++++ ffmpeg-3.4.1/ffbuild/pkgconfig_generate.sh 2017-12-24 20:55:30.186266110 +0100 +@@ -29,8 +29,8 @@ version=$(grep ${name}_VERSION= $name/${ + cat <<EOF > $name/$fullname.pc + prefix=$prefix + exec_prefix=\${prefix} +-libdir=$libdir +-includedir=$incdir ++libdir=\${prefix}/lib ++includedir=\${prefix}/include + + Name: $fullname + Description: $comment diff --git a/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S b/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S new file mode 100644 index 000000000..1472699be --- /dev/null +++ b/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S @@ -0,0 +1,93 @@ +--- ffmpeg-3.4.1.orig/libavcodec/arm/synth_filter_vfp.S 2016-03-29 04:25:11.000000000 +0200 ++++ ffmpeg-3.4.1/libavcodec/arm/synth_filter_vfp.S 2017-07-27 02:09:00.326946211 +0200 +@@ -1,6 +1,5 @@ + /* + * Copyright (c) 2013 RISC OS Open Ltd +- * Author: Ben Avison <bavison@riscosopen.org> + * + * This file is part of FFmpeg. + * +@@ -17,6 +16,8 @@ + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ * Author: Ben Avison <bavison@riscosopen.org> + */ + + #include "libavutil/arm/asm.S" +@@ -124,7 +125,7 @@ function ff_synth_filter_float_vfp, expo + push {r3-r7,lr} + vpush {s16-s31} + ldr lr, [P_SB_OFF] +- add a2, ORIG_P_SB, lr, lsl #2 @ calculate synth_buf to pass to imdct_half ++ add a2, ORIG_P_SB, lr, LSL #2 @ calculate synth_buf to pass to imdct_half + mov P_SB, a2 @ and keep a copy for ourselves + bic J_WRAP, lr, #63 @ mangled to make testing for wrap easier in inner loop + sub lr, lr, #32 +@@ -132,12 +133,12 @@ function ff_synth_filter_float_vfp, expo + str lr, [P_SB_OFF] @ rotate offset, modulo buffer size, ready for next call + ldr a3, [sp, #(16+6+2)*4] @ fetch in from stack, to pass to imdct_half + VFP vmov s16, SCALE @ imdct_half is free to corrupt s0, but it contains one of our arguments in hardfp case +- bl X(ff_imdct_half_vfp) ++ bl ff_imdct_half_c + VFP vmov SCALE, s16 + +- fmrx OLDFPSCR, FPSCR ++ vmrs OLDFPSCR, FPSCR + ldr lr, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1 +- fmxr FPSCR, lr ++ vmsr FPSCR, lr + ldr P_SB2_DN, [sp, #16*4] + ldr P_WIN_DN, [sp, #(16+6+0)*4] + ldr P_OUT_DN, [sp, #(16+6+1)*4] +@@ -196,48 +197,10 @@ NOVFP vldr SCALE, [sp, #(16+6+3)*4] + vstmdb P_SB2_DN!, {VD0-VD3} + bne 1b + +- fmxr FPSCR, OLDFPSCR ++ vmsr FPSCR, OLDFPSCR + vpop {s16-s31} + pop {r3-r7,pc} + endfunc + +- .unreq IMDCT +- .unreq ORIG_P_SB +- .unreq P_SB_OFF +- .unreq I +- .unreq P_SB2_UP +- .unreq OLDFPSCR +- .unreq P_SB2_DN +- .unreq P_WIN_DN +- .unreq P_OUT_DN +- .unreq P_SB +- .unreq J_WRAP +- .unreq P_WIN_UP +- .unreq P_OUT_UP +- +- .unreq SCALE +- .unreq SBUF_DAT_REV0 +- .unreq SBUF_DAT_REV1 +- .unreq SBUF_DAT_REV2 +- .unreq SBUF_DAT_REV3 +- .unreq VA0 +- .unreq VA3 +- .unreq VB0 +- .unreq VB3 +- .unreq VC0 +- .unreq VC3 +- .unreq VD0 +- .unreq VD3 +- .unreq SBUF_DAT0 +- .unreq SBUF_DAT1 +- .unreq SBUF_DAT2 +- .unreq SBUF_DAT3 +- .unreq SBUF_DAT_ALT0 +- .unreq SBUF_DAT_ALT1 +- .unreq SBUF_DAT_ALT2 +- .unreq SBUF_DAT_ALT3 +- .unreq WIN_DN_DAT0 +- .unreq WIN_UP_DAT0 +- + .align 3 + zero: .word 0, 0 |