pipeline: simple: Improve debug log in validate()
diff mbox series

Message ID 20250722102538.52706-1-uajain@igalia.com
State Accepted
Commit 01a9b83f3833f1ccfec22c991de747403c46ae68
Headers show
Series
  • pipeline: simple: Improve debug log in validate()
Related show

Commit Message

Umang Jain July 22, 2025, 10:25 a.m. UTC
Improve the debug log while adjusting the StreamConfiguration's
pixel format. The log should clearly indicate the requested pixel
format and the adjusted pixel format.

Signed-off-by: Umang Jain <uajain@igalia.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kieran Bingham July 22, 2025, 10:34 a.m. UTC | #1
Quoting Umang Jain (2025-07-22 11:25:38)
> Improve the debug log while adjusting the StreamConfiguration's
> pixel format. The log should clearly indicate the requested pixel
> format and the adjusted pixel format.
> 
> Signed-off-by: Umang Jain <uajain@igalia.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/simple/simple.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index efb07051..492da967 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -1204,7 +1204,9 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
>  
>                 PixelFormat pixelFormat = *it;
>                 if (cfg.pixelFormat != pixelFormat) {
> -                       LOG(SimplePipeline, Debug) << "Adjusting pixel format";
> +                       LOG(SimplePipeline, Debug)
> +                               << "Adjusting pixel format from "
> +                               << cfg.pixelFormat << " to " << pixelFormat;
>                         cfg.pixelFormat = pixelFormat;
>                         status = Adjusted;
>                 }
> -- 
> 2.50.0
>
Kieran Bingham Aug. 6, 2025, 5:08 p.m. UTC | #2
Quoting Kieran Bingham (2025-07-22 11:34:52)
> Quoting Umang Jain (2025-07-22 11:25:38)
> > Improve the debug log while adjusting the StreamConfiguration's
> > pixel format. The log should clearly indicate the requested pixel
> > format and the adjusted pixel format.
> > 
> > Signed-off-by: Umang Jain <uajain@igalia.com>
> 
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Any objections to merging this ?

Any more review tags or does anyone want to specifically test it ?

Milan, I think you're essentially the maintainer/owner of simple.cpp at
the moment - are you happy with this ?

--
Kieran


> 
> > ---
> >  src/libcamera/pipeline/simple/simple.cpp | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> > index efb07051..492da967 100644
> > --- a/src/libcamera/pipeline/simple/simple.cpp
> > +++ b/src/libcamera/pipeline/simple/simple.cpp
> > @@ -1204,7 +1204,9 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
> >  
> >                 PixelFormat pixelFormat = *it;
> >                 if (cfg.pixelFormat != pixelFormat) {
> > -                       LOG(SimplePipeline, Debug) << "Adjusting pixel format";
> > +                       LOG(SimplePipeline, Debug)
> > +                               << "Adjusting pixel format from "
> > +                               << cfg.pixelFormat << " to " << pixelFormat;
> >                         cfg.pixelFormat = pixelFormat;
> >                         status = Adjusted;
> >                 }
> > -- 
> > 2.50.0
> >
Milan Zamazal Aug. 11, 2025, 8:02 a.m. UTC | #3
Kieran Bingham <kieran.bingham@ideasonboard.com> writes:

> Quoting Kieran Bingham (2025-07-22 11:34:52)
>> Quoting Umang Jain (2025-07-22 11:25:38)
>> > Improve the debug log while adjusting the StreamConfiguration's
>> > pixel format. The log should clearly indicate the requested pixel
>> > format and the adjusted pixel format.
>> > 
>> > Signed-off-by: Umang Jain <uajain@igalia.com>
>> 
>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> Any objections to merging this ?
>
> Any more review tags or does anyone want to specifically test it ?
>
> Milan, I think you're essentially the maintainer/owner of simple.cpp at
> the moment - are you happy with this ?

Yes, it's a useful change, I have had a similar change in my raw stream
series.

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

> --
> Kieran
>
>
>> 
>> > ---
>> >  src/libcamera/pipeline/simple/simple.cpp | 4 +++-
>> >  1 file changed, 3 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
>> > index efb07051..492da967 100644
>> > --- a/src/libcamera/pipeline/simple/simple.cpp
>> > +++ b/src/libcamera/pipeline/simple/simple.cpp
>> > @@ -1204,7 +1204,9 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
>> >  
>> >                 PixelFormat pixelFormat = *it;
>> >                 if (cfg.pixelFormat != pixelFormat) {
>> > -                       LOG(SimplePipeline, Debug) << "Adjusting pixel format";
>> > +                       LOG(SimplePipeline, Debug)
>> > +                               << "Adjusting pixel format from "
>> > +                               << cfg.pixelFormat << " to " << pixelFormat;
>> >                         cfg.pixelFormat = pixelFormat;
>> >                         status = Adjusted;
>> >                 }
>> > -- 
>> > 2.50.0
>> >

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index efb07051..492da967 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1204,7 +1204,9 @@  CameraConfiguration::Status SimpleCameraConfiguration::validate()
 
 		PixelFormat pixelFormat = *it;
 		if (cfg.pixelFormat != pixelFormat) {
-			LOG(SimplePipeline, Debug) << "Adjusting pixel format";
+			LOG(SimplePipeline, Debug)
+				<< "Adjusting pixel format from "
+				<< cfg.pixelFormat << " to " << pixelFormat;
 			cfg.pixelFormat = pixelFormat;
 			status = Adjusted;
 		}