diff options
Diffstat (limited to 'package/ffmpeg')
| -rw-r--r-- | package/ffmpeg/Makefile | 19 | ||||
| -rw-r--r-- | package/ffmpeg/patches/patch-configure | 15 | ||||
| -rw-r--r-- | package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S | 93 | ||||
| -rw-r--r-- | package/ffmpeg/src/libavcodec/arm/synth_filter_vfp.S | 206 |
4 files changed, 14 insertions, 319 deletions
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile index 11ceb7813..ce7180293 100644 --- a/package/ffmpeg/Makefile +++ b/package/ffmpeg/Makefile @@ -4,19 +4,28 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= ffmpeg -PKG_VERSION:= 4.4.1 +PKG_VERSION:= 7.1.2 PKG_RELEASE:= 1 -PKG_HASH:= 8fc9f20ac5ed95115a9e285647add0eedd5cc1a98a039ada14c132452f98ac42 +PKG_HASH:= 5eb62f529114778333b7eb0381cb16e2b8725ce2ae081d07b1082effe22b12e9 PKG_DESCR:= record, convert and stream audio & video PKG_SECTION:= libs/video PKG_NEEDS:= threads -PKG_DEPENDS:= libncurses libressl -PKG_BUILDDEP:= ncurses libressl +PKG_DEPENDS:= libncurses +PKG_BUILDDEP:= ncurses PKG_URL:= http://www.ffmpeg.org/ PKG_SITES:= http://www.ffmpeg.org/releases/ PKG_LIBNAME:= libffmpeg PKG_OPTS:= dev +PKG_CHOICES_LIBFFMPEG:= WITH_OPENSSL WITH_LIBRESSL +PKGCD_WITH_LIBRESSL:= use libressl for crypto +PKGCS_WITH_LIBRESSL:= libressl ca-certificates +PKGCB_WITH_LIBRESSL:= libressl +PKGCD_WITH_OPENSSL:= use libopenssl for crypto +PKGCS_WITH_OPENSSL:= libopenssl ca-certificates +PKGCB_WITH_OPENSSL:= openssl + + PKG_SUBPKGS:= LIBFFMPEG FFPROBE FFMPEG PKGSD_FFMPEG:= video converter PKGSC_FFMPEG:= mm/video @@ -187,7 +196,6 @@ CONFIGURE_ARGS:= --prefix=/usr \ --disable-doc \ --disable-debug \ --disable-iconv \ - --disable-yasm \ --disable-optimizations \ --disable-stripping \ --enable-shared \ @@ -197,6 +205,7 @@ CONFIGURE_ARGS:= --prefix=/usr \ --enable-swscale \ --enable-postproc \ --enable-openssl \ + --disable-x86asm \ $(CONFIGURE_CPU_OPTS) ifeq ($(ADK_PACKAGE_LIBFFMPEG_WITH_BZIP2),y) diff --git a/package/ffmpeg/patches/patch-configure b/package/ffmpeg/patches/patch-configure deleted file mode 100644 index 645eb4d6a..000000000 --- a/package/ffmpeg/patches/patch-configure +++ /dev/null @@ -1,15 +0,0 @@ ---- ffmpeg-4.4.1.orig/configure 2021-10-24 22:47:11.000000000 +0200 -+++ ffmpeg-4.4.1/configure 2022-02-25 12:51:17.554887194 +0100 -@@ -4984,9 +4984,10 @@ elif enabled arm; then - fi - } - -- [ "$cpu" = generic ] && cpu=$(probe_arm_arch) -- - case $cpu in -+ generic) -+ subarch=$(probe_arm_arch | sed 's/[^a-z0-9]//g') -+ ;; - armv*) - cpuflags="-march=$cpu" - subarch=$(echo $cpu | sed 's/[^a-z0-9]//g') diff --git a/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S b/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S deleted file mode 100644 index 1472699be..000000000 --- a/package/ffmpeg/patches/patch-libavcodec_arm_synth_filter_vfp_S +++ /dev/null @@ -1,93 +0,0 @@ ---- 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 diff --git a/package/ffmpeg/src/libavcodec/arm/synth_filter_vfp.S b/package/ffmpeg/src/libavcodec/arm/synth_filter_vfp.S deleted file mode 100644 index 451fe5ce9..000000000 --- a/package/ffmpeg/src/libavcodec/arm/synth_filter_vfp.S +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2013 RISC OS Open Ltd - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * 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" - -IMDCT .req r0 -ORIG_P_SB .req r1 -P_SB_OFF .req r2 -I .req r0 -P_SB2_UP .req r1 -OLDFPSCR .req r2 -P_SB2_DN .req r3 -P_WIN_DN .req r4 -P_OUT_DN .req r5 -P_SB .req r6 -J_WRAP .req r7 -P_WIN_UP .req r12 -P_OUT_UP .req r14 - -SCALE .req s0 -SBUF_DAT_REV0 .req s4 -SBUF_DAT_REV1 .req s5 -SBUF_DAT_REV2 .req s6 -SBUF_DAT_REV3 .req s7 -VA0 .req s8 -VA3 .req s11 -VB0 .req s12 -VB3 .req s15 -VC0 .req s8 -VC3 .req s11 -VD0 .req s12 -VD3 .req s15 -SBUF_DAT0 .req s16 -SBUF_DAT1 .req s17 -SBUF_DAT2 .req s18 -SBUF_DAT3 .req s19 -SBUF_DAT_ALT0 .req s20 -SBUF_DAT_ALT1 .req s21 -SBUF_DAT_ALT2 .req s22 -SBUF_DAT_ALT3 .req s23 -WIN_DN_DAT0 .req s24 -WIN_UP_DAT0 .req s28 - - -.macro inner_loop half, tail, head - .if (OFFSET & (64*4)) == 0 @ even numbered call - SBUF_DAT_THIS0 .req SBUF_DAT0 - SBUF_DAT_THIS1 .req SBUF_DAT1 - SBUF_DAT_THIS2 .req SBUF_DAT2 - SBUF_DAT_THIS3 .req SBUF_DAT3 - .ifnc "\head","" - vldr d8, [P_SB, #OFFSET] @ d8 = SBUF_DAT - vldr d9, [P_SB, #OFFSET+8] - .endif - .else - SBUF_DAT_THIS0 .req SBUF_DAT_ALT0 - SBUF_DAT_THIS1 .req SBUF_DAT_ALT1 - SBUF_DAT_THIS2 .req SBUF_DAT_ALT2 - SBUF_DAT_THIS3 .req SBUF_DAT_ALT3 - .ifnc "\head","" - vldr d10, [P_SB, #OFFSET] @ d10 = SBUF_DAT_ALT - vldr d11, [P_SB, #OFFSET+8] - .endif - .endif - .ifnc "\tail","" - .ifc "\half","ab" - vmls.f VA0, SBUF_DAT_REV0, WIN_DN_DAT0 @ all operands treated as vectors - .else - vmla.f VD0, SBUF_DAT_REV0, WIN_DN_DAT0 @ all operands treated as vectors - .endif - .endif - .ifnc "\head","" - vldr d14, [P_WIN_UP, #OFFSET] @ d14 = WIN_UP_DAT - vldr d15, [P_WIN_UP, #OFFSET+8] - vldr d12, [P_WIN_DN, #OFFSET] @ d12 = WIN_DN_DAT - vldr d13, [P_WIN_DN, #OFFSET+8] - vmov SBUF_DAT_REV3, SBUF_DAT_THIS0 - vmov SBUF_DAT_REV2, SBUF_DAT_THIS1 - vmov SBUF_DAT_REV1, SBUF_DAT_THIS2 - vmov SBUF_DAT_REV0, SBUF_DAT_THIS3 - .ifc "\half","ab" - vmla.f VB0, SBUF_DAT_THIS0, WIN_UP_DAT0 - .else - vmla.f VC0, SBUF_DAT_THIS0, WIN_UP_DAT0 - .endif - teq J_WRAP, #J - bne 2f @ strongly predictable, so better than cond exec in this case - sub P_SB, P_SB, #512*4 -2: - .set J, J - 64 - .set OFFSET, OFFSET + 64*4 - .endif - .unreq SBUF_DAT_THIS0 - .unreq SBUF_DAT_THIS1 - .unreq SBUF_DAT_THIS2 - .unreq SBUF_DAT_THIS3 -.endm - - -/* void ff_synth_filter_float_vfp(FFTContext *imdct, - * float *synth_buf_ptr, int *synth_buf_offset, - * float synth_buf2[32], const float window[512], - * float out[32], const float in[32], float scale) - */ -function ff_synth_filter_float_vfp, export=1 - 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 - 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 - and lr, lr, #512-32 - 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 ff_imdct_half_c -VFP vmov SCALE, s16 - - vmrs OLDFPSCR, FPSCR - ldr lr, =0x03030000 @ RunFast mode, short vectors of length 4, stride 1 - 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] -NOVFP vldr SCALE, [sp, #(16+6+3)*4] - -#define IMM_OFF_SKEW 956 /* also valid immediate constant when you add 16*4 */ - add P_SB, P_SB, #IMM_OFF_SKEW @ so we can use -ve offsets to use full immediate offset range - add P_SB2_UP, P_SB2_DN, #16*4 - add P_WIN_UP, P_WIN_DN, #16*4+IMM_OFF_SKEW - add P_OUT_UP, P_OUT_DN, #16*4 - add P_SB2_DN, P_SB2_DN, #16*4 - add P_WIN_DN, P_WIN_DN, #12*4+IMM_OFF_SKEW - add P_OUT_DN, P_OUT_DN, #16*4 - mov I, #4 -1: - vldmia P_SB2_UP!, {VB0-VB3} - vldmdb P_SB2_DN!, {VA0-VA3} - .set J, 512 - 64 - .set OFFSET, -IMM_OFF_SKEW - inner_loop ab,, head - .rept 7 - inner_loop ab, tail, head - .endr - inner_loop ab, tail - add P_WIN_UP, P_WIN_UP, #4*4 - sub P_WIN_DN, P_WIN_DN, #4*4 - vmul.f VB0, VB0, SCALE @ SCALE treated as scalar - add P_SB, P_SB, #(512+4)*4 - subs I, I, #1 - vmul.f VA0, VA0, SCALE - vstmia P_OUT_UP!, {VB0-VB3} - vstmdb P_OUT_DN!, {VA0-VA3} - bne 1b - - add P_SB2_DN, P_SB2_DN, #(16+28-12)*4 - sub P_SB2_UP, P_SB2_UP, #(16+16)*4 - add P_WIN_DN, P_WIN_DN, #(32+16+28-12)*4 - mov I, #4 -1: - vldr.d d4, zero @ d4 = VC0 - vldr.d d5, zero - vldr.d d6, zero @ d6 = VD0 - vldr.d d7, zero - .set J, 512 - 64 - .set OFFSET, -IMM_OFF_SKEW - inner_loop cd,, head - .rept 7 - inner_loop cd, tail, head - .endr - inner_loop cd, tail - add P_WIN_UP, P_WIN_UP, #4*4 - sub P_WIN_DN, P_WIN_DN, #4*4 - add P_SB, P_SB, #(512+4)*4 - subs I, I, #1 - vstmia P_SB2_UP!, {VC0-VC3} - vstmdb P_SB2_DN!, {VD0-VD3} - bne 1b - - vmsr FPSCR, OLDFPSCR - vpop {s16-s31} - pop {r3-r7,pc} -endfunc - - .align 3 -zero: .word 0, 0 |
