Skip to content

Kernel 6.18#44

Open
Cn8001 wants to merge 8 commits into
bootlin:masterfrom
Cn8001:kernel-6.18
Open

Kernel 6.18#44
Cn8001 wants to merge 8 commits into
bootlin:masterfrom
Cn8001:kernel-6.18

Conversation

@Cn8001

@Cn8001 Cn8001 commented Jun 12, 2026

Copy link
Copy Markdown

This pull request introduces significant changes to support the Linux kernel 6.x stateless codec API, modernizes the codebase to use upstream V4L2 control headers, and improves H.264 decoding reliability and compatibility. Key updates include a new documentation addendum for kernel 6.x, replacement of custom control headers with standard kernel headers, refactoring to use stateless V4L2 controls, and several fixes to the H.264 decoding pipeline.

Kernel 6.x port and documentation:

  • README.md: Added a comprehensive addendum describing the port to the kernel 6.x stateless codec API, usage instructions, supported hardware, limitations, and verification methods.

Modernization: Upstream V4L2 control headers:

  • src/config.c, src/context.c, src/h264.c, src/h265.c: Replaced custom codec control headers (e.g., h264-ctrls.h, hevc-ctrls.h) with the upstream <linux/v4l2-controls.h>, aligning with kernel 6.x and reducing maintenance burden. [1] [2] [3] [4]
  • include/h264-ctrls.h, include/hevc-ctrls.h: Added guards to avoid conflicts with upstream kernel headers. [1] [2] [3] [4] [5] [6]

Stateless V4L2 controls and H.264 pipeline fixes:

  • src/h264.c: Updated to use stateless V4L2 control IDs (e.g., V4L2_CID_STATELESS_H264_*) instead of legacy MPEG controls, and split slice prediction weights into a dedicated control as required by the stateless API.
  • src/h264.c: Fixed and improved H.264 DPB and slice parameter handling, including proper filling of reference fields, passing of scaling matrix flags, and correct mapping of picture parameters. [1] [2] [3] [4] [5] [6] [7]

Profile detection and context creation improvements:

  • src/config.c, src/context.c: Improved detection of supported profiles and pixel formats, including support for single- and multi-planar output queues, and switched to the correct H.264 slice format (V4L2_PIX_FMT_H264_SLICE). [1] [2] [3] [4]
  • src/context.c, src/context.h: Ensured a buffer pool is always created for the output queue, even when no surfaces are provided at context creation, improving compatibility with modern libva clients. [1] [2]

These changes collectively bring the codebase up to date with the latest Linux stateless video decoding APIs, improve hardware compatibility, and enhance robustness for modern VA-API clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant