From d062fec65d11c72dc11f3f37e1cb1043e26916f6 Mon Sep 17 00:00:00 2001 From: claude-noether Date: Thu, 14 May 2026 10:04:16 +0000 Subject: [PATCH] =?UTF-8?q?iter25=20=CE=B1-25=20fix:=20add=20FRAME=5FMBS?= =?UTF-8?q?=5FONLY=20to=20H264=20dummy=20SPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rkvdec_h264_validate_sps doubles height when FRAME_MBS_ONLY is unset (field-to-frame). Dummy with 1080-height was failing validation as 2176 > 1080, returning -EINVAL silently (void-cast). Even though libva ignores the result of v4l2_set_controls, the side effect was leaving ctx->image_fmt at ANY → first per-frame H264_SPS still hit -EBUSY in try_or_set_cluster → setup loop broke (Bug 4 unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/context.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/context.c b/src/context.c index c05caf2..705c742 100644 --- a/src/context.c +++ b/src/context.c @@ -270,6 +270,14 @@ VAStatus RequestCreateContext(VADriverContextP context, VAConfigID config_id, (picture_height + 15) / 16 - 1; dummy_sps.profile_idc = 100; /* High */ dummy_sps.level_idc = 41; + /* + * FRAME_MBS_ONLY required: rkvdec_h264_validate_sps + * doubles height for non-frame-mbs-only streams to + * compute frame-height from field-height. Without + * this flag, dummy with (height_in_map_units+1)*16 + * = 1088 doubles to 2176 > coded_fmt 1080 → -EINVAL. + */ + dummy_sps.flags = V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY; dummy_ctrl.id = V4L2_CID_STATELESS_H264_SPS; dummy_ctrl.ptr = &dummy_sps;