diff options
Diffstat (limited to 'package/ffmpeg')
-rw-r--r-- | package/ffmpeg/Makefile | 8 | ||||
-rw-r--r-- | package/ffmpeg/patches/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch | 59 | ||||
-rw-r--r-- | package/ffmpeg/src/libavcodec/arm/synth_filter_vfp.S | 206 |
3 files changed, 63 insertions, 210 deletions
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile index 8c00cdef4..2920791d7 100644 --- a/package/ffmpeg/Makefile +++ b/package/ffmpeg/Makefile @@ -5,19 +5,19 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= ffmpeg PKG_VERSION:= 6.1.1 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_HASH:= 5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20 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_FFMPEG:= WITH_LIBRESSL WITH_OPENSSL +PKG_CHOICES_LIBFFMPEG:= WITH_LIBRESSL WITH_OPENSSL PKGCD_WITH_LIBRESSL:= use libressl for crypto PKGCS_WITH_LIBRESSL:= libressl ca-certificates PKGCB_WITH_LIBRESSL:= libressl diff --git a/package/ffmpeg/patches/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch b/package/ffmpeg/patches/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch new file mode 100644 index 000000000..a23de2e78 --- /dev/null +++ b/package/ffmpeg/patches/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch @@ -0,0 +1,59 @@ +From 654bd47716c4f36719fb0f3f7fd8386d5ed0b916 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Fri, 9 Aug 2024 11:32:00 +0100 +Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with + binutils 2.43 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +binutils 2.43 has stricter validation for labels[1] and results in errors +when building ffmpeg for armv5: + +src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0' + +Remove the leading zero in the "01" label to resolve this error. + +[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b + +Signed-off-by: Ross Burton <ross.burton@arm.com> +Signed-off-by: Martin Storsjö <martin@martin.st> +Signed-off-by: Phil Sutter <phil@nwl.cc> +--- + libavcodec/arm/mlpdsp_armv5te.S | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S +index 4f9aa485fd21a..d31568611c30f 100644 +--- a/libavcodec/arm/mlpdsp_armv5te.S ++++ b/libavcodec/arm/mlpdsp_armv5te.S +@@ -229,7 +229,7 @@ A .endif + .endif + + // Begin loop +-01: ++1: + .if TOTAL_TAPS == 0 + // Things simplify a lot in this case + // In fact this could be pipelined further if it's worth it... +@@ -241,7 +241,7 @@ A .endif + str ST0, [PST, #-4]! + str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)] + str ST0, [PSAMP], #4 * MAX_CHANNELS +- bne 01b ++ bne 1b + .else + .if \fir_taps & 1 + .set LOAD_REG, 1 +@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1 + str ST3, [PST, #-4]! + str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)] + str ST3, [PSAMP], #4 * MAX_CHANNELS +- bne 01b ++ bne 1b + .endif + b 99f + +-- +2.43.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 |