On Mon, Aug 24, 2026 at 12:02:38PM +0200, Kirill A. Korinsky wrote:
> On Mon, 24 Aug 2026 10:09:10 +0200,
> Theo Buehler <[email protected]> wrote:
> >
> > On Mon, Aug 24, 2026 at 12:25:19AM +0200, Kirill A. Korinsky wrote:
> > > On Sun, 23 Aug 2026 16:22:53 +0200,
> > > Theo Buehler <[email protected]> wrote:
> > > >
> > > > On Sun, Aug 23, 2026 at 06:50:10AM -0400, Brad Smith wrote:
> > > > > On Sun, Aug 23, 2026 at 10:53:25AM +0200, Kirill A. Korinsky wrote:
> > > > > > On Thu, 13 Aug 2026 12:13:54 +0200,
> > > > > > Kirill A. Korinsky <[email protected]> wrote:
> > > > > > >
> > > > > > > ports@, Brad,
> > > > > > >
> > > > > > > here a diff to update graphics/ffmpeg to 9.0.1, and it fixes and
> > > > > > > bumps
> > > > > > > x11/mplayer as well.
> > > > > > >
> > > > > > > Bulk on amd64 with previous diffs and this one successeded,
> > > > > > > unsigned
> > > > > > > packages available here:
> > > > > > > https://kirill.korins.ky/pub/packages/ffmpeg-9.0.1/
> > > > > > >
> > > > > > > Tests and OKs are welcome.
> > > > > > >
> > > > > >
> > > > > > The previous version was without subject what is fixed now.
> > > > > >
> > > > > > Also, it survives a few bulks on amd64 but I haven't tested BTI/IBT
> > > > > > amd64,
> > > > > > so any tests are welcome.
> > > > >
> > > > > Here is an updated diff. The configure patch SSL changes can be
> > > > > simplified a bit and add in my MIPS fix for CABAC.
> > > >
> > > > It works for me in some light testing. Tests run into segfaults on both
> > > > amd64 and arm64, which is not necessarily a blocker but a bit annoying.
> > > >
> > > > Quite a few tests do run with amd64/ibt without SIGILL, so that is
> > > > reassuring.
> > > >
> > > >
> > > > apple M1:
> > > >
> > > > NEON:
> > > > FAILURE: float_fft_16384_neon (segmentation fault)
> > > > - av_tx [FAILED]
> > > > checkasm: 1 of 8 tests failed
> > > > threads=1
> > > >
> > > > on both
> > > >
> > > > cpu0: 12th Gen Intel(R) Core(TM) i7-1260P, 1995.55 MHz, 06-9a-03, patch
> > > > 0000043b
> > > > cpu0: AMD Ryzen 7 PRO 5850U with Radeon Graphics, 1900.00 MHz,
> > > > 19-50-00, patch 0a500012
> > > >
> > > > I see this:
> > > >
> > > > ffmpeg version 9.0.1 Copyright (c) 2000-2026 the FFmpeg developers
> > > > built with OpenBSD clang version 22.1.6
> > > > configuration: --enable-shared --arch=amd64 --cc=cc --cxx=c++
> > > > --enable-debug --disable-stripping --disable-indev=jack
> > > > --disable-vulkan --enable-fontconfig --enable-frei0r --enable-gpl
> > > > --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d
> > > > --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> > > > --enable-libgsm --enable-libharfbuzz --enable-libmp3lame
> > > > --enable-libopus --enable-libspeex --enable-libsvtav1
> > > > --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx
> > > > --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
> > > > --enable-libxvid --enable-libzimg --enable-nonfree --enable-openssl
> > > > --enable-libvidstab --extra-cflags='-I/usr/local/include
> > > > -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib'
> > > > --extra-ldsoflags= --mandir=/usr/local/man --objcc=/usr/bin/false
> > > > --optflags='-O2 -pipe -g -Wno-redundant-decls'
> > > > libavutil 61. 1.101 / 61. 1.101
> > > > libavcodec 63. 1.101 / 63. 1.101
> > > > libavformat 63. 1.101 / 63. 1.101
> > > > libavdevice 63. 1.101 / 63. 1.101
> > > > libavfilter 12. 1.101 / 12. 1.101
> > > > libswscale 10. 1.101 / 10. 1.101
> > > > libswresample 7. 1.101 / 7. 1.101
> > > > Stream mapping:
> > > > crop:default -> Stream #0:0 (rawvideo)
> > > > Segmentation fault (core dumped)
> > > > threads=1
> > > >
> > > > Program terminated with signal SIGSEGV, Segmentation fault.
> > > > #0 memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4
> > > > <ff_init_hscaler_mmxext+180>, length=44)
> > > > at /usr/src/lib/libc/string/memcpy.c:97
> > > > 97 TLOOP1(*dst++ = *src++);
> > > > [Current thread is 1 (process 148644)]
> > > > (gdb) bt
> > > > #0 memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4
> > > > <ff_init_hscaler_mmxext+180>, length=44)
> > > > at /usr/src/lib/libc/string/memcpy.c:97
> > > > #1 0x00000f3c87d943b5 in ff_init_hscaler_mmxext (dstW=40032,
> > > > xInc=65504,
> > > > filterCode=0xf3c943c2000 "", filter=0xf3bda2a8000,
> > > > filterPos=0xf3c966f6000,
> > > > numSplits=<optimized out>) at
> > > > src/libswscale/x86/hscale_fast_bilinear_simd.c:157
> > > > #2 0x00000f3c87d90eb0 in ff_sws_init_single_context (sws=0xf3c09903000,
> > > > srcFilter=0xf3c227dd770, dstFilter=0xf3c227dd770) at
> > > > src/libswscale/utils.c:1705
> > > > #3 0x00000f3c87c9c8ab in add_legacy_sws_pass (graph=0xf3c2131d400,
> > > > src=0xf3c227dd988,
> > > > dst=0xf3c227dd900, input=0x0, output=0xf3c227dd8e8) at
> > > > src/libswscale/graph.c:584
> > > >
> > > >
> > >
> > > Thanks for testing amd64, here updated diff which fixes a bug.
> >
> > Thanks. Makes sense and passes regress on my IBT machine.
>
> I have an idea what can trigger crash on your M1, it uses ldr =constant
> instruction which should crash when it tries to read from segment without
> read permission.
>
> So, here a blind short. May I ask you to give it a try?
>
Not quite enough. The below passes regress on my m1. Would be nice if
someone with a bti-capable machine could run regress.
The vc1dsp_neon.S diff is pretty ugly. I hope there's a better way...
Index: graphics/ffmpeg/Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
diff -u -p -r1.260 Makefile
--- graphics/ffmpeg/Makefile 17 Jun 2026 17:13:06 -0000 1.260
+++ graphics/ffmpeg/Makefile 24 Aug 2026 15:12:25 -0000
@@ -1,7 +1,7 @@
COMMENT= audio/video converter and streamer
# keep it synced with x11/mplayer
-V= 8.1.2
+V= 9.0.1
DISTNAME= ffmpeg-${V}
CATEGORIES= graphics multimedia
SITES= https://ffmpeg.org/releases/
@@ -22,13 +22,13 @@ USE_NOBTCFI-amd64= Yes
EPOCH= 1
-SHARED_LIBS= avcodec 27.2 \
- avdevice 15.1 \
- avfilter 13.2 \
- avformat 24.2 \
- avutil 17.2 \
- swresample 6.1 \
- swscale 9.2
+SHARED_LIBS= avcodec 28.0 \
+ avdevice 16.0 \
+ avfilter 14.0 \
+ avformat 25.0 \
+ avutil 18.0 \
+ swresample 7.0 \
+ swscale 10.0
HOMEPAGE= https://ffmpeg.org/
Index: graphics/ffmpeg/distinfo
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/distinfo,v
diff -u -p -r1.74 distinfo
--- graphics/ffmpeg/distinfo 17 Jun 2026 17:13:06 -0000 1.74
+++ graphics/ffmpeg/distinfo 24 Aug 2026 10:06:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (ffmpeg-8.1.2.tar.xz) = RkvrXnvwwxHmi0WuLwTpzCr4iFGrtAgiMXQqdNl7Ukw=
-SIZE (ffmpeg-8.1.2.tar.xz) = 11710924
+SHA256 (ffmpeg-9.0.1.tar.xz) = zzjg4ox+VgWULEp3dVNJsBRYBKOXrzfrH7THfLI39jU=
+SIZE (ffmpeg-9.0.1.tar.xz) = 12036420
Index: graphics/ffmpeg/patches/patch-configure
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-configure,v
diff -u -p -r1.80 patch-configure
--- graphics/ffmpeg/patches/patch-configure 2 Jun 2026 21:29:05 -0000
1.80
+++ graphics/ffmpeg/patches/patch-configure 24 Aug 2026 10:06:27 -0000
@@ -3,7 +3,7 @@
Index: configure
--- configure.orig
+++ configure
-@@ -6076,7 +6076,6 @@ case $target_os in
+@@ -6159,7 +6159,6 @@ case $target_os in
enable section_data_rel_ro
striptype=""
SHFLAGS='-shared'
@@ -11,7 +11,7 @@ Index: configure
SLIB_INSTALL_LINKS=
oss_indev_extralibs="-lossaudio"
oss_outdev_extralibs="-lossaudio"
-@@ -6451,7 +6450,7 @@ set_default libdir
+@@ -6534,7 +6533,7 @@ set_default libdir
set_default $PATHS_LIST
set_default nm
@@ -20,7 +20,7 @@ Index: configure
enable_weak_pic() {
disabled pic && return
-@@ -6745,11 +6744,19 @@ elif enabled x86; then
+@@ -6830,11 +6829,19 @@ elif enabled x86; then
# As 'i' is stored on the stack, this program will crash
# if the base pointer is used to access it because the
# base pointer is cleared in the inline assembly code.
@@ -41,7 +41,7 @@ Index: configure
# check whether EBX is available on x86
check_inline_asm ebx_available '""::"b"(0)' &&
-@@ -7002,7 +7009,7 @@ check_headers asm/types.h
+@@ -7090,7 +7097,7 @@ check_headers asm/types.h
#
# some configurations also require linking to libatomic, so try
# both with -latomic and without
@@ -50,22 +50,12 @@ Index: configure
check_builtin stdatomic stdatomic.h \
"atomic_int foo, bar = -1; atomic_store(&foo, 0); foo += bar" \
$LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
-@@ -7489,13 +7496,13 @@ enabled omx_rpi && { test_code cc OMX_Core.h
- enabled omx && require_headers OMX_Core.h && \
- warn "The OpenMAX encoders are deprecated and will be removed in future
versions"
-
--enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0"
openssl/ssl.h DTLS_get_data_mtu &&
-+enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0"
openssl/ssl.h OPENSSL_init_ssl &&
+@@ -7551,7 +7558,7 @@ enabled opengl && { check_lib opengl GL/glx
+ enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0"
openssl/ssl.h DTLS_get_data_mtu &&
{ enabled gplv3 || ! enabled gpl || enabled
nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
{ enabled gpl && ! enabled nonfree && die
"ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
- check_pkg_config openssl "openssl >= 1.1.1"
openssl/ssl.h DTLS_get_data_mtu ||
-- check_lib openssl openssl/ssl.h
DTLS_get_data_mtu -lssl -lcrypto ||
-- check_lib openssl openssl/ssl.h
DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
-- die "ERROR: openssl (>= 1.1.1) not found"; }
+ check_pkg_config openssl "openssl >= 1.1.0"
openssl/ssl.h OPENSSL_init_ssl ||
-+ check_lib openssl openssl/ssl.h
OPENSSL_init_ssl -lssl -lcrypto ||
-+ check_lib openssl openssl/ssl.h
OPENSSL_init_ssl -lssl -lcrypto -lws2_32 -lgdi32 ||
-+ die "ERROR: openssl (>= 1.1.0) not found"; }
- enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx
pocketsphinx/pocketsphinx.h ps_init
- enabled rkmpp && { require_pkg_config rkmpp "rockchip_mpp >=
1.3.8" "rockchip/rk_mpi.h rockchip/mpp_buffer.h" "mpp_create
mpp_buffer_sync_begin_f" &&
- { enabled libdrm ||
+ check_lib openssl openssl/ssl.h
DTLS_get_data_mtu -lssl -lcrypto ||
+ check_lib openssl openssl/ssl.h
DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
+ die "ERROR: openssl (>= 1.1.1) not found"; }
Index: graphics/ffmpeg/patches/patch-ffbuild_library_mak
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-ffbuild_library_mak,v
diff -u -p -r1.5 patch-ffbuild_library_mak
--- graphics/ffmpeg/patches/patch-ffbuild_library_mak 21 May 2026 16:24:15
-0000 1.5
+++ graphics/ffmpeg/patches/patch-ffbuild_library_mak 24 Aug 2026 10:06:27
-0000
@@ -1,7 +1,7 @@
Index: ffbuild/library.mak
--- ffbuild/library.mak.orig
+++ ffbuild/library.mak
-@@ -96,8 +96,6 @@ clean::
+@@ -113,8 +113,6 @@ clean::
install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
$(Q)mkdir -p "$(SHLIBDIR)"
$$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
Index: graphics/ffmpeg/patches/patch-libavcodec_aarch64_h26x_sao_neon_S
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_aarch64_h26x_sao_neon_S
diff -N graphics/ffmpeg/patches/patch-libavcodec_aarch64_h26x_sao_neon_S
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libavcodec_aarch64_h26x_sao_neon_S 24 Aug
2026 14:33:15 -0000
@@ -0,0 +1,55 @@
+Index: libavcodec/aarch64/h26x/sao_neon.S
+--- libavcodec/aarch64/h26x/sao_neon.S.orig
++++ libavcodec/aarch64/h26x/sao_neon.S
+@@ -100,6 +100,8 @@ function ff_h26x_sao_band_filter_16x16_8_neon, export=
+ ret
+ endfunc
+
++.section .rodata
++
+ .Lhevc_sao_edge_pos:
+ .word 1 // horizontal
+ .word HEVC_SAO_STRIDE // vertical
+@@ -112,8 +115,11 @@ endfunc
+ .word VVC_SAO_STRIDE + 1 // 45 degree
+ .word VVC_SAO_STRIDE - 1 // 135 degree
+
++.previous
++
+ function ff_vvc_sao_edge_filter_16x16_8_neon, export=1
+- adr x7, .Lvvc_sao_edge_pos
++ adrp x7, .Lvvc_sao_edge_pos
++ add x7, x7, :lo12:.Lvvc_sao_edge_pos
+ mov x15, #VVC_SAO_STRIDE
+ b 1f
+ endfunc
+@@ -121,7 +127,8 @@ endfunc
+ // ff_hevc_sao_edge_filter_16x16_8_neon(char *dst, char *src, ptrdiff
stride_dst,
+ // int16 *sao_offset_val, int eo, int
width, int height)
+ function ff_hevc_sao_edge_filter_16x16_8_neon, export=1
+- adr x7, .Lhevc_sao_edge_pos
++ adrp x7, .Lhevc_sao_edge_pos
++ add x7, x7, :lo12:.Lhevc_sao_edge_pos
+ mov x15, #HEVC_SAO_STRIDE
+ 1:
+ ld1 {v3.8h}, [x3] // load sao_offset_val
+@@ -180,7 +187,8 @@ function ff_hevc_sao_edge_filter_16x16_8_neon, export=
+ endfunc
+
+ function ff_vvc_sao_edge_filter_8x8_8_neon, export=1
+- adr x7, .Lvvc_sao_edge_pos
++ adrp x7, .Lvvc_sao_edge_pos
++ add x7, x7, :lo12:.Lvvc_sao_edge_pos
+ mov x15, #VVC_SAO_STRIDE
+ b 1f
+ endfunc
+@@ -188,7 +196,8 @@ endfunc
+ // ff_hevc_sao_edge_filter_8x8_8_neon(char *dst, char *src, ptrdiff
stride_dst,
+ // int16 *sao_offset_val, int eo, int
width, int height)
+ function ff_hevc_sao_edge_filter_8x8_8_neon, export=1
+- adr x7, .Lhevc_sao_edge_pos
++ adrp x7, .Lhevc_sao_edge_pos
++ add x7, x7, :lo12:.Lhevc_sao_edge_pos
+ mov x15, #HEVC_SAO_STRIDE
+ 1:
+ ldr w4, [x7, w4, uxtw #2]
Index: graphics/ffmpeg/patches/patch-libavcodec_aarch64_vc1dsp_neon_S
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_aarch64_vc1dsp_neon_S
diff -N graphics/ffmpeg/patches/patch-libavcodec_aarch64_vc1dsp_neon_S
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libavcodec_aarch64_vc1dsp_neon_S 24 Aug
2026 14:56:01 -0000
@@ -0,0 +1,121 @@
+Index: libavcodec/aarch64/vc1dsp_neon.S
+--- libavcodec/aarch64/vc1dsp_neon.S.orig
++++ libavcodec/aarch64/vc1dsp_neon.S
+@@ -37,7 +37,8 @@ function ff_vc1_inv_trans_8x8_neon, export=1
+ shl v7.8h, v2.8h, #4 // 16 * src[8]
+ shl v18.8h, v2.8h, #2 // 4 * src[8]
+ shl v19.8h, v4.8h, #4 // 16
* src[24]
+- ldr d0, .Lcoeffs_it8
++ adrp x0, .Lcoeffs_it8
++ ldr d0, [x0, :lo12:.Lcoeffs_it8]
+ shl v5.8h, v5.8h, #2 //
8/2 * src[32]
+ shl v20.8h, v6.8h, #4 //
16 * src[40]
+ shl v21.8h, v6.8h, #2 //
4 * src[40]
+@@ -190,7 +191,8 @@ function ff_vc1_inv_trans_8x4_neon, export=1
+ ld1 {v1.8b, v2.8b, v3.8b, v4.8b}, [x2], #32
+ mov x3, x0
+ ld1 {v16.8b, v17.8b, v18.8b, v19.8b}, [x2]
+- ldr q0, .Lcoeffs_it8 // includes 4-point
coefficients in upper half of vector
++ adrp x4, .Lcoeffs_it8
++ ldr q0, [x4, :lo12:.Lcoeffs_it8] // includes
4-point coefficients in upper half of vector
+ ld1 {v5.8b}, [x0], x1
+ trn2 v6.4h, v1.4h, v3.4h
+ trn2 v7.4h, v2.4h, v4.4h
+@@ -318,7 +320,8 @@ endfunc
+ // array at x0 updated by saturated addition of (narrowed) transformed block
+ function ff_vc1_inv_trans_4x8_neon, export=1
+ mov x3, #16
+- ldr q0, .Lcoeffs_it8 // includes 4-point
coefficients in upper half of vector
++ adrp x4, .Lcoeffs_it8
++ ldr q0, [x4, :lo12:.Lcoeffs_it8] // includes
4-point coefficients in upper half of vector
+ mov x4, x0
+ ld1 {v1.d}[0], [x2], x3 // 00 01 02 03
+ ld1 {v2.d}[0], [x2], x3 // 10 11 12 13
+@@ -459,7 +462,8 @@ endfunc
+ // array at x0 updated by saturated addition of (narrowed) transformed block
+ function ff_vc1_inv_trans_4x4_neon, export=1
+ mov x3, #16
+- ldr d0, .Lcoeffs_it4
++ adrp x4, .Lcoeffs_it4
++ ldr d0, [x4, :lo12:.Lcoeffs_it4]
+ mov x4, x0
+ ld1 {v1.d}[0], [x2], x3 // 00 01 02 03
+ ld1 {v2.d}[0], [x2], x3 // 10 11 12 13
+@@ -696,6 +700,8 @@ function ff_vc1_inv_trans_4x4_dc_neon, export=1
+ ret
+ endfunc
+
++.section .rodata
++
+ .align 5
+ .Lcoeffs_it8:
+ .quad 0x000F00090003
+@@ -704,6 +710,8 @@ endfunc
+ .Lcoeffs:
+ .quad 0x00050002
+
++.previous
++
+ // VC-1 in-loop deblocking filter for 4 pixel pairs at boundary of
vertically-neighbouring blocks
+ // On entry:
+ // x0 -> top-left pel of lower block
+@@ -711,7 +719,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_v_loop_filter4_neon, export=1
+ sub x3, x0, w1, sxtw #2
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.s}[0], [x0], x1 // P5
+ ld1 {v2.s}[0], [x3], x1 // P1
+ ld1 {v3.s}[0], [x3], x1 // P2
+@@ -783,7 +792,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_h_loop_filter4_neon, export=1
+ sub x3, x0, #4 // where to start reading
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.8b}, [x3], x1
+ sub x0, x0, #1 // where to start writing
+ ld1 {v2.8b}, [x3], x1
+@@ -856,7 +866,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_v_loop_filter8_neon, export=1
+ sub x3, x0, w1, sxtw #2
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.8b}, [x0], x1 // P5
+ movi v2.2d, #0x0000ffff00000000
+ ld1 {v3.8b}, [x3], x1 // P1
+@@ -933,7 +944,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_h_loop_filter8_neon, export=1
+ sub x3, x0, #4 // where to start reading
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.8b}, [x3], x1 // P1[0], P2[0]...
+ sub x0, x0, #1 // where to start writing
+ ld1 {v2.8b}, [x3], x1
+@@ -1041,7 +1053,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_v_loop_filter16_neon, export=1
+ sub x3, x0, w1, sxtw #2
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.16b}, [x0], x1 // P5
+ movi v2.2d, #0x0000ffff00000000
+ ld1 {v3.16b}, [x3], x1 // P1
+@@ -1172,7 +1185,8 @@ endfunc
+ // w2 = PQUANT bitstream parameter
+ function ff_vc1_h_loop_filter16_neon, export=1
+ sub x3, x0, #4 // where to start reading
+- ldr d0, .Lcoeffs
++ adrp x4, .Lcoeffs
++ ldr d0, [x4, :lo12:.Lcoeffs]
+ ld1 {v1.8b}, [x3], x1 // P1[0], P2[0]...
+ sub x0, x0, #1 // where to start writing
+ ld1 {v2.8b}, [x3], x1
Index: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
diff -N graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
--- graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h 20 Jan 2026
17:22:00 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-
-Disable mips64-specific asm code that clang fails to assemble.
-
-Index: libavcodec/cabac_functions.h
---- libavcodec/cabac_functions.h.orig
-+++ libavcodec/cabac_functions.h
-@@ -48,7 +48,7 @@
- #if ARCH_X86
- # include "x86/cabac.h"
- #endif
--#if ARCH_MIPS
-+#if 0
- # include "mips/cabac.h"
- #endif
- #if ARCH_LOONGARCH64
Index: graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
diff -N graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h 24 Aug 2026
10:06:27 -0000
@@ -0,0 +1,89 @@
+- avcodec/mips/cabac: Fix building on OpenBSD/mips64
+ 7c533d0f86f13a06ec93968f6194349665b3536a
+
+Index: libavcodec/mips/cabac.h
+--- libavcodec/mips/cabac.h.orig
++++ libavcodec/mips/cabac.h
+@@ -101,8 +101,15 @@ static av_always_inline int get_cabac_inline_mips(CABA
+ #else
+ "slt %[tmp0], %[c_bytestream],
%[c_bytestream_end] \n\t"
+ PTR_ADDIU "%[tmp2], %[c_bytestream], 0x02
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movn %[c_bytestream], %[tmp2], %[tmp0]
\n\t"
++#else
++ "beqz %[tmp0], 2f
\n\t"
++ " nop
\n\t"
++ "move %[c_bytestream], %[tmp2]
\n\t"
++ "2:
\n\t"
+ #endif
++#endif
+ "1: \n\t"
+ : [bit]"=&r"(bit), [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1),
[tmp2]"=&r"(tmp2),
+ [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+@@ -152,14 +159,29 @@ static av_always_inline int get_cabac_bypass_mips(CABA
+ #else
+ "slt %[tmp0], %[c_bytestream], %[c_bytestream_end]
\n\t"
+ PTR_ADDIU "%[tmp1], %[c_bytestream], 0x02
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movn %[c_bytestream], %[tmp1], %[tmp0]
\n\t"
++#else
++ "beqz %[tmp0], 2f \n\t"
++ " nop \n\t"
++ "move %[c_bytestream], %[tmp1]
\n\t"
++ "2: \n\t"
+ #endif
++#endif
+ "1:
\n\t"
+ PTR_SLL "%[tmp1], %[c_range], 0x11
\n\t"
+ "slt %[tmp0], %[c_low], %[tmp1]
\n\t"
+ PTR_SUBU "%[tmp1], %[c_low], %[tmp1]
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movz %[res], %[one], %[tmp0]
\n\t"
+ "movz %[c_low], %[tmp1], %[tmp0]
\n\t"
++#else
++ "bnez %[tmp0], 2f \n\t"
++ " nop \n\t"
++ "move %[res], %[one] \n\t"
++ "move %[c_low], %[tmp1] \n\t"
++ "2: \n\t"
++#endif
+ : [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
+ [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+ [c_bytestream]"+&r"(c->bytestream)
+@@ -204,15 +226,36 @@ static av_always_inline int get_cabac_bypass_sign_mips
+ #else
+ "slt %[tmp0], %[c_bytestream], %[c_bytestream_end]
\n\t"
+ PTR_ADDIU "%[tmp1], %[c_bytestream], 0x02
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movn %[c_bytestream], %[tmp1], %[tmp0]
\n\t"
++#else
++ "beqz %[tmp0], 2f \n\t"
++ " nop \n\t"
++ "move %[c_bytestream], %[tmp1]
\n\t"
++ "2: \n\t"
+ #endif
++#endif
+ "1:
\n\t"
+ PTR_SLL "%[tmp1], %[c_range], 0x11
\n\t"
+ "slt %[tmp0], %[c_low], %[tmp1]
\n\t"
+ PTR_SUBU "%[tmp1], %[c_low], %[tmp1]
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movz %[c_low], %[tmp1], %[tmp0]
\n\t"
++#else
++ "bnez %[tmp0], 2f \n\t"
++ " nop \n\t"
++ "move %[c_low], %[tmp1]
\n\t"
++ "2: \n\t"
++#endif
+ PTR_SUBU "%[tmp1], %[zero], %[res]
\n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+ "movn %[res], %[tmp1], %[tmp0]
\n\t"
++#else
++ "beqz %[tmp0], 3f \n\t"
++ " nop \n\t"
++ "move %[res], %[tmp1]
\n\t"
++ "3: \n\t"
++#endif
+ : [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
+ [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+ [c_bytestream]"+&r"(c->bytestream)
Index: graphics/ffmpeg/patches/patch-libavformat_avformat_h
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavformat_avformat_h,v
diff -u -p -r1.7 patch-libavformat_avformat_h
--- graphics/ffmpeg/patches/patch-libavformat_avformat_h 21 May 2026
16:24:15 -0000 1.7
+++ graphics/ffmpeg/patches/patch-libavformat_avformat_h 24 Aug 2026
10:06:27 -0000
@@ -3,7 +3,7 @@ Add av_stream_get_first_dts for Chromium
Index: libavformat/avformat.h
--- libavformat/avformat.h.orig
+++ libavformat/avformat.h
-@@ -1178,6 +1178,10 @@ typedef struct AVStreamGroup {
+@@ -1229,6 +1229,10 @@ typedef struct AVStreamGroup {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
Index: graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c,v
diff -u -p -r1.4 patch-libavformat_tls_openssl_c
--- graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c 21 May 2026
16:24:15 -0000 1.4
+++ graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c 24 Aug 2026
10:06:27 -0000
@@ -1,17 +1,16 @@
Index: libavformat/tls_openssl.c
--- libavformat/tls_openssl.c.orig
+++ libavformat/tls_openssl.c
-@@ -32,13 +32,18 @@
- #include <openssl/ssl.h>
- #include <openssl/err.h>
- #include <openssl/x509v3.h>
-+#include <string.h>
+@@ -39,6 +39,8 @@
+ #endif
+ #include <string.h>
+#define TLS_ST_OK SSL_ST_OK
+
+ #define DTLS_HANDSHAKE_TIMEOUT_US 30000000
/**
* Convert an EVP_PKEY to a PEM string.
- */
+@@ -46,6 +48,8 @@
static int pkey_to_pem_string(EVP_PKEY *pkey, char *out, size_t out_sz)
{
BIO *mem = NULL;
@@ -20,7 +19,7 @@ Index: libavformat/tls_openssl.c
size_t read_bytes = 0;
if (!pkey || !out || !out_sz)
-@@ -50,9 +55,13 @@ static int pkey_to_pem_string(EVP_PKEY *pkey, char *ou
+@@ -57,9 +61,13 @@ static int pkey_to_pem_string(EVP_PKEY *pkey, char *ou
if (!PEM_write_bio_PrivateKey(mem, pkey, NULL, NULL, 0, NULL, NULL))
goto done;
@@ -35,7 +34,7 @@ Index: libavformat/tls_openssl.c
done:
BIO_free(mem);
if (out && out_sz)
-@@ -66,6 +75,8 @@ done:
+@@ -73,6 +81,8 @@ done:
static int cert_to_pem_string(X509 *cert, char *out, size_t out_sz)
{
BIO *mem = NULL;
@@ -44,7 +43,7 @@ Index: libavformat/tls_openssl.c
size_t read_bytes = 0;
if (!cert || !out || !out_sz)
-@@ -77,9 +88,13 @@ static int cert_to_pem_string(X509 *cert, char *out, s
+@@ -84,9 +94,13 @@ static int cert_to_pem_string(X509 *cert, char *out, s
if (!PEM_write_bio_X509(mem, cert))
goto done;
@@ -59,21 +58,21 @@ Index: libavformat/tls_openssl.c
done:
BIO_free(mem);
if (out && out_sz)
-@@ -801,7 +816,9 @@ static int dtls_start(URLContext *h, const char *url,
- s->mtu = 1096;
- SSL_set_options(c->ssl, SSL_OP_NO_QUERY_MTU);
- SSL_set_mtu(c->ssl, s->mtu);
+@@ -847,7 +861,9 @@ static int tls_open(URLContext *h, const char *uri, in
+ s->mtu = 1096;
+ SSL_set_options(c->ssl, SSL_OP_NO_QUERY_MTU);
+ SSL_set_mtu(c->ssl, s->mtu);
+#ifdef DTLS_set_link_mtu
- DTLS_set_link_mtu(c->ssl, s->mtu);
+ DTLS_set_link_mtu(c->ssl, s->mtu);
+#endif
- init_bio_method(h);
+ }
- /* This seems to be necessary despite explicitly setting client/server
method above. */
-@@ -925,10 +942,12 @@ static int tls_write(URLContext *h, const uint8_t *buf
+ init_bio_method(h);
+@@ -960,10 +976,12 @@ static int tls_write(URLContext *h, const uint8_t *buf
uc->flags &= ~AVIO_FLAG_NONBLOCK;
uc->flags |= h->flags & AVIO_FLAG_NONBLOCK;
-+#ifdef DTLS_get_link_mtu
++#ifdef DTLS_get_data_mtu
if (s->is_dtls) {
const size_t mtu_size = DTLS_get_data_mtu(c->ssl);
size = FFMIN(size, mtu_size);
Index: graphics/ffmpeg/patches/patch-libavutil_aarch64_tx_float_neon_S
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavutil_aarch64_tx_float_neon_S
diff -N graphics/ffmpeg/patches/patch-libavutil_aarch64_tx_float_neon_S
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libavutil_aarch64_tx_float_neon_S 24 Aug
2026 12:49:55 -0000
@@ -0,0 +1,24 @@
+Index: libavutil/aarch64/tx_float_neon.S
+--- libavutil/aarch64/tx_float_neon.S.orig
++++ libavutil/aarch64/tx_float_neon.S
+@@ -439,7 +439,8 @@ FFT16_FN float, 0
+ FFT16_FN ns_float, 1
+
+ .macro SETUP_SR_RECOMB len, re, im, dec
+- ldr w5, =(\len - 4*7)
++ mov w5, #(\len)
++ sub w5, w5, #(4*7)
+ movrel \re, X(ff_tx_tab_\len\()_float)
+ add \im, \re, x5
+ mov \dec, #-32
+@@ -928,8 +929,8 @@ FFT32_FN ns_float, 1
+ bl 32b
+ ldp x20, x30, [sp], #16
+ AARCH64_VALIDATE_LINK_REGISTER
+- ldr w5, =(\len*6 + \len/2)
+- sub x1, x1, x5
++ sub x1, x1, #(\len*6)
++ sub x1, x1, #(\len/2)
+
+ SETUP_SR_RECOMB \len, x7, x8, x9
+
Index: graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
===================================================================
RCS file:
graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
diff -N graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
24 Aug 2026 10:06:27 -0000
@@ -0,0 +1,35 @@
+Index: libswscale/x86/hscale_fast_bilinear_simd.c
+--- libswscale/x86/hscale_fast_bilinear_simd.c.orig
++++ libswscale/x86/hscale_fast_bilinear_simd.c
+@@ -53,6 +53,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+ // code fragment
+
+ __asm__ volatile (
++ ".pushsection .rodata \n\t"
+ "jmp 9f \n\t"
+ // Begin
+ "0: \n\t"
+@@ -76,6 +77,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+ "add $8, %%"FF_REG_a" \n\t"
+ // End
+ "9: \n\t"
++ ".popsection \n\t"
+ "lea " LOCAL_MANGLE(0b) ", %0 \n\t"
+ "lea " LOCAL_MANGLE(1b) ", %1 \n\t"
+ "lea " LOCAL_MANGLE(2b) ", %2 \n\t"
+@@ -92,6 +94,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+ );
+
+ __asm__ volatile (
++ ".pushsection .rodata \n\t"
+ "jmp 9f \n\t"
+ // Begin
+ "0: \n\t"
+@@ -113,6 +116,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+ "add $8, %%"FF_REG_a" \n\t"
+ // End
+ "9: \n\t"
++ ".popsection \n\t"
+ "lea " LOCAL_MANGLE(0b) ", %0 \n\t"
+ "lea " LOCAL_MANGLE(1b) ", %1 \n\t"
+ "lea " LOCAL_MANGLE(2b) ", %2 \n\t"
Index: graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
diff -N graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
--- graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm 13 Jun 2026
11:17:07 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: libswscale/x86/ops_int.asm
---- libswscale/x86/ops_int.asm.orig
-+++ libswscale/x86/ops_int.asm
-@@ -106,6 +106,7 @@ IF %1 > 3, mov out3q, [execq + SwsOpExec.out3]
- %endif
- align function_align
- current_function %+ _return:
-+ _CET_ENDBR
-
- ; op chain always returns back here
- mov implq, [rsp + 8]
Index: graphics/ffmpeg/pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/pkg/PLIST,v
diff -u -p -r1.45 PLIST
--- graphics/ffmpeg/pkg/PLIST 21 May 2026 16:24:15 -0000 1.45
+++ graphics/ffmpeg/pkg/PLIST 24 Aug 2026 10:06:27 -0000
@@ -122,6 +122,7 @@ include/libavutil/pixelutils.h
include/libavutil/pixfmt.h
include/libavutil/random_seed.h
include/libavutil/rational.h
+include/libavutil/raw_color_params.h
include/libavutil/rc4.h
include/libavutil/refstruct.h
include/libavutil/replaygain.h
Index: x11/mplayer/Makefile
===================================================================
RCS file: /cvs/ports/x11/mplayer/Makefile,v
diff -u -p -r1.344 Makefile
--- x11/mplayer/Makefile 19 Aug 2026 12:56:58 -0000 1.344
+++ x11/mplayer/Makefile 24 Aug 2026 10:06:27 -0000
@@ -1,8 +1,8 @@
COMMENT= movie player supporting many formats
V= 20251123
-FFMPEG_V= 8.1.2
-REVISION= 4
+FFMPEG_V= 9.0.1
+REVISION= 5
DISTNAME= mplayer-${V}
CATEGORIES= x11 multimedia
SITES= https://comstyle.com/source/