Skip to content

Adding gst pispconvert component#61

Open
6by9 wants to merge 8 commits intomainfrom
gst_clean
Open

Adding gst pispconvert component#61
6by9 wants to merge 8 commits intomainfrom
gst_clean

Conversation

@6by9
Copy link
Collaborator

@6by9 6by9 commented Feb 17, 2026

In @naushir 's absence, @davidplowman / @njhollinghurst would one of you be able to review the first 7 patches as they affect the main libpisp library.

The last is the squash of all the development GStreamer patches, and I'm not expecting you to be able to review it. Hopefully I've now kept it clean and it's only touching the gst directory or meson build files, so if there are any major goofs then they have limited effect.

naushir and others added 8 commits February 17, 2026 13:18
This is needed to compile correcly without earlier header inclusion.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
- Add Buffer and BufferRef classes for managing V4L2 buffers
- Add DmaHeap helper for dmabuf allocation
- Add caching for v4l2_format to reduce ioctl calls
- Improve buffer queue tracking
- Add dmabuf allocator support to BackendDevice
- Optimize stream on/off handling
- Update convert example for new buffer API

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Correct the stride calucation and add YUV420SP, YUV420SP_COL128,
and YUV420SP10_COL128 identifiers.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Add a GStreamer element for hardware-accelerated image scaling and
format conversion using the PiSP Backend.

Features:
- Single and dual output support
- DMABuf input/output for zero-copy pipelines
- Software buffer fallback
- Crop support with per-output configuration
- Format conversion between RGB, YUV420, YUV422, etc.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
@njhollinghurst
Copy link
Collaborator

Does any of this only work on 2712D0?
In which case, should we at least be asserting variant->BackendRGB32Supported(0) (as in convert.cpp)?
There isn't an explicit way to test for colour matrix offset bit-depth, but the above would check for that as well...

@6by9
Copy link
Collaborator Author

6by9 commented Feb 17, 2026

It runs on C1, but doesn't give correct results when given limited range colorimetry or for 32bpp RGB output.

You've implied the colorimetry issue could be fixed using other blocks, but I'll claim ignorance on that.
32bpp RGB could add the caveat with variant->BackendRGB32Supported(0). Varying the GStreamer caps based on that is possible but a little involved.

AIUI the initial user wanting this will be on Compute Modules, so those are all D0.

@6by9
Copy link
Collaborator Author

6by9 commented Feb 17, 2026

CI failing due to apt issues

2026-02-17T13:27:26.6145314Z Err:1 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 libboost1.83-dev arm64 1.83.0-2.1ubuntu3.1
2026-02-17T13:27:26.6145892Z   404  Not Found [IP: 91.189.92.19 80]

Fun!

@6by9
Copy link
Collaborator Author

6by9 commented Feb 19, 2026

This week hasn't gone quite to plan, so I'll leave this for @naushir to sort out when he's back.

There is one further tweak required to the component anyway to copy the input width and height to the output if not specified on the output, otherwise the PiSP setup fails as the width/height are both 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments