diff --git a/src/context.c b/src/context.c index 4785399..47bfc55 100644 --- a/src/context.c +++ b/src/context.c @@ -142,11 +142,17 @@ 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) - video_format = video_format_find(V4L2_PIX_FMT_NV15); + /* + * 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); } if (video_format == NULL) {