]> git.99rst.org Git - openwrt-packages.git/commit
ffmpeg: add V4L2 hardware decoding patches from LibreELEC
authorMirko Vogt <redacted>
Tue, 8 Sep 2026 13:49:22 +0000 (13:49 +0000)
committerMirko Vogt <redacted>
Tue, 15 Sep 2026 20:40:22 +0000 (22:40 +0200)
commite1a07d05b984d9bd14c0a4ad6c00ee617418ce6a
tree65809494080418c207d0af80611bd8c946d996c8
parent83f634c4b338398e71be82504998b1788faafe5b
ffmpeg: add V4L2 hardware decoding patches from LibreELEC

V4L2 Request API hwaccels for stateless decoders such as Allwinner
cedrus, exporting DRM_PRIME frames, and a V4L2 M2M deinterlace filter
driving mem2mem deinterlacers such as Allwinner's sun8i-di on DRM_PRIME
frames. The hwaccels introduce the v4l2-request and libudev configure
options.

Add the FFMPEG_V4L2_REQUEST option (pulls libdrm and libudev) to the
libffmpeg menu, keep both new configure options explicitly off in the
common block like the other autodetected ones, and re-add the
*_v4l2request hwaccels under manual component selection.

Patches:
  120-v4l2-request-01 to -13: carried over from LibreELEC
    (packages/multimedia/ffmpeg/patches/v4l2-request/0001-v4l2-request.patch
    as of LibreELEC commit 79de202a10), one file per patch of the series:
    01 avutil/hwcontext: Add hwdevice type for V4L2 Request API
       (Jonas Karlman)
    02 avutil/hwcontext_v4l2request: Probe for a capable media and
       video device (Jonas Karlman)
    03 avcodec: Add common V4L2 Request API code (Jonas Karlman)
    04 avcodec/v4l2request: Add common decode support for hwaccels
       (Jonas Karlman)
    05 avcodec: Add V4L2 Request API mpeg2 hwaccel (Jonas Karlman)
    06 avcodec/h264dec: add ref_pic_marking and pic_order_cnt bit_size
       to slice context (Boris Brezillon)
    07 avcodec: Add V4L2 Request API h264 hwaccel (Jernej Skrabec)
    08 avcodec: Add V4L2 Request API hevc hwaccel (Jernej Skrabec)
    09 avcodec: Add V4L2 Request API vp8 hwaccel (Boris Brezillon)
    10 avcodec: Add V4L2 Request API vp9 hwaccel (Boris Brezillon)
    11 avcodec: Add V4L2 Request API av1 hwaccel (Jonas Karlman)
    12 avutil/hwcontext_v4l2request: Add support for AFBC_16X16_SPLIT
       pix fmts (Jernej Skrabec)
    13 avutil/hwcontext_v4l2request: Add support for BROADCOM_SAND128
       pix fmts (Jonas Karlman)
    Co-developed by Alex Bee, Benjamin Gaignard and Ezequiel Garcia.
  140-vf-deinterlace-v4l2m2m: carried over from LibreELEC
    (packages/multimedia/ffmpeg/patches/vf-deinterlace-v4l2m2m/0001-vf-deinterlace-v4l2m2m.patch
    as of LibreELEC commit 9ef6c9c6f7; Jernej Skrabec): adds the
    deinterlace_v4l2m2m filter

Headers unchanged, hunks refreshed with quilt; the patched tree is
identical to the one LibreELEC's files produce.

LibreELEC's v4l2-drmprime patch (stateful M2M decoders) is not carried:
it needs a rebase for FFmpeg 9 which LibreELEC has not done either.

The V4L2 Request API series is under review upstream as:
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20847
The patches here are taken from LibreELEC, though,
as that's the set that Kodi is built and tested against,
incl. some platform specific fixes.

Signed-off-by: Mirko Vogt <redacted>
16 files changed:
multimedia/ffmpeg/Config.in
multimedia/ffmpeg/Makefile
multimedia/ffmpeg/patches/120-v4l2-request-01.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-02.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-03.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-04.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-05.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-06.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-07.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-08.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-09.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-10.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-11.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-12.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/120-v4l2-request-13.patch [new file with mode: 0644]
multimedia/ffmpeg/patches/140-vf-deinterlace-v4l2m2m.patch [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT