fresnel-fourier iter5b Phase 6 commit B: state-tracking — request.h field + config.c wire-up
request.h: add last_output_pixelformat to struct request_data, alongside
the existing last_output_{width,height} V4L2 device state cache. Gates
re-S_FMT on codec change in addition to resolution change.
config.c::RequestCreateConfig: wire up object_config->pixelformat
(previously dead field at config.h:46) by calling pixelformat_for_profile
on the active profile. The pixelformat field becomes the source of truth
that surface.c reads in commit C.
Signed-off-by: claude-noether <claude-noether@reauktion.de>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <hevc-ctrls.h>
|
||||
|
||||
#include "codec.h"
|
||||
#include "utils.h"
|
||||
#include "v4l2.h"
|
||||
|
||||
@@ -97,6 +98,15 @@ 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
|
||||
* surface.c::CreateSurfaces2 can read it without re-running the
|
||||
* profile→pixelformat mapping. Wires up the previously-dead
|
||||
* pixelformat field at config.h:46. Returns 0 for unhandled
|
||||
* profiles, which the switch above already rejects via
|
||||
* VA_STATUS_ERROR_UNSUPPORTED_PROFILE.
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user