[libcamera-devel] [PATCH v6 0/1] Provide multiple colorimetry for libcamerasrc.
Rishikesh Donadkar
rishikeshdonadkar at gmail.com
Mon Sep 19 04:57:08 CEST 2022
GStreamer pipeline supports passing multiple colorimetry as a comma
separated list.
For Example :
gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={bt2020,bt709,sRGB}" ! glimagesink
In this case, if supported by the camera one of bt2020, bt709, sRGB
should be applied.
This series aims to adds multiple colorimetry support to the libcamera
gstreamer element.
---
changes from v1 to v2:
- Moved the function colorspace_from_colorimetry() from PATCH 1/2 to
PATCH 2/2.
changes from v2 to v3:
- Rebase on top of [v3 PATCH 4/4] gstreamer: Provide colorimetry <> ColorSpace mappings.
- Use the comparator utility function gst_video_colorimetry_is_equal()
to cut down code.
- Rename dup_stream_cfg to pristine_stream_cfg.
- Log the colorimetry that is selected from the list.
- Change the API for the function gst_libcamera_configure_stream_from_caps()
to pass pass state->config_ here instead of taking it in a holder
variable reference.
changes from v3 to v4:
- Discard the approach form expanding the colorimetry list through caps
normalization. Instead enumerate the colorimetry list and try out the
colorimetry.
- Add error checking for invalid colorimetry.
changes for v4 to v5:
- Use gboolean instead of int. Return true/false.
- Add else if for the mutually exclusive conditions.
- Add final else to trace if anything other than a string or a list is
passed in the colorimetry field by the user.
changes from v5 to v6:
- Compare colorspace instead of colorimetry, this will reduce the
colorimetry<->colorspace conversion.
- Compare the colorspace applied directly with the colorimetry requested
in the caps.
---
----
Test results(on RPi 4 + OV5647):
gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={bt2020,bt709,sRGB}" ! glimagesink
Selected colorimetry bt709
gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={sRGB,bt601,bt2020,bt709}" ! glimagesink
Negotiation fails on bt601.
gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={sRGB,bt601,bt2020,bt709,2:4:5:4}" ! glimagesink
Selected colorimetry bt601.
gst-launch-1.0 libcamerasrc ! "video/x-raw,colorimetry={sRGB,bt709,bt2020,bt601}" ! glimagesink
Selected colorimetry bt709
----
Rishikesh Donadkar (1):
gstreamer: Provide multiple colorimetry support for libcamerasrc
src/gstreamer/gstlibcamera-utils.cpp | 49 +++++++++++++++++++++++-----
src/gstreamer/gstlibcamera-utils.h | 4 ++-
src/gstreamer/gstlibcamerasrc.cpp | 2 +-
3 files changed, 44 insertions(+), 11 deletions(-)
--
2.25.1
More information about the libcamera-devel
mailing list