Commit Graph

28 Commits

Author SHA1 Message Date
test0r 07fd527114 WIP: more entry-point tracing (CreateConfig, GetConfigAttributes, QuerySurfaceAttributes, QueryConfigEntrypoints)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:25:36 +00:00
test0r 2f54a8d9e8 src/config.c: probe both single- and multi-plane V4L2 buffer types
Bootlin's original probe assumed single-plane decoders (the sunxi-cedrus
target the library was originally written for). Rockchip's hantro VPU
on RK3566/RK3588 reports V4L2_CAP_VIDEO_M2M_MPLANE only — the single-
plane VIDIOC_ENUM_FMT path returns nothing, so vainfo prints an empty
"Supported profile and entrypoints" list and downstream apps fall back
to software.

Add an OUTPUT_MPLANE fallback to all three format probes (MPEG-2, H.264,
HEVC). On a single-plane decoder the second probe is a no-op; on a
multi-plane decoder it's what makes the profile list non-empty.

This is the *probe* fix only — it gets vainfo to enumerate profiles and
gets Brave's GPU process to attempt vaCreateContext. The rest of the
multiplanar port (S_FMT / REQBUFS / EXPBUF / QBUF in context.c, picture.c,
v4l2.c) is the next phase; vaCreateContext currently fails because
those paths are still single-plane only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:27:46 +00:00
test0r c1f5108ac3 include/h264-ctrls.h, src/config.c: rename to V4L2_PIX_FMT_H264_SLICE
Kernel mainline renamed V4L2_PIX_FMT_H264_SLICE_RAW → V4L2_PIX_FMT_H264_SLICE
some time after this library went dormant (the 'S264' fourcc value is
unchanged; only the C identifier moved). The two definitions have the same
value so this is purely cosmetic at runtime, but keeping the name aligned
with linux/videodev2.h matches downstream patches (e.g. bootlin PR #38)
and avoids confusion when reading kernel + library side-by-side.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:13:11 +00:00
Paul Kocialkowski 7f359be748 Include missing needed codec headers for build
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-05-16 16:32:03 +02:00
Paul Kocialkowski d48ace9757 Update H.264 V4L2 pixel format, which was renamed
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-05-16 16:24:23 +02:00
Paul Kocialkowski e29b04ccc7 autotools: Rewrite configuration in a minimalistic fashion
Drop the per-codec options while at it, since we'll soon include a copy
of the associated headers.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Paul Kocialkowski 518d7a0c59 Update and harmonize heading author lists
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Jernej Skrabec a816436baf config: fix building with h264 enabled
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
2018-10-31 18:10:47 +01:00
Ezequiel Garcia b2944629fa Add support for dynamic detection of supported codecs
H.264 and H.265 support is still not supported upstream,
so it makes sense to autodetect each codec and only
enable those that are supported.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2018-10-12 16:11:06 -03:00
Paul Kocialkowski 7ff2543e64 Add support for the single-planar V4L2 API
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-09-07 16:43:13 +02:00
Paul Kocialkowski 13eaae060e Add support for H265 decoding, including predictive frames
Some features are missing, such as scaling lists (quantization) and
10-bit output.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-08-31 10:13:52 +02:00
Maxime Ripard 92f6546596 tree: Remove void * casts
void * can be assigned from and stored to any pointer type without any
warning. Remove the explicit casts.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 111f5b209a tree: Rename cedrus_data to request_data
The cedrus_data structure carries the old name. In order to migrate to the
new name, let's rename it to request_data.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 4ad990e087 tree: Rename the header and defines
The sunxi_cedrus.h header contains a bunch of defines prefixed with
SUNXI_CEDRUS.

As part as the ongoing migration to a more generic name, change that prefix
for V4L2_REQUEST, and the header file to request.h

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 913e1e642c tree: Rename the libva hooks
As part of our renaming effort, Rename the libva hooks names to mention
request instead of SunxiCedrus

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 5aeb07f8bf tree: Run clang-format to conform to the kernel coding style
The coding style has been a bit erratic. Enforce the linux kernel coding
style by reusing their .clang-format file, running clang-format on the
source, and ignoring the few shortcomings that clang-format has at the
moment (especially on aligning the define values).

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 10:12:15 +02:00
Maxime Ripard b938824c48 tree: Shorten struct sunxi_cedrus_driver_data name
This long structure name makes it quite difficult to fit within the 80
characters limit. Shorten it.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 09:34:15 +02:00
Maxime Ripard fd263773cc tree: Change the macros to take the actual arguments they are using
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-13 16:00:08 +02:00
Maxime Ripard 1efa9d877e Add support for H264 decoding
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-11 17:07:15 +02:00
Paul Kocialkowski 03fd51b3b3 Reduce switch/case indentation
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-11 15:32:52 +02:00
Paul Kocialkowski bb73d363a3 Sync with latest definitions from the Cedrus driver and requests API
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-06-21 09:30:06 +02:00
Paul Kocialkowski 3d950a24f1 config: Fix incorrect prototypes
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 17:27:37 +02:00
Paul Kocialkowski 6cd00b758c Move log function to a dedicated file and rename it along the way
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 17:12:29 +02:00
Paul Kocialkowski a8c191b544 Rename mem2mem_fd to video_fd to prepare for media introduction
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 16:40:42 +02:00
Paul Kocialkowski c7f0d7684a Introduce and use dedicated v4l2 helpers to replace inline ioctls
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 15:39:31 +02:00
Paul Kocialkowski 5139aa6731 config: Remove unsupported motion compensation entry point
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 14:45:08 +02:00
Paul Kocialkowski 7ffc3fe9fe config: Harmonize coding style and reorder functions
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 11:27:31 +02:00
Paul Kocialkowski cd31cb568c Rename va_config to config for consistency
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 17:09:19 +02:00