<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/multimedia/ffmpeg/patches/151-v4l2-request-define-Raspberry-Pi-SAND128-formats.patch, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git-03.infra.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/'/>
<updated>2026-11-15T00:04:03Z</updated>
<entry>
<title>ffmpeg: update V4L2 Request, add RPi DRM PRIME, trust store</title>
<updated>2026-11-15T00:04:03Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-11-11T19:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/feed/packages/commit/?id=60aae222edbbcf3fcd1e9b570cabba28d5e06520'/>
<id>urn:sha1:60aae222edbbcf3fcd1e9b570cabba28d5e06520</id>
<content type='text'>
Move the V4L2 Request patches to the head of FFmpeg pull request 20847
(3ac4e07593ee), Jonas Karlman's submission of them, as
120-v4l2-request-01 to -11. Their hwcontext maps the capture formats
rpi-hevc-dec prefers, NV12MT_COL128 and NV12MT_10_COL128, only where
linux/videodev2.h defines them, which the toolchain's kernel headers do
not, so patch 151 defines them with the Raspberry Pi kernel's values.

Patch 121, Arun Iyengar's fix from that pull request, hands each frame a
reference-counted session object, so that a frame returned after an SPS
change re-created the hwaccel finds its session closed and needs no
wait; FFmpeg crashed or hung on such HEVC streams. Patch 122 sets the
EXT SPS RPS controls of Linux 7.0, from which rkvdec's HEVC decoders
take the reference picture sets a slice header selects, and patch 152
defines them for the toolchain's kernel headers.

The V4L2 M2M decoders copy every picture into a software frame, so a
player cannot hand a stateful decoder's capture buffers to the display
as it does with the V4L2 Request hwaccels; the Raspberry Pi 4's H.264
decoder is stateful. Carry LibreELEC's v4l2-drmprime series, rebased
for FFmpeg 9 in LibreELEC commit cd0c6aab93d9 ("ffmpeg: rebase and
re-enable v4l2-drmprime patches"), one file per patch of
packages/multimedia/ffmpeg/patches/v4l2-drmprime/0001-v4l2-drmprime.patch:
  130-v4l2-drmprime-01 to -08 (Lukas Rusak): DRM PRIME output, a DRM
    hwcontext, software pixel formats, a pixel format option and flush
  130-v4l2-drmprime-09 (Rudi Heitbaum): adapt to FFmpeg 9
The decoders include libdrm's drm_fourcc.h, so FFMPEG_V4L2_M2M selects
FFMPEG_LIBDRM. Patches 200 and 201 are refreshed.

The series allocates a DRM hwdevice context per decoder and a hwframes
context per queue and keeps them for the life of the process. Patch 131
releases all three when the decoder context is destroyed.

Give the mbedtls backend, the package's default TLS backend, a trust
store, so that https works with peer verification on, as it is by
default. Take the patch submitted upstream, which reads SSL_CERT_FILE
and otherwise the system bundle.

Let a caller keep a network stream on one uplink of a multi-homed
host. Patches 172 and 173, submitted upstream, make the segment and key
connections of an HLS or DASH stream inherit local_addr from the
playlist connection. Patches 175 and 176, submitted upstream, add
local_dev to the tcp and udp protocols, which binds the socket to a
named device with SO_BINDTODEVICE, joins multicast groups on that
device and is inherited the same way.

Since FFmpeg 9.0, struct Program in the MPEG-TS demuxer is about
131 KiB, and pat_cb() and pmt_cb() each keep one on the stack. The
ffmpeg program demuxes every input in a thread with musl's default
stack of 128 KiB, so it crashes on any MPEG-TS input. Backport FFmpeg
commit 6edbe0d5af28 ("avformat/mpegts: avoid ~131 KiB stack frames in
PAT/PMT callbacks"), which swaps two programs member by member and
copies only the stream list of the previous program.

Fixes: e1a07d05b984 ("ffmpeg: add V4L2 hardware decoding patches from LibreELEC")
Fixes: 785210230381 ("ffmpeg: update to 9.0.1")
Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847
Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24565
Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24566
Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25960
Link: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26065
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
