Skip to content

Commit 0c3e266

Browse files
committed
helpers: v4l2_device: Add TDN/Stitch Input nodes
These should be exposed for full functionality. Signed-off-by: Naushir Patuck <[email protected]>
1 parent 8002515 commit 0c3e266

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/helpers/backend_device.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ void BackendDevice::Setup(const pisp_be_tiles_config &config, unsigned int buffe
6262
nodes_enabled_.emplace("pispbe-output1");
6363
}
6464

65+
if (config.config.global.bayer_enables & PISP_BE_BAYER_ENABLE_TDN_INPUT)
66+
{
67+
nodes_.at("pispbe-tdn_input").SetFormat(config.config.tdn_input_format, use_opaque_format);
68+
// Release old/allocate a single buffer.
69+
nodes_.at("pispbe-tdn_input").ReturnBuffers();
70+
nodes_.at("pispbe-tdn_input").RequestBuffers(buffer_count);
71+
nodes_enabled_.emplace("pispbe-tdn_input");
72+
}
73+
6574
if (config.config.global.bayer_enables & PISP_BE_BAYER_ENABLE_TDN_OUTPUT)
6675
{
6776
nodes_.at("pispbe-tdn_output").SetFormat(config.config.tdn_output_format, use_opaque_format);
@@ -71,6 +80,15 @@ void BackendDevice::Setup(const pisp_be_tiles_config &config, unsigned int buffe
7180
nodes_enabled_.emplace("pispbe-tdn_output");
7281
}
7382

83+
if (config.config.global.bayer_enables & PISP_BE_BAYER_ENABLE_STITCH_INPUT)
84+
{
85+
nodes_.at("pispbe-stitch_input").SetFormat(config.config.stitch_input_format, use_opaque_format);
86+
// Release old/allocate a single buffer.
87+
nodes_.at("pispbe-stitch_input").ReturnBuffers();
88+
nodes_.at("pispbe-stitch_input").RequestBuffers(buffer_count);
89+
nodes_enabled_.emplace("pispbe-stitch_input");
90+
}
91+
7492
if (config.config.global.bayer_enables & PISP_BE_BAYER_ENABLE_STITCH_OUTPUT)
7593
{
7694
nodes_.at("pispbe-stitch_output").SetFormat(config.config.stitch_output_format, use_opaque_format);

src/helpers/v4l2_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int V4l2Device::QueueBuffer(unsigned int index)
175175
if (!buf)
176176
return -1;
177177

178-
v4l2_plane planes[VIDEO_MAX_PLANES];
178+
v4l2_plane planes[VIDEO_MAX_PLANES] = {};
179179
if (!isMeta())
180180
{
181181
buf->buffer.m.planes = planes;

0 commit comments

Comments
 (0)