forked from marfrit/libva-v4l2-request-fourier
iter39 fresnel fix: skip pre-S_FMT NV15 CAPTURE format probe
RK3399 rkvdec advertises NV15 in VIDIOC_ENUM_FMT(CAPTURE) only AFTER S_FMT(OUTPUT) + S_EXT_CTRLS(SPS) resolve image_fmt to 420_10BIT. Pre-flight v4l2_find_format(NV15) always returns 0 → video_format stays NULL → CreateContext returns OPERATION_FAILED → ffmpeg-vaapi hwaccel init fails with "Failed to create decode context: 1". Verified on fresnel (kernel 7.0-14 / linux-fresnel-fourier): v4l2-ctl -d /dev/video1 --list-formats → only NV12 enumerated Fix: for 10-bit profiles, skip the find_format probe and directly map to our NV15 video_format entry. The later S_FMT(CAPTURE) in the same RequestCreateContext path commits the actual NV15 mode once the synthetic-SPS injection sets bit_depth_luma_minus8=2. Discovered during Phase 7 sub-profile verification — Criterion 1 (vainfo enumeration) PASSed but Criteria 2/3 (Hi10P/Main10 decode) failed with the hwaccel init error. iter38 5/5 baseline still PASSES (no regression — non-10-bit path unchanged). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+10
-4
@@ -142,10 +142,16 @@ VAStatus RequestCreateContext(VADriverContextP context, VAConfigID config_id,
|
||||
if (found)
|
||||
video_format = video_format_find(V4L2_PIX_FMT_NV12);
|
||||
} else {
|
||||
found = v4l2_find_format(driver_data->video_fd,
|
||||
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
|
||||
V4L2_PIX_FMT_NV15);
|
||||
if (found)
|
||||
/*
|
||||
* iter39 fresnel fix: rkvdec only advertises NV15 in
|
||||
* VIDIOC_ENUM_FMT(CAPTURE) AFTER S_FMT(OUTPUT) +
|
||||
* S_EXT_CTRLS(SPS) resolve image_fmt to 420_10BIT.
|
||||
* Before that, only NV12 is enumerated. Pre-finding
|
||||
* NV15 always fails. Skip the find_format check and
|
||||
* directly map to our NV15 video_format entry; the
|
||||
* later S_FMT(CAPTURE) commits the actual NV15 mode
|
||||
* once the synthetic SPS sets bit_depth_luma_minus8=2.
|
||||
*/
|
||||
video_format = video_format_find(V4L2_PIX_FMT_NV15);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user