Skip to content

Commit ab4eeaf

Browse files
naushir6by9
authored andcommitted
gst: Add pispconvert GStreamer element
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>
1 parent 983b912 commit ab4eeaf

7 files changed

Lines changed: 1845 additions & 1 deletion

File tree

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,50 @@ libpisp_dep = dependency('libpisp', fallback : ['libpisp', 'libpisp_dep'])
2424

2525
Alternatively [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) can be used to locate ``libpisp.so`` installed in of the system directories for other build environments.
2626

27+
## Command-Line Tools
28+
29+
### convert
30+
31+
A simple command-line image converter that uses the PiSP Backend for hardware-accelerated format conversion and scaling.
32+
33+
```sh
34+
pisp_convert input.yuv output.rgb \
35+
--input-format 1920:1080:1920:YUV420P \
36+
--output-format 1280:720:3840:RGB888
37+
```
38+
39+
Format strings use the form `width:height:stride:format`. Use `--formats` to list available formats, or `--list` to enumerate available PiSP devices.
40+
41+
## GStreamer Element
42+
43+
libpisp includes a GStreamer element (`pispconvert`) that provides hardware-accelerated image scaling and format conversion using the PiSP Backend.
44+
45+
### Building with GStreamer Support
46+
47+
GStreamer support is enabled by default if the required dependencies are found. To explicitly enable or disable:
48+
49+
```sh
50+
meson setup <build_dir> -Dgstreamer=enabled # require GStreamer support
51+
meson setup <build_dir> -Dgstreamer=disabled # disable GStreamer support
52+
```
53+
54+
### Using the Element
55+
56+
After installation, the element will be available as `pispconvert`:
57+
58+
```sh
59+
gst-inspect-1.0 pispconvert
60+
```
61+
62+
For usage examples and supported formats, see [src/gst/usage.md](src/gst/usage.md).
63+
64+
### Testing Without Installing
65+
66+
To test the plugin without installing:
67+
68+
```sh
69+
GST_PLUGIN_PATH=<build_dir>/src/gst gst-inspect-1.0 pispconvert
70+
```
71+
2772
## License
2873
Copyright © 2023, Raspberry Pi Ltd. Released under the BSD-2-Clause License.

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
option('logging', type : 'feature', value : 'auto')
55
option('examples', type : 'boolean', value : false)
6+
option('gstreamer', type : 'feature', value : 'auto', description : 'Build GStreamer plugin')

0 commit comments

Comments
 (0)