From cc077a0c0678fdd651699e5b365a5f5cbe3b5fda Mon Sep 17 00:00:00 2001 From: claude-noether Date: Tue, 12 May 2026 14:11:32 +0000 Subject: [PATCH] =?UTF-8?q?fresnel-fourier=20iter5b-=CE=B2=20Phase=206=20c?= =?UTF-8?q?ommit=20B:=20config.c=20=E2=80=94=20wire=20object=5Fconfig->pix?= =?UTF-8?q?elformat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Populate the previously-dead pixelformat field at config.h:46 from pixelformat_for_profile(profile). The switch at lines 54-88 already rejects unsupported profiles, so by the time we reach the assignment at line 98, pixelformat_for_profile returns non-zero. Commit C reads this field at CreateContext to set the V4L2 OUTPUT format correctly per profile (the β architectural fix for Bug 2 — HEVC/VP9/VP8 currently dispatch through the pre-iter5b H264_SLICE hardcode at surface.c:173 because surface.c has no config_id to look up the profile). Signed-off-by: claude-noether --- src/config.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/config.c b/src/config.c index b4c6cfb..0ff19ea 100644 --- a/src/config.c +++ b/src/config.c @@ -36,6 +36,7 @@ #include +#include "codec.h" #include "utils.h" #include "v4l2.h" @@ -97,6 +98,16 @@ VAStatus RequestCreateConfig(VADriverContextP context, VAProfile profile, config_object->profile = profile; config_object->entrypoint = entrypoint; + /* + * iter5b-β: cache the V4L2 OUTPUT-side FOURCC for this profile so + * context.c::RequestCreateContext can read it without re-running + * the profile→pixelformat mapping. Wires up the previously-dead + * pixelformat field at config.h:46. The switch above already + * rejected unsupported profiles via VA_STATUS_ERROR_UNSUPPORTED_PROFILE, + * so pixelformat_for_profile here returns non-zero for every + * profile that reaches this assignment. + */ + config_object->pixelformat = pixelformat_for_profile(profile); config_object->attributes[0].type = VAConfigAttribRTFormat; config_object->attributes[0].value = VA_RT_FORMAT_YUV420; config_object->attributes_count = 1;