Message ID | 20250723223907.23698-1-laurent.pinchart@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
On Thu, Jul 24, 2025 at 01:39:07AM +0300, Laurent Pinchart wrote: > To debug color issues in a pipeline it is necessary to know the color > space used. Therefore add the color space to the string representation > of V4L2DeviceFormat that is returned by toString() and operator<<(). The > format gets for example printed as > > [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> LGTM, Reviewed-by: Umang Jain <uajain@igalia.com> > --- > src/libcamera/v4l2_videodevice.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 76bdad40ca8d..71cc7e895d8c 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const > */ > std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) > { > - out << f.size << "-" << f.fourcc; > + out << f.size << "-" << f.fourcc << "/" > + << ColorSpace::toString(f.colorSpace); > return out; > } > > > base-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe > -- > Regards, > > Laurent Pinchart >
Quoting Laurent Pinchart (2025-07-24 07:39:07) > To debug color issues in a pipeline it is necessary to know the color > space used. Therefore add the color space to the string representation > of V4L2DeviceFormat that is returned by toString() and operator<<(). The > format gets for example printed as > > [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/libcamera/v4l2_videodevice.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 76bdad40ca8d..71cc7e895d8c 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const > */ > std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) > { > - out << f.size << "-" << f.fourcc; > + out << f.size << "-" << f.fourcc << "/" > + << ColorSpace::toString(f.colorSpace); > return out; > } > > > base-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe > -- > Regards, > > Laurent Pinchart >
Quoting Laurent Pinchart (2025-07-23 23:39:07) > To debug color issues in a pipeline it is necessary to know the color > space used. Therefore add the color space to the string representation > of V4L2DeviceFormat that is returned by toString() and operator<<(). The > format gets for example printed as > > [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC I was about to say ... but we already did this ... and now I see this is the V4L2Device, and we've only extended the V4L2SubDevice so aligning both with this definitely helps. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/libcamera/v4l2_videodevice.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp > index 76bdad40ca8d..71cc7e895d8c 100644 > --- a/src/libcamera/v4l2_videodevice.cpp > +++ b/src/libcamera/v4l2_videodevice.cpp > @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const > */ > std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) > { > - out << f.size << "-" << f.fourcc; > + out << f.size << "-" << f.fourcc << "/" > + << ColorSpace::toString(f.colorSpace); > return out; > } > > > base-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe > -- > Regards, > > Laurent Pinchart >
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 76bdad40ca8d..71cc7e895d8c 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const */ std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) { - out << f.size << "-" << f.fourcc; + out << f.size << "-" << f.fourcc << "/" + << ColorSpace::toString(f.colorSpace); return out; }
To debug color issues in a pipeline it is necessary to know the color space used. Therefore add the color space to the string representation of V4L2DeviceFormat that is returned by toString() and operator<<(). The format gets for example printed as [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- src/libcamera/v4l2_videodevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe -- Regards, Laurent Pinchart